diff options
-rw-r--r-- | config/installers/daisy/network-dpdk.yaml.j2 | 9 | ||||
-rw-r--r-- | config/installers/daisy/network.yaml.j2 | 9 | ||||
-rw-r--r-- | config/pdf/pod1.encrypted.yaml | 4 | ||||
-rw-r--r-- | config/pdf/pod1.yaml | 4 | ||||
-rwxr-xr-x | config/utils/check-jinja2.sh | 2 | ||||
-rwxr-xr-x | config/utils/generate_config.py | 6 | ||||
-rw-r--r-- | labs/bii/pod1.yaml | 4 | ||||
-rw-r--r-- | labs/zte/pod1.yaml | 6 | ||||
-rw-r--r-- | labs/zte/pod2.yaml | 4 | ||||
-rw-r--r-- | labs/zte/pod3.yaml | 2 |
10 files changed, 32 insertions, 18 deletions
diff --git a/config/installers/daisy/network-dpdk.yaml.j2 b/config/installers/daisy/network-dpdk.yaml.j2 index 507e7cfc..ccd7c8c5 100644 --- a/config/installers/daisy/network-dpdk.yaml.j2 +++ b/config/installers/daisy/network-dpdk.yaml.j2 @@ -41,6 +41,7 @@ network-config-metadata: networks: + {%- set nodes_num = conf['nodes'] | length -%} {%- set networks = {} -%} {%- for key in mapping -%} {%- set net_data = conf['net_config'][mapping[key]] -%} @@ -61,7 +62,9 @@ networks: {%- set start = ".".join([ips[0], ips[1], ips[2], "10"]) -%} {%- set end = ".".join([ips[0], ips[1], ips[2], "200"]) -%} {%- endif -%} - {%- set vip = start -%} + {%- set vip = start.split(".")[3] | int -%} + {%- set vip = vip + nodes_num + 10 - (vip + nodes_num) % 10 -%} + {%- set vip = ".".join([ips[0], ips[1], ips[2], vip | string]) -%} {%- if 'gateway' in net_data -%} {%- set gateway = net_data.gateway -%} @@ -88,6 +91,10 @@ networks: 'end': '{{ end }}' vlan_id: {{ vlan }} name: '{{ key }}' + {%- if key == 'EXTERNAL' %} + network_name: 'admin_external' + mapping: 'physnet1' + {%- endif -%} {%- endfor %} interfaces: diff --git a/config/installers/daisy/network.yaml.j2 b/config/installers/daisy/network.yaml.j2 index 9eef7390..914df461 100644 --- a/config/installers/daisy/network.yaml.j2 +++ b/config/installers/daisy/network.yaml.j2 @@ -41,6 +41,7 @@ network-config-metadata: networks: + {%- set nodes_num = conf['nodes'] | length -%} {%- set networks = {} -%} {%- for key in mapping -%} {%- set net_data = conf['net_config'][mapping[key]] -%} @@ -61,7 +62,9 @@ networks: {%- set start = ".".join([ips[0], ips[1], ips[2], "10"]) -%} {%- set end = ".".join([ips[0], ips[1], ips[2], "200"]) -%} {%- endif -%} - {%- set vip = start -%} + {%- set vip = start.split(".")[3] | int -%} + {%- set vip = vip + nodes_num + 10 - (vip + nodes_num) % 10 -%} + {%- set vip = ".".join([ips[0], ips[1], ips[2], vip | string]) -%} {%- if 'gateway' in net_data -%} {%- set gateway = net_data.gateway -%} @@ -88,6 +91,10 @@ networks: 'end': '{{ end }}' vlan_id: {{ vlan }} name: '{{ key }}' + {%- if key == 'EXTERNAL' %} + network_name: 'admin_external' + mapping: 'physnet1' + {%- endif -%} {%- endfor %} interfaces: diff --git a/config/pdf/pod1.encrypted.yaml b/config/pdf/pod1.encrypted.yaml index 31548ea2..8693647d 100644 --- a/config/pdf/pod1.encrypted.yaml +++ b/config/pdf/pod1.encrypted.yaml @@ -19,7 +19,7 @@ jumphost: arch: {x86_64|aarch64} cpus: 2 # add values based on CFLAGS in GCC - cpu_cflags: {broadwell|hasewell|etc} + cpu_cflags: {broadwell|haswell|etc} # physical cores, not including hyper-threads cores: 10 memory: 32G @@ -96,7 +96,7 @@ nodes: model: S2600JF arch: x86_64 cpus: 2 - cpu_cflags: hasewell + cpu_cflags: haswell cores: 12 memory: 128G # for nodes in the same pod may have the same configuration diff --git a/config/pdf/pod1.yaml b/config/pdf/pod1.yaml index 77533bb2..d9028c23 100644 --- a/config/pdf/pod1.yaml +++ b/config/pdf/pod1.yaml @@ -19,7 +19,7 @@ jumphost: arch: {x86_64|aarch64} cpus: 2 # add values based on CFLAGS in GCC - cpu_cflags: {broadwell|hasewell|etc} + cpu_cflags: {broadwell|haswell|etc} # physical cores, not including hyper-threads cores: 10 memory: 32G @@ -77,7 +77,7 @@ nodes: model: S2600JF arch: x86_64 cpus: 2 - cpu_cflags: hasewell + cpu_cflags: haswell cores: 12 memory: 128G # for nodes in the same pod may have the same configuration diff --git a/config/utils/check-jinja2.sh b/config/utils/check-jinja2.sh index a19d2090..2953ff6a 100755 --- a/config/utils/check-jinja2.sh +++ b/config/utils/check-jinja2.sh @@ -61,7 +61,7 @@ To troubleshoot PDF parsing against a specific installer adapter, execute the following commands locally (e.g. for zte-pod2/joid): $ ./config/utils/generate_config.py \\ -y labs/zte/pod2.yaml \\ - -j ./pharos/config/installers/joid/pod_config.yaml.j2 + -j config/installers/joid/pod_config.yaml.j2 EOF exit "${RC}" diff --git a/config/utils/generate_config.py b/config/utils/generate_config.py index 37108808..dfc6e6c4 100755 --- a/config/utils/generate_config.py +++ b/config/utils/generate_config.py @@ -57,12 +57,12 @@ ENV.filters['dpkg_arch'] = dpkg_arch try: DICT = yaml.safe_load(check_output(['eyaml', 'decrypt', '-f', ARGS.yaml])) except CalledProcessError as ex: - logging.error('eyaml decryption failed, keys might be missing') + logging.error('eyaml decryption failed!') except OSError as ex: logging.warn('eyaml not found, skipping decryption') try: - DICT -except NameError as ex: + DICT['details'] +except (NameError, TypeError) as ex: logging.warn('PDF decryption skipped, fallback to using raw data.') with open(ARGS.yaml) as _: DICT = yaml.safe_load(_) diff --git a/labs/bii/pod1.yaml b/labs/bii/pod1.yaml index 1f5046b4..29d9a4e2 100644 --- a/labs/bii/pod1.yaml +++ b/labs/bii/pod1.yaml @@ -45,7 +45,7 @@ jumphost: model: powerEdge 720 arch: x86_64 cpus: 2 - cpu_cflags: hasewell # add values based on CFLAGS in GCC + cpu_cflags: haswell # add values based on CFLAGS in GCC cores: 8 # physical cores, not including hyper-threads memory: 16G disks: # disk list @@ -100,7 +100,7 @@ nodes: model: powerEdge 720 arch: x86_64 cpus: 2 - cpu_cflags: hasewell # add values based on CFLAGS in GCC + cpu_cflags: haswell # add values based on CFLAGS in GCC cores: 8 # physical cores, not including hyper-threads memory: 32G disks: &disk_A # disk list diff --git a/labs/zte/pod1.yaml b/labs/zte/pod1.yaml index bdc5ab44..950c2d89 100644 --- a/labs/zte/pod1.yaml +++ b/labs/zte/pod1.yaml @@ -19,7 +19,7 @@ net_config: admin: interface: 0 vlan: native - network: 10.20.6.0 + network: 10.10.6.0 mask: 24 mgmt: interface: 1 @@ -53,7 +53,7 @@ jumphost: model: R5300 arch: x86_64 cpus: 2 - cpu_cflags: hasewell + cpu_cflags: haswell cores: 12 memory: 128G disks: @@ -116,7 +116,7 @@ nodes: model: E9000 arch: x86_64 cpus: 2 - cpu_cflags: hasewell + cpu_cflags: haswell cores: 10 memory: 128G disks: &disks diff --git a/labs/zte/pod2.yaml b/labs/zte/pod2.yaml index 9cf629f3..5b3915fe 100644 --- a/labs/zte/pod2.yaml +++ b/labs/zte/pod2.yaml @@ -53,7 +53,7 @@ jumphost: model: R5300 arch: x86_64 cpus: 2 - cpu_cflags: hasewell + cpu_cflags: haswell cores: 12 memory: 128G disks: @@ -116,7 +116,7 @@ nodes: model: E9000 arch: x86_64 cpus: 2 - cpu_cflags: hasewell + cpu_cflags: haswell cores: 10 memory: 128G disks: &disks diff --git a/labs/zte/pod3.yaml b/labs/zte/pod3.yaml index d930d52c..b44602f2 100644 --- a/labs/zte/pod3.yaml +++ b/labs/zte/pod3.yaml @@ -53,7 +53,7 @@ jumphost: model: R5300 arch: x86_64 cpus: 1 - cpu_cflags: hasewell + cpu_cflags: haswell cores: 6 memory: 80G disks: |