fix templates
diff --git a/tcp_tests/templates/tcpcloud--user-data-master-node.yaml b/tcp_tests/templates/tcpcloud--user-data-master-node.yaml
index 6b0b1d1..2c2875b 100644
--- a/tcp_tests/templates/tcpcloud--user-data-master-node.yaml
+++ b/tcp_tests/templates/tcpcloud--user-data-master-node.yaml
@@ -69,6 +69,13 @@
reclass: *reclass
EOF
+ - echo "Configure git settings and certificate"
+ - touch /root/.git_trusted_certs.pem
+ - for server in git.tcpcloud.eu github.com; do openssl s_client -showcerts -connect $server:443 </dev/null | openssl x509 -outform PEM >> /root/.git_trusted_certs.pem; done
+ - HOME=/root git config --global http.sslCAInfo /root/.git_trusted_certs.pem
+ - HOME=/root git config --global user.email "tcp-qa@example.com"
+ - HOME=/root git config --global user.name "TCP QA"
+
- echo "Configuring reclass ..."
- git clone https://github.com/Mirantis/mk-lab-salt-model.git /srv/salt/reclass -b master
@@ -94,7 +101,7 @@
master: localhost
EOF
- - echo "Restarting services ..."
+ - echo "Restarting services with workarounds..."
- service salt-master restart
- rm -f /etc/salt/pki/minion/minion_master.pub
- service salt-minion restart
@@ -107,6 +114,16 @@
- echo "Running complete state ..."
- salt-call --no-color state.sls linux openssh salt.minion
- salt-call --no-color state.sls salt.master
+ - rm -f /etc/salt/pki/minion/minion_master.pub
+ - service salt-minion stop
+ - sleep 5
+ - service salt-master stop
+ - sleep 5
+ - killall -9 salt-master
+ - sleep 5
+ - service salt-master start
+ - sleep 60
+ - rm -f /etc/salt/pki/minion/minion_master.pub
- service salt-minion restart
# - salt-call --no-color state.highstate
@@ -124,9 +141,7 @@
# 2nd interface should be UP without IP address
auto eth1
- iface eth1 inet manual
- pre-up ifconfig $IFACE up
- post-down ifconfig $IFACE down
+ iface eth1 inet dhcp
- path: /root/.ssh/id_rsa
owner: root:root
diff --git a/tcp_tests/templates/tcpcloud--user-data.yaml b/tcp_tests/templates/tcpcloud--user-data.yaml
index 59eaf1e..d60a87a 100644
--- a/tcp_tests/templates/tcpcloud--user-data.yaml
+++ b/tcp_tests/templates/tcpcloud--user-data.yaml
@@ -56,6 +56,10 @@
- 'echo "id: {hostname}" >> /etc/salt/minion'
- 'echo "master: 172.16.10.100" >> /etc/salt/minion'
+ - echo "Restarting minion service with workarounds..."
+ - rm -f /etc/salt/pki/minion/minion_master.pub
+ - service salt-minion restart
+ - sleep 5
- rm -f /etc/salt/pki/minion/minion_master.pub
- service salt-minion restart
@@ -79,6 +83,4 @@
# 2nd interface should be UP without IP address
auto eth1
- iface eth1 inet manual
- pre-up ifconfig $IFACE up
- post-down ifconfig $IFACE down
+ iface eth1 inet dhcp
diff --git a/tcp_tests/templates/tcpcloud-default.yaml b/tcp_tests/templates/tcpcloud-default.yaml
index 83ac27c..43dcf4a 100644
--- a/tcp_tests/templates/tcpcloud-default.yaml
+++ b/tcp_tests/templates/tcpcloud-default.yaml
@@ -12,7 +12,16 @@
address_pools:
public-pool01:
- net: *pool_default
+ net: 172.16.10.0/24:24
+ params:
+ ip_reserved:
+ gateway: +1
+ l2_network_device: +1
+ ip_ranges:
+ dhcp: [+100, -2]
+
+ private-pool01:
+ net: 192.168.10.0/24:24
params:
ip_reserved:
gateway: +1
@@ -34,6 +43,7 @@
network_pools:
public: public-pool01
+ private: private-pool01
l2_network_devices:
public:
@@ -43,7 +53,10 @@
mode: nat
private:
- dhcp: false
+ address_pool: private-pool01
+ dhcp: true
+ forward:
+ mode: nat
group_volumes:
- name: cloudimage # This name is used for 'backing_store' option for node volumes.
@@ -317,3 +330,41 @@
eth1:
networks:
- private
+
+ - name: mon01.mk20-lab-advanced.local
+ 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: eth0
+ volumes:
+ - name: system
+ capacity: !os_env NODE_VOLUME_SIZE, 150
+ backing_store: cloudimage
+ 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: !include tcpcloud--meta-data.yaml
+ cloudinit_user_data: !include tcpcloud--user-data.yaml
+
+ interfaces:
+ - label: eth0
+ l2_network_device: public
+ interface_model: *interface_model
+ - label: eth1
+ l2_network_device: private
+ interface_model: *interface_model
+ network_config:
+ eth0: # Will get an IP from DHCP public-pool01
+ networks:
+ - public
+ eth1:
+ networks:
+ - private