summaryrefslogtreecommitdiffstats
path: root/xci
diff options
context:
space:
mode:
authorDave Urschatz <dave.urschatz@cengn.ca>2017-08-12 13:56:19 -0400
committerDave Urschatz <dave.urschatz@cengn.ca>2017-08-16 19:51:00 -0400
commit612c648bdcbd05382b2d916d82415a3016d793c0 (patch)
tree8ad133bab04f2344f17f2f0858cfaede0117dc36 /xci
parentc7ceaa77fba0d3dbe0ca802d0b4c159f38b6cbf9 (diff)
Refactor releng/prototypes/xci to releng-xci/xci in the code
These changes are needed as part of migrating xci from releng repo to the releng-xci repo. They cover: - README updates - Re-point configuration from releng/prototypes to releng-xci The changes have been tested as follows: - XCI_FLAVOR=aio - OPENSTACK_OSA_VERSION=adfaa66d6108f87599e0595591b39cad2c8fb658 xci: aio has been installed real 107m5.310s user 11m50.180s sys 4m11.152s ubuntu@rack-IRA2-SymKloudBlade4:~/releng-xci/xci$ Change-Id: I8fd86c2442ee3a7c6996eedb6510dbc6eebd30b0 Signed-off-by: Dave Urschatz <dave.urschatz@cengn.ca>
Diffstat (limited to 'xci')
-rw-r--r--xci/README.rst26
-rwxr-xr-xxci/config/env-vars5
-rwxr-xr-xxci/config/pinned-versions2
-rwxr-xr-xxci/config/user-vars2
-rw-r--r--xci/playbooks/configure-localhost.yml10
-rw-r--r--xci/playbooks/configure-opnfvhost.yml14
-rw-r--r--xci/playbooks/provision-vm-nodes.yml12
-rwxr-xr-xxci/xci-deploy.sh14
8 files changed, 43 insertions, 42 deletions
diff --git a/xci/README.rst b/xci/README.rst
index ecb8e19d..a6e34c85 100644
--- a/xci/README.rst
+++ b/xci/README.rst
@@ -40,7 +40,7 @@ and OpenStack installation.
More information about this project can be seen on
`OpenStack Ansible documentation <https://docs.openstack.org/developer/openstack-ansible/>`_.
-- **opnfv/releng:** OPNFV Releng Project provides additional scripts, Ansible
+- **opnfv/releng-xci:** OPNFV Releng Project provides additional scripts, Ansible
playbooks and configuration options in order for developers to have easy
way of using openstack/bifrost and openstack/openstack-ansible by just
setting couple of environment variables and executing a single script.
@@ -105,11 +105,11 @@ Basic Usage
clone OPNFV Releng repository
- git clone https://gerrit.opnfv.org/gerrit/releng.git
+ git clone https://gerrit.opnfv.org/gerrit/releng-xci.git
change into directory where the sandbox script is located
- cd releng/prototypes/xci
+ cd releng-xci/xci
execute sandbox script
@@ -132,13 +132,13 @@ be configured by developers by setting certain environment variables.
Below example deploys noha flavor using the latest of openstack-ansible
master branch and stores logs in different location than what is configured.
-clone OPNFV Releng repository
+clone OPNFV releng-xci repository
- git clone https://gerrit.opnfv.org/gerrit/releng.git
+ git clone https://gerrit.opnfv.org/gerrit/releng-xci.git
change into directory where the sandbox script is located
- cd releng/prototypes/xci
+ cd releng-xci/xci
set the sandbox flavor
@@ -156,13 +156,13 @@ execute sandbox script
./xci-deploy.sh
-===============
+==============
User Variables
-===============
+==============
All user variables can be set from command line by exporting them before
executing the script. The current user variables can be seen from
-``releng/prototypes/xci/config/user-vars``.
+``releng-xci/xci/config/user-vars``.
The variables can also be set directly within the file before executing
the sandbox script.
@@ -173,7 +173,7 @@ Pinned Versions
As explained above, the users can pick and choose which versions to use. If
you want to be on the safe side, you can use the pinned versions the sandbox
-provides. They can be seen from ``releng/prototypes/xci/config/pinned-versions``.
+provides. They can be seen from ``releng-xci/xci/config/pinned-versions``.
How Pinned Versions are Determined
----------------------------------
@@ -183,7 +183,7 @@ openstack/ansible using latest on master and stable/ocata branches,
continuously chasing the HEAD of corresponding branches.
Once a working version is identified, the versions of the upstream components
-are then bumped in releng repo.
+are then bumped in releng-xci repo.
==================
XCI developer tips
@@ -191,11 +191,11 @@ XCI developer tips
It is possible to run XCI in development mode, in order to test the
latest changes. When deploying on this mode, the script will use the working
-directories for releng/bifrost/OSA, instead of cloning the whole repositories
+directories for releng-xci/bifrost/OSA, instead of cloning the whole repositories
on each run.
To enable it, you need to export the different DEV_PATH vars:
-- export OPNFV_RELENG_DEV_PATH=/opt/releng/
+- export OPNFV_RELENG_DEV_PATH=/opt/releng-xci/
- export OPENSTACK_BIFROST_DEV_PATH=/opt/bifrost/
- export OPENSTACK_OSA_DEV_PATH=/opt/openstack-ansible/
diff --git a/xci/config/env-vars b/xci/config/env-vars
index 9d4c7825..f4a3facc 100755
--- a/xci/config/env-vars
+++ b/xci/config/env-vars
@@ -2,12 +2,13 @@
# !!! Changing or overriding these will most likely break everything altogether !!!
# Please do not change these settings if you are not developing for XCI!
#-------------------------------------------------------------------------------
-export OPNFV_RELENG_GIT_URL=https://gerrit.opnfv.org/gerrit/releng.git
+export OPNFV_RELENG_GIT_URL=https://gerrit.opnfv.org/gerrit/releng-xci.git
export OPENSTACK_BIFROST_GIT_URL=https://git.openstack.org/openstack/bifrost
export OPENSTACK_OSA_GIT_URL=https://git.openstack.org/openstack/openstack-ansible
export OPENSTACK_OSA_ETC_PATH=/etc/openstack_deploy
export OPNFV_HOST_IP=192.168.122.2
-export XCI_FLAVOR_ANSIBLE_FILE_PATH=$OPNFV_RELENG_PATH/prototypes/xci/file/$XCI_FLAVOR
+export OPNFV_XCI_PATH=$OPNFV_RELENG_PATH/xci
+export XCI_FLAVOR_ANSIBLE_FILE_PATH=$OPNFV_XCI_PATH/file/$XCI_FLAVOR
export CI_LOOP=${CI_LOOP:-daily}
export JOB_NAME=${JOB_NAME:-false}
# TODO: this currently matches to bifrost ansible version
diff --git a/xci/config/pinned-versions b/xci/config/pinned-versions
index 58178607..121cb473 100755
--- a/xci/config/pinned-versions
+++ b/xci/config/pinned-versions
@@ -19,7 +19,7 @@
# export OPENSTACK_BIFROST_VERSION="a87f7ce6c8725b3bbffec7b2efa1e466796848a9"
# export OPENSTACK_OSA_VERSION="4713cf45e11b4ebca9fbed25d1389854602213d8"
#-------------------------------------------------------------------------------
-# use releng from master until the development work with the sandbox is complete
+# use releng-xci from master until the development work with the sandbox is complete
export OPNFV_RELENG_VERSION="master"
# HEAD of bifrost "master" as of 29.06.2017
export OPENSTACK_BIFROST_VERSION=${OPENSTACK_BIFROST_VERSION:-"7c9bb5e07c6bc3b42c9a9e8457e5eef511075b38"}
diff --git a/xci/config/user-vars b/xci/config/user-vars
index fd11a584..c960b904 100755
--- a/xci/config/user-vars
+++ b/xci/config/user-vars
@@ -29,7 +29,7 @@ export XCI_FLAVOR=${XCI_FLAVOR:-aio}
# changing these paths might break things.
#-------------------------------------------------------------------------------
export XCI_DEVEL_ROOT=${XCI_DEVEL_ROOT:-"/tmp/.xci-deploy-env"}
-export OPNFV_RELENG_PATH="${XCI_DEVEL_ROOT}/releng"
+export OPNFV_RELENG_PATH="${XCI_DEVEL_ROOT}/releng-xci"
export OPENSTACK_BIFROST_PATH="${XCI_DEVEL_ROOT}/bifrost"
export OPENSTACK_OSA_PATH="${XCI_DEVEL_ROOT}/openstack-ansible"
export OPNFV_SSH_HOST_KEYS_PATH="${XCI_DEVEL_ROOT}/ssh_host_keys"
diff --git a/xci/playbooks/configure-localhost.yml b/xci/playbooks/configure-localhost.yml
index b6d0fccb..40147d31 100644
--- a/xci/playbooks/configure-localhost.yml
+++ b/xci/playbooks/configure-localhost.yml
@@ -14,7 +14,7 @@
- ../var/opnfv.yml
roles:
- role: remove-folders
- - { role: clone-repository, project: "opnfv/releng", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
+ - { role: clone-repository, project: "opnfv/releng-xci", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
- hosts: localhost
connection: local
@@ -23,7 +23,7 @@
- ../var/{{ ansible_os_family }}.yml
- ../var/opnfv.yml
tasks:
- - name: Synchronize local development releng repository to XCI paths
+ - name: Synchronize local development releng-xci repository to XCI paths
synchronize:
src: "{{ OPNFV_RELENG_DEV_PATH }}"
dest: "{{ OPNFV_RELENG_PATH }}"
@@ -47,13 +47,13 @@
- name: copy aio playbook
copy:
src: "{{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/configure-opnfvhost.yml"
- dest: "{{OPNFV_RELENG_PATH}}/prototypes/xci/playbooks"
+ dest: "{{OPNFV_RELENG_PATH}}/xci/playbooks"
when: XCI_FLAVOR == "aio"
- name: copy flavor inventory
copy:
src: "{{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/inventory"
- dest: "{{OPNFV_RELENG_PATH}}/prototypes/xci/playbooks"
+ dest: "{{OPNFV_RELENG_PATH}}/xci/playbooks"
- name: copy flavor vars
copy:
src: "{{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/flavor-vars.yml"
- dest: "{{OPNFV_RELENG_PATH}}/prototypes/xci/var"
+ dest: "{{OPNFV_RELENG_PATH}}/xci/var"
diff --git a/xci/playbooks/configure-opnfvhost.yml b/xci/playbooks/configure-opnfvhost.yml
index a7ce5216..53e34418 100644
--- a/xci/playbooks/configure-opnfvhost.yml
+++ b/xci/playbooks/configure-opnfvhost.yml
@@ -15,7 +15,7 @@
- ../var/opnfv.yml
roles:
- role: remove-folders
- - { role: clone-repository, project: "opnfv/releng", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
+ - { role: clone-repository, project: "opnfv/releng-xci", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
- { role: clone-repository, project: "openstack/openstack-ansible", repo: "{{ OPENSTACK_OSA_GIT_URL }}", dest: "{{ OPENSTACK_OSA_PATH }}", version: "{{ OPENSTACK_OSA_VERSION }}" }
- hosts: opnfv
@@ -24,7 +24,7 @@
- ../var/{{ ansible_os_family }}.yml
- ../var/opnfv.yml
tasks:
- - name: Synchronize local development releng repository to XCI paths
+ - name: Synchronize local development releng-xci repository to XCI paths
synchronize:
src: "{{ OPNFV_RELENG_DEV_PATH }}"
dest: "{{ OPNFV_RELENG_PATH }}"
@@ -62,9 +62,9 @@
- name: fetch public key
fetch: src="/root/.ssh/id_rsa.pub" dest="{{ OPNFV_SSH_HOST_KEYS_PATH }}"
- name: copy flavor inventory
- shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/inventory {{OPNFV_RELENG_PATH}}/prototypes/xci/playbooks"
+ shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/inventory {{OPNFV_RELENG_PATH}}/xci/playbooks"
- name: copy flavor vars
- shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/flavor-vars.yml {{OPNFV_RELENG_PATH}}/prototypes/xci/var"
+ shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/flavor-vars.yml {{OPNFV_RELENG_PATH}}/xci/var"
- name: copy openstack_deploy
shell: "/bin/cp -rf {{OPENSTACK_OSA_PATH}}/etc/openstack_deploy {{OPENSTACK_OSA_ETC_PATH}}"
- name: copy openstack_user_config.yml
@@ -72,7 +72,7 @@
- name: copy user_variables.yml
shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/user_variables.yml {{OPENSTACK_OSA_ETC_PATH}}"
- name: copy cinder.yml
- shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/prototypes/xci/file/cinder.yml {{OPENSTACK_OSA_ETC_PATH}}/env.d"
+ shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/xci/file/cinder.yml {{OPENSTACK_OSA_ETC_PATH}}/env.d"
# TODO: We need to get rid of this as soon as the issue is fixed upstream
- name: change the haproxy state from disable to enable
replace:
@@ -80,9 +80,9 @@
regexp: '(\s+)haproxy_state: disabled'
replace: '\1haproxy_state: enabled'
- name: copy OPNFV OpenStack playbook
- shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/prototypes/xci/file/setup-openstack.yml {{OPENSTACK_OSA_PATH}}/playbooks"
+ shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/xci/file/setup-openstack.yml {{OPENSTACK_OSA_PATH}}/playbooks"
- name: copy OPNFV role requirements
- shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/prototypes/xci/file/ansible-role-requirements.yml {{OPENSTACK_OSA_PATH}}"
+ shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/xci/file/ansible-role-requirements.yml {{OPENSTACK_OSA_PATH}}"
- name: bootstrap ansible on opnfv host
command: "/bin/bash ./scripts/bootstrap-ansible.sh"
args:
diff --git a/xci/playbooks/provision-vm-nodes.yml b/xci/playbooks/provision-vm-nodes.yml
index 92b5c553..e9b8fa2d 100644
--- a/xci/playbooks/provision-vm-nodes.yml
+++ b/xci/playbooks/provision-vm-nodes.yml
@@ -15,7 +15,7 @@
roles:
# using these roles here ensures that we can reuse this playbook in different context
- role: remove-folders
- - { role: clone-repository, project: "opnfv/releng", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
+ - { role: clone-repository, project: "opnfv/releng-xci", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
- { role: clone-repository, project: "opnfv/bifrost", repo: "{{ OPENSTACK_BIFROST_GIT_URL }}", dest: "{{ OPENSTACK_BIFROST_PATH }}", version: "{{ OPENSTACK_BIFROST_VERSION }}" }
- hosts: localhost
@@ -34,7 +34,7 @@
delete: yes
when:
- OPENSTACK_BIFROST_DEV_PATH != ""
- - name: Synchronize local development releng repository to XCI paths
+ - name: Synchronize local development releng-xci repository to XCI paths
synchronize:
src: "{{ OPNFV_RELENG_DEV_PATH }}"
dest: "{{ OPNFV_RELENG_PATH }}"
@@ -42,12 +42,12 @@
delete: yes
when:
- OPNFV_RELENG_DEV_PATH != ""
- - name: Copy extra vars to releng and bifrost
+ - name: Copy extra vars to releng-xci and bifrost
synchronize:
src: "{{ XCI_EXTRA_VARS_PATH }}"
dest: "{{ item }}"
with_items:
- - "{{ OPNFV_RELENG_PATH }}/prototypes/xci/playbooks"
+ - "{{ OPNFV_RELENG_PATH }}/xci/playbooks"
- "{{ OPENSTACK_BIFROST_PATH }}/playbooks/inventory"
when:
- XCI_EXTRA_VARS_PATH != ""
@@ -59,9 +59,9 @@
- ../var/{{ ansible_os_family }}.yml
- ../var/opnfv.yml
tasks:
- - name: combine opnfv/releng and openstack/bifrost scripts/playbooks
+ - name: combine opnfv/releng-xci and openstack/bifrost scripts/playbooks
copy:
- src: "{{ OPNFV_RELENG_PATH }}/prototypes/bifrost/"
+ src: "{{ OPNFV_RELENG_PATH }}/bifrost/"
dest: "{{ OPENSTACK_BIFROST_PATH }}"
- hosts: localhost
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index d7112565..268d2ab9 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -53,7 +53,7 @@ echo "Info: Starting XCI Deployment"
echo "Info: Deployment parameters"
echo "-------------------------------------------------------------------------"
echo "xci flavor: $XCI_FLAVOR"
-echo "opnfv/releng version: $OPNFV_RELENG_VERSION"
+echo "opnfv/releng-xci version: $OPNFV_RELENG_VERSION"
echo "openstack/bifrost version: $OPENSTACK_BIFROST_VERSION"
echo "openstack/openstack-ansible version: $OPENSTACK_OSA_VERSION"
echo "-------------------------------------------------------------------------"
@@ -70,8 +70,8 @@ source file/install-ansible.sh
#-------------------------------------------------------------------------------
# This playbook
# - removes directories that were created by the previous xci run
-# - clones opnfv/releng and openstack/bifrost repositories
-# - combines opnfv/releng and openstack/bifrost scripts/playbooks
+# - clones opnfv/releng-xci and openstack/bifrost repositories
+# - combines opnfv/releng-xci and openstack/bifrost scripts/playbooks
# - destorys VMs, removes ironic db, leases, logs
# - creates and provisions VMs for the chosen flavor
#-------------------------------------------------------------------------------
@@ -89,7 +89,7 @@ echo
#-------------------------------------------------------------------------------
# This playbook
# - removes directories that were created by the previous xci run
-# - clones opnfv/releng repository
+# - clones opnfv/releng-xci repository
# - creates log directory
# - copies flavor files such as playbook, inventory, and var file
#-------------------------------------------------------------------------------
@@ -105,7 +105,7 @@ echo "Info: Configured localhost host for openstack-ansible"
#-------------------------------------------------------------------------------
# This playbook
# - removes directories that were created by the previous xci run
-# - clones opnfv/releng and openstack/openstack-ansible repositories
+# - clones opnfv/releng-xci and openstack/openstack-ansible repositories
# - configures network
# - generates/prepares ssh keys
# - bootstraps ansible
@@ -113,7 +113,7 @@ echo "Info: Configured localhost host for openstack-ansible"
#-------------------------------------------------------------------------------
echo "Info: Configuring opnfv deployment host for openstack-ansible"
echo "-----------------------------------------------------------------------"
-cd $OPNFV_RELENG_PATH/prototypes/xci/playbooks
+cd $OPNFV_XCI_PATH/playbooks
ansible-playbook $ANSIBLE_VERBOSITY -i inventory configure-opnfvhost.yml
echo "-----------------------------------------------------------------------"
echo "Info: Configured opnfv deployment host for openstack-ansible"
@@ -136,7 +136,7 @@ fi
#-------------------------------------------------------------------------------
echo "Info: Configuring target hosts for openstack-ansible"
echo "-----------------------------------------------------------------------"
-cd $OPNFV_RELENG_PATH/prototypes/xci/playbooks
+cd $OPNFV_XCI_PATH/playbooks
ansible-playbook $ANSIBLE_VERBOSITY -i inventory configure-targethosts.yml
echo "-----------------------------------------------------------------------"
echo "Info: Configured target hosts"