summaryrefslogtreecommitdiffstats
path: root/xci
diff options
context:
space:
mode:
Diffstat (limited to 'xci')
-rw-r--r--xci/infra/bifrost/playbooks/bootstrap-bifrost.yml22
-rw-r--r--xci/installer/kubespray/playbooks/configure-opnfvhost.yml20
-rw-r--r--xci/installer/kubespray/playbooks/configure-targethosts.yml10
-rw-r--r--xci/installer/osa/playbooks/bootstrap-scenarios.yml10
-rw-r--r--xci/installer/osa/playbooks/configure-opnfvhost.yml76
-rw-r--r--xci/installer/osa/playbooks/configure-targethosts.yml10
-rw-r--r--xci/playbooks/configure-localhost.yml58
-rw-r--r--xci/playbooks/get-opnfv-scenario-requirements.yml24
-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.yml12
-rw-r--r--xci/var/opnfv.yml78
-rwxr-xr-xxci/xci-deploy.sh2
12 files changed, 167 insertions, 161 deletions
diff --git a/xci/infra/bifrost/playbooks/bootstrap-bifrost.yml b/xci/infra/bifrost/playbooks/bootstrap-bifrost.yml
index 23eb976c..2153b3b3 100644
--- a/xci/infra/bifrost/playbooks/bootstrap-bifrost.yml
+++ b/xci/infra/bifrost/playbooks/bootstrap-bifrost.yml
@@ -11,32 +11,32 @@
connection: local
gather_facts: true
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: 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: "{{ XCI_PATH }}/xci/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}}/xci/infra/bifrost/"
- dest: "{{ XCI_CACHE }}/repos/bifrost"
+ src: "{{ xci_path}}/xci/infra/bifrost/"
+ dest: "{{ xci_cache }}/repos/bifrost"
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/playbooks/bootstrap-scenarios.yml b/xci/installer/osa/playbooks/bootstrap-scenarios.yml
index 975c85c1..6546d5ce 100644
--- a/xci/installer/osa/playbooks/bootstrap-scenarios.yml
+++ b/xci/installer/osa/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/installer/osa/playbooks/configure-opnfvhost.yml b/xci/installer/osa/playbooks/configure-opnfvhost.yml
index 647f175b..3a904aed 100644
--- a/xci/installer/osa/playbooks/configure-opnfvhost.yml
+++ b/xci/installer/osa/playbooks/configure-opnfvhost.yml
@@ -10,8 +10,8 @@
- 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') }}"
@@ -25,17 +25,17 @@
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') }}"
@@ -50,71 +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"
+ 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"
+ 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"
+ - openstack_osa_version != "master"
- include: 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 }}"
@@ -125,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
@@ -154,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
@@ -162,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
@@ -175,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"
@@ -191,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 42822c96..09258e7c 100644
--- a/xci/installer/osa/playbooks/configure-targethosts.yml
+++ b/xci/installer/osa/playbooks/configure-targethosts.yml
@@ -9,15 +9,15 @@
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') }}"
@@ -30,10 +30,10 @@
- "'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/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/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..cd016f5f 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
@@ -11,16 +11,16 @@
- 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"
+ 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/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 80b10106..04e52fec 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -65,7 +65,7 @@ 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"