2. Clone releng::
- sudo git clone https://gerrit.opnfv.org/gerrit/releng /opt/releng
+ sudo git clone https://gerrit.opnfv.org/gerrit/releng-xci /opt/releng-xci
3. Clone infracloud::
4. Combine releng scripts and playbooks with bifrost::
- sudo cp -R /opt/releng/prototypes/bifrost/* /opt/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
cloud based on OpenStack-Ansible.
It needs to be combined with Bifrost. You need use Bifrost to provide six VMs.
To learn about how to use Bifrost, you can read the document on
-[/opt/releng/prototypes/bifrost/README.md].
+[/opt/bifrost/README.md].
Minimal requirements:
1. You will need to have a least 150G free space for the partition on where
After provisioning the six VMs please follow that steps:
1.Run the script to deploy OpenStack
- cd /opt/releng/prototypes/openstack-ansible/scripts/
+ cd /opt/openstack-ansible/scripts/
sudo ./osa_deploy.sh
It will take a lot of time. When the deploy is successful, you will see the
message "OpenStack deployed successfully".
Once all the hardware is provisioned, enter in controller and compute nodes and follow these steps:
-1. Clone releng::
+1. Clone releng-xci::
- git clone https://gerrit.opnfv.org/gerrit/releng /opt/releng
+ git clone https://gerrit.opnfv.org/gerrit/releng-xci /opt/releng-xci
2. Copy hiera to the right place::
- cp /opt/releng/prototypes/puppet-infracloud/hiera/common.yaml /var/lib/hiera
+ cp /opt/puppet-infracloud/hiera/common.yaml /var/lib/hiera
3. Install modules::
- cd /opt/releng/prototypes/puppet-infracloud
+ cd /opt/puppet-infracloud
./install_modules.sh
4. Apply the infracloud manifest::
- cd /opt/releng/prototypes/puppet-infracloud
- puppet apply manifests/site.pp --modulepath=/etc/puppet/modules:/opt/releng/prototypes/puppet-infracloud/modules
+ cd /opt/puppet-infracloud
+ puppet apply manifests/site.pp --modulepath=/etc/puppet/modules:/opt/puppet-infracloud/modules
5. Once you finish this operation on controller and compute nodes, you will have a functional OpenStack cloud.
In jumphost, follow that steps:
-1. Clone releng::
+1. Clone releng-xci::
- git clone https://gerrit.opnfv.org/gerrit/releng /opt/releng
+ git clone https://gerrit.opnfv.org/gerrit/releng-xci /opt/releng-xci
2. Create OpenStack clouds config directory::
3. Copy credentials file::
- cp /opt/releng/prototypes/puppet-infracloud/creds/clouds.yaml /root/.config/openstack/
+ cp /opt/puppet-infracloud/creds/clouds.yaml /root/.config/openstack/
4. Install python-dev package as the installation of python-openstackclient depends on it
Once the **baremetal** VM is finished, you can login by ssh and start installing bifrost there. To proceed, follow this steps:
1. Change to root user, install git
- 2. Clone releng project (cd /opt, git clone https://gerrit.opnfv.org/gerrit/releng)
- 3. cd /opt/releng/prototypes/puppet-infracloud
+ 2. Clone releng-xci project (cd /opt, git clone https://gerrit.opnfv.org/gerrit/releng-xci)
+ 3. cd /opt/puppet-infracloud
4. Copy hiera to the right folder (cp hiera/common_baremetal.yaml /var/lib/hiera/common.yaml)
5. Ensure hostname is properly set ( hostnamectl set-hostname baremetal.opnfvlocal , hostname -f )
6. Install puppet and modules ( ./install_puppet.sh , ./install_modules.sh )
- 7. Apply puppet to install bifrost (puppet apply manifests/site.pp --modulepath=/etc/puppet/modules:/opt/releng/prototypes/puppet-infracloud/modules)
+ 7. Apply puppet to install bifrost (puppet apply manifests/site.pp --modulepath=/etc/puppet/modules:/opt/puppet-infracloud/modules)
With these steps you will have a bifrost controller up and running.
On each of those, follow that steps:
1. ssh from the bifrost controller to their external ips: ssh root@172.30.13.90
- 2. cd /opt, clone releng project (git clone https://gerrit.opnfv.org/gerrit/releng)
+ 2. cd /opt, clone releng-xci project (git clone https://gerrit.opnfv.org/gerrit/releng-xci)
3. Copy hiera to the right folder ( cp hiera/common_baremetal.yaml /var/lib/hiera/common.yaml)
4. Install modules: ./install_modules.sh
- 5. Apply puppet: puppet apply manifests/site.pp --modulepath=/etc/puppet/modules:/opt/releng/prototypes/puppet-infracloud/modules
+ 5. Apply puppet: puppet apply manifests/site.pp --modulepath=/etc/puppet/modules:/opt/puppet-infracloud/modules
Once this has been done on controller and compute, you will have a working cloud. To start working with it, follow that steps:
1. Ensure that controller00.opnfvlocal resolves properly to the external IP (this is already done in the bifrost controller)
- 2. Copy releng/prototypes/puppet-infracloud/creds/clouds.yaml to $HOME/.config/openstack/clouds.yaml
+ 2. Copy releng-xci/puppet-infracloud/creds/clouds.yaml to $HOME/.config/openstack/clouds.yaml
3. Install python-openstackclient
4. Specify the cloud you want to use: export OS_CLOUD=opnfvlocal
5. Now you can start operating in your cloud with openstack-client: openstack flavor list
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.
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
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
./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.
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
----------------------------------
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
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/
# !!! 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
# 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"}
# 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"
- ../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
- ../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 }}"
- 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"
- ../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
- ../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 }}"
- 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
- 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:
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:
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
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 }}"
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 != ""
- ../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
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 "-------------------------------------------------------------------------"
#-------------------------------------------------------------------------------
# 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
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# 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
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# 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
#-------------------------------------------------------------------------------
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"
#-------------------------------------------------------------------------------
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"