Regenerate cfg01* node with reclass.storage
Change-Id: I074a46a31d9d296bd1706c9550e6b53ee78a91b0
Reviewed-on: https://review.gerrithub.io/377390
Reviewed-by: Dennis Dmitriev <dis.xcom@gmail.com>
Tested-by: Dennis Dmitriev <dis.xcom@gmail.com>
diff --git a/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/salt.yaml b/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/salt.yaml
index 478e9dd..3da0df6 100644
--- a/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/salt.yaml
+++ b/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/salt.yaml
@@ -23,7 +23,7 @@
mkdir -p /srv/salt/reclass/classes/cluster/
mkdir -p /srv/salt/reclass/classes/system/
mkdir -p /srv/salt/reclass/classes/service/
- mkdir -p /srv/salt/reclass/nodes/
+ mkdir -p /srv/salt/reclass/nodes/_generated
{%- set CONTEXT_PATH = '/tmp/cookiecutter-templates/contexts/openstack_ovs_dvr_vxlan.yml' %}
@@ -63,23 +63,11 @@
export GIT_SSL_NO_VERIFY=true; git clone https://gerrit.mcp.mirantis.net/salt-models/reclass-system /srv/salt/reclass/classes/system/
# Create the cfg01 node and disable checkouting the model from remote repository
- cat << 'EOF' >> /srv/salt/reclass/nodes/{{ HOSTNAME_CFG01 }}.yml
+ cat << 'EOF' >> /srv/salt/reclass/nodes/_generated/{{ HOSTNAME_CFG01 }}.yml
classes:
- cluster.{{ LAB_CONFIG_NAME }}.infra.config
- parameters:
- _param:
- linux_system_codename: xenial
- reclass_data_revision: master
- linux:
- system:
- name: cfg01
- domain: {{ DOMAIN_NAME }}
- # local storage
- reclass:
- storage:
- data_source:
- engine: local
- EOF
+ - environment.{{ ENVIRONMENT_MODEL_INVENTORY_NAME }}.reclass_datasource_local
+ - environment.{{ ENVIRONMENT_MODEL_INVENTORY_NAME }}
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 1}
@@ -92,23 +80,35 @@
pip install git+https://github.com/dis-xcom/reclass-tools;
# Enable 'root' user
- reclass-tools add-key classes system.openssh.server.team.lab /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/config.yml --merge
+ reclass-tools add-key classes system.openssh.server.team.all /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/config.yml --merge
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 1}
skip_fail: false
-
-{{ 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"') }}
-
-
-- description: Upload 'environment' to {{ HOSTNAME_GTW01 }}
+- description: "[EXPERIMENTAL] Upload 'environment' to {{ HOSTNAME_CFG01 }}"
upload:
local_path: {{ config.salt_deploy.environment_template_dir }}
remote_path: /tmp/environment/
node_name: {{ HOSTNAME_CFG01 }}
skip_fail: false
+- description: "[EXPERIMENTAL] Remove linux.network.interface object from the cluster/system models and use fixed 'environment' model instead"
+ cmd: |
+ apt-get -y install python-virtualenv python-pip build-essential python-dev libssl-dev;
+ pip install git+https://github.com/dis-xcom/reclass-tools;
+ reclass-tools del-key parameters.linux.network.interface /srv/salt/reclass/classes/cluster/;
+ reclass-tools del-key parameters.linux.network.interface /srv/salt/reclass/classes/system/;
+ reclass-tools del-key parameters.linux.network.interface /usr/share/salt-formulas/reclass/;
+
+ #if ! reclass-tools get-key 'classes' /srv/salt/reclass/nodes/{{ HOSTNAME_CFG01 }}.yml | grep -q "environment.{{ ENVIRONMENT_MODEL_INVENTORY_NAME }}$"; then
+ # reclass-tools add-key 'classes' 'environment.{{ ENVIRONMENT_MODEL_INVENTORY_NAME }}' /srv/salt/reclass/nodes/{{ HOSTNAME_CFG01 }}.yml --merge ;
+ #fi;
+
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 5}
+ skip_fail: false
+
- description: "[EXPERIMENTAL] Create environment model for virtual environment"
cmd: |
set -e;
@@ -122,21 +122,7 @@
retry: {count: 1, delay: 5}
skip_fail: false
-- description: "[EXPERIMENTAL] Remove linux.network.interface object from the cluster/system models and use fixed 'environment' model instead"
- cmd: |
- apt-get -y install python-virtualenv python-pip build-essential python-dev libssl-dev;
- pip install git+https://github.com/dis-xcom/reclass-tools;
- reclass-tools del-key parameters.linux.network.interface /srv/salt/reclass/classes/cluster/;
- reclass-tools del-key parameters.linux.network.interface /srv/salt/reclass/classes/system/;
- reclass-tools del-key parameters.linux.network.interface /usr/share/salt-formulas/reclass/;
-
- if ! reclass-tools get-key 'classes' /srv/salt/reclass/nodes/{{ HOSTNAME_CFG01 }}.yml | grep -q "environment.{{ ENVIRONMENT_MODEL_INVENTORY_NAME }}$"; then
- reclass-tools add-key 'classes' 'environment.{{ ENVIRONMENT_MODEL_INVENTORY_NAME }}' /srv/salt/reclass/nodes/{{ HOSTNAME_CFG01 }}.yml --merge ;
- fi;
-
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 5}
- skip_fail: false
+{{ 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"') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay--user-data-cfg01.yaml b/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay--user-data-cfg01.yaml
index 8c75753..8cb2c2d 100644
--- a/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay--user-data-cfg01.yaml
+++ b/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay--user-data-cfg01.yaml
@@ -37,7 +37,7 @@
# Prepare network connection
- sudo ifup ens3
#- sudo route add default gw {gateway} {interface_name}
- - sudo ifup ens4
+ #- sudo ifup ens4
# Create swap
- fallocate -l 4G /swapfile
@@ -85,8 +85,6 @@
content: |
auto ens3
iface ens3 inet dhcp
- auto ens4
- iface ens4 inet dhcp
- path: /root/.ssh/config
owner: root:root
diff --git a/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay--user-data1604.yaml b/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay--user-data1604.yaml
index 410a639..677c392 100644
--- a/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay--user-data1604.yaml
+++ b/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay--user-data1604.yaml
@@ -39,7 +39,7 @@
# Prepare network connection
- sudo ifup ens3
#- sudo route add default gw {gateway} {interface_name}
- - sudo ifup ens4
+ #- sudo ifup ens4
# Create swap
- fallocate -l 4G /swapfile
@@ -89,6 +89,4 @@
content: |
auto ens3
iface ens3 inet dhcp
- auto ens4
- iface ens4 inet dhcp
diff --git a/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay.yaml b/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay.yaml
index 7221945..35309f0 100644
--- a/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay.yaml
+++ b/tcp_tests/templates/cookied-mcp-ocata-dvr-vxlan/underlay.yaml
@@ -288,23 +288,23 @@
external: external-pool01
l2_network_devices:
- private:
- address_pool: private-pool01
- dhcp: true
-
admin:
address_pool: admin-pool01
dhcp: true
forward:
mode: nat
- tenant:
- address_pool: tenant-pool01
- dhcp: true
+ private:
+ address_pool: private-pool01
+ dhcp: false
+
+ #tenant:
+ # address_pool: tenant-pool01
+ # dhcp: false
external:
address_pool: external-pool01
- dhcp: true
+ dhcp: false
forward:
mode: nat
@@ -362,97 +362,6 @@
boot:
- hd
cloud_init_volume_name: iso
- cloud_init_iface_up: ens4
- volumes:
- - name: system
- capacity: !os_env NODE_VOLUME_SIZE, 150
- backing_store: cloudimage1604
- format: qcow2
- - name: iso # Volume with name 'iso' will be used
- # for store image with cloud-init metadata.
- capacity: 1
- format: raw
- device: cdrom
- bus: ide
- cloudinit_meta_data: *cloudinit_meta_data
- cloudinit_user_data: *cloudinit_user_data_cicd
-
- interfaces: &cid_interfaces
- - label: ens3
- l2_network_device: private
- interface_model: *interface_model
- - label: ens4
- l2_network_device: admin
- interface_model: *interface_model
- network_config: &cid_network_config
- ens3:
- networks:
- - private
- ens4:
- networks:
- - admin
-
-# - name: {{ HOSTNAME_CID02 }}
-# role: salt_minion
-# params:
-## vcpu: !os_env SLAVE_NODE_CPU, 2
-# memory: !os_env SLAVE_NODE_MEMORY, 6144
-# boot:
-# - hd
-# cloud_init_volume_name: iso
-# cloud_init_iface_up: ens4
-# volumes:
-# - name: system
-# capacity: !os_env NODE_VOLUME_SIZE, 150
-# backing_store: cloudimage1604
-# format: qcow2
-# - name: iso # Volume with name 'iso' will be used
-# # for store image with cloud-init metadata.
-# capacity: 1
-# format: raw
-# device: cdrom
-# bus: ide
-# cloudinit_meta_data: *cloudinit_meta_data
-# cloudinit_user_data: *cloudinit_user_data_cicd
-#
-# interfaces: *cid_interfaces
-# network_config: *cid_network_config
-
-# - name: {{ HOSTNAME_CID03 }}
-# role: salt_minion
-# params:
-# vcpu: !os_env SLAVE_NODE_CPU, 2
-# memory: !os_env SLAVE_NODE_MEMORY, 6144
-# boot:
-# - hd
-# cloud_init_volume_name: iso
-# cloud_init_iface_up: ens4
-# volumes:
-# - name: system
-# capacity: !os_env NODE_VOLUME_SIZE, 150
-# backing_store: cloudimage1604
-# format: qcow2
-# - name: iso # Volume with name 'iso' will be used
-# # for store image with cloud-init metadata.
-# capacity: 1
-# format: raw
-# device: cdrom
-# bus: ide
-# cloudinit_meta_data: *cloudinit_meta_data
-# cloudinit_user_data: *cloudinit_user_data_cicd
-#
-# interfaces: *cid_interfaces
-# network_config: *cid_network_config
-
- # KVM* nodes required for services like glusterfs.server
- - name: {{ HOSTNAME_KVM01 }}
- role: salt_minion
- params:
- vcpu: !os_env SLAVE_NODE_CPU, 1
- memory: !os_env SLAVE_NODE_MEMORY, 2048
- boot:
- - hd
- cloud_init_volume_name: iso
cloud_init_iface_up: ens3
volumes:
- name: system
@@ -483,6 +392,85 @@
networks:
- private
+# - name: {{ HOSTNAME_CID02 }}
+# role: salt_minion
+# params:
+## vcpu: !os_env SLAVE_NODE_CPU, 2
+# memory: !os_env SLAVE_NODE_MEMORY, 6144
+# boot:
+# - hd
+# cloud_init_volume_name: iso
+# cloud_init_iface_up: ens3
+# volumes:
+# - name: system
+# capacity: !os_env NODE_VOLUME_SIZE, 150
+# backing_store: cloudimage1604
+# format: qcow2
+# - name: iso # Volume with name 'iso' will be used
+# # for store image with cloud-init metadata.
+# capacity: 1
+# format: raw
+# device: cdrom
+# bus: ide
+# cloudinit_meta_data: *cloudinit_meta_data
+# cloudinit_user_data: *cloudinit_user_data_1604
+#
+# interfaces: *interfaces
+# network_config: *network_config
+
+# - name: {{ HOSTNAME_CID03 }}
+# role: salt_minion
+# params:
+# vcpu: !os_env SLAVE_NODE_CPU, 2
+# memory: !os_env SLAVE_NODE_MEMORY, 6144
+# boot:
+# - hd
+# cloud_init_volume_name: iso
+# cloud_init_iface_up: ens3
+# volumes:
+# - name: system
+# capacity: !os_env NODE_VOLUME_SIZE, 150
+# backing_store: cloudimage1604
+# format: qcow2
+# - name: iso # Volume with name 'iso' will be used
+# # for store image with cloud-init metadata.
+# capacity: 1
+# format: raw
+# device: cdrom
+# bus: ide
+# cloudinit_meta_data: *cloudinit_meta_data
+# cloudinit_user_data: *cloudinit_user_data_1604
+#
+# interfaces: *interfaces
+# network_config: *network_config
+
+ # KVM* nodes required for services like glusterfs.server
+ - name: {{ HOSTNAME_KVM01 }}
+ role: salt_minion
+ params:
+ vcpu: !os_env SLAVE_NODE_CPU, 1
+ memory: !os_env SLAVE_NODE_MEMORY, 2048
+ boot:
+ - hd
+ cloud_init_volume_name: iso
+ cloud_init_iface_up: ens3
+ volumes:
+ - name: system
+ capacity: !os_env NODE_VOLUME_SIZE, 150
+ backing_store: cloudimage1604
+ format: qcow2
+ - name: iso # Volume with name 'iso' will be used
+ # for store image with cloud-init metadata.
+ capacity: 1
+ format: raw
+ device: cdrom
+ bus: ide
+ cloudinit_meta_data: *cloudinit_meta_data
+ cloudinit_user_data: *cloudinit_user_data_1604
+
+ interfaces: *interfaces
+ network_config: *network_config
+
- name: {{ HOSTNAME_KVM02 }}
role: salt_minion
params:
@@ -543,7 +531,7 @@
boot:
- hd
cloud_init_volume_name: iso
- cloud_init_iface_up: ens4
+ cloud_init_iface_up: ens3
volumes:
- name: system
capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -556,10 +544,10 @@
device: cdrom
bus: ide
cloudinit_meta_data: *cloudinit_meta_data
- cloudinit_user_data: *cloudinit_user_data_cicd
+ cloudinit_user_data: *cloudinit_user_data_1604
- interfaces: *cid_interfaces
- network_config: *cid_network_config
+ interfaces: *interfaces
+ network_config: *network_config
- name: {{ HOSTNAME_DBS02 }}
role: salt_minion
@@ -569,7 +557,7 @@
boot:
- hd
cloud_init_volume_name: iso
- cloud_init_iface_up: ens4
+ cloud_init_iface_up: ens3
volumes:
- name: system
capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -582,10 +570,10 @@
device: cdrom
bus: ide
cloudinit_meta_data: *cloudinit_meta_data
- cloudinit_user_data: *cloudinit_user_data_cicd
+ cloudinit_user_data: *cloudinit_user_data_1604
- interfaces: *cid_interfaces
- network_config: *cid_network_config
+ interfaces: *interfaces
+ network_config: *network_config
- name: {{ HOSTNAME_DBS03 }}
role: salt_minion
@@ -595,7 +583,7 @@
boot:
- hd
cloud_init_volume_name: iso
- cloud_init_iface_up: ens4
+ cloud_init_iface_up: ens3
volumes:
- name: system
capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -608,10 +596,10 @@
device: cdrom
bus: ide
cloudinit_meta_data: *cloudinit_meta_data
- cloudinit_user_data: *cloudinit_user_data_cicd
+ cloudinit_user_data: *cloudinit_user_data_1604
- interfaces: *cid_interfaces
- network_config: *cid_network_config
+ interfaces: *interfaces
+ network_config: *network_config
- name: {{ HOSTNAME_MSG01 }}
role: salt_minion
@@ -621,7 +609,7 @@
boot:
- hd
cloud_init_volume_name: iso
- cloud_init_iface_up: ens4
+ cloud_init_iface_up: ens3
volumes:
- name: system
capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -634,10 +622,10 @@
device: cdrom
bus: ide
cloudinit_meta_data: *cloudinit_meta_data
- cloudinit_user_data: *cloudinit_user_data_cicd
+ cloudinit_user_data: *cloudinit_user_data_1604
- interfaces: *cid_interfaces
- network_config: *cid_network_config
+ interfaces: *interfaces
+ network_config: *network_config
# - name: {{ HOSTNAME_MSG02 }}
# role: salt_minion
@@ -647,7 +635,7 @@
# boot:
# - hd
# cloud_init_volume_name: iso
-# cloud_init_iface_up: ens4
+# cloud_init_iface_up: ens3
# volumes:
# - name: system
# capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -660,10 +648,10 @@
# device: cdrom
# bus: ide
# cloudinit_meta_data: *cloudinit_meta_data
-# cloudinit_user_data: *cloudinit_user_data_cicd
+# cloudinit_user_data: *cloudinit_user_data_1604
#
-# interfaces: *cid_interfaces
-# network_config: *cid_network_config
+# interfaces: *interfaces
+# network_config: *network_config
# - name: {{ HOSTNAME_MSG03 }}
# role: salt_minion
@@ -673,7 +661,7 @@
# boot:
# - hd
# cloud_init_volume_name: iso
-# cloud_init_iface_up: ens4
+# cloud_init_iface_up: ens3
# volumes:
# - name: system
# capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -686,10 +674,10 @@
# device: cdrom
# bus: ide
# cloudinit_meta_data: *cloudinit_meta_data
-# cloudinit_user_data: *cloudinit_user_data_cicd
+# cloudinit_user_data: *cloudinit_user_data_1604
#
-# interfaces: *cid_interfaces
-# network_config: *cid_network_config
+# interfaces: *interfaces
+# network_config: *network_config
- name: {{ HOSTNAME_CTL01 }}
role: salt_minion
@@ -699,7 +687,7 @@
boot:
- hd
cloud_init_volume_name: iso
- cloud_init_iface_up: ens4
+ cloud_init_iface_up: ens3
volumes:
- name: system
capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -715,10 +703,10 @@
device: cdrom
bus: ide
cloudinit_meta_data: *cloudinit_meta_data
- cloudinit_user_data: *cloudinit_user_data_cicd
+ cloudinit_user_data: *cloudinit_user_data_1604
- interfaces: *cid_interfaces
- network_config: *cid_network_config
+ interfaces: *interfaces
+ network_config: *network_config
- name: {{ HOSTNAME_CTL02 }}
role: salt_minion
@@ -728,7 +716,7 @@
boot:
- hd
cloud_init_volume_name: iso
- cloud_init_iface_up: ens4
+ cloud_init_iface_up: ens3
volumes:
- name: system
capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -744,10 +732,10 @@
device: cdrom
bus: ide
cloudinit_meta_data: *cloudinit_meta_data
- cloudinit_user_data: *cloudinit_user_data_cicd
+ cloudinit_user_data: *cloudinit_user_data_1604
- interfaces: *cid_interfaces
- network_config: *cid_network_config
+ interfaces: *interfaces
+ network_config: *network_config
# - name: {{ HOSTNAME_CTL03 }}
# role: salt_minion
@@ -757,7 +745,7 @@
# boot:
# - hd
# cloud_init_volume_name: iso
-# cloud_init_iface_up: ens4
+# cloud_init_iface_up: ens3
# volumes:
# - name: system
# capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -773,10 +761,10 @@
# device: cdrom
# bus: ide
# cloudinit_meta_data: *cloudinit_meta_data
-# cloudinit_user_data: *cloudinit_user_data_cicd
+# cloudinit_user_data: *cloudinit_user_data_1604
#
-# interfaces: *cid_interfaces
-# network_config: *cid_network_config
+# interfaces: *interfaces
+# network_config: *network_config
- name: {{ HOSTNAME_PRX01 }}
role: salt_minion
@@ -786,7 +774,7 @@
boot:
- hd
cloud_init_volume_name: iso
- cloud_init_iface_up: ens4
+ cloud_init_iface_up: ens3
volumes:
- name: system
capacity: !os_env NODE_VOLUME_SIZE, 150
@@ -802,10 +790,10 @@
device: cdrom
bus: ide
cloudinit_meta_data: *cloudinit_meta_data
- cloudinit_user_data: *cloudinit_user_data_cicd
+ cloudinit_user_data: *cloudinit_user_data_1604
- interfaces: *cid_interfaces
- network_config: *cid_network_config
+ interfaces: *interfaces
+ network_config: *network_config
- name: {{ HOSTNAME_CMP01 }}
role: salt_minion
@@ -839,7 +827,7 @@
l2_network_device: private
interface_model: *interface_model
- label: ens5
- l2_network_device: tenant
+ l2_network_device: private
interface_model: *interface_model
- label: ens6
l2_network_device: external
@@ -853,7 +841,7 @@
- private
ens5:
networks:
- - tenant
+ - private
ens6:
networks:
- external