Fix cookied-bm-mcp-pike-k8s-contrail
Change-Id: Id788c4e33be273f18c5b5582494e9452501488b8
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/core.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/core.yaml
index 99b3aa7..4ab0f03 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/core.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/core.yaml
@@ -5,10 +5,16 @@
{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %}
# Install support services
-- description: Create and distribute SSL certificates for services using salt state
- cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls salt
+- description: Sync all
+ cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.sync_all
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
+ skip_fail: false
+
+- description: Create and distribute SSL certificates for services using salt state
+ cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls salt -b 1
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 2, delay: 5}
skip_fail: true
- description: Install docker
@@ -39,20 +45,6 @@
retry: {count: 1, delay: 10}
skip_fail: true
-- description: Install RabbitMQ
- cmd: salt --hard-crash --state-output=mixed --state-verbose=False
- -C 'I@rabbitmq:server' state.sls rabbitmq
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 2, delay: 10}
- skip_fail: false
-
-- description: Check RabbitMQ
- cmd: salt --hard-crash --state-output=mixed --state-verbose=False
- -C 'I@rabbitmq:server' cmd.run "rabbitmqctl cluster_status"
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 10}
- skip_fail: false
-
- description: Install haproxy
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@haproxy:proxy' state.sls haproxy
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/k8s.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/k8s.yaml
index 45ad04f..bbe3126 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/k8s.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/k8s.yaml
@@ -1,4 +1,25 @@
-{% from 'k8s-ha-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %}
+{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %}
+
+- description: Install keepalived on primary controller
+ cmd: salt --hard-crash --state-output=mixed --state-verbose=False
+ -C 'I@keepalived:cluster and *01*' state.sls keepalived
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 10}
+ skip_fail: false
+
+- description: Install keepalived
+ cmd: salt --hard-crash --state-output=mixed --state-verbose=False
+ -C 'I@keepalived:cluster' state.sls keepalived
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 10}
+ skip_fail: false
+
+- description: Install haproxy
+ cmd: salt --hard-crash --state-output=mixed --state-verbose=False
+ -C 'I@haproxy:proxy' state.sls haproxy
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 5}
+ skip_fail: false
- description: Install etcd
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
@@ -7,6 +28,13 @@
retry: {count: 1, delay: 5}
skip_fail: false
+- description: Install certs
+ cmd: salt --hard-crash --state-output=mixed --state-verbose=False
+ -C 'I@etcd:server' salt.minion.cert,etcd.server.service -b 1
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 2, delay: 5}
+ skip_fail: false
+
- description: Check the etcd health
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@etcd:server' cmd.run '. /var/lib/etcd/configenv && etcdctl cluster-health'
@@ -19,7 +47,7 @@
-C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
- skip_fail: true
+ skip_fail: false
- description: Install Kubernetes components
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
@@ -37,13 +65,6 @@
retry: {count: 1, delay: 5}
skip_fail: false
-- description: Install Opencontrail db on ctl01
- cmd: salt --hard-crash --state-output=mixed --state-verbose=False
- -C 'I@opencontrail:database and *01*' state.sls opencontrail.database
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 2, delay: 20}
- skip_fail: false
-
- description: Configure OpenContrail as an add-on for Kubernetes
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons
@@ -87,13 +108,6 @@
retry: {count: 1, delay: 5}
skip_fail: false
-# - description: Reboot contrail computes
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@opencontrail:compute' cmd.run 'reboot'
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: false
-
- description: Reboot contrail computes
cmd: salt --timeout=600 -C 'I@opencontrail:compute' system.reboot
node_name: {{ HOSTNAME_CFG01 }}
@@ -140,125 +154,3 @@
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
-
-# - description: Install Opencontrail db on all nodes
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@opencontrail:database' state.sls opencontrail.database
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 2, delay: 20}
-# skip_fail: false
-
-# - description: Install Opencontrail control on ctl01
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@opencontrail:control and *01*' state.sls opencontrail exclude=opencontrail.client
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: false
-
-# - description: Install Opencontrail control on all nodes
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@opencontrail:control' state.sls opencontrail exclude=opencontrail.client
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: false
-
-# - description: Install Opencontrail on collector
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@opencontrail:collector' state.sls opencontrail exclude=opencontrail.client
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: false
-
-# # OpenContrail vrouters
-# - description: Install Opencontrail client
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@opencontrail:database:id:1' state.sls opencontrail.client
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: false
-
-# - description: Install Opencontrail on computes
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@opencontrail:compute' state.sls opencontrail exclude=opencontrail.client
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 2, delay: 5}
-# skip_fail: false
-
-# - description: Wake up vhost0
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@nova:compute' cmd.run 'exec 0>&-; exec 1>&-; exec 2>&-;
-# nohup bash -c "ip link | grep vhost && echo no_reboot || sleep 5 && reboot & "'
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: false
-
-# - description: Install Opencontrail client on computes
-# cmd: sleep 300 && salt --timeout=60 --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@opencontrail:compute' state.sls 'opencontrail.client'
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: false
-
-# - description: Install Opencontrail on computes #2
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@opencontrail:compute' state.sls opencontrail
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 2, delay: 5}
-# skip_fail: false
-
-# # Kubernetes
-# - description: Install Kubernetes Addons
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: true
-
-# - description: Check contrail status
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@opencontrail:database' cmd.run contrail-status
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: false
-
-# - description: Install Kubernetes components
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@kubernetes:pool' state.sls kubernetes.pool
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 5, delay: 60}
-# skip_fail: false
-
-# # NOTE(vryzhenkin): There is nothing to setup at this model
-# #- description: Setup etcd server on primary controller
-# # cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# # -C 'I@kubernetes:master and *01*' state.sls etcd.server.setup
-# # node_name: {{ HOSTNAME_CFG01 }}
-# # retry: {count: 1, delay: 5}
-# # skip_fail: false
-
-# - description: Run Kubernetes master without setup
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@kubernetes:master' state.sls kubernetes exclude=kubernetes.master.setup
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 3, delay: 5}
-# skip_fail: true
-
-# - description: Run Kubernetes master setup
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@kubernetes:master and *01*' state.sls kubernetes.master.setup
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: true
-
-# - description: Restart Kubelet
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-# -C 'I@kubernetes:pool' service.restart 'kubelet'
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: true
-
-# - description: Renew hosts file on a whole cluster
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C '*' state.sls linux.network.host;
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 5}
-# skip_fail: false
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/lab04-upgrade-physical-inventory.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/lab04-upgrade-physical-inventory.yaml
index eb9d76f..c5648a8 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/lab04-upgrade-physical-inventory.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/lab04-upgrade-physical-inventory.yaml
@@ -42,6 +42,45 @@
enp9s0f1:
role: single_ctl
+ ctl01.bm-mcp-pike-k8s-contrail.local:
+ reclass_storage_name: kubernetes_control_node01
+ roles:
+ - kubernetes_control_contrail
+ - linux_system_codename_xenial
+ interfaces:
+ enp2s0f0:
+ role: single_mgm
+ deploy_address: 172.17.41.9
+ enp2s0f1:
+ role: single_ctl
+ single_address: 10.167.8.239
+
+ ctl02.bm-mcp-pike-k8s-contrail.local:
+ reclass_storage_name: kubernetes_control_node02
+ roles:
+ - kubernetes_control_contrail
+ - linux_system_codename_xenial
+ interfaces:
+ enp2s0f0:
+ role: single_mgm
+ deploy_address: 172.17.41.10
+ enp2s0f1:
+ role: single_ctl
+ single_address: 10.167.8.238
+
+ ctl03.bm-mcp-pike-k8s-contrail.local:
+ reclass_storage_name: kubernetes_control_node03
+ roles:
+ - kubernetes_control_contrail
+ - linux_system_codename_xenial
+ interfaces:
+ enp2s0f0:
+ role: single_mgm
+ deploy_address: 172.17.41.11
+ enp2s0f1:
+ role: single_ctl
+ single_address: 10.167.8.237
+
# prx01.bm-mcp-pike-k8s-contrail.local:
# reclass_storage_name: kubernetes_proxy_node01
# roles:
@@ -75,6 +114,23 @@
role: single_ctl
single_address: 10.167.8.101
+ cmp002.bm-mcp-pike-k8s-contrail.local:
+ reclass_storage_name: kubernetes_compute_node002
+ roles:
+ - linux_system_codename_xenial
+ - kubernetes_compute_contrail
+ - salt_master_host
+ #- features_lvm_backend
+ interfaces:
+ enp9s0f0:
+ role: single_dhcp
+ ens11f0:
+ role: bond0_ab_contrail
+ tenant_address: 192.168.0.102
+ ens11f1:
+ role: single_ctl
+ single_address: 10.167.8.102
+
# cmp002.bm-mcp-pike-k8s-contrail.local:
# reclass_storage_name: kubernetes_compute_node02
# roles:
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-cookiecutter-k8s-contrail.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-cookiecutter-k8s-contrail.yaml
index b1a3be5..88aef93 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-cookiecutter-k8s-contrail.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-cookiecutter-k8s-contrail.yaml
@@ -1,3 +1,4 @@
+#https://docs.mirantis.com/mcp/master/mcp-ref-arch/opencontrail-plan/contrail-overview/contrail-4.html#
default_context:
backup_private_key: |-
-----BEGIN RSA PRIVATE KEY-----
@@ -30,6 +31,7 @@
backup_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyRnKFPJJha8aun52W/6rYtryiIzxK/Ul9CiDz5RbbyEZRsKo+dZrtvNWoQ0Rj6D6ptBiHY+9vbFRHJj37TZNYuYJjOrv6is7V4bZIO3fzhjMNzoGdCiFRsbBpIfZixP9ADwpXV+9Rb0/SBUQeYlZHwmje91HLD60RSzNiSJNiRxVz3O07l5hP1rqBKMuGX62Yle7fyN1ZNwTzMk/44aklEMmlXYQBjC/4td171ES/goIYyo2W+WL0gD7Nqt8ywDNJM+kvmiiyUHbRqQozWHmWLcsbjs6kowb2wxUUYQSjv6WpMZrNQkRQ9slT3k+ot/Ggg6NgX8yFYpTlUAsutpXD
bmk_enabled: 'False'
ceph_enabled: 'False'
+ auditd_enabled: 'False'
cicd_control_node01_address: 10.167.8.91
cicd_control_node01_hostname: cid01
cicd_control_node02_address: 10.167.8.92
@@ -104,7 +106,7 @@
infra_primary_first_nic: eth1
infra_primary_second_nic: eth2
kubernetes_enabled: 'True'
- kubernetes_compute_count: 1
+ kubernetes_compute_count: 2
kubernetes_compute_rack01_single_subnet: 10.167.8
kubernetes_compute_rack01_tenant_subnet: 192.168.0
kubernetes_network_opencontrail_enabled: 'True'
@@ -118,23 +120,34 @@
mcp_common_scripts_branch: ''
mcp_version: proposed
offline_deployment: 'False'
+ kubernetes_control_address: 10.167.8.236
+ kubernetes_control_node01_deploy_address: 172.17.41.9
+ kubernetes_control_node01_address: 10.167.8.239
+ kubernetes_control_node01_hostname: ctl01
+ kubernetes_control_node02_deploy_address: 172.17.41.10
+ kubernetes_control_node02_address: 10.167.8.238
+ kubernetes_control_node02_hostname: ctl02
+ kubernetes_control_node02_deploy_address: 172.17.41.11
+ kubernetes_control_node03_address: 10.167.8.237
+ kubernetes_control_node03_hostname: ctl03
+ linux_repo_contrail_component: oc40
opencontrail_analytics_address: 10.167.8.30
- opencontrail_analytics_hostname: nal
+ opencontrail_analytics_hostname: ctl
opencontrail_analytics_node01_address: 10.167.8.31
- opencontrail_analytics_node01_hostname: nal01
+ opencontrail_analytics_node01_hostname: ctl01
opencontrail_analytics_node02_address: 10.167.8.32
- opencontrail_analytics_node02_hostname: nal02
+ opencontrail_analytics_node02_hostname: ctl02
opencontrail_analytics_node03_address: 10.167.8.33
- opencontrail_analytics_node03_hostname: nal03
+ opencontrail_analytics_node03_hostname: ctl03
opencontrail_compute_iface_mask: '24'
- opencontrail_control_address: 10.167.8.20
- opencontrail_control_hostname: ntw
- opencontrail_control_node01_address: 10.167.8.21
- opencontrail_control_node01_hostname: ntw01
- opencontrail_control_node02_address: 10.167.8.22
- opencontrail_control_node02_hostname: ntw02
- opencontrail_control_node03_address: 10.167.8.23
- opencontrail_control_node03_hostname: ntw03
+ opencontrail_control_address: 10.167.8.236
+ opencontrail_control_hostname: ctl
+ opencontrail_control_node01_address: 10.167.8.239
+ opencontrail_control_node01_hostname: ctl01
+ opencontrail_control_node02_address: 10.167.8.238
+ opencontrail_control_node02_hostname: ctl02
+ opencontrail_control_node03_address: 10.167.8.237
+ opencontrail_control_node03_hostname: ctl03
opencontrail_enabled: 'True'
opencontrail_router01_address: 10.167.8.100
opencontrail_router01_hostname: rtr01
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-environment.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-environment.yaml
index 63f07b5..18032a1 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-environment.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt-context-environment.yaml
@@ -1,56 +1,57 @@
nodes:
# Virtual Control Plane nodes
+# commented as ctl is bm
+# ctl01.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: kubernetes_control_node01
+# roles:
+# - kubernetes_control_contrail
+# - linux_system_codename_xenial
+# interfaces:
+# ens3:
+# role: single_ctl
+#
+# ctl02.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: kubernetes_control_node02
+# roles:
+# - kubernetes_control_contrail
+# - linux_system_codename_xenial
+# interfaces:
+# ens3:
+# role: single_ctl
+#
+# ctl03.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: kubernetes_control_node03
+# roles:
+# - kubernetes_control_contrail
+# - linux_system_codename_xenial
+# interfaces:
+# ens3:
+# role: single_ctl
- ctl01.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: kubernetes_control_node01
- roles:
- - kubernetes_control_contrail
- - linux_system_codename_xenial
- interfaces:
- ens3:
- role: single_ctl
+# commented as there is no k8s proxy nodes in this setup
+# prx01.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: kubernetes_proxy_node01
+# roles:
+# - kubernetes_proxy
+# # - infra_proxy
+# # - stacklight_proxy
+# - salt_master_host
+# - linux_system_codename_xenial
+# interfaces:
+# ens3:
+# role: single_ctl
- ctl02.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: kubernetes_control_node02
- roles:
- - kubernetes_control_contrail
- - linux_system_codename_xenial
- interfaces:
- ens3:
- role: single_ctl
-
- ctl03.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: kubernetes_control_node03
- roles:
- - kubernetes_control_contrail
- - linux_system_codename_xenial
- interfaces:
- ens3:
- role: single_ctl
-
- prx01.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: kubernetes_proxy_node01
- roles:
- - kubernetes_proxy
- # - infra_proxy
- # - stacklight_proxy
- - salt_master_host
- - linux_system_codename_xenial
- interfaces:
- ens3:
- role: single_ctl
-
- prx02.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: kubernetes_proxy_node02
- roles:
- - kubernetes_proxy
- # - infra_proxy
- # - stacklight_proxy
- - salt_master_host
- - linux_system_codename_xenial
- interfaces:
- ens3:
- role: single_ctl
+# prx02.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: kubernetes_proxy_node02
+# roles:
+# - kubernetes_proxy
+# # - infra_proxy
+# # - stacklight_proxy
+# - salt_master_host
+# - linux_system_codename_xenial
+# interfaces:
+# ens3:
+# role: single_ctl
mon01.cookied-bm-mcp-ocata-contrail.local:
reclass_storage_name: stacklight_server_node01
@@ -79,71 +80,72 @@
ens3:
role: single_ctl
- nal01.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: opencontrail_analytics_node01
- roles:
- - opencontrail_analytics
- - linux_system_codename_xenial
- - salt_master_host
- interfaces:
- ens3:
- role: single_ctl
- single_address: 10.167.8.31
-
- nal02.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: opencontrail_analytics_node02
- roles:
- - opencontrail_analytics
- - linux_system_codename_xenial
- - salt_master_host
- interfaces:
- ens3:
- role: single_ctl
- single_address: 10.167.8.32
-
- nal03.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: opencontrail_analytics_node03
- roles:
- - opencontrail_analytics
- - linux_system_codename_xenial
- - salt_master_host
- interfaces:
- ens3:
- role: single_ctl
- single_address: 10.167.8.33
-
- ntw01.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: opencontrail_control_node01
- roles:
- - opencontrail_control
- - linux_system_codename_xenial
- - salt_master_host
- interfaces:
- ens3:
- role: single_ctl
- single_address: 10.167.8.21
-
- ntw02.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: opencontrail_control_node02
- roles:
- - opencontrail_control
- - linux_system_codename_xenial
- - salt_master_host
- interfaces:
- ens3:
- role: single_ctl
- single_address: 10.167.8.22
-
- ntw03.cookied-bm-mcp-ocata-contrail.local:
- reclass_storage_name: opencontrail_control_node03
- roles:
- - opencontrail_control
- - linux_system_codename_xenial
- - salt_master_host
- interfaces:
- ens3:
- role: single_ctl
- single_address: 10.167.8.23
+# commented as shpuld be in pod
+# nal01.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: opencontrail_analytics_node01
+# roles:
+# - opencontrail_analytics
+# - linux_system_codename_xenial
+# - salt_master_host
+# interfaces:
+# ens3:
+# role: single_ctl
+# single_address: 10.167.8.31
+#
+# nal02.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: opencontrail_analytics_node02
+# roles:
+# - opencontrail_analytics
+# - linux_system_codename_xenial
+# - salt_master_host
+# interfaces:
+# ens3:
+# role: single_ctl
+# single_address: 10.167.8.32
+#
+# nal03.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: opencontrail_analytics_node03
+# roles:
+# - opencontrail_analytics
+# - linux_system_codename_xenial
+# - salt_master_host
+# interfaces:
+# ens3:
+# role: single_ctl
+# single_address: 10.167.8.33
+#
+# ntw01.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: opencontrail_control_node01
+# roles:
+# - opencontrail_control
+# - linux_system_codename_xenial
+# - salt_master_host
+# interfaces:
+# ens3:
+# role: single_ctl
+# single_address: 10.167.8.21
+#
+# ntw02.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: opencontrail_control_node02
+# roles:
+# - opencontrail_control
+# - linux_system_codename_xenial
+# - salt_master_host
+# interfaces:
+# ens3:
+# role: single_ctl
+# single_address: 10.167.8.22
+#
+# ntw03.cookied-bm-mcp-ocata-contrail.local:
+# reclass_storage_name: opencontrail_control_node03
+# roles:
+# - opencontrail_control
+# - linux_system_codename_xenial
+# - salt_master_host
+# interfaces:
+# ens3:
+# role: single_ctl
+# single_address: 10.167.8.23
mtr01.cookied-bm-mcp-ocata-contrail.local:
reclass_storage_name: stacklight_telemetry_node01
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt.yaml
index 7e46564..d26a22a 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/salt.yaml
@@ -1,9 +1,6 @@
{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %}
-{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_CMP001 with context %}
{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import LAB_CONFIG_NAME with context %}
{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import DOMAIN_NAME with context %}
-{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import ETH0_IP_ADDRESS_CFG01 with context %}
-{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import ETH0_IP_ADDRESS_CMP001 with context %}
{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_KVM01 with context %}
{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_KVM02 with context %}
{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_KVM03 with context %}
@@ -28,30 +25,12 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd" "auditd"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd" "auditd" "logrotate"') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
{{ SHARED.MACRO_RUN_SALT_MASTER_UNDERLAY_STATES() }}
-{{ SHARED.ADJUST_SL_OPTS(OVERRIDES_FILENAME='/srv/salt/reclass/classes/environment/' + ENVIRONMENT_MODEL_INVENTORY_NAME + '/overrides.yml') }}
-
-
-# - description: "Registration cmp001 node"
-# cmd: |
-# salt-call event.send "reclass/minion/classify" \
-# "{\"node_master_ip\": \"{{ ETH0_IP_ADDRESS_CFG01 }}\", \
-# \"node_deploy_ip\": \"{{ ETH0_IP_ADDRESS_CMP001 }}\", \
-# \"node_control_ip\": \"10.167.8.101\", \
-# \"node_tenant_ipcontrol_ip\": \"10.167.8.101\", \
-# \"node_os\": \"xenial\", \
-# \"node_domain\": \"{{ DOMAIN_NAME }}\", \
-# \"node_cluster\": \"{{ LAB_CONFIG_NAME }}\",
-# \"node_hostname\": \"$(hostname -s)\"}"
-# node_name: {{ HOSTNAME_CMP001 }}
-# retry: {count: 1, delay: 10}
-# skip_fail: false
-#
- description: "Workaround for rack01 compute generator"
cmd: |
set -e;
@@ -62,67 +41,16 @@
retry: {count: 1, delay: 10}
skip_fail: false
-# - description: "WR for changing image to proposed"
-# cmd: |
-# set -e;
-# # Add message_queu host for opencontrail
-# . /root/venv-reclass-tools/bin/activate;
-# reclass-tools add-key parameters._param.salt_control_xenial_image 'http://ci.mcp.mirantis.net:8085/images/ubuntu-16-04-x64-mcpproposed.qcow2' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/init.yml;
-# reclass-tools add-key parameters._param.salt_control_trusty_image 'http://ci.mcp.mirantis.net:8085/images/ubuntu-14-04-x64-mcpproposed.qcow2' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/init.yml;
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 10}
-# skip_fail: false
-
-- description: "Workaround for xenial images"
+- description: "Change path to internal storage for salt.control images"
cmd: |
set -e;
- # Add tenant and single addresses for computes
- set -e;
- # Add message_queu host for opencontrail
. /root/venv-reclass-tools/bin/activate;
- reclass-tools add-key parameters.salt.control.cluster.internal.node.nal01.image '${_param:salt_control_xenial_image}' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml;
- reclass-tools add-key parameters.salt.control.cluster.internal.node.nal02.image '${_param:salt_control_xenial_image}' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml;
- reclass-tools add-key parameters.salt.control.cluster.internal.node.nal03.image '${_param:salt_control_xenial_image}' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml;
- reclass-tools add-key parameters.salt.control.cluster.internal.node.ntw01.image '${_param:salt_control_xenial_image}' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml;
- reclass-tools add-key parameters.salt.control.cluster.internal.node.ntw02.image '${_param:salt_control_xenial_image}' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml;
- reclass-tools add-key parameters.salt.control.cluster.internal.node.ntw03.image '${_param:salt_control_xenial_image}' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml;
- reclass-tools add-key parameters.salt.control.cluster.internal.node.prx01.image '${_param:salt_control_xenial_image}' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml;
- reclass-tools add-key parameters.salt.control.cluster.internal.node.prx02.image '${_param:salt_control_xenial_image}' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml;
+ reclass-tools add-key parameters._param.salt_control_xenial_image 'https://apt.mcp.mirantis.net/images/ubuntu-16-04-x64-mcp{{ SHARED.REPOSITORY_SUITE }}.qcow2' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/init.yml;
+ reclass-tools add-key parameters._param.salt_control_trusty_image 'https://apt.mcp.mirantis.net/images/ubuntu-14-04-x64-mcp{{ SHARED.REPOSITORY_SUITE }}.qcow2' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/init.yml;
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 10}
skip_fail: false
-
-{{ SHARED.MACRO_GENERATE_INVENTORY() }}
-
-{{ SHARED.MACRO_NETWORKING_WORKAROUNDS() }}
-
-
-- description: "Workaround for PROD-14060"
- cmd: |
- set -e;
- # Add tenant and single addresses for computes
- salt-call reclass.cluster_meta_set deploy_address 172.17.41.7 /srv/salt/reclass/nodes/_generated/cmp001.cookied-bm-mcp-ocata-contrail.local.yml
- salt-call reclass.cluster_meta_set tenant_address 192.168.0.101 /srv/salt/reclass/nodes/_generated/cmp001.cookied-bm-mcp-ocata-contrail.local.yml
- salt-call reclass.cluster_meta_set single_address 10.167.8.101 /srv/salt/reclass/nodes/_generated/cmp001.cookied-bm-mcp-ocata-contrail.local.yml
-
- # salt-call reclass.cluster_meta_set deploy_address 172.16.49.74 /srv/salt/reclass/nodes/_generated/cmp002.cookied-bm-mcp-ocata-contrail.local.yml
- # salt-call reclass.cluster_meta_set tenant_address 192.168.0.102 /srv/salt/reclass/nodes/_generated/cmp002.cookied-bm-mcp-ocata-contrail.local.yml
- # salt-call reclass.cluster_meta_set single_address 10.167.8.102 /srv/salt/reclass/nodes/_generated/cmp002.cookied-bm-mcp-ocata-contrail.local.yml
-
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 10}
- skip_fail: false
-
-
-- description: Temporary workaround for removing cinder-volume from CTL nodes
- cmd: |
- sed -i 's/\-\ system\.cinder\.volume\.single//g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control.yml;
- sed -i 's/\-\ system\.cinder\.volume\.notification\.messagingv2//g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control.yml;
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 5}
- skip_fail: true
-
- description: Temporary WR for correct bridge name according to envoronment templates
cmd: |
sed -i 's/br\-ctl/br\_ctl/g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml;
@@ -131,6 +59,48 @@
retry: {count: 1, delay: 10}
skip_fail: false
+- description: Rerun openssh after env model is generated
+ cmd: |
+ salt-call state.sls openssh
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 10}
+ skip_fail: false
+
+{{ SHARED.MACRO_GENERATE_INVENTORY() }}
+
+{{ SHARED.MACRO_NETWORKING_WORKAROUNDS() }}
+
+- description: "Disable kubelet_fail_on_swap"
+ cmd: |
+ set -e;
+ . /root/venv-reclass-tools/bin/activate;
+ reclass-tools add-key parameters._param.kubelet_fail_on_swap false /srv/salt/reclass/classes/system/kubernetes/common.yml;
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 10}
+ skip_fail: false
+
+- description: Update minion information
+ cmd: |
+ salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.sync_grains &&
+ salt --hard-crash --state-output=mixed --state-verbose=False '*' mine.update &&
+ salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.refresh_pillar && sleep 10
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 10}
+ skip_fail: false
+
+- description: Rerun openssh after env model is generated
+ cmd: |
+ salt-call state.sls openssh
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 10}
+ skip_fail: false
+
+- description: Execute linux.network.host one more time after salt.minion to apply dynamically registered hosts on the cluster nodes
+ cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@linux:system' state.sls linux.network.host
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 2, delay: 10}
+ skip_fail: false
+
{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
########################################
@@ -157,13 +127,15 @@
retry: {count: 20, delay: 30}
skip_fail: false
+{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
+
#########################################
# Configure all running salt minion nodes
#########################################
- description: Hack resolv.conf on VCP nodes for internal services access
cmd: |
- salt --hard-crash --state-output=mixed --state-verbose=False -C '* and not kvm* and not cmp* and not gtw* and not cfg*' cmd.run "echo 'nameserver 172.17.41.2' > /etc/resolv.conf;"
+ salt --hard-crash --state-output=mixed --state-verbose=False -C '* and not cfg*' cmd.run "echo 'nameserver 172.17.41.2' > /etc/resolv.conf;"
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
@@ -186,4 +158,28 @@
retry: {count: 1, delay: 5}
skip_fail: false
-{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
+{{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}}
+
+{{SHARED.MACRO_CHECK_SALT_VERSION_ON_NODES()}}
+
+- description: "Lab04 workaround: Give each node root acces with key from cfg01"
+ cmd: |
+ set -e;
+ set -x;
+ key=$(ssh-keygen -y -f /root/.ssh/id_rsa);
+ salt '*' cmd.run "echo $key >> /root/.ssh/authorized_keys";
+ salt '*' cmd.run "service sshd restart"
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 5}
+ skip_fail: true
+
+- description: "Lab04 workaround: Control network access from cfg01 node using sshuttle via kvm01"
+ cmd: |
+ set -e;
+ set -x;
+ KVM01_DEPLOY_ADDRESS=$(salt-call --out=newline_values_only pillar.get _param:infra_kvm_node01_deploy_address);
+ apt-get install -y sshuttle;
+ sshuttle -r ${KVM01_DEPLOY_ADDRESS} 10.167.8.0/24 -D >/dev/null;
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 5}
+ skip_fail: true
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/sl.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/sl.yaml
index 4045fe8..0b559a8 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/sl.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/sl.yaml
@@ -1,4 +1,4 @@
-{% from 'cookied-bm-mcp-ocata-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %}
+{% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %}
# Install docker swarm
- description: Configure docker service
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay--user-data1604-hwe-compute.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay--user-data1604-hwe-compute.yaml
index a8981c7..ddbd762 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay--user-data1604-hwe-compute.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay--user-data1604-hwe-compute.yaml
@@ -42,11 +42,11 @@
#- sudo route add default gw {gateway} {interface_name}
# Create swap
- - fallocate -l 4G /swapfile
- - chmod 600 /swapfile
- - mkswap /swapfile
- - swapon /swapfile
- - echo "/swapfile none swap defaults 0 0" >> /etc/fstab
+ # - fallocate -l 4G /swapfile
+ # - chmod 600 /swapfile
+ # - mkswap /swapfile
+ # - swapon /swapfile
+ # - echo "/swapfile none swap defaults 0 0" >> /etc/fstab
############## TCP Cloud cfg01 node ##################
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay--user-data1604.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay--user-data1604.yaml
index bb7056a..89b0da7 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay--user-data1604.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay--user-data1604.yaml
@@ -41,11 +41,11 @@
#- sudo route add default gw {gateway} {interface_name}
# Create swap
- - fallocate -l 4G /swapfile
- - chmod 600 /swapfile
- - mkswap /swapfile
- - swapon /swapfile
- - echo "/swapfile none swap defaults 0 0" >> /etc/fstab
+ # - fallocate -l 4G /swapfile
+ # - chmod 600 /swapfile
+ # - mkswap /swapfile
+ # - swapon /swapfile
+ # - echo "/swapfile none swap defaults 0 0" >> /etc/fstab
############## TCP Cloud cfg01 node ##################
diff --git a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay.yaml b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay.yaml
index ef8c4f1..da6afea 100644
--- a/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-pike-k8s-contrail/underlay.yaml
@@ -8,27 +8,20 @@
{% set HOSTNAME_KVM01 = os_env('HOSTNAME_KVM01', 'kvm01.' + DOMAIN_NAME) %}
{% set HOSTNAME_KVM02 = os_env('HOSTNAME_KVM02', 'kvm02.' + DOMAIN_NAME) %}
{% set HOSTNAME_KVM03 = os_env('HOSTNAME_KVM03', 'kvm03.' + DOMAIN_NAME) %}
+{% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01.' + DOMAIN_NAME) %}
+{% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02.' + DOMAIN_NAME) %}
+{% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03.' + DOMAIN_NAME) %}
{% set HOSTNAME_CMP001 = os_env('HOSTNAME_CMP001', 'cmp001.' + DOMAIN_NAME) %}
-{#
{% set HOSTNAME_CMP002 = os_env('HOSTNAME_CMP002', 'cmp002.' + DOMAIN_NAME) %}
-{% set HOSTNAME_PRX01 = os_env('HOSTNAME_PRX01', 'prx01.' + DOMAIN_NAME) %}
-{% set HOSTNAME_GTW01 = os_env('HOSTNAME_GTW01', 'gtw01.' + DOMAIN_NAME) %}
-{% set HOSTNAME_GTW02 = os_env('HOSTNAME_GTW02', 'gtw02.' + DOMAIN_NAME) %}
-#}
{% set ETH0_IP_ADDRESS_CFG01 = os_env('ETH0_IP_ADDRESS_CFG01', '172.17.41.3') %}
{% set ETH0_IP_ADDRESS_KVM01 = os_env('ETH0_IP_ADDRESS_KVM01', '172.17.41.4') %}
{% set ETH0_IP_ADDRESS_KVM02 = os_env('ETH0_IP_ADDRESS_KVM02', '172.17.41.5') %}
{% set ETH0_IP_ADDRESS_KVM03 = os_env('ETH0_IP_ADDRESS_KVM03', '172.17.41.6') %}
{% set ETH0_IP_ADDRESS_CMP001 = os_env('ETH0_IP_ADDRESS_CMP001', '172.17.41.7') %}
-{#
-# {% set ETH0_IP_ADDRESS_CMP002 = os_env('ETH0_IP_ADDRESS_CMP002', '172.16.49.74') %}
-# {% set ETH0_IP_ADDRESS_CMP003 = os_env('ETH0_IP_ADDRESS_CMP003', '172.16.167.140') %}
-#}
-{#
-# {% set ETH0_IP_ADDRESS_PRX01 = os_env('ETH0_IP_ADDRESS_PRX01', '172.17.41.8') %}
-# {% set ETH0_IP_ADDRESS_GTW01 = os_env('ETH0_IP_ADDRESS_GTW01', '172.16.49.5') %}
-# {% set ETH0_IP_ADDRESS_GTW02 = os_env('ETH0_IP_ADDRESS_GTW02', '172.16.49.4') %}
-#}
+{% set ETH0_IP_ADDRESS_CMP002 = os_env('ETH0_IP_ADDRESS_CMP002', '172.17.41.8') %}
+{% set ETH0_IP_ADDRESS_CTL01 = os_env('ETH0_IP_ADDRESS_CTL01', '172.17.41.9') %}
+{% set ETH0_IP_ADDRESS_CTL02 = os_env('ETH0_IP_ADDRESS_CTL02', '172.17.41.10') %}
+{% set ETH0_IP_ADDRESS_CTL03 = os_env('ETH0_IP_ADDRESS_CTL03', '172.17.41.11') %}
{% import 'cookied-bm-mcp-pike-k8s-contrail/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
{% import 'cookied-bm-mcp-pike-k8s-contrail/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %}
{% import 'cookied-bm-mcp-pike-k8s-contrail/underlay--user-data1604.yaml' as CLOUDINIT_USER_DATA with context %}
@@ -59,14 +52,20 @@
default_{{ HOSTNAME_KVM02 }}: {{ ETH0_IP_ADDRESS_KVM02 }}
default_{{ HOSTNAME_KVM03 }}: {{ ETH0_IP_ADDRESS_KVM03 }}
default_{{ HOSTNAME_CMP001 }}: {{ ETH0_IP_ADDRESS_CMP001 }}
- #default_{{ HOSTNAME_PRX01 }}: {{ ETH0_IP_ADDRESS_PRX01 }}
+ default_{{ HOSTNAME_CMP002 }}: {{ ETH0_IP_ADDRESS_CMP002 }}
+ default_{{ HOSTNAME_CTL01 }}: {{ ETH0_IP_ADDRESS_CTL01 }}
+ default_{{ HOSTNAME_CTL02 }}: {{ ETH0_IP_ADDRESS_CTL02 }}
+ default_{{ HOSTNAME_CTL03 }}: {{ ETH0_IP_ADDRESS_CTL03 }}
virtual_{{ HOSTNAME_CFG01 }}: {{ ETH0_IP_ADDRESS_CFG01 }}
virtual_{{ HOSTNAME_KVM01 }}: {{ ETH0_IP_ADDRESS_KVM01 }}
virtual_{{ HOSTNAME_KVM02 }}: {{ ETH0_IP_ADDRESS_KVM02 }}
virtual_{{ HOSTNAME_KVM03 }}: {{ ETH0_IP_ADDRESS_KVM03 }}
virtual_{{ HOSTNAME_CMP001 }}: {{ ETH0_IP_ADDRESS_CMP001 }}
- #virtual_{{ HOSTNAME_PRX01 }}: {{ ETH0_IP_ADDRESS_PRX01 }}
+ virtual_{{ HOSTNAME_CMP002 }}: {{ ETH0_IP_ADDRESS_CMP002 }}
+ virtual_{{ HOSTNAME_CTL01 }}: {{ ETH0_IP_ADDRESS_CTL01 }}
+ virtual_{{ HOSTNAME_CTL02 }}: {{ ETH0_IP_ADDRESS_CTL02 }}
+ virtual_{{ HOSTNAME_CTL03 }}: {{ ETH0_IP_ADDRESS_CTL03 }}
#ip_ranges:
# dhcp: [+2, -4]
private-pool01:
@@ -415,6 +414,132 @@
parents:
- enp9s0f1
+ - name: {{ HOSTNAME_CTL01 }}
+ role: salt_minion
+ params:
+ ipmi_user: !os_env IPMI_USER
+ ipmi_password: !os_env IPMI_PASSWORD
+ ipmi_previlegies: OPERATOR
+ ipmi_host: !os_env IPMI_HOST_CTL01 # hostname or IP address
+ ipmi_lan_interface: lanplus
+ ipmi_port: 623
+
+ root_volume_name: system # see 'volumes' below
+ cloud_init_volume_name: iso # see 'volumes' below
+ cloud_init_iface_up: enp2s0f0 # see 'interfaces' below.
+ volumes:
+ - name: system
+ capacity: !os_env NODE_VOLUME_SIZE, 200
+
+ # The same as for agent URL, here is an URL to the image that should be
+ # used for deploy the node. It should also be accessible from deploying
+ # node when nodes are provisioned by agent. Usually PXE/provision network address is used.
+ source_image: !os_env IRONIC_SOURCE_IMAGE_URL
+ source_image_checksum: !os_env IRONIC_SOURCE_IMAGE_CHECKSUM
+
+ - name: iso # Volume with name 'iso' will be used
+ # for store image with cloud-init metadata.
+
+ cloudinit_meta_data: *cloudinit_meta_data
+ cloudinit_user_data: *cloudinit_user_data
+
+ interfaces:
+ - label: enp2s0f0
+ l2_network_device: admin
+ mac_address: !os_env ETH0_MAC_ADDRESS_CTL01
+ - label: enp2s0f1
+ mac_address: !os_env ETH1_MAC_ADDRESS_CTL01
+
+ network_config:
+ enp2s0f0:
+ networks:
+ - admin
+
+ - name: {{ HOSTNAME_CTL02 }}
+ role: salt_minion
+ params:
+ ipmi_user: !os_env IPMI_USER
+ ipmi_password: !os_env IPMI_PASSWORD_CTL
+ ipmi_previlegies: OPERATOR
+ ipmi_host: !os_env IPMI_HOST_CTL02 # hostname or IP address
+ ipmi_lan_interface: lanplus
+ ipmi_port: 623
+
+ root_volume_name: system # see 'volumes' below
+ cloud_init_volume_name: iso # see 'volumes' below
+ cloud_init_iface_up: enp2s0f0 # see 'interfaces' below.
+ volumes:
+ - name: system
+ capacity: !os_env NODE_VOLUME_SIZE, 200
+
+ # The same as for agent URL, here is an URL to the image that should be
+ # used for deploy the node. It should also be accessible from deploying
+ # node when nodes are provisioned by agent. Usually PXE/provision network address is used.
+ source_image: !os_env IRONIC_SOURCE_IMAGE_URL
+ source_image_checksum: !os_env IRONIC_SOURCE_IMAGE_CHECKSUM
+
+ - name: iso # Volume with name 'iso' will be used
+ # for store image with cloud-init metadata.
+
+ cloudinit_meta_data: *cloudinit_meta_data
+ cloudinit_user_data: *cloudinit_user_data
+
+ interfaces:
+ - label: enp2s0f0
+ l2_network_device: admin
+ mac_address: !os_env ETH0_MAC_ADDRESS_CTL02
+ - label: enp2s0f1
+ mac_address: !os_env ETH1_MAC_ADDRESS_CTL02
+
+ network_config:
+ enp2s0f0:
+ networks:
+ - admin
+
+ - name: {{ HOSTNAME_CTL03 }}
+ role: salt_minion
+ params:
+ ipmi_user: !os_env IPMI_USER
+ ipmi_password: !os_env IPMI_PASSWORD_CTL
+ ipmi_previlegies: OPERATOR
+ ipmi_host: !os_env IPMI_HOST_CTL03 # hostname or IP address
+ ipmi_lan_interface: lanplus
+ ipmi_port: 623
+
+ root_volume_name: system # see 'volumes' below
+ cloud_init_volume_name: iso # see 'volumes' below
+ # cloud_init_iface_up: eno1 # see 'interfaces' below.
+ cloud_init_iface_up: enp2s0f0 # see 'interfaces' below.
+ volumes:
+ - name: system
+ capacity: !os_env NODE_VOLUME_SIZE, 200
+
+ # The same as for agent URL, here is an URL to the image that should be
+ # used for deploy the node. It should also be accessible from deploying
+ # node when nodes are provisioned by agent. Usually PXE/provision network address is used.
+ source_image: !os_env IRONIC_SOURCE_IMAGE_URL
+ source_image_checksum: !os_env IRONIC_SOURCE_IMAGE_CHECKSUM
+
+ - name: iso # Volume with name 'iso' will be used
+ # for store image with cloud-init metadata.
+
+ cloudinit_meta_data: *cloudinit_meta_data
+ cloudinit_user_data: *cloudinit_user_data
+
+ interfaces:
+ # - label: eno1
+ - label: enp2s0f0
+ l2_network_device: admin
+ mac_address: !os_env ETH0_MAC_ADDRESS_CTL03
+ # - label: eno2
+ - label: enp2s0f1
+ mac_address: !os_env ETH1_MAC_ADDRESS_CTL03
+
+ network_config:
+ # eno1:
+ enp2s0f0:
+ networks:
+ - admin
- name: {{ HOSTNAME_CMP001 }}
role: salt_minion
@@ -473,66 +598,49 @@
parents:
- enp9s0f1
+ - name: {{ HOSTNAME_CMP002 }}
+ role: salt_minion
+ params:
+ ipmi_user: !os_env IPMI_USER
+ ipmi_password: !os_env IPMI_PASSWORD
+ ipmi_previlegies: OPERATOR
+ ipmi_host: !os_env IPMI_HOST_CMP002 # hostname or IP address
+ ipmi_lan_interface: lanplus
+ ipmi_port: 623
+ root_volume_name: system # see 'volumes' below
+ cloud_init_volume_name: iso # see 'volumes' below
+ # cloud_init_iface_up: enp3s0f0 # see 'interfaces' below.
+ cloud_init_iface_up: enp9s0f0 # see 'interfaces' below.
+ volumes:
+ - name: system
+ capacity: !os_env NODE_VOLUME_SIZE, 200
- # - name: {{ HOSTNAME_CMP002 }}
- # role: salt_minion
- # params:
- # ipmi_user: !os_env IPMI_USER
- # ipmi_password: !os_env IPMI_PASSWORD
- # ipmi_previlegies: OPERATOR
- # ipmi_host: !os_env IPMI_HOST_CMP002 # hostname or IP address
- # ipmi_lan_interface: lanplus
- # ipmi_port: 623
+ # The same as for agent URL, here is an URL to the image that should be
+ # used for deploy the node. It should also be accessible from deploying
+ # node when nodes are provisioned by agent. Usually PXE/provision network address is used.
+ source_image: !os_env IRONIC_SOURCE_IMAGE_URL
+ source_image_checksum: !os_env IRONIC_SOURCE_IMAGE_CHECKSUM
- # root_volume_name: system # see 'volumes' below
- # cloud_init_volume_name: iso # see 'volumes' below
- # # cloud_init_iface_up: eno1 # see 'interfaces' below.
- # cloud_init_iface_up: enp2s0f1 # see 'interfaces' below.
- # volumes:
- # - name: system
- # capacity: !os_env NODE_VOLUME_SIZE, 200
+ - name: iso # Volume with name 'iso' will be used
+ # for store image with cloud-init metadata.
- # # The same as for agent URL, here is an URL to the image that should be
- # # used for deploy the node. It should also be accessible from deploying
- # # node when nodes are provisioned by agent. Usually PXE/provision network address is used.
- # source_image: !os_env IRONIC_SOURCE_IMAGE_URL
- # source_image_checksum: !os_env IRONIC_SOURCE_IMAGE_CHECKSUM
+ cloudinit_meta_data: *cloudinit_meta_data
+ cloudinit_user_data: *cloudinit_user_data_hwe_cmp
- # - name: iso # Volume with name 'iso' will be used
- # # for store image with cloud-init metadata.
-
- # cloudinit_meta_data: *cloudinit_meta_data
- # cloudinit_user_data: *cloudinit_user_data_hwe
-
- # interfaces:
- # # - label: eno1
- # - label: enp2s0f0
- # mac_address: !os_env ETH0_MAC_ADDRESS_CMP002
- # # - label: eth0
- # - label: enp2s0f1
- # l2_network_device: admin
- # mac_address: !os_env ETH1_MAC_ADDRESS_CMP002
- # # - label: eth3
- # - label: enp5s0f0
- # mac_address: !os_env ETH2_MAC_ADDRESS_CMP002
- # features: ['dpdk', 'dpdk_pci: 0000:05:00.0']
- # # - label: eth2
- # - label: enp5s0f1
- # mac_address: !os_env ETH3_MAC_ADDRESS_CMP002
- # features: ['dpdk', 'dpdk_pci: 0000:05:00.1']
- # # - label: eth4
- # # mac_address: !os_env ETH4_MAC_ADDRESS_CMP002
- # # features: ['dpdk', 'dpdk_pci: 0000:0b:00.0']
-
- # network_config:
- # enp2s0f1:
- # networks:
- # - admin
- # bond0:
- # networks:
- # - control
- # aggregation: active-backup
- # parents:
- # - enp5s0f0
- # - enp5s0f1
+ interfaces:
+ - label: enp9s0f0
+ l2_network_device: admin
+ mac_address: !os_env ETH0_MAC_ADDRESS_CMP002
+ - label: enp9s0f1
+ mac_address: !os_env ETH1_MAC_ADDRESS_CMP002
+ network_config:
+ enp9s0f0:
+ networks:
+ - admin
+ bond0:
+ networks:
+ - control
+ aggregation: active-backup
+ parents:
+ - enp9s0f1