diff options
Diffstat (limited to 'xci/playbooks')
-rw-r--r-- | xci/playbooks/configure-localhost.yml | 5 | ||||
-rw-r--r-- | xci/playbooks/roles/.gitignore | 8 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/defaults/main.yml | 11 | ||||
-rwxr-xr-x | xci/playbooks/roles/bootstrap-host/files/network-config-suse (renamed from xci/playbooks/roles/configure-network/files/network-config-suse) | 0 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/tasks/main.yml | 15 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/tasks/network.yml (renamed from xci/playbooks/roles/configure-network/tasks/main.yml) | 0 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/tasks/time.yml (renamed from xci/playbooks/roles/synchronize-time/tasks/main.yml) | 0 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/templates/debian/compute00.interface.j2 (renamed from xci/playbooks/roles/configure-network/templates/debian/compute00.interface.j2) | 0 | ||||
l--------- | xci/playbooks/roles/bootstrap-host/templates/debian/compute01.interface.j2 (renamed from xci/playbooks/roles/configure-network/templates/debian/compute01.interface.j2) | 0 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/templates/debian/controller00.interface.j2 (renamed from xci/playbooks/roles/configure-network/templates/debian/controller00.interface.j2) | 0 | ||||
l--------- | xci/playbooks/roles/bootstrap-host/templates/debian/controller01.interface.j2 (renamed from xci/playbooks/roles/configure-network/templates/debian/controller01.interface.j2) | 0 | ||||
l--------- | xci/playbooks/roles/bootstrap-host/templates/debian/controller02.interface.j2 (renamed from xci/playbooks/roles/configure-network/templates/debian/controller02.interface.j2) | 0 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/templates/debian/opnfv.interface.j2 (renamed from xci/playbooks/roles/configure-network/templates/debian/opnfv.interface.j2) | 0 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/templates/redhat/bridge.ifcfg.j2 (renamed from xci/playbooks/roles/configure-network/templates/redhat/bridge.ifcfg.j2) | 0 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/templates/redhat/interface.ifcfg.j2 (renamed from xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2) | 0 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/templates/suse/suse.interface.j2 (renamed from xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2) | 0 | ||||
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/templates/suse/suse.routes.j2 (renamed from xci/playbooks/roles/configure-network/templates/suse/suse.routes.j2) | 0 | ||||
-rw-r--r-- | xci/playbooks/roles/prepare-functest/templates/env.j2 | 2 | ||||
-rw-r--r-- | xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2 | 16 |
19 files changed, 47 insertions, 10 deletions
diff --git a/xci/playbooks/configure-localhost.yml b/xci/playbooks/configure-localhost.yml index a5b0e3fa..0e3cde6e 100644 --- a/xci/playbooks/configure-localhost.yml +++ b/xci/playbooks/configure-localhost.yml @@ -98,3 +98,8 @@ - OPENSTACK_OSA_DEV_PATH != "" when: - INSTALLER_TYPE == "osa" + + - name: Dump XCI execution environment to a file + shell: env > "{{ XCI_PATH }}/.cache/xci.env" + args: + executable: /bin/bash diff --git a/xci/playbooks/roles/.gitignore b/xci/playbooks/roles/.gitignore deleted file mode 100644 index e0b47770..00000000 --- a/xci/playbooks/roles/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -* -!.gitignore -!clone-repository/ -!configure-network/ -!configure-nfs/ -!prepare-functest/ -!remote-folders/ -!synchronize-time/ diff --git a/xci/playbooks/roles/bootstrap-host/defaults/main.yml b/xci/playbooks/roles/bootstrap-host/defaults/main.yml new file mode 100644 index 00000000..8e5a0e34 --- /dev/null +++ b/xci/playbooks/roles/bootstrap-host/defaults/main.yml @@ -0,0 +1,11 @@ +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 SUSE Linux GmbH 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 +############################################################################## + +configure_network: yes +configure_time: yes diff --git a/xci/playbooks/roles/configure-network/files/network-config-suse b/xci/playbooks/roles/bootstrap-host/files/network-config-suse index 02cdd998..02cdd998 100755 --- a/xci/playbooks/roles/configure-network/files/network-config-suse +++ b/xci/playbooks/roles/bootstrap-host/files/network-config-suse diff --git a/xci/playbooks/roles/bootstrap-host/tasks/main.yml b/xci/playbooks/roles/bootstrap-host/tasks/main.yml new file mode 100644 index 00000000..7d6d259e --- /dev/null +++ b/xci/playbooks/roles/bootstrap-host/tasks/main.yml @@ -0,0 +1,15 @@ +--- +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 SUSE Linx GmbH 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 +############################################################################## + +- include: network.yml + when: configure_network + +- include: time.yml + when: configure_time diff --git a/xci/playbooks/roles/configure-network/tasks/main.yml b/xci/playbooks/roles/bootstrap-host/tasks/network.yml index 01edf459..01edf459 100644 --- a/xci/playbooks/roles/configure-network/tasks/main.yml +++ b/xci/playbooks/roles/bootstrap-host/tasks/network.yml diff --git a/xci/playbooks/roles/synchronize-time/tasks/main.yml b/xci/playbooks/roles/bootstrap-host/tasks/time.yml index 8f94d33f..8f94d33f 100644 --- a/xci/playbooks/roles/synchronize-time/tasks/main.yml +++ b/xci/playbooks/roles/bootstrap-host/tasks/time.yml diff --git a/xci/playbooks/roles/configure-network/templates/debian/compute00.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/compute00.interface.j2 index 2da12f20..2da12f20 100644 --- a/xci/playbooks/roles/configure-network/templates/debian/compute00.interface.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/debian/compute00.interface.j2 diff --git a/xci/playbooks/roles/configure-network/templates/debian/compute01.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/compute01.interface.j2 index a74df1c2..a74df1c2 120000 --- a/xci/playbooks/roles/configure-network/templates/debian/compute01.interface.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/debian/compute01.interface.j2 diff --git a/xci/playbooks/roles/configure-network/templates/debian/controller00.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/controller00.interface.j2 index c540f66e..c540f66e 100644 --- a/xci/playbooks/roles/configure-network/templates/debian/controller00.interface.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/debian/controller00.interface.j2 diff --git a/xci/playbooks/roles/configure-network/templates/debian/controller01.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/controller01.interface.j2 index e835d7ca..e835d7ca 120000 --- a/xci/playbooks/roles/configure-network/templates/debian/controller01.interface.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/debian/controller01.interface.j2 diff --git a/xci/playbooks/roles/configure-network/templates/debian/controller02.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/controller02.interface.j2 index e835d7ca..e835d7ca 120000 --- a/xci/playbooks/roles/configure-network/templates/debian/controller02.interface.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/debian/controller02.interface.j2 diff --git a/xci/playbooks/roles/configure-network/templates/debian/opnfv.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/debian/opnfv.interface.j2 index 03f81dbb..03f81dbb 100644 --- a/xci/playbooks/roles/configure-network/templates/debian/opnfv.interface.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/debian/opnfv.interface.j2 diff --git a/xci/playbooks/roles/configure-network/templates/redhat/bridge.ifcfg.j2 b/xci/playbooks/roles/bootstrap-host/templates/redhat/bridge.ifcfg.j2 index 06b5f177..06b5f177 100644 --- a/xci/playbooks/roles/configure-network/templates/redhat/bridge.ifcfg.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/redhat/bridge.ifcfg.j2 diff --git a/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 b/xci/playbooks/roles/bootstrap-host/templates/redhat/interface.ifcfg.j2 index a97ad0cf..a97ad0cf 100644 --- a/xci/playbooks/roles/configure-network/templates/redhat/interface.ifcfg.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/redhat/interface.ifcfg.j2 diff --git a/xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/suse/suse.interface.j2 index 27b01eb4..27b01eb4 100644 --- a/xci/playbooks/roles/configure-network/templates/suse/suse.interface.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/suse/suse.interface.j2 diff --git a/xci/playbooks/roles/configure-network/templates/suse/suse.routes.j2 b/xci/playbooks/roles/bootstrap-host/templates/suse/suse.routes.j2 index 7c868447..7c868447 100644 --- a/xci/playbooks/roles/configure-network/templates/suse/suse.routes.j2 +++ b/xci/playbooks/roles/bootstrap-host/templates/suse/suse.routes.j2 diff --git a/xci/playbooks/roles/prepare-functest/templates/env.j2 b/xci/playbooks/roles/prepare-functest/templates/env.j2 index 43a581bd..af271ac7 100644 --- a/xci/playbooks/roles/prepare-functest/templates/env.j2 +++ b/xci/playbooks/roles/prepare-functest/templates/env.j2 @@ -1,7 +1,5 @@ -INSTALLER_TYPE=osa INSTALLER_IP=192.168.122.2 EXTERNAL_NETWORK={{ external_network }} -DEPLOY_SCENARIO="os-nosdn-nofeature-noha" CI_LOOP=daily TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results ENERGY_RECORDER_API_URL=http://energy.opnfv.fr/resources diff --git a/xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2 b/xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2 index c0b9bc88..81a0734f 100644 --- a/xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2 +++ b/xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2 @@ -1,5 +1,8 @@ #!/bin/bash +# Variables that we need to pass from XCI to functest +XCI_ENV=(INSTALLER_TYPE DEPLOY_SCENARIO XCI_FLAVOR) + source /root/openrc openstack --insecure network create --external \ @@ -14,6 +17,19 @@ openstack --insecure subnet create --network {{ external_network }} \ mkdir ~/results/ mkdir ~/images && cd ~/images && wget -q http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img && cd ~ +# Extract variables from xci.env file +if [[ -e /root/xci.env ]]; then + for x in ${XCI_ENV[@]}; do + grep "^${x}=" /root/xci.env >> /root/env + done +fi + +# Dump the env file +echo "------------------------------------------------------" +echo "------------- functest environment file --------------" +cat /root/env +echo "------------------------------------------------------" + sudo docker run --env-file env \ -v $(pwd)/openrc:/home/opnfv/functest/conf/env_file \ -v $(pwd)/images:/home/opnfv/functest/images \ |