diff options
Diffstat (limited to 'mcp')
24 files changed, 247 insertions, 141 deletions
diff --git a/mcp/config/scenario/defaults-x86_64.yaml b/mcp/config/scenario/defaults-x86_64.yaml index 4db3aad61..18b0826f9 100644 --- a/mcp/config/scenario/defaults-x86_64.yaml +++ b/mcp/config/scenario/defaults-x86_64.yaml @@ -20,8 +20,6 @@ virtual: - saltstack 500 deb [arch=amd64] http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.11 xenial main pkg: install: - - linux-image-generic-hwe-16.04-edge - - linux-headers-generic-hwe-16.04-edge - salt-minion control: pkg: diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init index ef2f78b70..cd254ddd3 100755 --- a/mcp/config/states/baremetal_init +++ b/mcp/config/states/baremetal_init @@ -25,9 +25,13 @@ salt -C 'kvm* or cmp*' file.replace $debian_ip_source \ salt -C 'kvm*' pkg.install bridge-utils salt -C 'kvm*' state.apply linux.network salt -C 'kvm* or cmp*' state.apply salt.minion -salt -C 'kvm* or cmp*' service.force_reload salt-minion salt -C 'cmp*' state.apply linux.system salt -C 'cmp*' state.apply linux.network || true + +# disable dhcp offered routes on compute nodes +salt -C 'cmp*' file.write /etc/dhcp/dhclient-enter-hooks.d/no-default-route \ + args='unset new_routers' + salt -C 'kvm* or cmp*' system.reboot wait_for 90.0 "salt -C 'kvm* or cmp*' test.ping" diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index 62a965401..0bbf7cde5 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -46,17 +46,17 @@ salt -I 'nova:controller' state.sls nova -b 1 salt -I 'heat:server' state.sls heat -b 1 wait_for 5 "salt -I 'cinder:controller' state.sls cinder -b 1" -salt -I 'cinder:volume' state.sls cinder +wait_for 3 "salt -I 'cinder:volume' state.sls cinder" salt -I 'neutron:server' state.sls neutron -b 1 salt -I 'neutron:gateway' state.sls neutron.gateway salt -I 'nova:compute' state.sls nova -salt -I 'mongodb:server' state.sls mongodb || true -wait_for 90 "salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin'" +salt -C 'I@mongodb:server and *01*' state.sls mongodb || true +wait_for 10 "salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin'" salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin --eval "rs.initiate()"' -salt -C 'I@mongodb:server and *01*' state.sls mongodb +salt -I 'mongodb:server' state.sls mongodb salt -I 'aodh:server' state.sls aodh -b 1 salt -I 'ceilometer:server' state.sls ceilometer @@ -65,6 +65,16 @@ salt -I 'ceilometer:agent' state.sls ceilometer salt -I 'horizon:server' state.sls horizon salt -I 'nginx:server' state.sls nginx,sphinx +# workaround for the pike horizon is missing css, FUEL-324 +salt -I 'horizon:server' file.symlink \ + /var/lib/openstack-dashboard/static \ + /usr/share/openstack-dashboard/static +salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py collectstatic --noinput" +salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py compress --force" +salt -I 'horizon:server' file.append /etc/openstack-dashboard/local_settings.py \ + "AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'),]" +salt -I 'horizon:server' service.reload apache2 + clstr_vip_addr=$(salt -C 'I@nginx:server and *01*' --out=yaml \ pillar.get _param:cluster_vip_address | awk '{print $2; exit}') salt -C 'I@nginx:server and *01*' cp.push \ diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha index 0a278760d..9fc30bbf1 100755 --- a/mcp/config/states/openstack_noha +++ b/mcp/config/states/openstack_noha @@ -9,6 +9,9 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x +# shellcheck disable=SC1090 +source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" + salt -I 'nfs:server' file.mkdir /srv/nova/instances salt -I 'nfs:server' state.sls nfs salt -I 'nfs:client' state.sls nfs @@ -36,15 +39,25 @@ salt -I 'nova:controller' state.sls nova salt -I 'heat:server' state.sls heat salt -I 'cinder:controller' state.sls cinder -salt -I 'cinder:volume' state.sls cinder +wait_for 3 "salt -I 'cinder:volume' state.sls cinder" salt -I 'neutron:server' state.sls neutron salt -I 'nova:compute' state.sls nova -salt -I 'mongodb:server' state.sls mongodb || salt -I 'mongodb:server' state.sls mongodb +wait_for 3 "salt -I 'mongodb:server' state.sls mongodb" salt -I 'aodh:server' state.sls aodh salt -I 'ceilometer:server' state.sls ceilometer salt -I 'ceilometer:agent' state.sls ceilometer salt -I 'horizon:server' state.sls horizon + +# workaround for the pike horizon is missing css, FUEL-324 +salt -I 'horizon:server' file.symlink \ + /var/lib/openstack-dashboard/static \ + /usr/share/openstack-dashboard/static +salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py collectstatic --noinput" +salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py compress --force" +salt -I 'horizon:server' file.append /etc/openstack-dashboard/local_settings.py \ + "AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'),]" +salt -I 'horizon:server' service.reload apache2 diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane index 0607b318b..75347d918 100755 --- a/mcp/config/states/virtual_control_plane +++ b/mcp/config/states/virtual_control_plane @@ -59,7 +59,6 @@ salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' cp.get_file \ "salt://maas/files/$(basename "${APT_CONF_D_CURTIN}")" "${APT_CONF_D_CURTIN}" wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply salt" -wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' service.force_reload salt-minion" wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply linux,ntp" wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' ssh.set_auth_key ${SUDO_USER} \ diff --git a/mcp/patches/0011-system.repo-Debian-Add-keyserver-proxy-support.patch b/mcp/patches/0011-system.repo-Debian-Add-keyserver-proxy-support.patch new file mode 100644 index 000000000..1ff519e84 --- /dev/null +++ b/mcp/patches/0011-system.repo-Debian-Add-keyserver-proxy-support.patch @@ -0,0 +1,110 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +Date: Mon, 22 Jan 2018 00:28:09 +0100 +Subject: [PATCH] system.repo: Debian: Add keyserver proxy support + +Introduce a new, optional set of parameters to configure the proxy +used for key fetching / keyserver access under: +linux:system:proxy:keyserver:http(s). + +Previously, when fetching GPG keys for APT keyring, either using +public key download & import (as for default repos) or via keyserver, +we relied on simple `curl` calls or passed it down to Salt aptpkg +module. +To be able to retrieve APT keys behind a proxy, one used to have to +configure the proxy for the Salt minion, which does not yet have +`no_proxy` support (either *all* or *no* traffic hits the proxy). + +When the new http(s) proxy param is set: +- no longer pass key configuration to Salt aptpkg (until it properly + supports `no_proxy`); +- handle all keys explicitly with `curl` and `apt-key`; +- set 'http(s)_proxy' env vars for `cmd.run`/`cmd.wait` calls; + +If linux:system:proxy:keyserver is not defined, the behavior is +unchanged for backwards compatibility. + +Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +--- + README.rst | 16 ++++++++++++++++ + linux/system/repo.sls | 40 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 56 insertions(+) + +diff --git a/linux/system/repo.sls b/linux/system/repo.sls +index 5d4d059..724db5a 100644 +--- a/linux/system/repo.sls ++++ b/linux/system/repo.sls +@@ -96,13 +96,50 @@ linux_repo_{{ name }}_key: + - name: "curl -s {{ repo.key_url }} | apt-key add -" + - watch: + - file: default_repo_list ++{%- if system.proxy.keyserver is defined %} ++ - env: ++ - http_proxy: {{ system.proxy.get('keyserver', {}).get('http', '') }} ++ - https_proxy: {{ system.proxy.get('keyserver', {}).get('https', '') }} ++{%- endif %} + + {%- endif %} + ++{#- repo.default is false #} + {%- else %} + + {%- if repo.get('enabled', True) %} + ++{%- if system.proxy.keyserver is defined %} ++ ++{%- if repo.get('key') %} ++ ++linux_repo_{{ name }}_key: ++ cmd.run: ++ - name: "echo '{{ repo.key }}' | apt-key add -" ++ ++{%- elif repo.key_url|default(False) %} ++ ++linux_repo_{{ name }}_key: ++ cmd.run: ++ - name: "curl -s {{ repo.key_url }} | apt-key add -" ++ - env: ++ - http_proxy: {{ system.proxy.get('keyserver', {}).get('http', '') }} ++ - https_proxy: {{ system.proxy.get('keyserver', {}).get('https', '') }} ++ ++{%- elif repo.key_id is defined and repo.key_server is defined %} ++ ++linux_repo_{{ name }}_key: ++ cmd.run: ++ - name: "apt-key adv --keyserver {{ repo.key_server }} --recv {{ repo.key_id }}" ++ - env: ++ - http_proxy: {{ system.proxy.get('keyserver', {}).get('http', '') }} ++ - https_proxy: {{ system.proxy.get('keyserver', {}).get('https', '') }} ++ ++{%- endif %} ++ ++{#- system.proxy.keyserver #} ++{%- endif %} ++ + linux_repo_{{ name }}: + pkgrepo.managed: + {%- if repo.ppa is defined %} +@@ -115,6 +152,7 @@ linux_repo_{{ name }}: + {%- endif %} + - file: /etc/apt/sources.list.d/{{ name }}.list + - clean_file: {{ repo.clean|default(True) }} ++ {%- if system.proxy.keyserver is not defined %} + {%- if repo.key_id is defined %} + - keyid: {{ repo.key_id }} + {%- endif %} +@@ -124,6 +162,7 @@ linux_repo_{{ name }}: + {%- if repo.key_url is defined %} + - key_url: {{ repo.key_url }} + {%- endif %} ++ {%- endif %} + - consolidate: {{ repo.get('consolidate', False) }} + - clean_file: {{ repo.get('clean_file', False) }} + - refresh_db: {{ repo.get('refresh_db', True) }} +@@ -140,6 +179,7 @@ linux_repo_{{ name }}: + {%- endif %} + {%- endif %} + ++{#- repo.enabled is false #} + {%- else %} + + linux_repo_{{ name }}_absent: diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list index 284f1bcec..1b3bfeab0 100644 --- a/mcp/patches/patches.list +++ b/mcp/patches/patches.list @@ -15,4 +15,5 @@ /usr/share/salt-formulas/env: 0008-Handle-file_recv-option.patch /usr/share/salt-formulas/env: 0009-controller-Use-keystoneclient-to-check-project-ID.patch /usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.patch +/usr/share/salt-formulas/env: 0011-system.repo-Debian-Add-keyserver-proxy-support.patch /usr/share/salt-formulas/env: 0012-linux.storage.lvm-Disable-filter.patch diff --git a/mcp/patches/pharos/0001-Update-MaaS-PXE-config.patch b/mcp/patches/pharos/0001-Update-MaaS-PXE-config.patch deleted file mode 100644 index 27467dd61..000000000 --- a/mcp/patches/pharos/0001-Update-MaaS-PXE-config.patch +++ /dev/null @@ -1,47 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Mirantis Inc., Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Sat, 16 Dec 2017 21:14:35 +0100 -Subject: [PATCH] Update MaaS PXE config - -- reduce DHCP range to silence a dummy MaaS warning about address exhaustion; -- define PXE/admin address for Salt Master node; -- drop obsolete opnfv_infra_maas_pxe_address; - -JIRA: FUEL-316 - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - config/installers/fuel/pod_config.yml.j2 | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2 -index 28c6188..f380535 100644 ---- a/config/installers/fuel/pod_config.yml.j2 -+++ b/config/installers/fuel/pod_config.yml.j2 -@@ -40,6 +40,7 @@ parameters: - {%- endif %} - - opnfv_infra_config_address: {{ net_mgmt | ipaddr_index('100') }} -+ opnfv_infra_config_pxe_address: {{ net_admin | ipaddr_index('2') }} - opnfv_infra_maas_node01_address: {{ net_mgmt | ipaddr_index('3') }} - opnfv_infra_maas_node01_deploy_address: {{ net_admin | ipaddr_index('3') }} - opnfv_infra_kvm_address: {{ net_mgmt | ipaddr_index('140') }} -@@ -48,9 +49,8 @@ parameters: - opnfv_infra_kvm_node03_address: {{ net_mgmt | ipaddr_index('143') }} - - opnfv_infra_maas_pxe_network_address: {{ net_admin }} -- opnfv_infra_maas_pxe_address: {{ net_admin | ipaddr_index('3') }} -- opnfv_infra_maas_pxe_start_address: {{ net_admin | ipaddr_index('5') }} -- opnfv_infra_maas_pxe_end_address: {{ net_admin | ipaddr_index('250') }} -+ opnfv_infra_maas_pxe_start_address: {{ net_admin | ipaddr_index('4') }} -+ opnfv_infra_maas_pxe_end_address: {{ net_admin | ipaddr_index('100') }} - - opnfv_openstack_gateway_node01_address: {{ net_mgmt | ipaddr_index('124') }} - opnfv_openstack_gateway_node02_address: {{ net_mgmt | ipaddr_index('125') }} diff --git a/mcp/patches/pharos/0002-Add-proxy-node-management-network-VIP.patch b/mcp/patches/pharos/0002-Add-proxy-node-management-network-VIP.patch deleted file mode 100644 index 346d7505c..000000000 --- a/mcp/patches/pharos/0002-Add-proxy-node-management-network-VIP.patch +++ /dev/null @@ -1,29 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: Copyright (c) 2017 Mirantis Inc., Enea AB and others. -: -: All rights reserved. This program and the accompanying materials -: are made available under the terms of the Apache License, Version 2.0 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> -Date: Mon, 1 Jan 2018 17:06:59 +0100 -Subject: [PATCH] Add proxy node management network VIP - -Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> ---- - config/installers/fuel/pod_config.yml.j2 | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/config/installers/fuel/pod_config.yml.j2 b/config/installers/fuel/pod_config.yml.j2 -index f380535..2d0cdee 100644 ---- a/config/installers/fuel/pod_config.yml.j2 -+++ b/config/installers/fuel/pod_config.yml.j2 -@@ -61,6 +61,7 @@ parameters: - opnfv_openstack_proxy_address: {{ net_public | ipaddr_index('103') }} - opnfv_openstack_proxy_node01_address: {{ net_public | ipaddr_index('104') }} - opnfv_openstack_proxy_node02_address: {{ net_public | ipaddr_index('105') }} -+ opnfv_openstack_proxy_control_address: {{ net_mgmt | ipaddr_index('103') }} - opnfv_openstack_proxy_node01_control_address: {{ net_mgmt | ipaddr_index('104') }} - opnfv_openstack_proxy_node02_control_address: {{ net_mgmt | ipaddr_index('105') }} - opnfv_openstack_control_address: {{ net_mgmt | ipaddr_index('10') }} diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/include/proxy.yml b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/include/proxy.yml index 5d7475812..3c324db8b 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/include/proxy.yml +++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/include/proxy.yml @@ -16,8 +16,9 @@ parameters: # https_proxy: http://${_param:infra_maas_node01_deploy_address}:8000 # no_proxy: # - .local - salt: - minion: + linux: + system: proxy: - host: ${_param:infra_maas_node01_deploy_address} - port: 8000 + keyserver: + http: http://${_param:infra_maas_node01_deploy_address}:8000 + https: http://${_param:infra_maas_node01_deploy_address}:8000 diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/config.yml b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/config.yml index 6b44be6a4..4d7fa1eb1 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/config.yml +++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/config.yml @@ -25,6 +25,7 @@ classes: # - system.reclass.storage.system.stacklight_monitor_cluster # - system.reclass.storage.system.stacklight_telemetry_cluster - system.reclass.storage.system.infra_maas_single + - cluster.baremetal-mcp-pike-common-ha.infra.lab_proxy_pdf parameters: _param: salt_master_base_environment: prd diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/init.yml index f2a6b4e68..7d513e9bf 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/init.yml +++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/init.yml @@ -13,7 +13,7 @@ classes: # - cluster.baremetal-mcp-pike-common-ha.stacklight.client parameters: _param: - apt_mk_version: nightly + apt_mk_version: stable mcp_repo_version: 1.1 salt_version: 2016.11 cluster_domain: ${_param:cluster_name}.local diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/kvm_pdf.yml.j2 b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/kvm_pdf.yml.j2 index ddbdfd578..0aab6cbc0 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/kvm_pdf.yml.j2 +++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/kvm_pdf.yml.j2 @@ -6,14 +6,14 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #} -{%- if conf.net_config is defined and conf.idf is defined -%} +{%- if conf.idf is defined and conf.idf.net_config is defined -%} {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#} {#- Determine interface index for each network (plumbing vars) -#} - {%- set idx_admin = conf['net_config']['admin']['interface'] -%} - {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%} - {%- set idx_private = conf['net_config']['private']['interface'] -%} - {%- set idx_public = conf['net_config']['public']['interface'] -%} + {%- set idx_admin = conf['idf']['net_config']['admin']['interface'] -%} + {%- set idx_mgmt = conf['idf']['net_config']['mgmt']['interface'] -%} + {%- set idx_private = conf['idf']['net_config']['private']['interface'] -%} + {%- set idx_public = conf['idf']['net_config']['public']['interface'] -%} {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#} {%- set node = conf['idf']['fuel']['network']['node'][0] -%} @@ -26,10 +26,10 @@ {%- set bus_private = node['busaddr'][idx_private] -%} {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#} - {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%} - {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%} - {%- set vlan_private = conf['net_config']['private']['vlan'] -%} - {%- set vlan_public = conf['net_config']['public']['vlan'] -%} + {%- set vlan_admin = conf['idf']['net_config']['admin']['vlan'] -%} + {%- set vlan_mgmt = conf['idf']['net_config']['mgmt']['vlan'] -%} + {%- set vlan_private = conf['idf']['net_config']['private']['vlan'] -%} + {%- set vlan_public = conf['idf']['net_config']['public']['vlan'] -%} {%- else -%} {%- set nic_admin = 'enp6s0' -%} {%- set nic_mgmt = 'enp6s0' -%} diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/lab_proxy_pdf.yml.j2 b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/lab_proxy_pdf.yml.j2 new file mode 100644 index 000000000..0e95d2d1d --- /dev/null +++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/lab_proxy_pdf.yml.j2 @@ -0,0 +1,24 @@ +############################################################################## +# Copyright (c) 2018 Mirantis Inc., Enea AB and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# We'll craft this class so it can be reused on both cfg01 and mas01 +{%- if conf.idf.fuel.network.upstream_proxy is defined %} +{%- set upstream_proxy=conf.idf.fuel.network.upstream_proxy %} +parameters: + maas: + region: + upstream_proxy: + address: {{ upstream_proxy.address }} + port: {{ upstream_proxy.port }} + linux: + system: + proxy: + keyserver: + http: http://{{ upstream_proxy.address }}:{{ upstream_proxy.port }} + https: http://{{ upstream_proxy.address }}:{{ upstream_proxy.port }} +{%- endif %} diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/maas.yml index 04ffdb44d..da28abf06 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/maas.yml +++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/maas.yml @@ -9,6 +9,7 @@ classes: - system.maas.region.single - service.maas.cluster.single + - cluster.baremetal-mcp-pike-common-ha.infra.lab_proxy_pdf parameters: _param: dhcp_interface: ${_param:opnfv_fn_vm_primary_interface} @@ -23,7 +24,7 @@ parameters: maas_db_password: opnfv_secret dns_server01: ${_param:opnfv_dns_server01} single_address: ${_param:infra_maas_node01_deploy_address} - hwe_kernel: 'hwe-16.04-edge' + hwe_kernel: 'ga-16.04' maas: region: salt_master_ip: ${_param:reclass_config_master} diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_compute_pdf.yml.j2 b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_compute_pdf.yml.j2 index 8824971ae..c1c1094cb 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_compute_pdf.yml.j2 +++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/openstack_compute_pdf.yml.j2 @@ -6,14 +6,14 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #} -{%- if conf.net_config is defined and conf.idf is defined -%} +{%- if conf.idf is defined and conf.idf.net_config is defined -%} {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#} {#- Determine interface index for each network (plumbing vars) -#} - {%- set idx_admin = conf['net_config']['admin']['interface'] -%} - {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%} - {%- set idx_private = conf['net_config']['private']['interface'] -%} - {%- set idx_public = conf['net_config']['public']['interface'] -%} + {%- set idx_admin = conf['idf']['net_config']['admin']['interface'] -%} + {%- set idx_mgmt = conf['idf']['net_config']['mgmt']['interface'] -%} + {%- set idx_private = conf['idf']['net_config']['private']['interface'] -%} + {%- set idx_public = conf['idf']['net_config']['public']['interface'] -%} {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#} {%- set iface_names = conf['idf']['fuel']['network']['node'][3]['interfaces'] -%} @@ -23,10 +23,10 @@ {%- set nic_public = iface_names[idx_public] -%} {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#} - {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%} - {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%} - {%- set vlan_private = conf['net_config']['private']['vlan'] -%} - {%- set vlan_public = conf['net_config']['public']['vlan'] -%} + {%- set vlan_admin = conf['idf']['net_config']['admin']['vlan'] -%} + {%- set vlan_mgmt = conf['idf']['net_config']['mgmt']['vlan'] -%} + {%- set vlan_private = conf['idf']['net_config']['private']['vlan'] -%} + {%- set vlan_public = conf['idf']['net_config']['public']['vlan'] -%} {%- else -%} {%- set nic_admin = 'enp6s0' -%} {%- set nic_mgmt = 'enp6s0' -%} diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack/compute_pdf.yml.j2 b/mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack/compute_pdf.yml.j2 index 7809bd8c8..52090cc0a 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack/compute_pdf.yml.j2 +++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-odl-ha/openstack/compute_pdf.yml.j2 @@ -6,14 +6,14 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #} -{%- if conf.net_config is defined and conf.idf is defined -%} +{%- if conf.idf is defined and conf.idf.net_config is defined -%} {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#} {#- Determine interface index for each network (plumbing vars) -#} - {%- set idx_admin = conf['net_config']['admin']['interface'] -%} - {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%} - {%- set idx_private = conf['net_config']['private']['interface'] -%} - {%- set idx_public = conf['net_config']['public']['interface'] -%} + {%- set idx_admin = conf['idf']['net_config']['admin']['interface'] -%} + {%- set idx_mgmt = conf['idf']['net_config']['mgmt']['interface'] -%} + {%- set idx_private = conf['idf']['net_config']['private']['interface'] -%} + {%- set idx_public = conf['idf']['net_config']['public']['interface'] -%} {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#} {%- set node = conf['idf']['fuel']['network']['node'][1] -%} @@ -26,10 +26,10 @@ {%- set bus_private = node['busaddr'][idx_private] -%} {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#} - {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%} - {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%} - {%- set vlan_private = conf['net_config']['private']['vlan'] -%} - {%- set vlan_public = conf['net_config']['public']['vlan'] -%} + {%- set vlan_admin = conf['idf']['net_config']['admin']['vlan'] -%} + {%- set vlan_mgmt = conf['idf']['net_config']['mgmt']['vlan'] -%} + {%- set vlan_private = conf['idf']['net_config']['private']['vlan'] -%} + {%- set vlan_public = conf['idf']['net_config']['public']['vlan'] -%} {%- else -%} {%- set nic_admin = 'enp6s0' -%} {%- set nic_mgmt = 'enp6s0' -%} @@ -53,7 +53,11 @@ parameters: {{ nic }}: enabled: true type: eth + {%- if nic == nic_admin %} + proto: dhcp + {%- else %} proto: manual + {%- endif %} name: {{ nic }} {%- endfor %} diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-dpdk-ha/infra/config_pdf.yml.j2 b/mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-dpdk-ha/infra/config_pdf.yml.j2 index 5511ed774..08e8ab717 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-dpdk-ha/infra/config_pdf.yml.j2 +++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-dpdk-ha/infra/config_pdf.yml.j2 @@ -6,14 +6,14 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #} -{%- if conf.net_config is defined and conf.idf is defined -%} +{%- if conf.idf is defined and conf.idf.net_config is defined -%} {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#} {#- Determine interface index for each network (plumbing vars) -#} - {%- set idx_admin = conf['net_config']['admin']['interface'] -%} - {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%} - {%- set idx_private = conf['net_config']['private']['interface'] -%} - {%- set idx_public = conf['net_config']['public']['interface'] -%} + {%- set idx_admin = conf['idf']['net_config']['admin']['interface'] -%} + {%- set idx_mgmt = conf['idf']['net_config']['mgmt']['interface'] -%} + {%- set idx_private = conf['idf']['net_config']['private']['interface'] -%} + {%- set idx_public = conf['idf']['net_config']['public']['interface'] -%} {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#} {%- set node = conf['idf']['fuel']['network']['node'][0] -%} @@ -26,10 +26,10 @@ {%- set bus_private = node['busaddr'][idx_private] -%} {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#} - {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%} - {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%} - {%- set vlan_private = conf['net_config']['private']['vlan'] -%} - {%- set vlan_public = conf['net_config']['public']['vlan'] -%} + {%- set vlan_admin = conf['idf']['net_config']['admin']['vlan'] -%} + {%- set vlan_mgmt = conf['idf']['net_config']['mgmt']['vlan'] -%} + {%- set vlan_private = conf['idf']['net_config']['private']['vlan'] -%} + {%- set vlan_public = conf['idf']['net_config']['public']['vlan'] -%} {%- else -%} {%- set nic_admin = 'enp6s0' -%} {%- set nic_mgmt = 'enp6s0' -%} diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-ha/openstack/compute_pdf.yml.j2 b/mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-ha/openstack/compute_pdf.yml.j2 index 7acb4b4c6..7b90c727a 100644 --- a/mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-ha/openstack/compute_pdf.yml.j2 +++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-ovs-ha/openstack/compute_pdf.yml.j2 @@ -6,14 +6,14 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## {# NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #} -{%- if conf.net_config is defined and conf.idf is defined -%} +{%- if conf.idf is defined and conf.idf.net_config is defined -%} {#- NOTE: Currently, we assume all cluster nodes use the same mapping -#} {#- Determine interface index for each network (plumbing vars) -#} - {%- set idx_admin = conf['net_config']['admin']['interface'] -%} - {%- set idx_mgmt = conf['net_config']['mgmt']['interface'] -%} - {%- set idx_private = conf['net_config']['private']['interface'] -%} - {%- set idx_public = conf['net_config']['public']['interface'] -%} + {%- set idx_admin = conf['idf']['net_config']['admin']['interface'] -%} + {%- set idx_mgmt = conf['idf']['net_config']['mgmt']['interface'] -%} + {%- set idx_private = conf['idf']['net_config']['private']['interface'] -%} + {%- set idx_public = conf['idf']['net_config']['public']['interface'] -%} {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) -#} {%- set node = conf['idf']['fuel']['network']['node'][0] -%} @@ -26,10 +26,10 @@ {%- set bus_private = node['busaddr'][idx_private] -%} {#- VLAN for each network (only untagged 'admin' is supported by MaaS config!) -#} - {%- set vlan_admin = conf['net_config']['admin']['vlan'] -%} - {%- set vlan_mgmt = conf['net_config']['mgmt']['vlan'] -%} - {%- set vlan_private = conf['net_config']['private']['vlan'] -%} - {%- set vlan_public = conf['net_config']['public']['vlan'] -%} + {%- set vlan_admin = conf['idf']['net_config']['admin']['vlan'] -%} + {%- set vlan_mgmt = conf['idf']['net_config']['mgmt']['vlan'] -%} + {%- set vlan_private = conf['idf']['net_config']['private']['vlan'] -%} + {%- set vlan_public = conf['idf']['net_config']['public']['vlan'] -%} {%- else -%} {%- set nic_admin = 'enp6s0' -%} {%- set nic_mgmt = 'enp6s0' -%} @@ -53,7 +53,11 @@ parameters: {{ nic }}: enabled: true type: eth + {%- if nic == nic_admin %} + proto: dhcp + {%- else %} proto: manual + {%- endif %} name: {{ nic }} {%- endfor %} diff --git a/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/openstack_init.yml b/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/openstack_init.yml index 89b06fb7e..d5606b594 100644 --- a/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/openstack_init.yml +++ b/mcp/reclass/classes/cluster/virtual-mcp-pike-common-noha/openstack_init.yml @@ -9,7 +9,7 @@ parameters: _param: openstack_version: pike - apt_mk_version: nightly + apt_mk_version: stable mcp_repo_version: 1.1 openstack_region: RegionOne admin_email: root@localhost diff --git a/mcp/reclass/classes/system b/mcp/reclass/classes/system -Subproject 267dde28bae403546a83357c5d21ff8864871ed +Subproject 4a5c3dec811bfdbbd7c3f9d20d53e4a95842f6b diff --git a/mcp/salt-formulas/opendaylight/server.sls b/mcp/salt-formulas/opendaylight/server.sls index 30c337c00..f953cddc0 100644 --- a/mcp/salt-formulas/opendaylight/server.sls +++ b/mcp/salt-formulas/opendaylight/server.sls @@ -6,9 +6,23 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## {% from "opendaylight/map.jinja" import server with context %} +{% from "linux/map.jinja" import system with context %} {%- if server.enabled %} +opendaylight_repo_key: + cmd.run: + - name: "apt-key adv --keyserver keyserver.ubuntu.com --recv 44C05248" +{%- if system.proxy is defined and system.proxy.keyserver is defined %} + - env: +{%- if system.proxy.keyserver.http is defined %} + - http_proxy: {{ system.proxy.keyserver.http }} +{%- endif %} +{%- if system.proxy.keyserver.https is defined %} + - https_proxy: {{ system.proxy.keyserver.https }} +{%- endif %} +{%- endif %} + opendaylight_repo: pkgrepo.managed: # NOTE(armband): PPA handling behind proxy broken, define it explicitly @@ -17,8 +31,6 @@ opendaylight_repo: - human_name: opendaylight-ppa - name: deb http://ppa.launchpad.net/odl-team/nitrogen/ubuntu xenial main - file: /etc/apt/sources.list.d/odl-team-ubuntu-nitrogen-xenial.list - - keyid: 49B07274951063870A8B7EAE7B8AA1A344C05248 - - keyserver: keyserver.ubuntu.com opendaylight: pkg.installed: diff --git a/mcp/scripts/pharos b/mcp/scripts/pharos -Subproject 89d7cb905bf6f286648638f5865884ac5e332e5 +Subproject c1fab72890ba215217d706401ba13328a8e179c diff --git a/mcp/scripts/salt.sh b/mcp/scripts/salt.sh index a13194363..1975f9e54 100755 --- a/mcp/scripts/salt.sh +++ b/mcp/scripts/salt.sh @@ -54,7 +54,7 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END echo ' done' mkdir -p /srv/salt /usr/share/salt-formulas/reclass - rm -rf ${OPNFV_GIT_DIR} + rm -rf ${OPNFV_GIT_DIR} ${OPNFV_FUEL_DIR} mv ${OPNFV_TMP_DIR} ${OPNFV_GIT_DIR} && chown -R root.root ${OPNFV_GIT_DIR} find ${OPNFV_GIT_DIR} -name '.git' -type f | while read f_git; do sed -i 's@${LOCAL_GIT_DIR}@${OPNFV_GIT_DIR}@g' \$f_git |