summaryrefslogtreecommitdiffstats
path: root/xci
diff options
context:
space:
mode:
Diffstat (limited to 'xci')
-rwxr-xr-xxci/config/pinned-versions4
-rwxr-xr-xxci/config/user-vars9
-rw-r--r--xci/files/requirements.yml10
-rwxr-xr-xxci/files/xci-destroy-env.sh78
-rw-r--r--xci/infra/bifrost/README.md53
-rw-r--r--xci/infra/bifrost/infra-provision.sh21
-rw-r--r--xci/infra/bifrost/playbooks/bootstrap-bifrost.yml (renamed from xci/playbooks/bootstrap-bifrost.yml)22
-rw-r--r--xci/infra/bifrost/playbooks/opnfv-virtual.yaml129
-rwxr-xr-xxci/infra/bifrost/scripts/bifrost-provision.sh158
-rw-r--r--xci/installer/kubespray/playbooks/configure-opnfvhost.yml20
-rw-r--r--xci/installer/kubespray/playbooks/configure-targethosts.yml10
-rwxr-xr-xxci/installer/osa/deploy.sh1
-rw-r--r--xci/installer/osa/files/ansible-role-requirements.yml86
-rw-r--r--xci/installer/osa/files/ha/user_variables.yml3
-rw-r--r--xci/installer/osa/files/mini/user_variables.yml3
-rw-r--r--xci/installer/osa/files/noha/user_variables.yml3
-rw-r--r--xci/installer/osa/files/openstack_services.yml78
-rw-r--r--xci/installer/osa/files/user_variables_proxy.yml22
-rw-r--r--xci/installer/osa/playbooks/configure-opnfvhost.yml96
-rw-r--r--xci/installer/osa/playbooks/configure-targethosts.yml22
-rw-r--r--xci/playbooks/bootstrap-scenarios.yml (renamed from xci/installer/osa/playbooks/bootstrap-scenarios.yml)10
-rw-r--r--xci/playbooks/configure-localhost.yml58
-rw-r--r--xci/playbooks/get-opnfv-scenario-requirements.yml24
-rw-r--r--xci/playbooks/roles/bootstrap-host/tasks/time.yml4
-rw-r--r--xci/playbooks/roles/clone-repository/tasks/main.yml4
-rw-r--r--xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j210
-rw-r--r--xci/scenarios/os-nosdn-nofeature/role/os-nosdn-nofeature/tasks/main.yml6
-rw-r--r--xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/tasks/main.yml16
-rw-r--r--xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/templates/user_variables_os-odl-nofeature.yml.j2 (renamed from xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/files/user_variables_os-odl-nofeature.yml)8
-rw-r--r--xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/vars/main.yml10
-rwxr-xr-xxci/scripts/vm/start-new-vm.sh18
-rw-r--r--xci/var/opnfv.yml78
-rwxr-xr-xxci/xci-deploy.sh44
33 files changed, 840 insertions, 278 deletions
diff --git a/xci/config/pinned-versions b/xci/config/pinned-versions
index 5d5908e7..8067fe69 100755
--- a/xci/config/pinned-versions
+++ b/xci/config/pinned-versions
@@ -35,8 +35,8 @@ export BIFROST_IRONIC_CLIENT_VERSION=${BIFROST_IRONIC_CLIENT_VERSION:-"1da269b0e
export BIFROST_IRONIC_INSPECTOR_VERSION=${BIFROST_IRONIC_INSPECTOR_VERSION:-"84da941fafb905c2debdd9a9ba68ba743af3ce8a"}
# HEAD of ironic-inspector-client "master" as of 13.02.2018
export BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION=${BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION:-"b73403fdad3165cfcccbf4b0330d426ae5925e01"}
-# HEAD of osa "stable/queens" as of 02.03.2018
-export OPENSTACK_OSA_VERSION=${OPENSTACK_OSA_VERSION:-"eee0498dbe21fea565c06c686546c0734c4bb2e3"}
+# HEAD of osa "stable/queens" as of 21.03.2018
+export OPENSTACK_OSA_VERSION=${OPENSTACK_OSA_VERSION:-"dbf6a9c54a8a3aa59eb998daef296022eeadfa0f"}
export KEEPALIVED_VERSION=$(grep -E '.*name: keepalived' -A 3 \
${XCI_PATH}/xci/installer/osa/files/ansible-role-requirements.yml \
| tail -n1 | sed -n 's/\(^.*: \)\([0-9a-z].*$\)/\2/p')
diff --git a/xci/config/user-vars b/xci/config/user-vars
index c3b11e8e..1554777d 100755
--- a/xci/config/user-vars
+++ b/xci/config/user-vars
@@ -35,6 +35,15 @@ export XCI_CEPH_ENABLED=${XCI_CEPH_ENABLED:-false}
export INSTALLER_TYPE=${INSTALLER_TYPE:-osa}
#-------------------------------------------------------------------------------
+# Set DEPLOYMENT
+#-------------------------------------------------------------------------------
+# Currently, there is a single infra deployment method: bifrost
+# Examples:
+# export INFRA_DEPLOYMENT="bifrost"
+export INFRA_DEPLOYMENT=${INFRA_DEPLOYMENT:-bifrost}
+
+
+#-------------------------------------------------------------------------------
# Configure some other stuff
#-------------------------------------------------------------------------------
# Set the verbosity for ansible
diff --git a/xci/files/requirements.yml b/xci/files/requirements.yml
new file mode 100644
index 00000000..a1b7feb3
--- /dev/null
+++ b/xci/files/requirements.yml
@@ -0,0 +1,10 @@
+---
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018 Intel Corporation.
+# 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
+##############################################################################
+- src: peru.proxy_settings
diff --git a/xci/files/xci-destroy-env.sh b/xci/files/xci-destroy-env.sh
new file mode 100755
index 00000000..9d53dc15
--- /dev/null
+++ b/xci/files/xci-destroy-env.sh
@@ -0,0 +1,78 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2016 RedHat 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 need to execute everything as root
+if [[ $(whoami) != "root" ]]; then
+ echo "Error: This script must be run as root!"
+ exit 1
+fi
+
+# Start fresh
+rm -rf /opt/stack
+# HOME is normally set by sudo -H
+rm -rf ${HOME}/.config/openstack
+rm -rf ${HOME}/.ansible
+
+# bifrost installs everything on venv so we need to look there if virtualbmc is not installed on the host.
+if which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && source /opt/stack/bifrost/bin/activate; }; then
+ # Delete all libvirt VMs and hosts from vbmc (look for a port number)
+ for vm in $(vbmc list | awk '/[0-9]/{{ print $2 }}'); do
+ if which virsh &>/dev/null; then
+ virsh destroy $vm || true
+ virsh undefine $vm || true
+ fi
+ vbmc delete $vm
+ done
+ which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && deactivate; }
+fi
+
+# Destroy all XCI VMs if the previous operation failed
+[[ -n ${XCI_FLAVOR} ]] && \
+ for vm in ${TEST_VM_NODE_NAMES}; do
+ if which virsh &>/dev/null; then
+ virsh destroy $vm || true
+ virsh undefine $vm || true
+ fi
+ done
+
+service ironic-conductor stop || true
+
+echo "removing inventory files created by previous builds"
+rm -rf /tmp/baremetal.*
+
+echo "removing ironic database"
+if $(which mysql &> /dev/null); then
+ mysql_ironic_user=$(sudo grep "connection" /etc/ironic/ironic.conf | cut -d : -f 2 )
+ msyql_ironic_password=$(sudo grep "connection" /etc/ironic/ironic.conf | cut -d : -f 3)
+ mysql -u${mysql_ironic_user#*//} -p${msyql_ironic_password%%@*} --execute "drop database ironic;"
+fi
+echo "removing leases"
+[[ -e /var/lib/misc/dnsmasq/dnsmasq.leases ]] && > /var/lib/misc/dnsmasq/dnsmasq.leases
+echo "removing logs"
+rm -rf /var/log/libvirt/baremetal_logs/*
+
+# clean up dib images by default
+CLEAN_DIB_IMAGES=${CLEAN_DIB_IMAGES:-true}
+
+if [ $CLEAN_DIB_IMAGES = "true" ]; then
+ rm -rf /httpboot /tftpboot
+ mkdir /httpboot /tftpboot
+ chmod -R 755 /httpboot /tftpboot
+fi
+
+# remove VM disk images
+rm -rf /var/lib/libvirt/images/*.qcow2
+
+echo "restarting services"
+service dnsmasq restart || true
+service libvirtd restart
+service ironic-api restart || true
+service ironic-conductor start || true
+service ironic-inspector restart || true
diff --git a/xci/infra/bifrost/README.md b/xci/infra/bifrost/README.md
new file mode 100644
index 00000000..60d07244
--- /dev/null
+++ b/xci/infra/bifrost/README.md
@@ -0,0 +1,53 @@
+=====================
+How to deploy bifrost
+=====================
+The scripts and playbooks defined on this repo, need to be combined with proper `Bifrost <http://git.openstack.org/cgit/openstack/bifrost>`_ code.
+
+Please follow that steps:
+
+1. Clone bifrost::
+
+ sudo git clone https://git.openstack.org/openstack/bifrost /opt/bifrost
+
+2. Clone releng::
+
+ sudo git clone https://gerrit.opnfv.org/gerrit/releng-xci /opt/releng-xci
+
+3. Clone infracloud::
+
+ sudo git clone https://git.openstack.org/openstack-infra/puppet-infracloud /opt/puppet-infracloud
+
+4. Combine releng scripts and playbooks with bifrost::
+
+ sudo cp -R /opt/releng-xci/bifrost/* /opt/bifrost/
+
+5. Copy /opt/puppet-infracloud/templates/bifrost/create_bridge.py.erb to /opt/puppet-infracloud/files/elements/infra-cloud-bridge/static/opt/create_bridge.py,
+ and replace tag <%= @bridge_name -%> with br_opnfv
+
+6. If you are on a RHEL/CentOS box, ensure that selinux is disabled
+
+7. Run destroy script if you need to cleanup previous environment::
+
+ cd /opt/bifrost
+ sudo ./scripts/destroy-env.sh
+
+8. Run deployment script to spin up 3 vms with bifrost: xcimaster, controller and compute::
+
+ cd /opt/bifrost
+ sudo ./scripts/test-bifrost-deployment.sh
+
+It is likely that the script will show some errors due to timeout. Please ignore the errors, and wait until the vms are completely bootstrapped. To verify it you can check with ironic::
+
+ cd /opt/bifrost
+ source env-vars
+ ironic node-list
+
+And wait until all the vms are in **active** Provisioning State.
+
+9. Check the IPs assigned to each of the VMS. You can check it by looking at inventory:
+
+ cat /tmp/baremetal.csv
+
+10. You can enter into the vms with devuser login/pass:
+
+ ssh devuser@192.168.122.2
diff --git a/xci/infra/bifrost/infra-provision.sh b/xci/infra/bifrost/infra-provision.sh
new file mode 100644
index 00000000..9c3adfc2
--- /dev/null
+++ b/xci/infra/bifrost/infra-provision.sh
@@ -0,0 +1,21 @@
+#-------------------------------------------------------------------------------
+# Start provisioning VM nodes
+#-------------------------------------------------------------------------------
+# This playbook
+# - removes directories that were created by the previous xci run
+# - clones opnfv/releng-xci and openstack/bifrost repositories
+# - combines opnfv/releng-xci and openstack/bifrost scripts/playbooks
+# - destroys VMs, removes ironic db, leases, logs
+# - creates and provisions VMs for the chosen flavor
+#-------------------------------------------------------------------------------
+BIFROST_ROOT_DIR="$(dirname $(realpath ${BASH_SOURCE[0]}))"
+
+echo "Info: Starting provisining VM nodes using openstack/bifrost"
+echo "-------------------------------------------------------------------------"
+cd $BIFROST_ROOT_DIR/playbooks/
+ansible-playbook ${XCI_ANSIBLE_PARAMS} -i "localhost," bootstrap-bifrost.yml
+cd ${XCI_CACHE}/repos/bifrost
+bash ./scripts/bifrost-provision.sh
+echo "-----------------------------------------------------------------------"
+echo "Info: VM nodes are provisioned!"
+echo "-----------------------------------------------------------------------"
diff --git a/xci/playbooks/bootstrap-bifrost.yml b/xci/infra/bifrost/playbooks/bootstrap-bifrost.yml
index 8b8bb30d..2153b3b3 100644
--- a/xci/playbooks/bootstrap-bifrost.yml
+++ b/xci/infra/bifrost/playbooks/bootstrap-bifrost.yml
@@ -11,32 +11,32 @@
connection: local
gather_facts: true
vars_files:
- - ../var/opnfv.yml
+ - "{{ xci_path }}/xci/var/opnfv.yml"
pre_tasks:
- name: Load distribution variables
include_vars:
- file: ../var/{{ ansible_os_family }}.yml
+ file: "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
roles:
- role: clone-repository
project: "opnfv/bifrost"
- repo: "{{ OPENSTACK_BIFROST_GIT_URL }}"
- dest: "{{ XCI_CACHE }}/repos/bifrost"
- version: "{{ OPENSTACK_BIFROST_VERSION }}"
+ repo: "{{ openstack_bifrost_git_url }}"
+ dest: "{{ xci_cache }}/repos/bifrost"
+ version: "{{ openstack_bifrost_version }}"
tasks:
- name: Load distribution variables
include_vars:
- file: ../var/{{ ansible_os_family }}.yml
+ file: "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
- name: Synchronize local development bifrost repository to XCI paths
# command module is much faster than the copy module
synchronize:
- src: "{{ OPENSTACK_BIFROST_DEV_PATH }}"
- dest: "{{ XCI_CACHE }}/repos/bifrost"
+ src: "{{ openstack_bifrost_dev_path }}"
+ dest: "{{ xci_cache }}/repos/bifrost"
recursive: yes
delete: yes
when:
- - OPENSTACK_BIFROST_DEV_PATH != ""
+ - openstack_bifrost_dev_path != ""
- name: combine opnfv/releng-xci and openstack/bifrost scripts/playbooks
copy:
- src: "{{ XCI_PATH}}/bifrost/"
- dest: "{{ XCI_CACHE }}/repos/bifrost"
+ src: "{{ xci_path}}/xci/infra/bifrost/"
+ dest: "{{ xci_cache }}/repos/bifrost"
diff --git a/xci/infra/bifrost/playbooks/opnfv-virtual.yaml b/xci/infra/bifrost/playbooks/opnfv-virtual.yaml
new file mode 100644
index 00000000..3429f2e6
--- /dev/null
+++ b/xci/infra/bifrost/playbooks/opnfv-virtual.yaml
@@ -0,0 +1,129 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2016 RedHat 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
+##############################################################################
+---
+- hosts: localhost
+ connection: local
+ name: "Host and Ironic bootstrapping"
+ become: yes
+ gather_facts: yes
+ pre_tasks:
+ - name: Remove pre-existing leases file
+ file: path=/var/lib/misc/dnsmasq.leases state=absent
+ - name: "Override the ipv4_gateway setting"
+ set_fact:
+ ipv4_gateway: "192.168.122.1"
+ - name: Prepare the XCI pre-built images
+ block:
+ - name: Create the PXE directory
+ file:
+ path: /httpboot
+ state: directory
+ - name: Download the {{ xci_distro }} image checksum file
+ get_url:
+ dest: /httpboot/deployment_image.qcow2.sha256.txt
+ force: no
+ url: http://artifacts.opnfv.org/releng/xci/images/{{ xci_distro }}.qcow2.sha256.txt
+ timeout: 3000
+ - name: Extract checksum
+ shell: awk '{print $1}' /httpboot/deployment_image.qcow2.sha256.txt
+ register: _image_checksum
+ - fail:
+ msg: "Failed to get image checksum"
+ when: _image_checksum == ''
+ - set_fact:
+ image_checksum: "{{ _image_checksum.stdout }}"
+ - name: Download the {{ xci_distro }} image file
+ get_url:
+ url: http://artifacts.opnfv.org/releng/xci/images/{{ xci_distro }}.qcow2
+ checksum: "sha256:{{ image_checksum }}"
+ timeout: 3000
+ dest: /httpboot/deployment_image.qcow2
+ force: no
+ - name: Set correct mode for {{ xci_distro }}.qcow2 file
+ file:
+ path: /httpboot/deployment_image.qcow2
+ mode: '0755'
+ owner: 'root'
+ group: 'root'
+ when: use_prebuilt_images | bool == true
+
+ roles:
+ - role: bifrost-prep-for-install
+ when: skip_install is not defined
+ - role: bifrost-keystone-install
+ - role: bifrost-ironic-install
+ cleaning: false
+ testing: true
+ # NOTE(TheJulia): While the next step creates a ramdisk, some elements
+ # do not support ramdisk-image-create as they invoke steps to cleanup
+ # the ramdisk which causes ramdisk-image-create to believe it failed.
+ - role: bifrost-create-dib-image
+ dib_imagename: "{{ http_boot_folder }}/ipa"
+ build_ramdisk: false
+ dib_os_element: "{{ ipa_dib_os_element|default('debian') }}"
+ dib_os_release: "jessie"
+ dib_elements: "ironic-agent {{ ipa_extra_dib_elements | default('') }}"
+ dib_notmpfs: true
+ when:
+ - create_ipa_image | bool == true
+ - not use_prebuilt_images | bool == false
+ - role: bifrost-create-dib-image
+ dib_imagetype: "qcow2"
+ dib_imagename: "{{deploy_image}}"
+ dib_env_vars:
+ DIB_PYTHON_VERSION: 2
+ dib_os_element: "{{ lookup('env','DIB_OS_ELEMENT') }}"
+ dib_os_release: "{{ lookup('env', 'DIB_OS_RELEASE') }}"
+ extra_dib_elements: "{{ lookup('env', 'EXTRA_DIB_ELEMENTS') | default('') }}"
+ dib_elements: "vm enable-serial-console simple-init devuser openssh-server growroot pip-and-virtualenv {{ extra_dib_elements }}"
+ dib_packages: "{{ lookup('env', 'DIB_OS_PACKAGES') }}"
+ dib_notmpfs: true
+ when:
+ - create_image_via_dib | bool == true
+ - transform_boot_image | bool == false
+ - use_prebuilt_images | bool == false
+ - role: bifrost-keystone-client-config
+ user: "{{ ansible_env.SUDO_USER }}"
+ clouds:
+ bifrost:
+ config_username: "{{ ironic.keystone.default_username }}"
+ config_password: "{{ ironic.keystone.default_password }}"
+ config_project_name: "baremetal"
+ config_region_name: "{{ keystone.bootstrap.region_name }}"
+ config_auth_url: "{{ keystone.bootstrap.public_url }}"
+ environment:
+ http_proxy: "{{ lookup('env','http_proxy') }}"
+ https_proxy: "{{ lookup('env','https_proxy') }}"
+ no_proxy: "{{ lookup('env','no_proxy') }}"
+
+- hosts: baremetal
+ name: "Enrollment and Deployment"
+ vars:
+ multinode_testing: "{{ inventory_dhcp | bool == true }}"
+ become: no
+ connection: local
+ gather_facts: yes
+ roles:
+ - role: ironic-enroll-dynamic
+ - { role: ironic-inspect-node, when: inspect_nodes | default('false') | bool == true }
+ - role: bifrost-configdrives-dynamic
+ ipv4_nameserver: 192.168.122.1
+ - role: bifrost-deploy-nodes-dynamic
+ environment:
+ http_proxy: "{{ lookup('env','http_proxy') }}"
+ https_proxy: "{{ lookup('env','https_proxy') }}"
+ no_proxy: "{{ lookup('env','no_proxy') }}"
+
+- hosts: baremetal
+ name: "Deploy machines."
+ become: no
+ connection: local
+ serial: 1
+ roles:
+ - role: bifrost-prepare-for-test-dynamic
diff --git a/xci/infra/bifrost/scripts/bifrost-provision.sh b/xci/infra/bifrost/scripts/bifrost-provision.sh
new file mode 100755
index 00000000..939acb58
--- /dev/null
+++ b/xci/infra/bifrost/scripts/bifrost-provision.sh
@@ -0,0 +1,158 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2016 Ericsson 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
+##############################################################################
+set -eu
+set -o pipefail
+
+export PYTHONUNBUFFERED=1
+SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)"
+BIFROST_HOME=$SCRIPT_HOME/..
+ENABLE_VENV="false"
+PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600}
+# This is normally exported by XCI env but we should initialize it here
+# in case we run this script on its own for debug purposes
+XCI_ANSIBLE_PARAMS=${XCI_ANSIBLE_PARAMS:-}
+# Ironic SHAs
+BIFROST_IRONIC_INSPECTOR_VERSION=${BIFROST_IRONIC_INSPECTOR_VERSION:-master}
+BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION=${BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION:-master}
+BIFROST_IRONIC_CLIENT_VERSION=${BIFROST_IRONIC_CLIENT_VERSION:-master}
+BIFROST_IRONIC_VERSION=${BIFROST_IRONIC_VERSION:-master}
+
+# set UPPER_CONSTRAINTS_FILE since it is needed in order to limit libvirt-python to 4.0.0
+export UPPER_CONSTRAINTS_FILE=https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt
+
+# Ensure the right inventory files is used based on branch
+CURRENT_BIFROST_BRANCH=$(git rev-parse --abbrev-ref HEAD)
+if [ $CURRENT_BIFROST_BRANCH = "master" ]; then
+ BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
+ INVENTORY_FILE_FORMAT="baremetal_json_file"
+else
+ BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.csv'}
+ INVENTORY_FILE_FORMAT="baremetal_csv_file"
+fi
+export BIFROST_INVENTORY_SOURCE=$BAREMETAL_DATA_FILE
+
+# Default settings for VMs
+export TEST_VM_NUM_NODES=${TEST_VM_NUM_NODES:-3}
+export TEST_VM_NODE_NAMES=${TEST_VM_NODE_NAMES:-"opnfv controller00 compute00"}
+export VM_DOMAIN_TYPE=${VM_DOMAIN_TYPE:-kvm}
+export VM_CPU=${VM_CPU:-4}
+export VM_DISK=${VM_DISK:-100}
+export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-8192}
+export VM_DISK_CACHE=${VM_DISK_CACHE:-unsafe}
+
+# Settings for bifrost
+TEST_PLAYBOOK="opnfv-virtual.yaml"
+USE_INSPECTOR=true
+USE_CIRROS=false
+TESTING_USER=root
+DOWNLOAD_IPA=true
+CREATE_IPA_IMAGE=false
+INSPECT_NODES=true
+INVENTORY_DHCP=false
+INVENTORY_DHCP_STATIC_IP=false
+WRITE_INTERFACES_FILE=true
+
+# Settings for console access
+export DIB_DEV_USER_PWDLESS_SUDO=yes
+export DIB_DEV_USER_PASSWORD=devuser
+
+# Additional dib elements
+export EXTRA_DIB_ELEMENTS=${EXTRA_DIB_ELEMENTS:-"openssh-server"}
+
+# dib configuration
+case ${XCI_DISTRO,,} in
+ # These should ideally match the CI jobs
+ ubuntu)
+ export DIB_OS_RELEASE="${DIB_OS_RELEASE:-xenial}"
+ export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-ubuntu-minimal}"
+ export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl,iptables}"
+ ;;
+ centos)
+ export DIB_OS_RELEASE="${DIB_OS_RELEASE:-7}"
+ export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-centos-minimal}"
+ export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vim,less,bridge-utils,iputils,rsyslog,curl,iptables}"
+ ;;
+ opensuse)
+ export DIB_OS_RELEASE="${DIB_OS_RELEASE:-42.3}"
+ export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-opensuse-minimal}"
+ export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vim,less,bridge-utils,iputils,rsyslog,curl,iptables}"
+ ;;
+esac
+
+# Copy the OS images if found
+if [[ -e ${XCI_PATH}/deployment_image.qcow2 ]]; then
+ sudo mkdir -p /httpboot
+ sudo mv ${XCI_PATH}/deployment_image.qcow2* /httpboot/
+fi
+
+# Install missing dependencies
+$(which pip) install -q --user --upgrade -r "$(dirname $0)/../requirements.txt"
+
+# Change working directory
+cd $BIFROST_HOME/playbooks
+
+# NOTE(hwoarang): Disable selinux as we are hitting issues with it from time to
+# time. Remove this when Centos7 is a proper gate on bifrost so we know that
+# selinux works as expected.
+if [[ -e /etc/centos-release ]]; then
+ echo "*************************************"
+ echo "WARNING: Disabling selinux on CentOS7"
+ echo "*************************************"
+ sudo setenforce 0
+fi
+
+# Create the VMS
+ansible-playbook ${XCI_ANSIBLE_PARAMS} \
+ -i inventory/localhost \
+ test-bifrost-create-vm.yaml \
+ -e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
+ -e test_vm_cpu='host-model' \
+ -e test_vm_memory_size=${VM_MEMORY_SIZE} \
+ -e enable_venv=${ENABLE_VENV} \
+ -e test_vm_domain_type=${VM_DOMAIN_TYPE} \
+ -e ${INVENTORY_FILE_FORMAT}=${BAREMETAL_DATA_FILE}
+
+# Execute the installation and VM startup test
+ansible-playbook ${XCI_ANSIBLE_PARAMS} \
+ -i inventory/bifrost_inventory.py \
+ ${TEST_PLAYBOOK} \
+ -e use_cirros=${USE_CIRROS} \
+ -e testing_user=${TESTING_USER} \
+ -e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
+ -e test_vm_cpu='host-model' \
+ -e inventory_dhcp=${INVENTORY_DHCP} \
+ -e inventory_dhcp_static_ip=${INVENTORY_DHCP_STATIC_IP} \
+ -e enable_venv=${ENABLE_VENV} \
+ -e enable_inspector=${USE_INSPECTOR} \
+ -e inspect_nodes=${INSPECT_NODES} \
+ -e download_ipa=${DOWNLOAD_IPA} \
+ -e create_ipa_image=${CREATE_IPA_IMAGE} \
+ -e write_interfaces_file=${WRITE_INTERFACES_FILE} \
+ -e ipv4_gateway=192.168.122.1 \
+ -e wait_timeout=${PROVISION_WAIT_TIMEOUT} \
+ -e enable_keystone=false \
+ -e ironicinspector_source_install=true \
+ -e ironicinspector_git_branch=${BIFROST_IRONIC_INSPECTOR_VERSION} \
+ -e ironicinspectorclient_source_install=true \
+ -e ironicinspectorclient_git_branch=${BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION} \
+ -e ironicclient_source_install=true \
+ -e ironicclient_git_branch=${BIFROST_IRONIC_CLIENT_VERSION} \
+ -e ironic_git_branch=${BIFROST_IRONIC_VERSION} \
+ -e use_prebuilt_images=${BIFROST_USE_PREBUILT_IMAGES} \
+ -e xci_distro=${XCI_DISTRO}
+EXITCODE=$?
+
+if [ $EXITCODE != 0 ]; then
+ echo "************************************"
+ echo "Provisioning failed. See logs folder"
+ echo "************************************"
+fi
+
+exit $EXITCODE
diff --git a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
index d6e1d7b8..8166b0e5 100644
--- a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
+++ b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
@@ -9,23 +9,23 @@
- hosts: opnfv
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
tasks:
- name: Load distribution variables
include_vars:
file: "{{ item }}"
with_items:
- - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
- name: Set facts for remote deployment
set_fact:
remote_xci_path: "{{ ansible_env.HOME }}/releng-xci"
- remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{ INSTALLER_TYPE }}/files/{{ XCI_FLAVOR }}"
+ remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{ installer_type }}/files/{{ xci_flavor }}"
remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks"
- name: Copy releng-xci to remote host
synchronize:
- src: "{{ XCI_PATH }}/"
+ src: "{{ xci_path }}/"
dest: "{{ remote_xci_path }}"
recursive: yes
delete: yes
@@ -36,11 +36,11 @@
creates: /root/.ssh/id_rsa
- name: add id_rsa.pub to authorized_keys
shell: cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
- when: XCI_FLAVOR == 'aio'
+ when: xci_flavor == 'aio'
- name: fetch public key
fetch:
src: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
- dest: "{{ XCI_PATH }}/xci/files/authorized_keys"
+ dest: "{{ xci_path }}/xci/files/authorized_keys"
flat: yes
- name: delete the opnfv_inventory directory
file:
@@ -61,7 +61,7 @@
name: "{{ kube_require_packages[ansible_pkg_mgr] }}"
state: present
update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
- when: XCI_FLAVOR == 'aio'
+ when: xci_flavor == 'aio'
- name: change dashboard server type to NodePort
lineinfile:
@@ -72,13 +72,13 @@
- name: pip install ansible
pip:
name: ansible
- version: "{{ XCI_KUBE_ANSIBLE_PIP_VERSION }}"
+ version: "{{ xci_kube_ansible_pip_version }}"
- hosts: localhost
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
tasks:
- name: Append public keys to authorized_keys
- shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ XCI_PATH }}/xci/files/authorized_keys"
+ shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ xci_path }}/xci/files/authorized_keys"
diff --git a/xci/installer/kubespray/playbooks/configure-targethosts.yml b/xci/installer/kubespray/playbooks/configure-targethosts.yml
index 08c735b4..d89cd334 100644
--- a/xci/installer/kubespray/playbooks/configure-targethosts.yml
+++ b/xci/installer/kubespray/playbooks/configure-targethosts.yml
@@ -4,7 +4,7 @@
tasks:
- name: add public key to host
copy:
- src: "{{ XCI_PATH }}/xci/files/authorized_keys"
+ src: "{{ xci_path }}/xci/files/authorized_keys"
dest: /root/.ssh/authorized_keys
- name: Install required packages
package:
@@ -15,14 +15,14 @@
- hosts: kube-master
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
pre_tasks:
- name: Load distribution variables
include_vars:
- file: "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
+ file: "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
roles:
- role: "keepalived"
- when: XCI_FLAVOR == 'ha'
+ when: xci_flavor == 'ha'
- role: "haproxy_server"
haproxy_service_configs: "{{ haproxy_default_services}}"
- when: XCI_FLAVOR == 'ha'
+ when: xci_flavor == 'ha'
diff --git a/xci/installer/osa/deploy.sh b/xci/installer/osa/deploy.sh
index ce44626a..6dada3f5 100755
--- a/xci/installer/osa/deploy.sh
+++ b/xci/installer/osa/deploy.sh
@@ -57,6 +57,7 @@ echo "Info: Configured localhost host for openstack-ansible"
echo "Info: Configuring opnfv deployment host for openstack-ansible"
echo "-----------------------------------------------------------------------"
cd $OSA_XCI_PLAYBOOKS
+ansible-galaxy install -r ${XCI_PATH}/xci/files/requirements.yml -p $HOME/.ansible/roles
ansible-playbook ${XCI_ANSIBLE_PARAMS} -i ${XCI_FLAVOR_ANSIBLE_FILE_PATH}/inventory \
configure-opnfvhost.yml
echo "-----------------------------------------------------------------------"
diff --git a/xci/installer/osa/files/ansible-role-requirements.yml b/xci/installer/osa/files/ansible-role-requirements.yml
index 5e25c02c..761609ef 100644
--- a/xci/installer/osa/files/ansible-role-requirements.yml
+++ b/xci/installer/osa/files/ansible-role-requirements.yml
@@ -7,36 +7,36 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-# these versions are based on the osa commit eee0498dbe21fea565c06c686546c0734c4bb2e3 on 2018-03-02
-# http://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=eee0498dbe21fea565c06c686546c0734c4bb2e3
+# these versions are based on the osa commit dbf6a9c54a8a3aa59eb998daef296022eeadfa0f on 2018-03-21
+# http://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=dbf6a9c54a8a3aa59eb998daef296022eeadfa0f
- name: ansible-hardening
scm: git
src: https://github.com/openstack/ansible-hardening
- version: 0635fb840aafc914f2ffdfedc4548dc1abb37c7a
+ version: 3f870c24f9bcd88ec1f1d7815c30cf2abfac39e5
- name: apt_package_pinning
scm: git
src: https://github.com/openstack/openstack-ansible-apt_package_pinning
- version: af87185d6d9a2ed066db85a9e6e2bec4d047089b
+ version: b488ec5ee3092ba5b6765b5888c9ad2e44922ec5
- name: pip_install
scm: git
src: https://github.com/openstack/openstack-ansible-pip_install
- version: faf690dffb820104c9ad707fe11ca646b7b78098
+ version: 99181a635478d082f5b8f2bf47d15509907fafb7
- name: galera_client
scm: git
src: https://github.com/openstack/openstack-ansible-galera_client
- version: ccafe5e816694907869c6591b5121fc59074934c
+ version: 4bc75a7b141fa0ff0ff1f35d26c09163df482b34
- name: galera_server
scm: git
src: https://github.com/openstack/openstack-ansible-galera_server
- version: dfb3d59dfb87eedb84a3e7b0bafb3764dd8a2cfa
+ version: 9b2c2e8098f0f02e206c0498fa466a6798f7c89d
- name: ceph_client
scm: git
src: https://github.com/openstack/openstack-ansible-ceph_client
- version: ab68c5e925e086c91b1ad4064cb406cc736bdb23
+ version: 50ea8b644c0713d007f6f172cd7bbc850f44a55a
- name: haproxy_server
scm: git
src: https://github.com/openstack/openstack-ansible-haproxy_server
- version: 212e9bd262ee8fb9c635597516d56879ac817c7c
+ version: 0c0c9453e8760fcbb0a126e6c97de83f004ae06b
- name: keepalived
scm: git
src: https://github.com/evrardjp/ansible-keepalived
@@ -44,135 +44,135 @@
- name: lxc_container_create
scm: git
src: https://github.com/openstack/openstack-ansible-lxc_container_create
- version: 87353ebc316286b1f883124c45860a021e518889
+ version: 3d1e70d1be8d10a54da35ad97c3e750384f8a73b
- name: lxc_hosts
scm: git
src: https://github.com/openstack/openstack-ansible-lxc_hosts
- version: 0c6d6c89acda8db63d93e6514359a03e782089aa
+ version: 0abc1e2352f928e6c42bd952c1434dd0060cdaa2
- name: memcached_server
scm: git
src: https://github.com/openstack/openstack-ansible-memcached_server
- version: 0e526d63e68c9318dbe249ffcb355672c401268a
+ version: 67ff6cd34d8158dde56a7a59b8ccbdd079effde5
- name: openstack_hosts
scm: git
src: https://github.com/openstack/openstack-ansible-openstack_hosts
- version: 3e64936b228593d3dd59bf3b3203023b4c6e554c
+ version: 372be6bfc1169131c6607c4f0f5758563dc1265f
- name: os_keystone
scm: git
src: https://github.com/openstack/openstack-ansible-os_keystone
- version: 17f702aa093579e61b482c7496e2a1f056819483
+ version: 48019740f86570f8bcb14068a0e253b05ffb4336
- name: openstack_openrc
scm: git
src: https://github.com/openstack/openstack-ansible-openstack_openrc
- version: 735e066ba19caebb9299aaab163f5082d2b04bd4
+ version: e86c73ef9af547b30a4aab0d39aca96359bf5ce4
- name: os_aodh
scm: git
src: https://github.com/openstack/openstack-ansible-os_aodh
- version: 492ff856886ab096329dee337728e7c88482e9f9
+ version: 75c8a1f07c0b0f8e8baa68198be789efd453183e
- name: os_barbican
scm: git
src: https://github.com/openstack/openstack-ansible-os_barbican
- version: bb2b7264292e7a957c66b95ac412a94c0d8e407d
+ version: bd8b72cb68c2629f3d1c032f315eb9c25931920e
- name: os_ceilometer
scm: git
src: https://github.com/openstack/openstack-ansible-os_ceilometer
- version: 0b88342fa352f2bc048104f66c9476f465d1d23d
+ version: c9b2115cf7c38a5861a8126d45eddef9ea03d1ad
- name: os_cinder
scm: git
src: https://github.com/openstack/openstack-ansible-os_cinder
- version: 782c27cf60aa57cc2168ca51b6a8a7f2b43acfc6
+ version: c96e5e21273adbaa48ebb8f957226c6ec0ad3b8c
- name: os_designate
scm: git
src: https://github.com/openstack/openstack-ansible-os_designate
- version: e9c1d198a4dcb645f7c1f3cff22e98dab180315a
+ version: b1a08cc7e897e5b600415a69280a64f8f61dd66c
- name: os_glance
scm: git
src: https://github.com/openstack/openstack-ansible-os_glance
- version: 6c5c8d3d915f506a60b89251bd5caaba3b383ef0
+ version: 9f2aa6478dadab3a4ec0cee6d23ffc86fa76a99b
- name: os_gnocchi
scm: git
src: https://github.com/openstack/openstack-ansible-os_gnocchi
- version: 4891d9bdfb4569f3097373f2fb2e677795663a52
+ version: 5beb9ca451812959f09c9f9235eee529c42b3805
- name: os_heat
scm: git
src: https://github.com/openstack/openstack-ansible-os_heat
- version: dda5325225213c095c7c5697f30df8c41bcd9d4e
+ version: 7eff32af7fae96096694d582589389c66d10a8a3
- name: os_horizon
scm: git
src: https://github.com/openstack/openstack-ansible-os_horizon
- version: ec13e3b9e0c46616812c9278ddd606fdd3082682
+ version: ea9a27931e6d7f22df23ea02e1c0938ba576fada
- name: os_ironic
scm: git
src: https://github.com/openstack/openstack-ansible-os_ironic
- version: 5b7f9f342f2346aa38f69204936d0d428800afed
+ version: 8c33498070489e2ff645cc1286df535e2b16726b
- name: os_magnum
scm: git
src: https://github.com/openstack/openstack-ansible-os_magnum
- version: 1d55c75816b7eed495806e1793cbe130804af8fc
+ version: 06087d8d193f4985ed8c33e996b02fa717628c27
- name: os_molteniron
scm: git
src: https://github.com/openstack/openstack-ansible-os_molteniron
- version: 07c6cdc462a56e6c76e5071414d35da3878aa14f
+ version: 5102381790218c390438011f64e763016d335c61
- name: os_neutron
scm: git
src: https://github.com/openstack/openstack-ansible-os_neutron
- version: 454d1f5c115a11023a33f60b0cdf8f687cfa3596
+ version: 4bbb681632f2d577585905982d81fa019332f993
- name: os_nova
scm: git
src: https://github.com/openstack/openstack-ansible-os_nova
- version: d0154df0818cb1b97537e1d65409818959a021d4
+ version: 8c6a1b572e334bf185bf23759b90089a88a88b4b
- name: os_octavia
scm: git
src: https://github.com/openstack/openstack-ansible-os_octavia
- version: 23ad1f1828c5ab1737cbaf48cd4b4a83f67a45d4
+ version: c4cdbc5f36c43591cf729a5ce0f2a1e605c30be0
- name: os_rally
scm: git
src: https://github.com/openstack/openstack-ansible-os_rally
- version: 6c4e344def546adf76545d741a6ef24e5cbf7daa
+ version: 083bbb8c1290506797d49c51ee91a344a481d25c
- name: os_sahara
scm: git
src: https://github.com/openstack/openstack-ansible-os_sahara
- version: 06c328e1872cdce959bfa1e5c6cedf3c4cde65a6
+ version: 9b5111884ebd64ec8088bbdfb3b9a58cdabf1edb
- name: os_swift
scm: git
src: https://github.com/openstack/openstack-ansible-os_swift
- version: 37eb776041ad324a01bc673da0eb7894566f419d
+ version: 5e88210fdd42d40960a14767fc662b3bd8a73c8a
- name: os_tacker
scm: git
src: https://github.com/openstack/openstack-ansible-os_tacker
- version: 68305ee8e03885967c95520614e50ba84176f5c1
+ version: d4acca1ce9ec3ce0c599a3424fa3c92ee318d270
- name: os_tempest
scm: git
src: https://github.com/openstack/openstack-ansible-os_tempest
- version: 48d9b6d46965462aa01ef353ca06ffdbc5b55c33
+ version: f34582d887e8e26e99710b29ac35306938ca857c
- name: os_trove
scm: git
src: https://github.com/openstack/openstack-ansible-os_trove
- version: a63122f8fdffdf19719788911999fdb0e3b13fa5
+ version: 6cd21b625d9f3da5c537e98064f67001173c9174
- name: plugins
scm: git
src: https://github.com/openstack/openstack-ansible-plugins
- version: a9ee4932cb30522549db4866148ef066e2e2ab7d
+ version: 2472c81eb3b065a7ed7dc4fd6bc4fef3f171089c
- name: rabbitmq_server
scm: git
src: https://github.com/openstack/openstack-ansible-rabbitmq_server
- version: 52f3b38b630b54eb45e81a8f0b5348f72ffa967d
+ version: cffd1ebd45e20331ee505568cd34c277d3225138
- name: repo_build
scm: git
src: https://github.com/openstack/openstack-ansible-repo_build
- version: 1948d899a5c76143cf24c1a8ae162906a8e1faf1
+ version: df5483086d92d1148d1e763247e086ff44388aaf
- name: repo_server
scm: git
src: https://github.com/openstack/openstack-ansible-repo_server
- version: 0a3b993bf18f82fdf6199769302d971d917a8595
+ version: 5979a638eade8523f113714f9fd5c0fb59353277
- name: rsyslog_client
scm: git
src: https://github.com/openstack/openstack-ansible-rsyslog_client
- version: 6576a296328c7c2eeeec360978133913d81fb647
+ version: ed8e178c38a28cab87b8d9bd4396caccf8c0e790
- name: rsyslog_server
scm: git
src: https://github.com/openstack/openstack-ansible-rsyslog_server
- version: 3e1db84f1a9be6473bfbb8f80495f747b406e8ef
+ version: d401a62d2f8ff7c8e6924b6fae0086e47ab37fa6
- name: sshd
scm: git
src: https://github.com/willshersystems/ansible-sshd
@@ -200,7 +200,7 @@
- name: opendaylight
scm: git
src: https://github.com/opendaylight/integration-packaging-ansible-opendaylight
- version: 4aabce0605ef0f51eef4d6564cc7d779630706c5
+ version: 72face5c6bfcef4e548d2af5066eff884b4cfac7
- name: haproxy_endpoints
scm: git
src: https://github.com/logan2211/ansible-haproxy-endpoints
diff --git a/xci/installer/osa/files/ha/user_variables.yml b/xci/installer/osa/files/ha/user_variables.yml
index ea349456..c6f1b065 100644
--- a/xci/installer/osa/files/ha/user_variables.yml
+++ b/xci/installer/osa/files/ha/user_variables.yml
@@ -21,6 +21,9 @@
# # Debug and Verbose options.
debug: false
+# package_state: present should give us a better chance to finish
+package_state: present
+
# Allow root logins
security_sshd_permit_root_login: yes
diff --git a/xci/installer/osa/files/mini/user_variables.yml b/xci/installer/osa/files/mini/user_variables.yml
index c812f1df..9fb2001e 100644
--- a/xci/installer/osa/files/mini/user_variables.yml
+++ b/xci/installer/osa/files/mini/user_variables.yml
@@ -21,6 +21,9 @@
# # Debug and Verbose options.
debug: false
+# package_state: present should give us a better chance to finish
+package_state: present
+
# Allow root logins
security_sshd_permit_root_login: yes
diff --git a/xci/installer/osa/files/noha/user_variables.yml b/xci/installer/osa/files/noha/user_variables.yml
index 91ceba2d..95450937 100644
--- a/xci/installer/osa/files/noha/user_variables.yml
+++ b/xci/installer/osa/files/noha/user_variables.yml
@@ -21,6 +21,9 @@
# # Debug and Verbose options.
debug: false
+# package_state: present should give us a better chance to finish
+package_state: present
+
# Allow root logins
security_sshd_permit_root_login: yes
diff --git a/xci/installer/osa/files/openstack_services.yml b/xci/installer/osa/files/openstack_services.yml
index 65ff43f8..95abec5c 100644
--- a/xci/installer/osa/files/openstack_services.yml
+++ b/xci/installer/osa/files/openstack_services.yml
@@ -31,210 +31,210 @@
## Global Requirements
requirements_git_repo: https://github.com/openstack/requirements
-requirements_git_install_branch: 46890f5b5654c14c54a3c1990cb51a8e01b35791 # HEAD of "stable/queens" as of 13.02.2018
+requirements_git_install_branch: 207ac2e166f0874b7ff891535bdb78ecf36cabc6 # HEAD of "stable/queens" as of 01.03.2018
## Aodh service
aodh_git_repo: https://github.com/openstack/aodh
-aodh_git_install_branch: a1e60be0b8018fea95f2c0020545d0e6cd63fdbf # HEAD of "master" as of 10.02.2018 because no stable/queens branch yet
+aodh_git_install_branch: f549faea0ea19dad5bb3f1871b7d66ae5d9d80f2 # HEAD of "stable/queens" as of 01.03.2018
aodh_git_project_group: aodh_all
## Barbican service
barbican_git_repo: https://github.com/openstack/barbican
-barbican_git_install_branch: 5b525f6b0a7cf5342a9ffa3ca3618028d6d53649 # HEAD of "stable/queens" as of 13.02.2018
+barbican_git_install_branch: 5b525f6b0a7cf5342a9ffa3ca3618028d6d53649 # HEAD of "stable/queens" as of 01.03.2018
barbican_git_project_group: barbican_all
## Ceilometer service
ceilometer_git_repo: https://github.com/openstack/ceilometer
-ceilometer_git_install_branch: 71a13e1b831e782e7ca25aa0fcd9ebf92a830302 # HEAD of "stable/queens" as of 10.02.2018
+ceilometer_git_install_branch: 24caac82528be7678165bf12fb5b997852727ecd # HEAD of "stable/queens" as of 01.03.2018
ceilometer_git_project_group: ceilometer_all
## Cinder service
cinder_git_repo: https://github.com/openstack/cinder
-cinder_git_install_branch: d02b6894f50f07ebd6f4e424f2438e58c234630d # HEAD of "stable/queens" as of 10.02.2018
+cinder_git_install_branch: b61a02de56c1b9cc6d5003b5304ce66ee930f37b # HEAD of "stable/queens" as of 01.03.2018
cinder_git_project_group: cinder_all
## Designate service
designate_git_repo: https://github.com/openstack/designate
-designate_git_install_branch: 5772ec049be2ae7570d98b4815be16947a045ff9 # HEAD of "stable/queens" as of 10.02.2018
+designate_git_install_branch: 6ca9446bdcf04ba80787348892937cf19eefbf5a # HEAD of "stable/queens" as of 01.03.2018
designate_git_project_group: designate_all
## Horizon Designate dashboard plugin
designate_dashboard_git_repo: https://github.com/openstack/designate-dashboard
-designate_dashboard_git_install_branch: df336662cbda7befe177b780c95a61c72df6973d # HEAD of "stable/queens" as of 10.02.2018
+designate_dashboard_git_install_branch: 5570a2dd51ccd3750012bfde9991f0689a02323b # HEAD of "stable/queens" as of 01.03.2018
designate_dashboard_git_project_group: horizon_all
## Dragonflow service
dragonflow_git_repo: https://github.com/openstack/dragonflow
-dragonflow_git_install_branch: 8285aff0bc1c2c1c28e2f16a341ab769b93c40d6 # HEAD of "master" as of 10.02.2018 because no stable/queens branch yet
+dragonflow_git_install_branch: a2f50a8e8222ae1de04e44a6fd6f7e00d5864fc0 # HEAD of "master" as of 01.03.2018
dragonflow_git_project_group: neutron_all
## Glance service
glance_git_repo: https://github.com/openstack/glance
-glance_git_install_branch: cbd6c08c35b6469765ae9519513c46b2a563a586 # HEAD of "stable/queens" as of 10.02.2018
+glance_git_install_branch: 968f4ae9ce244d9372cb3e8f45acea9d557f317d # HEAD of "stable/queens" as of 01.03.2018
glance_git_project_group: glance_all
## Heat service
heat_git_repo: https://github.com/openstack/heat
-heat_git_install_branch: 98636290c5a4ed9c7d608a1944124b5d92678107 # HEAD of "stable/queens" as of 10.02.2018
+heat_git_install_branch: 43f122be13736f15fbc38cb6e6ce29545f784c86 # HEAD of "stable/queens" as of 01.03.2018
heat_git_project_group: heat_all
## Horizon service
horizon_git_repo: https://github.com/openstack/horizon
-horizon_git_install_branch: d3b403a96cd32e5c2c14261c75daf35275dda66f # HEAD of "stable/queens" as of 10.02.2018
+horizon_git_install_branch: d017fde2a0fdc48e4687f0f5ae0362ba6c5ad66a # HEAD of "stable/queens" as of 01.03.2018
horizon_git_project_group: horizon_all
## Horizon Ironic dashboard plugin
ironic_dashboard_git_repo: https://github.com/openstack/ironic-ui
-ironic_dashboard_git_install_branch: 7614aa2504df1e6370b6d36fba57d27315287179 # HEAD of "stable/queens" as of 10.02.2018
+ironic_dashboard_git_install_branch: 1c4cbd2b90270f65d04b91ddc5f86efa35bbc622 # HEAD of "stable/queens" as of 01.03.2018
ironic_dashboard_git_project_group: horizon_all
## Horizon Magnum dashboard plugin
magnum_dashboard_git_repo: https://github.com/openstack/magnum-ui
-magnum_dashboard_git_install_branch: c7692de7c046cab3a5669520818fbe61f17811c8 # HEAD of "master" as of 10.02.2018 because no stable/queens branch yet
+magnum_dashboard_git_install_branch: 051408e5b86615f74e5fa4cd2e4284b6d1e6a3f2 # HEAD of "stable/queens" as of 01.03.2018
magnum_dashboard_git_project_group: horizon_all
## Horizon LBaaS dashboard plugin
neutron_lbaas_dashboard_git_repo: https://github.com/openstack/neutron-lbaas-dashboard
-neutron_lbaas_dashboard_git_install_branch: a42434a21bf95566472dc6c8ce078ca84432423d # HEAD of "stable/queens" as of 10.02.2018
+neutron_lbaas_dashboard_git_install_branch: a42434a21bf95566472dc6c8ce078ca84432423d # HEAD of "stable/queens" as of 01.03.2018
neutron_lbaas_dashboard_git_project_group: horizon_all
## Horizon FWaaS dashboard plugin
neutron_fwaas_dashboard_git_repo: https://github.com//openstack/neutron-fwaas-dashboard
-neutron_fwaas_dashboard_git_install_branch: 193940f465f9b5f1798f22239cc629d3ff3beece # HEAD of "stable/queens" as of 10.02.2018
+neutron_fwaas_dashboard_git_install_branch: a710e7c4f48afe0261ef25efc44088346124de1c # HEAD of "stable/queens" as of 01.03.2018
neutron_fwaas_dashboard_git_project_group: horizon_all
## Horizon Sahara dashboard plugin
sahara_dashboard_git_repo: https://github.com/openstack/sahara-dashboard
-sahara_dashboard_git_install_branch: 03ef0ca66f72e3ccc6a7f01b26d6f43590701db9 # HEAD of "stable/queens" as of 10.02.2018
+sahara_dashboard_git_install_branch: 707059ff4e372ae66b21b82050a9e16295176782 # HEAD of "stable/queens" as of 01.03.2018
sahara_dashboard_git_project_group: horizon_all
## Keystone service
keystone_git_repo: https://github.com/openstack/keystone
-keystone_git_install_branch: 30afb87247b6f6b7afbe431139e3471a2739aa1a # HEAD of "stable/queens" as of 10.02.2018
+keystone_git_install_branch: c06d74fcf4cf5338db6572265c609036f6817466 # HEAD of "stable/queens" as of 01.03.2018
keystone_git_project_group: keystone_all
## Neutron service
neutron_git_repo: https://github.com/openstack/neutron
-neutron_git_install_branch: e6b4fe995d903844c5d4c3dcd98bb424814eeb04 # HEAD of "stable/queens" as of 10.02.2018
+neutron_git_install_branch: abb60c6175af435964028ce7c97bb4803aeab004 # HEAD of "stable/queens" as of 01.03.2018
neutron_git_project_group: neutron_all
neutron_lbaas_git_repo: https://github.com/openstack/neutron-lbaas
-neutron_lbaas_git_install_branch: f6b8b5b0ad2c19ddf6a7c102c706cbfdb0b2bf05 # HEAD of "stable/queens" as of 10.02.2018
+neutron_lbaas_git_install_branch: f6b8b5b0ad2c19ddf6a7c102c706cbfdb0b2bf05 # HEAD of "stable/queens" as of 01.03.2018
neutron_lbaas_git_project_group: neutron_all
neutron_vpnaas_git_repo: https://github.com/openstack/neutron-vpnaas
-neutron_vpnaas_git_install_branch: 2e01dfec9fda930cf8c5ce4abca23b354859274a # HEAD of "stable/queens" as of 10.02.2018
+neutron_vpnaas_git_install_branch: 8b01dcabb456d2d0bdf905b23f0bdb3ff2530f4d # HEAD of "stable/queens" as of 01.03.2018
neutron_vpnaas_git_project_group: neutron_all
neutron_fwaas_git_repo: https://github.com/openstack/neutron-fwaas
-neutron_fwaas_git_install_branch: 74c90445f8e25d0ae4fb45a48bfb5d5e670c82d8 # HEAD of "stable/queens" as of 10.02.2018
+neutron_fwaas_git_install_branch: 43f56b794b19bb0f362e1d0a1449ee24bb16156e # HEAD of "stable/queens" as of 01.03.2018
neutron_fwaas_git_project_group: neutron_all
neutron_dynamic_routing_git_repo: https://github.com/openstack/neutron-dynamic-routing
-neutron_dynamic_routing_git_install_branch: 4115b4972dc2e8e9ead82d9b7e63a516e404d28f # HEAD of "stable/queens" as of 10.02.2018
+neutron_dynamic_routing_git_install_branch: 386b5e4c33ab765eb7a72e9a9d4ffc1524d7d0c8 # HEAD of "stable/queens" as of 01.03.2018
neutron_dynamic_routing_git_project_group: neutron_all
networking_calico_git_repo: https://github.com/openstack/networking-calico
-networking_calico_git_install_branch: cc3628125775f2f1b3c57c95db3d6b50278dc92b # HEAD of "stable/queens" as of 10.02.2018 because no stable/queens branch yet
+networking_calico_git_install_branch: 10626324b597585cc781197133d4b12f890b8081 # HEAD of "master" as of 01.03.2018
networking_calico_git_project_group: neutron_all
networking_odl_git_repo: https://github.com/openstack/networking-odl
-networking_odl_git_install_branch: ff80c7decc196cae5d7940aabbf14e5c37a94335 # HEAD of "stable/queens" as of 10.02.2018
+networking_odl_git_install_branch: 8733cf68cbc827a4dd458e3328b5fd2c23a07bcf # HEAD of "stable/queens" as of 01.03.2018
networking_odl_git_project_group: neutron_all
networking_bgpvpn_git_repo: https://github.com/openstack/networking-bgpvpn
-networking_bgpvpn_git_install_branch: 38781f232fa457c4032d6697ca9239dc538bc5c9 # HEAD of "stable/queens" as of 10.02.2018
+networking_bgpvpn_git_install_branch: a15c091d8a616c1fd1d3741f32c5d135b5db594f # HEAD of "stable/queens" as of 01.03.2018
networking_bgpvpn_git_project_group: neutron_all
networking_sfc_git_repo: https://github.com/openstack/networking-sfc
-networking_sfc_git_install_branch: 86f958ec212efdaa0508f71ebc389cc1b060ea34 # HEAD of "stable/queens" as of 10.02.2018
+networking_sfc_git_install_branch: cbb68837a38428766ed4d22c5adfe3b2bc6c5f99 # HEAD of "stable/queens" as of 01.03.2018
networking_sfc_git_project_group: neutron_all
## Nova service
nova_git_repo: https://github.com/openstack/nova
-nova_git_install_branch: 01b756f960ed19ab801994d08d749dd94d729a22 # HEAD of "stable/queens" as of 10.02.2018
+nova_git_install_branch: 5039511840bd64151f3111d9c8d7d8a01344193b # HEAD of "stable/queens" as of 01.03.2018
nova_git_project_group: nova_all
## PowerVM Virt Driver
nova_powervm_git_repo: https://github.com/openstack/nova-powervm
-nova_powervm_git_install_branch: a4e0721c6b307ab0046c3314aaa2b691ff8053df # HEAD of "stable/queens" as of 10.02.2018
+nova_powervm_git_install_branch: 2999bff2d0e651cc091757d0501f82af2691daf6 # HEAD of "stable/queens" as of 01.03.2018
nova_powervm_git_project_group: nova_all
## LXD Virt Driver
nova_lxd_git_repo: https://github.com/openstack/nova-lxd
-nova_lxd_git_install_branch: 16d06d149ed979745aa0ccd2b6db23122d17b57f # HEAD of "master" as of 10.02.2018 becayse no stable/queens branch yet
+nova_lxd_git_install_branch: 01b6a8e07558678505e3fa2b6f9ea2d10f821642 # HEAD of "stable/queens" as of 01.03.2018
nova_lxd_git_project_group: nova_all
## Sahara service
sahara_git_repo: https://github.com/openstack/sahara
-sahara_git_install_branch: 4e2cf14ef9fb7c5c0009a2a6e53a28ac1748d9cb # HEAD of "stable/queens" as of 10.02.2018
+sahara_git_install_branch: abcc07a70f2da288548aa96abb16c8380e46dcf9 # HEAD of "stable/queens" as of 01.03.2018
sahara_git_project_group: sahara_all
## Swift service
swift_git_repo: https://github.com/openstack/swift
-swift_git_install_branch: 700a6756da70026fbffe3977bd40fc73404b5e25 # HEAD of "stable/queens" as of 10.02.2018
+swift_git_install_branch: bd4b3c5dc9256fc0d6cca8f925705740c2395efd # HEAD of "stable/queens" as of 01.03.2018
swift_git_project_group: swift_all
## Swift3 middleware
swift_swift3_git_repo: https://github.com/openstack/swift3
-swift_swift3_git_install_branch: 1c117c96dda8113c3398c16e68b61efef397de74 # HEAD of "stable/queens" as of 10.02.2018
+swift_swift3_git_install_branch: 1c117c96dda8113c3398c16e68b61efef397de74 # HEAD of "master" as of 01.03.2018
swift_swift3_git_project_group: swift_all
## Ironic service
ironic_git_repo: https://github.com/openstack/ironic
-ironic_git_install_branch: 6ab2908f829f39f6fb438a7bae9b671abfa97588 # HEAD of "stable/queens" as of 10.02.2018
+ironic_git_install_branch: 4c3a611ac3803a17dd584eb319f0bb40d6ee5ba3 # HEAD of "stable/queens" as of 01.03.2018
ironic_git_project_group: ironic_all
## Magnum service
magnum_git_repo: https://github.com/openstack/magnum
-magnum_git_install_branch: 8e879f67dd21202f90504a86d617470fbe605338 # HEAD of "stable/queens" as of 10.02.2018
+magnum_git_install_branch: 0b3133280fd7dbde65c8581b7be03cd1e3686bc4 # HEAD of "stable/queens" as of 01.03.2018
magnum_git_project_group: magnum_all
## Trove service
trove_git_repo: https://github.com/openstack/trove
-trove_git_install_branch: 9e5186b95bba51d911a0de9e6d6bd412c478aef4 # HEAD of "stable/queens" as of 10.02.2018
+trove_git_install_branch: 43d2b96f86a5365d69c885738ea1c3642f4e5aa1 # HEAD of "stable/queens" as of 01.03.2018
trove_git_project_group: trove_all
## Horizon Trove dashboard plugin
trove_dashboard_git_repo: https://github.com/openstack/trove-dashboard
-trove_dashboard_git_install_branch: bd33e730f52889a6979e7d751e6732ce06806774 # HEAD of "stable/queens" as of 10.02.2018
+trove_dashboard_git_install_branch: f7cf9d5bbe8b04fc9ea95e79b9bec21842d324f9 # HEAD of "stable/queens" as of 01.03.2018
trove_dashboard_git_project_group: horizon_all
## Octavia service
octavia_git_repo: https://github.com/openstack/octavia
-octavia_git_install_branch: 45be6ff7cb06134c2b5a90af7d246316cd0495f8 # HEAD of "stable/queens" as of 10.02.2018
+octavia_git_install_branch: 9f379aef7c0665d4183ac549ed7a0dbc0e5d3aca # HEAD of "stable/queens" as of 01.03.2018
octavia_git_project_group: octavia_all
## Molteniron service
molteniron_git_repo: https://github.com/openstack/molteniron
-molteniron_git_install_branch: 094276cda77d814d07ad885e7d63de8d1243750a # HEAD of "master" as of 10.02.2018 because no stable/queens branch yet
+molteniron_git_install_branch: 094276cda77d814d07ad885e7d63de8d1243750a # HEAD of "master" as of 01.03.2018
molteniron_git_project_group: molteniron_all
## Tacker service
tacker_git_repo: https://github.com/openstack/tacker
-tacker_git_install_branch: 6932f5642598d53d93f94514eaed55cc93ea19d7 # HEAD of "stable/queens" as of 10.02.2018
+tacker_git_install_branch: 6932f5642598d53d93f94514eaed55cc93ea19d7 # HEAD of "stable/queens" as of 01.03.2018
tacker_git_project_group: tacker_all
diff --git a/xci/installer/osa/files/user_variables_proxy.yml b/xci/installer/osa/files/user_variables_proxy.yml
new file mode 100644
index 00000000..d25c3181
--- /dev/null
+++ b/xci/installer/osa/files/user_variables_proxy.yml
@@ -0,0 +1,22 @@
+---
+# Copyright 2018, Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+http_proxy_env_url: ""
+no_proxy_env: "localhost,127.0.0.1,{{ internal_lb_vip_address }},{{ external_lb_vip_address }},{% for host in groups['all_containers'] %}{{ hostvars[host]['container_address'] }}{% if not loop.last %},{% endif %}{% endfor %}"
+global_environment_variables:
+ HTTP_PROXY: "{{ http_proxy_env_url }}"
+ NO_PROXY: "{{ no_proxy_env }}"
+ http_proxy: "{{ http_proxy_env_url }}"
+ no_proxy: "{{ no_proxy_env }}"
diff --git a/xci/installer/osa/playbooks/configure-opnfvhost.yml b/xci/installer/osa/playbooks/configure-opnfvhost.yml
index 4c30f4d1..47e9a65f 100644
--- a/xci/installer/osa/playbooks/configure-opnfvhost.yml
+++ b/xci/installer/osa/playbooks/configure-opnfvhost.yml
@@ -10,25 +10,37 @@
- hosts: opnfv
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
- - "{{ XCI_PATH }}/xci/installer/osa/files/openstack_services.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/installer/osa/files/openstack_services.yml"
+ environment:
+ http_proxy: "{{ lookup('env','http_proxy') }}"
+ https_proxy: "{{ lookup('env','https_proxy') }}"
+ no_proxy: "{{ lookup('env','no_proxy') }}"
+ HTTP_PROXY: "{{ lookup('env','http_proxy') }}"
+ HTTPS_PROXY: "{{ lookup('env','https_proxy') }}"
+ NO_PROXY: "{{ lookup('env','no_proxy') }}"
pre_tasks:
- name: Load distribution variables
include_vars:
file: "{{ item }}"
with_items:
- - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
- - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml"
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
+ - "{{ xci_flavor_ansible_file_path }}/flavor-vars.yml"
- name: Set facts for remote deployment
set_fact:
remote_xci_path: "{{ ansible_env.HOME }}/releng-xci"
- remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{INSTALLER_TYPE}}/files/{{ XCI_FLAVOR }}"
+ remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{installer_type}}/files/{{ xci_flavor }}"
remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks"
roles:
- role: bootstrap-host
- configure_network: XCI_FLAVOR != 'aio'
+ configure_network: xci_flavor != 'aio'
+ - role: peru.proxy_settings
+ proxy_settings_http_proxy: "{{ lookup('env','http_proxy') }}"
+ proxy_settings_https_proxy: "{{ lookup('env','https_proxy') }}"
+ proxy_settings_ftp_proxy: "{{ lookup('env','ftp_proxy') }}"
+ proxy_settings_no_proxy: "{{ lookup('env','no_proxy') }}"
tasks:
- name: generate SSH keys
@@ -38,61 +50,71 @@
- name: fetch public key
fetch:
src: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
- dest: "{{ XCI_PATH }}/xci/files/authorized_keys"
+ dest: "{{ xci_path }}/xci/files/authorized_keys"
flat: yes
- name: Copy releng-xci to remote host
synchronize:
- src: "{{ XCI_PATH }}/"
+ src: "{{ xci_path }}/"
dest: "{{ remote_xci_path }}"
recursive: yes
delete: yes
- name: copy flavor inventory
shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/inventory {{ remote_xci_playbooks }}"
- name: copy openstack_deploy
- shell: "/bin/cp -rf {{OPENSTACK_OSA_PATH}}/etc/openstack_deploy {{OPENSTACK_OSA_ETC_PATH}}"
+ shell: "/bin/cp -rf {{openstack_osa_path}}/etc/openstack_deploy {{openstack_osa_etc_path}}"
- name: copy openstack_user_config.yml
- shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/openstack_user_config.yml {{OPENSTACK_OSA_ETC_PATH}}"
+ shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/openstack_user_config.yml {{openstack_osa_etc_path}}"
failed_when: false
- name: copy all user override files
- shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_variables.yml {{OPENSTACK_OSA_ETC_PATH}}"
+ shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_variables.yml {{openstack_osa_etc_path}}"
failed_when: false
- name: copy cinder.yml
- shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/cinder.yml {{OPENSTACK_OSA_ETC_PATH}}/env.d"
+ shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/cinder.yml {{openstack_osa_etc_path}}/env.d"
- name: Configure OpenStack-Ansible components
lineinfile:
- path: "{{ OPENSTACK_OSA_ETC_PATH }}/user_variables.yml"
+ path: "{{ openstack_osa_etc_path }}/user_variables.yml"
line: "{{ item.component }}: {{ item.value }}"
state: present
with_items:
- - { component: "tempest_install", value: "{{ RUN_TEMPEST | bool }}" }
- - { component: "tempest_run", value: "{{ RUN_TEMPEST | bool }}" }
- - { component: "core_openstack", value: "{{ CORE_OPENSTACK_INSTALL | bool }}" }
+ - { component: "tempest_install", value: "{{ run_tempest | bool }}" }
+ - { component: "tempest_run", value: "{{ run_tempest | bool }}" }
+ - { component: "core_openstack", value: "{{ core_openstack_install | bool }}" }
- block:
- name: copy ceph.yml
- shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/ceph.yml {{OPENSTACK_OSA_ETC_PATH}}/conf.d/"
+ shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/ceph.yml {{openstack_osa_etc_path}}/conf.d/"
- name: copy user_ceph.yml
- shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_ceph.yml {{OPENSTACK_OSA_ETC_PATH}}/user_ceph.yml"
+ shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_ceph.yml {{openstack_osa_etc_path}}/user_ceph.yml"
- name: copy user_variables_ceph.yml
- shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_variables_ceph.yml {{OPENSTACK_OSA_ETC_PATH}}/user_variables_ceph.yml"
- when: XCI_CEPH_ENABLED == "true"
+ shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_variables_ceph.yml {{openstack_osa_etc_path}}/user_variables_ceph.yml"
+ when: xci_ceph_enabled == "true"
+ - block:
+ - name: copy user_variables_proxy.yml
+ shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/user_variables_proxy.yml {{openstack_osa_etc_path}}/user_variables_proxy.yml"
+ - name: "Configure http_proxy_env_url"
+ lineinfile:
+ path: "{{openstack_osa_etc_path}}/user_variables_proxy.yml"
+ regexp: "^http_proxy_env_url:.*"
+ line: "{{ 'http_proxy_env_url: ' + lookup('env','http_proxy') }}"
+ when:
+ - lookup('env','http_proxy') != "randomfoobarstring"
- name: copy OPNFV OpenStack playbook
- shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/setup-openstack.yml {{OPENSTACK_OSA_PATH}}/playbooks"
+ shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/setup-openstack.yml {{openstack_osa_path}}/playbooks"
- name: copy pinned versions of OSA Roles and global requirements
- shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/{{ item }} {{OPENSTACK_OSA_PATH}}/{{ item }}"
+ shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/{{ item }} {{openstack_osa_path}}/{{ item }}"
with_items:
- "ansible-role-requirements.yml"
- "global-requirement-pins.txt"
when:
- - OPENSTACK_OSA_VERSION != "master"
+ - openstack_osa_version != "master"
- name: copy pinned versions of OpenStack services
- shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/openstack_services.yml {{OPENSTACK_OSA_PATH}}/playbooks/defaults/repo_packages/openstack_services.yml"
+ shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/openstack_services.yml {{openstack_osa_path}}/playbooks/defaults/repo_packages/openstack_services.yml"
when:
- - OPENSTACK_OSA_VERSION != "master"
- - include: bootstrap-scenarios.yml
+ - openstack_osa_version != "master"
+ - include: "{{ xci_path }}/xci/playbooks/bootstrap-scenarios.yml"
- name: bootstrap ansible on opnfv host
command: "/bin/bash ./scripts/bootstrap-ansible.sh"
args:
- chdir: "{{OPENSTACK_OSA_PATH}}"
+ chdir: "{{openstack_osa_path}}"
- name: install opnfv pip required packages
pip:
name: "{{ item }}"
@@ -103,9 +125,9 @@
- python-neutronclient
- python-openstackclient
- name: generate password token
- command: "python pw-token-gen.py --file {{OPENSTACK_OSA_ETC_PATH}}/user_secrets.yml"
+ command: "python pw-token-gen.py --file {{openstack_osa_etc_path}}/user_secrets.yml"
args:
- chdir: "{{OPENSTACK_OSA_PATH}}/scripts"
+ chdir: "{{openstack_osa_path}}/scripts"
- name: check if certificate directory /etc/ssl/certs exists already
stat: path=/etc/ssl/certs
register: check_etc_ssl_certs
@@ -132,7 +154,7 @@
become: true
- name: fetch xci environment
copy:
- src: "{{ XCI_PATH }}/.cache/xci.env"
+ src: "{{ xci_path }}/.cache/xci.env"
dest: /root/xci.env
- hosts: localhost
@@ -140,12 +162,12 @@
tasks:
- name: Append public keys to authorized_keys
- shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ XCI_PATH }}/xci/files/authorized_keys"
+ shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ xci_path }}/xci/files/authorized_keys"
- hosts: opnfv
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
pre_tasks:
- name: Load distribution variables
@@ -153,9 +175,9 @@
file: "{{ item }}"
failed_when: false
with_items:
- - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
- - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml"
- - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/user_variables.yml"
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
+ - "{{ xci_flavor_ansible_file_path }}/flavor-vars.yml"
+ - "{{ xci_flavor_ansible_file_path }}/user_variables.yml"
roles:
- role: "openstack-ansible-openstack_openrc"
@@ -169,10 +191,10 @@
- name: fetch generated openrc
fetch:
src: "{{ ansible_env.HOME }}/openrc"
- dest: "{{ XCI_PATH }}/.cache/openrc"
+ dest: "{{ xci_path }}/.cache/openrc"
flat: true
- name: add public key to host
copy:
- src: "{{ XCI_PATH }}/xci/files/authorized_keys"
+ src: "{{ xci_path }}/xci/files/authorized_keys"
dest: /root/.ssh/authorized_keys
diff --git a/xci/installer/osa/playbooks/configure-targethosts.yml b/xci/installer/osa/playbooks/configure-targethosts.yml
index 31c3e02e..09258e7c 100644
--- a/xci/installer/osa/playbooks/configure-targethosts.yml
+++ b/xci/installer/osa/playbooks/configure-targethosts.yml
@@ -1,27 +1,39 @@
---
- hosts: openstack
+ environment:
+ http_proxy: "{{ lookup('env','http_proxy') }}"
+ https_proxy: "{{ lookup('env','https_proxy') }}"
+ no_proxy: "{{ lookup('env','no_proxy') }}"
+ HTTP_PROXY: "{{ lookup('env','http_proxy') }}"
+ HTTPS_PROXY: "{{ lookup('env','https_proxy') }}"
+ NO_PROXY: "{{ lookup('env','no_proxy') }}"
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
pre_tasks:
- name: Load distribution variables
include_vars:
file: "{{ item }}"
with_items:
- - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
- - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml"
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
+ - "{{ xci_flavor_ansible_file_path }}/flavor-vars.yml"
roles:
+ - role: peru.proxy_settings
+ proxy_settings_http_proxy: "{{ lookup('env','http_proxy') }}"
+ proxy_settings_https_proxy: "{{ lookup('env','https_proxy') }}"
+ proxy_settings_ftp_proxy: "{{ lookup('env','ftp_proxy') }}"
+ proxy_settings_no_proxy: "{{ lookup('env','no_proxy') }}"
- role: bootstrap-host
- role: configure-nfs
when:
- "'compute' in group_names"
- role: configure-ceph
when:
- - XCI_CEPH_ENABLED == "true"
+ - xci_ceph_enabled == "true"
- "'compute' in group_names"
tasks:
- name: add public key to host
copy:
- src: "{{ XCI_PATH }}/xci/files/authorized_keys"
+ src: "{{ xci_path }}/xci/files/authorized_keys"
dest: /root/.ssh/authorized_keys
diff --git a/xci/installer/osa/playbooks/bootstrap-scenarios.yml b/xci/playbooks/bootstrap-scenarios.yml
index 975c85c1..6546d5ce 100644
--- a/xci/installer/osa/playbooks/bootstrap-scenarios.yml
+++ b/xci/playbooks/bootstrap-scenarios.yml
@@ -7,21 +7,21 @@
# - name: Include foobar role
# include_role:
# name: "foobar"
-# when: DEPLOY_SCENARIO == "foobar"
+# when: deploy_scenario == "foobar"
- name: Prepare everything to run the os-nosdn-nofeature scenario
include_role:
name: "os-nosdn-nofeature"
- when: DEPLOY_SCENARIO == 'os-nosdn-nofeature'
+ when: deploy_scenario == 'os-nosdn-nofeature'
- name: Prepare everything to run the os-odl-nofeature scenario
include_role:
name: "os-odl-nofeature"
- when: DEPLOY_SCENARIO == 'os-odl-nofeature'
+ when: deploy_scenario == 'os-odl-nofeature'
- name: Prepare everything to run the os-odl-sfc scenario
include_role:
name: "os-odl-sfc"
- when: DEPLOY_SCENARIO == 'os-odl-sfc'
+ when: deploy_scenario == 'os-odl-sfc'
- name: Prepare everything to run the os-odl-bgpvpn scenario
include_role:
name: "os-odl-bgpvpn"
- when: DEPLOY_SCENARIO == 'os-odl-bgpvpn'
+ when: deploy_scenario == 'os-odl-bgpvpn'
diff --git a/xci/playbooks/configure-localhost.yml b/xci/playbooks/configure-localhost.yml
index 0e3cde6e..c8a9840c 100644
--- a/xci/playbooks/configure-localhost.yml
+++ b/xci/playbooks/configure-localhost.yml
@@ -16,8 +16,8 @@
file: "{{ item }}"
failed_when: false
with_items:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
- - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
- name: cleanup leftovers of previous deployment
file:
@@ -25,48 +25,48 @@
state: absent
recurse: no
with_items:
- - "{{ XCI_CACHE }}/repos"
- - "{{ LOG_PATH }} "
- - "{{ OPNFV_SSH_HOST_KEYS_PATH }}"
+ - "{{ xci_cache }}/repos"
+ - "{{ log_path }} "
+ - "{{ opnfv_ssh_host_keys_path }}"
roles:
- role: clone-repository
project: "openstack/openstack-ansible-openstack_openrc"
- repo: "{{ OPENSTACK_OSA_OPENRC_GIT_URL }}"
+ repo: "{{ openstack_osa_openrc_git_url }}"
dest: roles/openstack-ansible-openstack_openrc
version: "master"
- when: INSTALLER_TYPE == "osa"
+ when: installer_type == "osa"
- role: clone-repository
project: "openstack/openstack-ansible"
- repo: "{{ OPENSTACK_OSA_GIT_URL }}"
- dest: "{{ XCI_CACHE }}/repos/openstack-ansible"
- version: "{{ OPENSTACK_OSA_VERSION }}"
- when: INSTALLER_TYPE == "osa"
+ repo: "{{ openstack_osa_git_url }}"
+ dest: "{{ xci_cache }}/repos/openstack-ansible"
+ version: "{{ openstack_osa_version }}"
+ when: installer_type == "osa"
- role: clone-repository
project: "kubernetes-incubator/kubespray"
- repo: "{{ KUBESPRAY_GIT_URL }}"
- dest: "{{ XCI_CACHE }}/repos/kubespray"
- version: "{{ KUBESPRAY_VERSION }}"
- when: INSTALLER_TYPE == "kubespray"
+ repo: "{{ kubespray_git_url }}"
+ dest: "{{ xci_cache }}/repos/kubespray"
+ version: "{{ kubespray_version }}"
+ when: installer_type == "kubespray"
- role: clone-repository
project: "openstack/openstack-ansible-haproxy_server"
- repo: "{{ OPENSTACK_OSA_HAPROXY_GIT_URL }}"
+ repo: "{{ openstack_osa_haproxy_git_url }}"
dest: roles/haproxy_server
- version: "{{ HAPROXY_VERSION }}"
+ version: "{{ haproxy_version }}"
when:
- - INSTALLER_TYPE == "kubespray"
+ - installer_type == "kubespray"
- role: clone-repository
project: "ansible-keepalived"
- repo: "{{ KEEPALIVED_GIT_URL }}"
+ repo: "{{ keepalived_git_url }}"
dest: roles/keepalived
- version: "{{ KEEPALIVED_VERSION }}"
+ version: "{{ keepalived_version }}"
when:
- - INSTALLER_TYPE == "kubespray"
+ - installer_type == "kubespray"
tasks:
- - name: create log directory {{LOG_PATH}}
+ - name: create log directory {{log_path}}
file:
- path: "{{LOG_PATH}}"
+ path: "{{log_path}}"
state: directory
recurse: no
- block:
@@ -85,21 +85,21 @@
path: "/etc/ssl/private"
state: directory
- name: generate self signed certificate
- command: openssl req -new -nodes -x509 -subj "{{ XCI_SSL_SUBJECT }}" -days 3650 -keyout "/etc/ssl/private/xci.key" -out "/etc/ssl/certs/xci.crt" -extensions v3_ca
+ command: openssl req -new -nodes -x509 -subj "{{ xci_ssl_subject }}" -days 3650 -keyout "/etc/ssl/private/xci.key" -out "/etc/ssl/certs/xci.crt" -extensions v3_ca
become: true
- name: Synchronize local development OSA repository to XCI paths
# command module is much faster than the copy module
synchronize:
- src: "{{ OPENSTACK_OSA_DEV_PATH }}"
- dest: "{{ XCI_CACHE }}/repos/openstack-ansible"
+ src: "{{ openstack_osa_dev_path }}"
+ dest: "{{ xci_cache }}/repos/openstack-ansible"
recursive: yes
delete: yes
when:
- - OPENSTACK_OSA_DEV_PATH != ""
+ - openstack_osa_dev_path != ""
when:
- - INSTALLER_TYPE == "osa"
+ - installer_type == "osa"
- name: Dump XCI execution environment to a file
- shell: env > "{{ XCI_PATH }}/.cache/xci.env"
+ shell: env > "{{ xci_path }}/.cache/xci.env"
args:
executable: /bin/bash
diff --git a/xci/playbooks/get-opnfv-scenario-requirements.yml b/xci/playbooks/get-opnfv-scenario-requirements.yml
index 0615fde1..6937b47e 100644
--- a/xci/playbooks/get-opnfv-scenario-requirements.yml
+++ b/xci/playbooks/get-opnfv-scenario-requirements.yml
@@ -76,7 +76,7 @@
- name: Synchronize local changes to scenarios' master branch
synchronize:
- src: "{{ XCI_PATH }}/{{ item.item.role }}/"
+ src: "{{ xci_path }}/{{ item.item.role }}/"
dest: "{{ role_path_default }}/{{ item.item.scenario }}"
failed_when: false
when:
@@ -88,47 +88,47 @@
- name: Plug in the scenario to XCI (fallback)
synchronize:
- src: "{{ XCI_PATH }}/{{ item.item.role }}/"
+ src: "{{ xci_path }}/{{ item.item.role }}/"
dest: "{{ role_path_default }}/{{ item.item.scenario }}"
when: not item.stat.exists
with_items: "{{ scenarios_list_exists.results }}"
loop_control:
label: "{{ item.item.scenario }}"
- - name: Gather information about the selected {{ DEPLOY_SCENARIO }} scenario
+ - name: Gather information about the selected {{ deploy_scenario }} scenario
set_fact:
deploy_scenario: "{{ item }}"
with_items: "{{ scenarios }}"
loop_control:
label: "{{ item.scenario }}"
- when: DEPLOY_SCENARIO | lower == item.scenario
+ when: deploy_scenario | lower == item.scenario
- - name: Determine if the selected {{ DEPLOY_SCENARIO }} scenario can be deployed
+ - name: Determine if the selected {{ deploy_scenario }} scenario can be deployed
block:
- set_fact:
deploy_scenario_installer: "{{ item }}"
with_items: "{{ deploy_scenario.installers }}"
loop_control:
label: "{{ item.installer }}"
- when: item.installer == INSTALLER_TYPE
+ when: item.installer == installer_type
- set_fact:
- deploy_scenario_flavor: "{{ (XCI_FLAVOR in deploy_scenario_installer.flavors) | bool }}"
+ deploy_scenario_flavor: "{{ (xci_flavor in deploy_scenario_installer.flavors) | bool }}"
when:
- deploy_scenario_installer is defined
- deploy_scenario_installer
- set_fact:
- deploy_scenario_distro: "{{ (XCI_DISTRO in deploy_scenario_installer.distros) | bool }}"
+ deploy_scenario_distro: "{{ (xci_distro in deploy_scenario_installer.distros) | bool }}"
when:
- deploy_scenario_flavor is defined
- deploy_scenario_flavor
when: deploy_scenario is defined
- - name: Fail if {{ DEPLOY_SCENARIO }} is not supported
+ - name: Fail if {{ deploy_scenario }} is not supported
fail:
msg:
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - ERROR! The {{ DEPLOY_SCENARIO }} scenario can't be deployed. This is because
- - the {{ INSTALLER_TYPE }} XCI installer or the {{ XCI_FLAVOR }} flavor or the {{ XCI_DISTRO }}
+ - ERROR! The {{ deploy_scenario }} scenario can't be deployed. This is because
+ - the {{ installer_type }} XCI installer or the {{ xci_flavor }} flavor or the {{ xci_distro }}
- distribution is not supported by this scenario. It may also be possible that
- this scenario doesn't exist at all or it's not listed in {{ scenario_file }}.
- ''
@@ -144,7 +144,7 @@
ansible_python_interpreter: "/usr/bin/python"
scenarios: "{{ lookup('file', scenario_file) | from_yaml }}"
scenario_file: '../opnfv-scenario-requirements.yml'
- scenario_path_default: "{{ XCI_SCENARIOS_CACHE }}"
+ scenario_path_default: "{{ xci_scenarios_cache }}"
role_path_default: "{{ playbook_dir }}/roles"
git_clone_retries: 2
git_clone_retry_delay: 5
diff --git a/xci/playbooks/roles/bootstrap-host/tasks/time.yml b/xci/playbooks/roles/bootstrap-host/tasks/time.yml
index 8f94d33f..4b3bf95a 100644
--- a/xci/playbooks/roles/bootstrap-host/tasks/time.yml
+++ b/xci/playbooks/roles/bootstrap-host/tasks/time.yml
@@ -21,3 +21,7 @@
until: chrony_got_time.rc == 0
retries: 5
delay: 5
+ environment:
+ http_proxy: "{{ lookup('env','http_proxy') }}"
+ https_proxy: "{{ lookup('env','https_proxy') }}"
+ no_proxy: "{{ lookup('env','no_proxy') }}"
diff --git a/xci/playbooks/roles/clone-repository/tasks/main.yml b/xci/playbooks/roles/clone-repository/tasks/main.yml
index a124003d..0ba80c0a 100644
--- a/xci/playbooks/roles/clone-repository/tasks/main.yml
+++ b/xci/playbooks/roles/clone-repository/tasks/main.yml
@@ -13,3 +13,7 @@
dest: "{{ dest }}"
version: "{{ version }}"
force: yes
+ environment:
+ http_proxy: "{{ lookup('env','http_proxy') }}"
+ https_proxy: "{{ lookup('env','https_proxy') }}"
+ no_proxy: "{{ lookup('env','no_proxy') }}"
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 db3daa54..a0ac9970 100644
--- a/xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2
+++ b/xci/playbooks/roles/prepare-functest/templates/run-functest.sh.j2
@@ -1,7 +1,7 @@
#!/bin/bash
# Variables that we need to pass from XCI to functest
-XCI_ENV=(INSTALLER_TYPE DEPLOY_SCENARIO XCI_FLAVOR OPENSTACK_OSA_VERSION)
+XCI_ENV=(INSTALLER_TYPE XCI_FLAVOR)
source /root/openrc
@@ -22,6 +22,14 @@ if [[ -e /root/xci.env ]]; then
for x in ${XCI_ENV[@]}; do
grep "^${x}=" /root/xci.env >> /root/env
done
+ # Parse the XCI's DEPLOY_SCENARIO and XCI_FLAVOR variables and
+ # set the functest container's DEPLOY_SCENARIO variable in the
+ # following format <scenario>-<flavor>. But the XCI's mini flavor
+ # is converted into noha.
+ DEPLOY_SCENARIO=`grep -Po '(?<=DEPLOY_SCENARIO=).*' /root/xci.env`
+ XCI_FLAVOR=`grep -Po '(?<=XCI_FLAVOR=).*' /root/xci.env`
+ XCI_FLAVOR=${XCI_FLAVOR/mini/noha}
+ echo "DEPLOY_SCENARIO=$DEPLOY_SCENARIO-$XCI_FLAVOR" >> /root/env
fi
# Dump the env file
diff --git a/xci/scenarios/os-nosdn-nofeature/role/os-nosdn-nofeature/tasks/main.yml b/xci/scenarios/os-nosdn-nofeature/role/os-nosdn-nofeature/tasks/main.yml
index 3725fb58..79aa3aa1 100644
--- a/xci/scenarios/os-nosdn-nofeature/role/os-nosdn-nofeature/tasks/main.yml
+++ b/xci/scenarios/os-nosdn-nofeature/role/os-nosdn-nofeature/tasks/main.yml
@@ -11,8 +11,8 @@
- name: copy user_variables_os-nosdn-nofeature.yml
copy:
src: "user_variables_os-nosdn-nofeature.yml"
- dest: "{{OPENSTACK_OSA_ETC_PATH}}/user_variables_os-nosdn-nofeature.yml"
+ dest: "{{openstack_osa_etc_path}}/user_variables_os-nosdn-nofeature.yml"
- name: copy os-nosdn-nofeature scenario specific openstack_user_config.yml
copy:
- src: "{{XCI_FLAVOR}}/openstack_user_config.yml"
- dest: "{{OPENSTACK_OSA_ETC_PATH}}/openstack_user_config.yml"
+ src: "{{xci_flavor}}/openstack_user_config.yml"
+ dest: "{{openstack_osa_etc_path}}/openstack_user_config.yml"
diff --git a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/tasks/main.yml b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/tasks/main.yml
index 61d31a7f..7e872787 100644
--- a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/tasks/main.yml
+++ b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/tasks/main.yml
@@ -9,18 +9,18 @@
##############################################################################
- name: copy user_variables_os-odl-nofeature.yml
- copy:
- src: "user_variables_os-odl-nofeature.yml"
- dest: "{{OPENSTACK_OSA_ETC_PATH}}/user_variables_os-odl-nofeature.yml"
+ template:
+ src: "user_variables_os-odl-nofeature.yml.j2"
+ dest: "{{openstack_osa_etc_path}}/user_variables_os-odl-nofeature.yml"
- name: copy user_variables_os-odl-nofeature-ha.yml
copy:
- src: "{{XCI_FLAVOR}}/user_variables_os-odl-nofeature-ha.yml"
- dest: "{{OPENSTACK_OSA_ETC_PATH}}/user_variables_os-odl-nofeature-ha.yml"
+ src: "{{xci_flavor}}/user_variables_os-odl-nofeature-ha.yml"
+ dest: "{{openstack_osa_etc_path}}/user_variables_os-odl-nofeature-ha.yml"
when:
- - XCI_FLAVOR == "ha"
+ - xci_flavor == "ha"
- name: copy os-odl-nofeature scenario specific openstack_user_config.yml
copy:
- src: "{{XCI_FLAVOR}}/openstack_user_config.yml"
- dest: "{{OPENSTACK_OSA_ETC_PATH}}/openstack_user_config.yml" \ No newline at end of file
+ src: "{{xci_flavor}}/openstack_user_config.yml"
+ dest: "{{openstack_osa_etc_path}}/openstack_user_config.yml"
diff --git a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/files/user_variables_os-odl-nofeature.yml b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/templates/user_variables_os-odl-nofeature.yml.j2
index 403d372c..5a5ec553 100644
--- a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/files/user_variables_os-odl-nofeature.yml
+++ b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/templates/user_variables_os-odl-nofeature.yml.j2
@@ -18,6 +18,7 @@
# ## the defaults for each role to find additional override options.
# ##
+{% raw %}
# Ensure the openvswitch kernel module is loaded
openstack_host_specific_kernel_modules:
- name: "openvswitch"
@@ -36,4 +37,9 @@ neutron_opendaylight_conf_ini_overrides:
neutron_ml2_drivers_type: "flat,vlan,vxlan"
neutron_plugin_base:
- - odl-router_v2 \ No newline at end of file
+ - odl-router_v2
+{% endraw %}
+
+{% if ODL_VERSION is defined %}
+odl_repo_url: "{{ repo_url[ ansible_pkg_mgr ] }}"
+{% endif %}
diff --git a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/vars/main.yml b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/vars/main.yml
new file mode 100644
index 00000000..5f672b37
--- /dev/null
+++ b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/vars/main.yml
@@ -0,0 +1,10 @@
+---
+odl_version:
+ master: 9
+ oxygen: 8
+ nitrogen: 7
+
+repo_url:
+ zypper: "{% if ODL_VERSION is defined %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version[ODL_VERSION] }}-opensuse-devel.repo{% endif %}"
+ yum: "{% if ODL_VERSION is defined %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version[ODL_VERSION] }}-devel.repo{% endif %}"
+ apt: "{% if ODL_VERSION is defined %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version[ODL_VERSION] }}-ubuntu-devel.repo{% endif %}"
diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index 6e5c8194..f266d64f 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -179,6 +179,8 @@ else
update_clean_vm_files
fi
+declare -r XCI_DEPLOYMENT_IMAGE="deployment_image.qcow2"
+
# Doesn't matter if we just built an image or got one from artifacts. In both
# cases there should be a copy in the cache so copy it over.
sudo rm -f ${BASE_PATH}/${OS}.qcow2
@@ -186,8 +188,8 @@ sudo rm -f ${BASE_PATH}/${OS}.qcow2
sudo chmod 777 -R $XCI_CACHE_DIR/clean_vm/images/
sudo chown $uid:$gid -R $XCI_CACHE_DIR/clean_vm/images/
cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2* ${BASE_PATH}/
-cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2.sha256.txt ${BASE_PATH}/deployment_image.qcow2.sha256.txt
-cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2 ${BASE_PATH}/deployment_image.qcow2
+cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2.sha256.txt ${BASE_PATH}/${XCI_DEPLOYMENT_IMAGE}.sha256.txt
+cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2 ${BASE_PATH}/${XCI_DEPLOYMENT_IMAGE}
cd ${BASE_PATH}
declare -r OS_IMAGE_FILE=${OS}.qcow2
@@ -332,11 +334,13 @@ EOF
# Need to copy releng-xci to the vm so we can execute stuff
do_copy() {
- rsync -a \
- --exclude "${VM_NAME}*" \
- --exclude "${OS}*" \
- --exclude "build.log" \
- -e "$vm_ssh" ${BASE_PATH}/ ${VM_NAME}:~/releng-xci/
+ echo "Copying releng-xci host folder to guest vm..."
+ rsync -a \
+ --exclude "${VM_NAME}*" \
+ --include "${XCI_DEPLOYMENT_IMAGE}*" \
+ --exclude "*qcow2*" \
+ --exclude "build.log" \
+ -e "$vm_ssh" ${BASE_PATH}/ ${VM_NAME}:~/releng-xci/
}
do_copy
diff --git a/xci/var/opnfv.yml b/xci/var/opnfv.yml
index 646eaf8e..e7e3b76c 100644
--- a/xci/var/opnfv.yml
+++ b/xci/var/opnfv.yml
@@ -7,39 +7,45 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-OPNFV_RELENG_GIT_URL: "{{ lookup('env','OPNFV_RELENG_GIT_URL') }}"
-OPNFV_RELENG_VERSION: "{{ lookup('env','OPNFV_RELENG_VERSION') }}"
-OPENSTACK_BIFROST_GIT_URL: "{{ lookup('env','OPENSTACK_BIFROST_GIT_URL') }}"
-OPENSTACK_BIFROST_DEV_PATH: "{{ lookup('env','OPENSTACK_BIFROST_DEV_PATH') }}"
-OPENSTACK_BIFROST_VERSION: "{{ lookup('env','OPENSTACK_BIFROST_VERSION') }}"
-OPENSTACK_OSA_GIT_URL: "{{ lookup('env','OPENSTACK_OSA_GIT_URL') }}"
-OPENSTACK_OSA_OPENRC_GIT_URL: "{{ lookup('env', 'OPENSTACK_OSA_OPENRC_GIT_URL') }}"
-OPENSTACK_OSA_PATH: "{{ lookup('env','OPENSTACK_OSA_PATH') }}"
-OPENSTACK_OSA_DEV_PATH: "{{ lookup('env','OPENSTACK_OSA_DEV_PATH') }}"
-OPENSTACK_OSA_VERSION: "{{ lookup('env','OPENSTACK_OSA_VERSION') }}"
-OPENSTACK_OSA_ETC_PATH: "{{ lookup('env','OPENSTACK_OSA_ETC_PATH') }}"
-XCI_ANSIBLE_PIP_VERSION: "{{ lookup('env','XCI_ANSIBLE_PIP_VERSION') }}"
-XCI_CACHE: "{{ lookup('env', 'XCI_CACHE') }}"
-XCI_FLAVOR: "{{ lookup('env','XCI_FLAVOR') }}"
-XCI_DISTRO: "{{ lookup('env', 'XCI_DISTRO') }}"
-XCI_FLAVOR_ANSIBLE_FILE_PATH: "{{ lookup('env','XCI_FLAVOR_ANSIBLE_FILE_PATH') }}"
-CI_LOOP: "{{ lookup('env','CI_LOOP') }}"
-XCI_PATH: "{{ lookup('env', 'XCI_PATH') }}"
-XCI_SCENARIOS_CACHE: "{{ lookup('env', 'XCI_SCENARIOS_CACHE') }}"
-LOG_PATH: "{{ lookup('env','LOG_PATH') }}"
-OPNFV_HOST_IP: "{{ lookup('env','OPNFV_HOST_IP') }}"
-OPNFV_SSH_HOST_KEYS_PATH: "{{ lookup('env', 'OPNFV_SSH_HOST_KEYS_PATH') }}"
-XCI_EXTRA_VARS_PATH: "{{ lookup('env', 'XCI_EXTRA_VARS_PATH') }}"
-XCI_SSL_SUBJECT: "{{ lookup('env', 'XCI_SSL_SUBJECT') }}"
-XCI_CEPH_ENABLED: "{{ lookup('env', 'XCI_CEPH_ENABLED') }}"
-RUN_TEMPEST: "{{ lookup('env', 'RUN_TEMPEST') }}"
-CORE_OPENSTACK_INSTALL: "{{ lookup('env', 'CORE_OPENSTACK_INSTALL') }}"
-DEPLOY_SCENARIO: "{{ lookup('env','DEPLOY_SCENARIO') }}"
-INSTALLER_TYPE: "{{ lookup('env','INSTALLER_TYPE') }}"
-KUBESPRAY_VERSION: "{{ lookup('env','KUBESPRAY_VERSION') }}"
-XCI_KUBE_ANSIBLE_PIP_VERSION: "{{ lookup('env','XCI_KUBE_ANSIBLE_PIP_VERSION') }}"
-KUBESPRAY_GIT_URL: "{{ lookup('env','KUBESPRAY_GIT_URL') }}"
-OPENSTACK_OSA_HAPROXY_GIT_URL: "{{ lookup('env','OPENSTACK_OSA_HAPROXY_GIT_URL') }}"
-HAPROXY_VERSION: "{{ lookup('env','HAPROXY_VERSION') }}"
-KEEPALIVED_GIT_URL: "{{ lookup('env','KEEPALIVED_GIT_URL') }}"
-KEEPALIVED_VERSION: "{{ lookup('env','KEEPALIVED_VERSION') }}"
+# This file is used for reflecting the environment variables set in various places
+# that are used in ansible playbooks/roles. Only the variables used within ansible
+# playbooks/roles should exist in this file.
+
+# openstack/bifrost variables
+openstack_bifrost_git_url: "{{ lookup('env','OPENSTACK_BIFROST_GIT_URL') }}"
+openstack_bifrost_version: "{{ lookup('env','OPENSTACK_BIFROST_VERSION') }}"
+openstack_bifrost_dev_path: "{{ lookup('env','OPENSTACK_BIFROST_DEV_PATH') }}"
+
+# openstack/openstack-ansible variables
+openstack_osa_git_url: "{{ lookup('env','OPENSTACK_OSA_GIT_URL') }}"
+openstack_osa_version: "{{ lookup('env','OPENSTACK_OSA_VERSION') }}"
+openstack_osa_dev_path: "{{ lookup('env','OPENSTACK_OSA_DEV_PATH') }}"
+openstack_osa_path: "{{ lookup('env','OPENSTACK_OSA_PATH') }}"
+openstack_osa_etc_path: "{{ lookup('env','OPENSTACK_OSA_ETC_PATH') }}"
+openstack_osa_openrc_git_url: "{{ lookup('env', 'OPENSTACK_OSA_OPENRC_GIT_URL') }}"
+openstack_osa_haproxy_git_url: "{{ lookup('env','OPENSTACK_OSA_HAPROXY_GIT_URL') }}"
+
+# kubespray variables
+kubespray_git_url: "{{ lookup('env','KUBESPRAY_GIT_URL') }}"
+kubespray_version: "{{ lookup('env','KUBESPRAY_VERSION') }}"
+xci_kube_ansible_pip_version: "{{ lookup('env','XCI_KUBE_ANSIBLE_PIP_VERSION') }}"
+
+# variables for other components
+keepalived_git_url: "{{ lookup('env','KEEPALIVED_GIT_URL') }}"
+haproxy_version: "{{ lookup('env','HAPROXY_VERSION') }}"
+keepalived_version: "{{ lookup('env','KEEPALIVED_VERSION') }}"
+
+# xci variables
+xci_cache: "{{ lookup('env', 'XCI_CACHE') }}"
+xci_flavor: "{{ lookup('env','XCI_FLAVOR') }}"
+xci_flavor_ansible_file_path: "{{ lookup('env','XCI_FLAVOR_ANSIBLE_FILE_PATH') }}"
+xci_distro: "{{ lookup('env', 'XCI_DISTRO') }}"
+xci_scenarios_cache: "{{ lookup('env', 'XCI_SCENARIOS_CACHE') }}"
+xci_ssl_subject: "{{ lookup('env', 'XCI_SSL_SUBJECT') }}"
+xci_ceph_enabled: "{{ lookup('env', 'XCI_CEPH_ENABLED') }}"
+log_path: "{{ lookup('env','LOG_PATH') }}"
+opnfv_ssh_host_keys_path: "{{ lookup('env', 'OPNFV_SSH_HOST_KEYS_PATH') }}"
+run_tempest: "{{ lookup('env', 'RUN_TEMPEST') }}"
+core_openstack_install: "{{ lookup('env', 'CORE_OPENSTACK_INSTALL') }}"
+deploy_scenario: "{{ lookup('env','DEPLOY_SCENARIO') }}"
+installer_type: "{{ lookup('env','INSTALLER_TYPE') }}"
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index 3d5854a4..04e52fec 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -65,7 +65,9 @@ source "$XCI_PATH/xci/installer/${INSTALLER_TYPE}/env" &>/dev/null || true
# source xci configuration
source $XCI_PATH/xci/config/env-vars
# Make sure we pass XCI_PATH everywhere
-export XCI_ANSIBLE_PARAMS+=" -e XCI_PATH=${XCI_PATH}"
+export XCI_ANSIBLE_PARAMS+=" -e xci_path=${XCI_PATH}"
+# Make sure everybody knows where our global roles are
+export ANSIBLE_ROLES_PATH="$HOME/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${XCI_PATH}/xci/playbooks/roles"
if [[ -z $(echo $PATH | grep "$HOME/.local/bin") ]]; then
export PATH="$HOME/.local/bin:$PATH"
@@ -83,6 +85,9 @@ unset user_local_dev_vars local_user_var
# register our handler
trap submit_bug_report ERR
+# We are using sudo so we need to make sure that env_reset is not present
+sudo sed -i "s/^Defaults.*env_reset/#&/" /etc/sudoers
+
#-------------------------------------------------------------------------------
# Log info to console
#-------------------------------------------------------------------------------
@@ -92,10 +97,20 @@ echo "-------------------------------------------------------------------------"
echo "OPNFV scenario: $DEPLOY_SCENARIO"
echo "xci flavor: $XCI_FLAVOR"
echo "xci installer: $INSTALLER_TYPE"
+echo "infra deployment: $INFRA_DEPLOYMENT"
echo "opnfv/releng-xci version: $(git rev-parse HEAD)"
echo "openstack/bifrost version: $OPENSTACK_BIFROST_VERSION"
[[ "$INSTALLER_TYPE" == "osa" ]] && echo "openstack/openstack-ansible version: $OPENSTACK_OSA_VERSION"
[[ "$INSTALLER_TYPE" == "kubespray" ]] && echo "kubespray version: $KUBESPRAY_VERSION"
+[[ "$INFRA_DEPLOYMENT" == "bifrost" ]] && echo "bifrost version: $OPENSTACK_BIFROST_VERSION"
+echo "-------------------------------------------------------------------------"
+
+#-------------------------------------------------------------------------------
+# Clean up environment
+#-------------------------------------------------------------------------------
+echo "Info: Cleaning up previous XCI artifacts"
+echo "-------------------------------------------------------------------------"
+sudo -E bash files/xci-destroy-env.sh
echo "-------------------------------------------------------------------------"
#-------------------------------------------------------------------------------
@@ -123,29 +138,10 @@ echo "-------------------------------------------------------------------------"
#-------------------------------------------------------------------------------
source $(find $XCI_SCENARIOS_CACHE/${DEPLOY_SCENARIO} -name xci_overrides) &>/dev/null || :
-#-------------------------------------------------------------------------------
-# Start provisioning VM nodes
-#-------------------------------------------------------------------------------
-# This playbook
-# - removes directories that were created by the previous xci run
-# - clones opnfv/releng-xci and openstack/bifrost repositories
-# - combines opnfv/releng-xci and openstack/bifrost scripts/playbooks
-# - destroys VMs, removes ironic db, leases, logs
-# - creates and provisions VMs for the chosen flavor
-#-------------------------------------------------------------------------------
-echo "Info: Starting provisining VM nodes using openstack/bifrost"
-echo "-------------------------------------------------------------------------"
-# We are using sudo so we need to make sure that env_reset is not present
-sudo sed -i "s/^Defaults.*env_reset/#&/" /etc/sudoers
-cd $XCI_PATH/bifrost/
-sudo -E bash ./scripts/destroy-env.sh
-cd $XCI_PLAYBOOKS
-ansible-playbook ${XCI_ANSIBLE_PARAMS} -i "localhost," bootstrap-bifrost.yml
-cd ${XCI_CACHE}/repos/bifrost
-bash ./scripts/bifrost-provision.sh
-echo "-----------------------------------------------------------------------"
-echo "Info: VM nodes are provisioned!"
-echo "-----------------------------------------------------------------------"
+# Deploy infrastructure based on the selected deloyment method
+echo "Info: Deploying hardware using '${INFRA_DEPLOYMENT}'"
+echo "---------------------------------------------------"
+source ${XCI_PATH}/xci/infra/${INFRA_DEPLOYMENT}/infra-provision.sh
# Deploy OpenStack on the selected installer
echo "Info: Deploying '${INSTALLER_TYPE}' installer"