From 878fdf4f0b0c9cbe416adacf001844c0aa6d3b0f Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Wed, 16 Aug 2017 12:09:58 +0200 Subject: xci: Remove prototypes directory due to migration to releng-xci repo Change-Id: I3b8a1dff64151dc55f05e621bab61f2b214bfd05 Signed-off-by: Fatih Degirmenci --- prototypes/xci/README.rst | 236 ------------------- prototypes/xci/config/aio-vars | 18 -- prototypes/xci/config/env-vars | 21 -- prototypes/xci/config/ha-vars | 18 -- prototypes/xci/config/mini-vars | 18 -- prototypes/xci/config/noha-vars | 18 -- prototypes/xci/config/pinned-versions | 27 --- prototypes/xci/config/user-vars | 61 ----- prototypes/xci/docs/developer-guide.rst | 31 --- prototypes/xci/file/aio/configure-opnfvhost.yml | 22 -- prototypes/xci/file/aio/flavor-vars.yml | 3 - prototypes/xci/file/aio/inventory | 2 - prototypes/xci/file/ansible-role-requirements.yml | 207 ----------------- prototypes/xci/file/cinder.yml | 13 -- prototypes/xci/file/ha/flavor-vars.yml | 39 ---- prototypes/xci/file/ha/inventory | 11 - prototypes/xci/file/ha/openstack_user_config.yml | 254 --------------------- prototypes/xci/file/ha/user_variables.yml | 28 --- prototypes/xci/file/install-ansible.sh | 136 ----------- prototypes/xci/file/mini/flavor-vars.yml | 21 -- prototypes/xci/file/mini/inventory | 8 - prototypes/xci/file/mini/openstack_user_config.yml | 170 -------------- prototypes/xci/file/mini/user_variables.yml | 28 --- prototypes/xci/file/noha/flavor-vars.yml | 27 --- prototypes/xci/file/noha/inventory | 9 - prototypes/xci/file/noha/openstack_user_config.yml | 172 -------------- prototypes/xci/file/noha/user_variables.yml | 28 --- prototypes/xci/file/setup-openstack.yml | 25 -- prototypes/xci/playbooks/configure-localhost.yml | 59 ----- prototypes/xci/playbooks/configure-opnfvhost.yml | 109 --------- prototypes/xci/playbooks/configure-targethosts.yml | 36 --- prototypes/xci/playbooks/inventory | 10 - prototypes/xci/playbooks/provision-vm-nodes.yml | 88 ------- .../roles/clone-repository/tasks/main.yml | 14 -- .../roles/configure-network/tasks/main.yml | 34 --- .../playbooks/roles/configure-nfs/tasks/main.yml | 43 ---- .../playbooks/roles/remove-folders/tasks/main.yml | 21 -- .../roles/synchronize-time/tasks/main.yml | 18 -- prototypes/xci/scripts/update-osa-version-files.sh | 91 -------- prototypes/xci/template/compute.interface.j2 | 73 ------ prototypes/xci/template/controller.interface.j2 | 64 ------ prototypes/xci/template/opnfv.interface.j2 | 64 ------ prototypes/xci/var/Debian.yml | 12 - prototypes/xci/var/RedHat.yml | 11 - prototypes/xci/var/Suse.yml | 11 - prototypes/xci/var/opnfv.yml | 30 --- prototypes/xci/xci-deploy.sh | 213 ----------------- 47 files changed, 2652 deletions(-) delete mode 100644 prototypes/xci/README.rst delete mode 100755 prototypes/xci/config/aio-vars delete mode 100755 prototypes/xci/config/env-vars delete mode 100755 prototypes/xci/config/ha-vars delete mode 100755 prototypes/xci/config/mini-vars delete mode 100755 prototypes/xci/config/noha-vars delete mode 100755 prototypes/xci/config/pinned-versions delete mode 100755 prototypes/xci/config/user-vars delete mode 100644 prototypes/xci/docs/developer-guide.rst delete mode 100644 prototypes/xci/file/aio/configure-opnfvhost.yml delete mode 100644 prototypes/xci/file/aio/flavor-vars.yml delete mode 100644 prototypes/xci/file/aio/inventory delete mode 100644 prototypes/xci/file/ansible-role-requirements.yml delete mode 100644 prototypes/xci/file/cinder.yml delete mode 100644 prototypes/xci/file/ha/flavor-vars.yml delete mode 100644 prototypes/xci/file/ha/inventory delete mode 100644 prototypes/xci/file/ha/openstack_user_config.yml delete mode 100644 prototypes/xci/file/ha/user_variables.yml delete mode 100644 prototypes/xci/file/install-ansible.sh delete mode 100644 prototypes/xci/file/mini/flavor-vars.yml delete mode 100644 prototypes/xci/file/mini/inventory delete mode 100644 prototypes/xci/file/mini/openstack_user_config.yml delete mode 100644 prototypes/xci/file/mini/user_variables.yml delete mode 100644 prototypes/xci/file/noha/flavor-vars.yml delete mode 100644 prototypes/xci/file/noha/inventory delete mode 100644 prototypes/xci/file/noha/openstack_user_config.yml delete mode 100644 prototypes/xci/file/noha/user_variables.yml delete mode 100644 prototypes/xci/file/setup-openstack.yml delete mode 100644 prototypes/xci/playbooks/configure-localhost.yml delete mode 100644 prototypes/xci/playbooks/configure-opnfvhost.yml delete mode 100644 prototypes/xci/playbooks/configure-targethosts.yml delete mode 100644 prototypes/xci/playbooks/inventory delete mode 100644 prototypes/xci/playbooks/provision-vm-nodes.yml delete mode 100644 prototypes/xci/playbooks/roles/clone-repository/tasks/main.yml delete mode 100644 prototypes/xci/playbooks/roles/configure-network/tasks/main.yml delete mode 100644 prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml delete mode 100644 prototypes/xci/playbooks/roles/remove-folders/tasks/main.yml delete mode 100644 prototypes/xci/playbooks/roles/synchronize-time/tasks/main.yml delete mode 100755 prototypes/xci/scripts/update-osa-version-files.sh delete mode 100644 prototypes/xci/template/compute.interface.j2 delete mode 100644 prototypes/xci/template/controller.interface.j2 delete mode 100644 prototypes/xci/template/opnfv.interface.j2 delete mode 100644 prototypes/xci/var/Debian.yml delete mode 100644 prototypes/xci/var/RedHat.yml delete mode 100644 prototypes/xci/var/Suse.yml delete mode 100644 prototypes/xci/var/opnfv.yml delete mode 100755 prototypes/xci/xci-deploy.sh (limited to 'prototypes/xci') diff --git a/prototypes/xci/README.rst b/prototypes/xci/README.rst deleted file mode 100644 index ecb8e19dc..000000000 --- a/prototypes/xci/README.rst +++ /dev/null @@ -1,236 +0,0 @@ -########################### -OPNFV XCI Developer Sandbox -########################### - -The XCI Developer Sandbox is created by the OPNFV community for the OPNFV -community in order to - -- provide means for OPNFV developers to work with OpenStack master branch, - cutting the time it takes to develop new features significantly and testing - them on OPNFV Infrastructure -- enable OPNFV developers to identify bugs earlier, issue fixes faster, and - get feedback on a daily basis -- establish mechanisms to run additional testing on OPNFV Infrastructure to - provide feedback to OpenStack community -- make the solutions we put in place available to other LF Networking Projects - OPNFV works with closely - -More information about OPNFV XCI and the sandbox can be seen on -`OPNFV Wiki `_. - -=================================== -Components of XCI Developer Sandbox -=================================== - -The sandbox uses OpenStack projects for VM node creation, provisioning -and OpenStack installation. - -- **openstack/bifrost:** Bifrost (pronounced bye-frost) is a set of Ansible - playbooks that automates the task of deploying a base image onto a set - of known hardware using ironic. It provides modular utility for one-off - operating system deployment with as few operational requirements as - reasonably possible. Bifrost supports different operating systems such as - Ubuntu, CentOS, and openSUSE. - More information about this project can be seen on - `Bifrost documentation `_. - -- **openstack/openstack-ansible:** OpenStack-Ansible is an official OpenStack - project which aims to deploy production environments from source in a way - that makes it scalable while also being simple to operate, upgrade, and grow. - More information about this project can be seen on - `OpenStack Ansible documentation `_. - -- **opnfv/releng:** 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. - More infromation about this project can be seen on - `OPNFV Releng documentation _`. - -========== -Basic Flow -========== - -Here are the steps that take place upon the execution of the sandbox script -``xci-deploy.sh``: - -1. Sources environment variables in order to set things up properly. -2. Installs ansible on the host where sandbox script is executed. -3. Creates and provisions VM nodes based on the flavor chosen by the user. -4. Configures the host where the sandbox script is executed. -5. Configures the deployment host which the OpenStack installation will - be driven from. -6. Configures the target hosts where OpenStack will be installed. -7. Configures the target hosts as controller(s) and compute(s) nodes. -8. Starts the OpenStack installation. - -===================== -Sandbox Prerequisites -===================== - -In order to use this sandbox, the host must have certain packages installed. - -- libvirt -- python -- pip -- git -- -- passwordless sudo - -The host must also have enough CPU/RAM/Disk in order to host number of VM -nodes that will be created based on the chosen flavor. See the details from -`this link `_. - -=========================== -Flavors Provided by Sandbox -=========================== - -OPNFV XCI Sandbox provides different flavors such as all in one (aio) which -puts much lower requirements on the host machine and full-blown HA. - -* aio: Single node which acts as the deployment host, controller and compute. -* mini: One deployment host, 1 controller node and 1 compute node. -* noha: One deployment host, 1 controller node and 2 compute nodes. -* ha: One deployment host, 3 controller nodes and 2 compute nodes. - -See the details of the flavors from -`this link `_. - -========== -How to Use -========== - -Basic Usage ------------ - -clone OPNFV Releng repository - - git clone https://gerrit.opnfv.org/gerrit/releng.git - -change into directory where the sandbox script is located - - cd releng/prototypes/xci - -execute sandbox script - - ./xci-deploy.sh - -Issuing above command will start aio sandbox deployment and the sandbox -should be ready between 1,5 and 2 hours depending on the host machine. - -Please remember that the user executing the XCI script will need to -have an ssh key available, and stored in $HOME/.ssh directory. -You can generate one by executing - - ssh-keygen -t rsa - -Advanced Usage --------------- - -The flavor to deploy, the versions of upstream components to use can -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 - - git clone https://gerrit.opnfv.org/gerrit/releng.git - -change into directory where the sandbox script is located - - cd releng/prototypes/xci - -set the sandbox flavor - - export XCI_FLAVOR=noha - -set the version to use for openstack-ansible - - export OPENSTACK_OSA_VERSION=master - -set where the logs should be stored - - export LOG_PATH=/home/jenkins/xcilogs - -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``. - -The variables can also be set directly within the file before executing -the sandbox script. - -=============== -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``. - -How Pinned Versions are Determined ----------------------------------- - -OPNFV runs periodic jobs against upstream projects openstack/bifrost and -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. - -================== -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 -on each run. -To enable it, you need to export the different DEV_PATH vars: - -- export OPNFV_RELENG_DEV_PATH=/opt/releng/ -- export OPENSTACK_BIFROST_DEV_PATH=/opt/bifrost/ -- export OPENSTACK_OSA_DEV_PATH=/opt/openstack-ansible/ - -Please note the trailing slahses. - -This will cause the deployment to pick the development copies stored at the -specified directories, and use them instead of cloning those on every run. - -=========================================== -Limitations, Known Issues, and Improvements -=========================================== - -The list can be seen using `this link `_. - -========= -Changelog -========= - -Changelog can be seen using `this link `_. - -======= -Testing -======= - -Sandbox is continuously tested by OPNFV CI to ensure the changes do not impact -users. In fact, OPNFV CI itself uses the sandbox scripts to run daily platform -verification jobs. - -======= -Support -======= - -OPNFV XCI issues are tracked on OPNFV JIRA Releng project. If you encounter -and issue or identify a bug, please submit an issue to JIRA using -`this link _`. - -If you have questions or comments, you can ask them on ``#opnfv-pharos`` IRC -channel on Freenode. diff --git a/prototypes/xci/config/aio-vars b/prototypes/xci/config/aio-vars deleted file mode 100755 index f28ecff1b..000000000 --- a/prototypes/xci/config/aio-vars +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------------------------------------- -# XCI Flavor Configuration -#------------------------------------------------------------------------------- -# You are free to modify parts of the configuration to fit into your environment. -# But before doing that, please ensure you checked other flavors to see if one -# them can be used instead, saving you some time. -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Configure VM Nodes -#------------------------------------------------------------------------------- -export TEST_VM_NUM_NODES=1 -export TEST_VM_NODE_NAMES=opnfv -export VM_DOMAIN_TYPE=kvm -export VM_CPU=8 -export VM_DISK=80 -export VM_MEMORY_SIZE=8192 -export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/config/env-vars b/prototypes/xci/config/env-vars deleted file mode 100755 index 9d4c78258..000000000 --- a/prototypes/xci/config/env-vars +++ /dev/null @@ -1,21 +0,0 @@ -#------------------------------------------------------------------------------- -# !!! 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 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 CI_LOOP=${CI_LOOP:-daily} -export JOB_NAME=${JOB_NAME:-false} -# TODO: this currently matches to bifrost ansible version -# there is perhaps better way to do this -export XCI_ANSIBLE_PIP_VERSION=2.1.5.0 -export ANSIBLE_HOST_KEY_CHECKING=False -export DISTRO=${DISTRO:-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,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptables"} -export EXTRA_DIB_ELEMENTS=${EXTRA_DIB_ELEMENTS:-"openssh-server"} diff --git a/prototypes/xci/config/ha-vars b/prototypes/xci/config/ha-vars deleted file mode 100755 index 1ba45890b..000000000 --- a/prototypes/xci/config/ha-vars +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------------------------------------- -# XCI Flavor Configuration -#------------------------------------------------------------------------------- -# You are free to modify parts of the configuration to fit into your environment. -# But before doing that, please ensure you checked other flavors to see if one -# them can be used instead, saving you some time. -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Configure VM Nodes -#------------------------------------------------------------------------------- -export TEST_VM_NUM_NODES=6 -export TEST_VM_NODE_NAMES="opnfv controller00 controller01 controller02 compute00 compute01" -export VM_DOMAIN_TYPE=kvm -export VM_CPU=8 -export VM_DISK=80 -export VM_MEMORY_SIZE=16384 -export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/config/mini-vars b/prototypes/xci/config/mini-vars deleted file mode 100755 index 8f1e83cd8..000000000 --- a/prototypes/xci/config/mini-vars +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------------------------------------- -# XCI Flavor Configuration -#------------------------------------------------------------------------------- -# You are free to modify parts of the configuration to fit into your environment. -# But before doing that, please ensure you checked other flavors to see if one -# them can be used instead, saving you some time. -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Configure VM Nodes -#------------------------------------------------------------------------------- -export TEST_VM_NUM_NODES=3 -export TEST_VM_NODE_NAMES="opnfv controller00 compute00" -export VM_DOMAIN_TYPE=kvm -export VM_CPU=8 -export VM_DISK=80 -export VM_MEMORY_SIZE=12288 -export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/config/noha-vars b/prototypes/xci/config/noha-vars deleted file mode 100755 index 935becb27..000000000 --- a/prototypes/xci/config/noha-vars +++ /dev/null @@ -1,18 +0,0 @@ -#------------------------------------------------------------------------------- -# XCI Flavor Configuration -#------------------------------------------------------------------------------- -# You are free to modify parts of the configuration to fit into your environment. -# But before doing that, please ensure you checked other flavors to see if one -# them can be used instead, saving you some time. -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Configure VM Nodes -#------------------------------------------------------------------------------- -export TEST_VM_NUM_NODES=4 -export TEST_VM_NODE_NAMES="opnfv controller00 compute00 compute01" -export VM_DOMAIN_TYPE=kvm -export VM_CPU=8 -export VM_DISK=80 -export VM_MEMORY_SIZE=12288 -export VM_DISK_CACHE=unsafe diff --git a/prototypes/xci/config/pinned-versions b/prototypes/xci/config/pinned-versions deleted file mode 100755 index 581786075..000000000 --- a/prototypes/xci/config/pinned-versions +++ /dev/null @@ -1,27 +0,0 @@ -#------------------------------------------------------------------------------- -# Pinned Component Versions -#------------------------------------------------------------------------------- -# You are free to override these versions in user-vars to experiment with -# different branches or with different commits but be aware that things might -# not work as expected. You can set the versions you want to use before running -# the main script on your shell as shown on the examples below. -# -# It is important to be consistent between branches you use for OpenStack -# projects OPNFV XCI uses. -# -# Examples: -# export OPENSTACK_BIFROST_VERSION="stable/ocata" -# export OPENSTACK_OSA_VERSION="stable/ocata" -# or -# export OPENSTACK_BIFROST_VERSION="master" -# export OPENSTACK_OSA_VERSION="master" -# or -# export OPENSTACK_BIFROST_VERSION="a87f7ce6c8725b3bbffec7b2efa1e466796848a9" -# export OPENSTACK_OSA_VERSION="4713cf45e11b4ebca9fbed25d1389854602213d8" -#------------------------------------------------------------------------------- -# use releng 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"} -# HEAD of osa "master" as of 29.06.2017 -export OPENSTACK_OSA_VERSION=${OPENSTACK_OSA_VERSION:-"0648818c64239b534d00db381c4609f28e40bda9"} diff --git a/prototypes/xci/config/user-vars b/prototypes/xci/config/user-vars deleted file mode 100755 index fd11a5845..000000000 --- a/prototypes/xci/config/user-vars +++ /dev/null @@ -1,61 +0,0 @@ -#------------------------------------------------------------------------------- -# Set Deployment Flavor -#------------------------------------------------------------------------------- -# OPNFV XCI currently supports 4 different types of flavors: -# - all in one (aio): 1 opnfv VM which acts as controller and compute node -# - mini: 3 VMs, 1 opnfv VM deployment host, 1 controller, and 1 compute nodes -# - noha: 4 VMs, 1 opnfv VM deployment host, 1 controller, and 2 compute nodes -# - ha: 6 VMs, 1 opnfv VM deployment host, 3 controllers, and 2 compute nodes -# -# Apart from having different number of nodes, CPU, RAM, and disk allocations -# also differ from each other. Please take a look at the env-vars files for -# each of these flavors. -# -# Examples: -# export XCI_FLAVOR="aio" -# or -# export XCI_FLAVOR="mini" -# or -# export XCI_FLAVOR="noha" -# or -# export XCI_FLAVOR="ha" -#------------------------------------------------------------------------------- -export XCI_FLAVOR=${XCI_FLAVOR:-aio} - -#------------------------------------------------------------------------------- -# Set Paths to where git repositories of XCI Components will be cloned -#------------------------------------------------------------------------------- -# OPNFV XCI Sandbox is not verified to be used as non-root user as of yet so -# 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 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" - -#------------------------------------------------------------------------------- -# Set the playbook to use for OpenStack deployment -#------------------------------------------------------------------------------- -# The variable can be overriden in order to install additional OpenStack services -# supported by OpenStack Ansible or exclude certain OpenStack services. -#------------------------------------------------------------------------------- -export OPNFV_OSA_PLAYBOOK=${OPNFV_OSA_PLAYBOOK:-"$OPENSTACK_OSA_PATH/playbooks/setup-openstack.yml"} - -#------------------------------------------------------------------------------- -# Configure some other stuff -#------------------------------------------------------------------------------- -# Set the verbosity for ansible -# -# Examples: -# ANSIBLE_VERBOSITY="-v" -# or -# ANSIBLE_VERBOSITY="-vvvv" -export ANSIBLE_VERBOSITY=${ANSIBLE_VERBOSITY-""} -export LOG_PATH=${LOG_PATH:-${XCI_DEVEL_ROOT}/opnfv/logs} -export RUN_TEMPEST=${RUN_TEMPEST:-false} -# Set this to to true to force XCI to re-create the target OS images -export CLEAN_DIB_IMAGES=${CLEAN_DIB_IMAGES:-false} -# Set this to a full path pointing to extra config files (containing -# group_vars/all) -export XCI_EXTRA_VARS_PATH=${XCI_EXTRA_VARS_PATH:-""} diff --git a/prototypes/xci/docs/developer-guide.rst b/prototypes/xci/docs/developer-guide.rst deleted file mode 100644 index 9a07b1267..000000000 --- a/prototypes/xci/docs/developer-guide.rst +++ /dev/null @@ -1,31 +0,0 @@ -######################### -OPNFV XCI Developer Guide -######################### - -This document will contain details about the XCI and how things are put -together in order to support different flavors and different distros in future. - -Document is for anyone who will - -- do hands on development with XCI such as new features to XCI itself or - bugfixes -- integrate new features -- want to know what is going on behind the scenes - -It will also have guidance regarding how to develop for the sandbox. - -If you are looking for User's Guide, please check README.rst in the root of -xci folder or take a look at -`Wiki `_. - -=================================== -Components of XCI Developer Sandbox -=================================== - -TBD - -============= -Detailed Flow -============= - -TBD diff --git a/prototypes/xci/file/aio/configure-opnfvhost.yml b/prototypes/xci/file/aio/configure-opnfvhost.yml deleted file mode 100644 index 5c66d40c7..000000000 --- a/prototypes/xci/file/aio/configure-opnfvhost.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- hosts: opnfv - remote_user: root - vars_files: - vars_files: - - ../var/opnfv.yml - roles: - - role: remove-folders - - { role: clone-repository, project: "openstack/openstack-ansible", repo: "{{ OPENSTACK_OSA_GIT_URL }}", dest: "{{ OPENSTACK_OSA_PATH }}", version: "{{ OPENSTACK_OSA_VERSION }}" } - tasks: - - name: bootstrap ansible on opnfv host - command: "/bin/bash ./scripts/bootstrap-ansible.sh" - args: - chdir: "{{OPENSTACK_OSA_PATH}}" - - name: bootstrap opnfv host as aio - command: "/bin/bash ./scripts/bootstrap-aio.sh" - args: - chdir: "{{OPENSTACK_OSA_PATH}}" - - name: install OpenStack on opnfv host - this command doesn't log anything to console - command: "/bin/bash ./scripts/run-playbooks.sh" - args: - chdir: "{{OPENSTACK_OSA_PATH}}" diff --git a/prototypes/xci/file/aio/flavor-vars.yml b/prototypes/xci/file/aio/flavor-vars.yml deleted file mode 100644 index 6ac1e0fe9..000000000 --- a/prototypes/xci/file/aio/flavor-vars.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# this file is added intentionally in order to simplify putting files in place -# in future, it might contain vars specific to this flavor diff --git a/prototypes/xci/file/aio/inventory b/prototypes/xci/file/aio/inventory deleted file mode 100644 index 9a3dd9ee3..000000000 --- a/prototypes/xci/file/aio/inventory +++ /dev/null @@ -1,2 +0,0 @@ -[opnfv] -opnfv ansible_ssh_host=192.168.122.2 diff --git a/prototypes/xci/file/ansible-role-requirements.yml b/prototypes/xci/file/ansible-role-requirements.yml deleted file mode 100644 index 57e0bb8f4..000000000 --- a/prototypes/xci/file/ansible-role-requirements.yml +++ /dev/null @@ -1,207 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -# these versions are extracted based on the osa commit 0648818c64239b534d00db381c4609f28e40bda9 on 2017-06-27T22:02:17+00:00 -# https://review.openstack.org/gitweb?p=openstack/openstack-ansible.git;a=commit;h=0648818c64239b534d00db381c4609f28e40bda9 -- name: ansible-hardening - scm: git - src: https://git.openstack.org/openstack/ansible-hardening - version: f422da8599c6d8f64ebfefbf0a0aa711ea1f9569 -- name: apt_package_pinning - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-apt_package_pinning - version: 4afe664efb5a2385a1d7071f68bc9001f16c0f41 -- name: pip_install - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-pip_install - version: 348995b85f91f796b28656459474fb3935be737c -- name: galera_client - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-galera_client - version: 2055ebf1582a15c2b2a73985485be15884c9b2d3 -- name: galera_server - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-galera_server - version: 78a1259a10a5be95ab7d6ba3e8f2961805ae3a5b -- name: ceph_client - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-ceph_client - version: aa3b0d959464f9362aaf29d6cf6225e1d4e302be -- name: haproxy_server - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-haproxy_server - version: f8bc5c6129c0d50ac3355c82560fbf22ee32479b -- name: keepalived - scm: git - src: https://github.com/evrardjp/ansible-keepalived - version: 3.0.1 -- name: lxc_container_create - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-lxc_container_create - version: 1eab03452885f0a34cb78f54e3bcf5824abc012e -- name: lxc_hosts - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-lxc_hosts - version: f0b8782c03dde4dd65e70d8b03afc26a30c74f37 -- name: memcached_server - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-memcached_server - version: 6924e7d44d6e36cbe45507e43ef82af6ac0ae125 -- name: openstack_hosts - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-openstack_hosts - version: d68b1dd8fc5ef18c78172d4e9fa3ca01d7473dcf -- name: os_keystone - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_keystone - version: 0cafcc150da10a01ee0b4543167fdc88b9b91a85 -- name: openstack_openrc - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-openstack_openrc - version: 18b7f31a19c4c9bc95abc07a83c9ba866eff538d -- name: os_aodh - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_aodh - version: 5bebd5a18aa7469803f26fb41df62495730afde3 -- name: os_barbican - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_barbican - version: fc95936f9375c3e9eab708b356e760e3eeb785d7 -- name: os_ceilometer - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_ceilometer - version: daf94c5d1a009abb111b5ff7dea8b4f50473b227 -- name: os_cinder - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_cinder - version: d0c46f29d7bb02139a14ad46869ce411e80874d9 -- name: os_glance - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_glance - version: a1e3588769e6d17b074398f0ef2675f34438b73b -- name: os_gnocchi - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_gnocchi - version: f79b0f6e1db40b59390b7e40a90792e72afe55e6 -- name: os_heat - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_heat - version: 7a5b703b35f36a5a63ce9934ef585c8967e9de5a -- name: os_horizon - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_horizon - version: cb4a27da79ad67b2826f637927514e0829c23c0f -- name: os_ironic - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_ironic - version: e5c24e40b0d08d8bc7b4641679a8731c2b2aca29 -- name: os_magnum - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_magnum - version: 3eeb33db25db48f04e496a3ee47323fffe2af864 -- name: os_trove - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_trove - version: 0cf74c1a917b07e557411ca1c1376491c97aa0a9 -- name: os_neutron - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_neutron - version: 280788b20099532c13042966defcbcbf5d5dd994 -- name: os_nova - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_nova - version: 031b386bdd29f895203a3d053c1dabba66cfeeb0 -- name: os_rally - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_rally - version: 9125458265088eb8622f28df57f640509546a6d4 -- name: os_sahara - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_sahara - version: 433d624b0ddb0d2778f014a175064572e15ea462 -- name: os_swift - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_swift - version: 3b91c62e1de6e0d852476e3b74e39b7a55d77ec9 -- name: os_tempest - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_tempest - version: 692209da1fdab6014e13e65be27ffb9b8c8578bb -- name: plugins - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-plugins - version: 8685a0ba38b7f534dd4db971da6d54b495c79169 -- name: rabbitmq_server - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-rabbitmq_server - version: 50bffbf8f114c8100ec5e86ebac9baba5c4f233d -- name: repo_build - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-repo_build - version: 9ce713e9762650e1041ba7d9ad3c207a0c65d0c4 -- name: repo_server - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-repo_server - version: 275124b643d6e6a9c92d65be7a7f309fe6f0c6dc -- name: rsyslog_client - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-rsyslog_client - version: da0090d48b166e0ffe83c35483572e358a29d523 -- name: rsyslog_server - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-rsyslog_server - version: 0f4b5ac0e7a170bd9811875965b781d447a5517a -- name: sshd - scm: git - src: https://github.com/willshersystems/ansible-sshd - version: 0.5.1 -- name: bird - scm: git - src: https://github.com/logan2211/ansible-bird - version: '1.2' -- name: etcd - scm: git - src: https://github.com/logan2211/ansible-etcd - version: '1.2' -- name: unbound - scm: git - src: https://github.com/logan2211/ansible-unbound - version: '1.4' -- name: resolvconf - scm: git - src: https://github.com/logan2211/ansible-resolvconf - version: '1.2' -- name: os_designate - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_designate - version: cc9760d0a08083c1168999422ccefa0d56ead093 -- name: ceph.ceph-common - scm: git - src: https://github.com/ceph/ansible-ceph-common - version: v2.2.9 -- name: ceph.ceph-docker-common - scm: git - src: https://github.com/ceph/ansible-ceph-docker-common - version: ca86fd0ef6d24aa2c750a625acdcb8012c374aa0 -- name: ceph-mon - scm: git - src: https://github.com/ceph/ansible-ceph-mon - version: v2.2.9 -- name: ceph-osd - scm: git - src: https://github.com/ceph/ansible-ceph-osd - version: v2.2.9 -- name: os_octavia - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_octavia - version: 48ff9a634a3ea34c6811ebc10057708dc23ed76e -- name: os_molteniron - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-os_molteniron - version: 0de6fe5251b54881ab3eb8bf0a8d694dd4362430 diff --git a/prototypes/xci/file/cinder.yml b/prototypes/xci/file/cinder.yml deleted file mode 100644 index e40b39256..000000000 --- a/prototypes/xci/file/cinder.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# This file contains an example to show how to set -# the cinder-volume service to run in a container. -# -# Important note: -# When using LVM or any iSCSI-based cinder backends, such as NetApp with -# iSCSI protocol, the cinder-volume service *must* run on metal. -# Reference: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1226855 - -container_skel: - cinder_volumes_container: - properties: - is_metal: false diff --git a/prototypes/xci/file/ha/flavor-vars.yml b/prototypes/xci/file/ha/flavor-vars.yml deleted file mode 100644 index 167502c95..000000000 --- a/prototypes/xci/file/ha/flavor-vars.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -host_info: { - 'opnfv': { - 'VLAN_IP': '192.168.122.2', - 'MGMT_IP': '172.29.236.10', - 'VXLAN_IP': '172.29.240.10', - 'STORAGE_IP': '172.29.244.10' - }, - 'controller00': { - 'VLAN_IP': '192.168.122.3', - 'MGMT_IP': '172.29.236.11', - 'VXLAN_IP': '172.29.240.11', - 'STORAGE_IP': '172.29.244.11' - }, - 'controller01': { - 'VLAN_IP': '192.168.122.4', - 'MGMT_IP': '172.29.236.12', - 'VXLAN_IP': '172.29.240.12', - 'STORAGE_IP': '172.29.244.12' - }, - 'controller02': { - 'VLAN_IP': '192.168.122.5', - 'MGMT_IP': '172.29.236.13', - 'VXLAN_IP': '172.29.240.13', - 'STORAGE_IP': '172.29.244.13' - }, - 'compute00': { - 'VLAN_IP': '192.168.122.6', - 'MGMT_IP': '172.29.236.14', - 'VXLAN_IP': '172.29.240.14', - 'STORAGE_IP': '172.29.244.14' - }, - 'compute01': { - 'VLAN_IP': '192.168.122.7', - 'MGMT_IP': '172.29.236.15', - 'VXLAN_IP': '172.29.240.15', - 'STORAGE_IP': '172.29.244.15' - } -} diff --git a/prototypes/xci/file/ha/inventory b/prototypes/xci/file/ha/inventory deleted file mode 100644 index 94b1d074d..000000000 --- a/prototypes/xci/file/ha/inventory +++ /dev/null @@ -1,11 +0,0 @@ -[opnfv] -opnfv ansible_ssh_host=192.168.122.2 - -[controller] -controller00 ansible_ssh_host=192.168.122.3 -controller01 ansible_ssh_host=192.168.122.4 -controller02 ansible_ssh_host=192.168.122.5 - -[compute] -compute00 ansible_ssh_host=192.168.122.6 -compute01 ansible_ssh_host=192.168.122.7 diff --git a/prototypes/xci/file/ha/openstack_user_config.yml b/prototypes/xci/file/ha/openstack_user_config.yml deleted file mode 100644 index 09fb734c1..000000000 --- a/prototypes/xci/file/ha/openstack_user_config.yml +++ /dev/null @@ -1,254 +0,0 @@ ---- -cidr_networks: - container: 172.29.236.0/22 - tunnel: 172.29.240.0/22 - storage: 172.29.244.0/22 - -used_ips: - - "172.29.236.1,172.29.236.50" - - "172.29.240.1,172.29.240.50" - - "172.29.244.1,172.29.244.50" - - "172.29.248.1,172.29.248.50" - -global_overrides: - internal_lb_vip_address: 172.29.236.222 - external_lb_vip_address: 192.168.122.220 - tunnel_bridge: "br-vxlan" - management_bridge: "br-mgmt" - provider_networks: - - network: - container_bridge: "br-mgmt" - container_type: "veth" - container_interface: "eth1" - ip_from_q: "container" - type: "raw" - group_binds: - - all_containers - - hosts - is_container_address: true - is_ssh_address: true - - network: - container_bridge: "br-vxlan" - container_type: "veth" - container_interface: "eth10" - ip_from_q: "tunnel" - type: "vxlan" - range: "1:1000" - net_name: "vxlan" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-vlan" - container_type: "veth" - container_interface: "eth12" - host_bind_override: "eth12" - type: "flat" - net_name: "flat" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-vlan" - container_type: "veth" - container_interface: "eth11" - type: "vlan" - range: "1:1" - net_name: "vlan" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-storage" - container_type: "veth" - container_interface: "eth2" - ip_from_q: "storage" - type: "raw" - group_binds: - - glance_api - - cinder_api - - cinder_volume - - nova_compute - -# ## -# ## Infrastructure -# ## - -# galera, memcache, rabbitmq, utility -shared-infra_hosts: - controller00: - ip: 172.29.236.11 - controller01: - ip: 172.29.236.12 - controller02: - ip: 172.29.236.13 - -# repository (apt cache, python packages, etc) -repo-infra_hosts: - controller00: - ip: 172.29.236.11 - controller01: - ip: 172.29.236.12 - controller02: - ip: 172.29.236.13 - -# load balancer -# Ideally the load balancer should not use the Infrastructure hosts. -# Dedicated hardware is best for improved performance and security. -haproxy_hosts: - controller00: - ip: 172.29.236.11 - controller01: - ip: 172.29.236.12 - controller02: - ip: 172.29.236.13 - -# rsyslog server -# log_hosts: -# log1: -# ip: 172.29.236.14 - -# ## -# ## OpenStack -# ## - -# keystone -identity_hosts: - controller00: - ip: 172.29.236.11 - controller01: - ip: 172.29.236.12 - controller02: - ip: 172.29.236.13 - -# cinder api services -storage-infra_hosts: - controller00: - ip: 172.29.236.11 - controller01: - ip: 172.29.236.12 - controller02: - ip: 172.29.236.13 - -# glance -# The settings here are repeated for each infra host. -# They could instead be applied as global settings in -# user_variables, but are left here to illustrate that -# each container could have different storage targets. -image_hosts: - controller00: - ip: 172.29.236.11 - container_vars: - limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.14" - remote_path: "/images" - local_path: "/var/lib/glance/images" - type: "nfs" - options: "_netdev,auto" - controller01: - ip: 172.29.236.12 - container_vars: - limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.14" - remote_path: "/images" - local_path: "/var/lib/glance/images" - type: "nfs" - options: "_netdev,auto" - controller02: - ip: 172.29.236.13 - container_vars: - limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.14" - remote_path: "/images" - local_path: "/var/lib/glance/images" - type: "nfs" - options: "_netdev,auto" - -# nova api, conductor, etc services -compute-infra_hosts: - controller00: - ip: 172.29.236.11 - controller01: - ip: 172.29.236.12 - controller02: - ip: 172.29.236.13 - -# heat -orchestration_hosts: - controller00: - ip: 172.29.236.11 - controller01: - ip: 172.29.236.12 - controller02: - ip: 172.29.236.13 - -# horizon -dashboard_hosts: - controller00: - ip: 172.29.236.11 - controller01: - ip: 172.29.236.12 - controller02: - ip: 172.29.236.13 - -# neutron server, agents (L3, etc) -network_hosts: - controller00: - ip: 172.29.236.11 - controller01: - ip: 172.29.236.12 - controller02: - ip: 172.29.236.13 - -# nova hypervisors -compute_hosts: - compute00: - ip: 172.29.236.14 - compute01: - ip: 172.29.236.15 - -# cinder volume hosts (NFS-backed) -# The settings here are repeated for each infra host. -# They could instead be applied as global settings in -# user_variables, but are left here to illustrate that -# each container could have different storage targets. -storage_hosts: - controller00: - ip: 172.29.236.11 - container_vars: - cinder_backends: - limit_container_types: cinder_volume - nfs_volume: - volume_backend_name: NFS_VOLUME1 - volume_driver: cinder.volume.drivers.nfs.NfsDriver - nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120" - nfs_shares_config: /etc/cinder/nfs_shares - shares: - - ip: "172.29.244.14" - share: "/volumes" - controller01: - ip: 172.29.236.12 - container_vars: - cinder_backends: - limit_container_types: cinder_volume - nfs_volume: - volume_backend_name: NFS_VOLUME1 - volume_driver: cinder.volume.drivers.nfs.NfsDriver - nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120" - nfs_shares_config: /etc/cinder/nfs_shares - shares: - - ip: "172.29.244.14" - share: "/volumes" - controller02: - ip: 172.29.236.13 - container_vars: - cinder_backends: - limit_container_types: cinder_volume - nfs_volume: - volume_backend_name: NFS_VOLUME1 - volume_driver: cinder.volume.drivers.nfs.NfsDriver - nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120" - nfs_shares_config: /etc/cinder/nfs_shares - shares: - - ip: "172.29.244.14" - share: "/volumes" diff --git a/prototypes/xci/file/ha/user_variables.yml b/prototypes/xci/file/ha/user_variables.yml deleted file mode 100644 index 094cc8cd6..000000000 --- a/prototypes/xci/file/ha/user_variables.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# Copyright 2014, Rackspace US, Inc. -# -# 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. - -# ## -# ## This file contains commonly used overrides for convenience. Please inspect -# ## the defaults for each role to find additional override options. -# ## - -# # Debug and Verbose options. -debug: false - -haproxy_keepalived_external_vip_cidr: "192.168.122.220/32" -haproxy_keepalived_internal_vip_cidr: "172.29.236.222/32" -haproxy_keepalived_external_interface: br-vlan -haproxy_keepalived_internal_interface: br-mgmt -gnocchi_db_sync_options: "" diff --git a/prototypes/xci/file/install-ansible.sh b/prototypes/xci/file/install-ansible.sh deleted file mode 100644 index 67a49b397..000000000 --- a/prototypes/xci/file/install-ansible.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/bash -# NOTE(hwoarang): Most parts of this this file were taken from the -# bifrost repository (scripts/install-deps.sh). This script contains all -# the necessary distro specific code to install ansible and it's dependencies. - -set -eu - -declare -A PKG_MAP - -CHECK_CMD_PKGS=( - libffi - libopenssl - net-tools - python-devel -) - -# Check zypper before apt-get in case zypper-aptitude -# is installed -if [ -x '/usr/bin/zypper' ]; then - OS_FAMILY="Suse" - INSTALLER_CMD="sudo -H -E zypper install -y" - CHECK_CMD="zypper search --match-exact --installed" - PKG_MAP=( - [gcc]=gcc - [git]=git - [libffi]=libffi-devel - [libopenssl]=libopenssl-devel - [net-tools]=net-tools - [python]=python - [python-devel]=python-devel - [venv]=python-virtualenv - [wget]=wget - ) - EXTRA_PKG_DEPS=( python-xml ) - # NOTE (cinerama): we can't install python without removing this package - # if it exists - if $(${CHECK_CMD} patterns-openSUSE-minimal_base-conflicts &> /dev/null); then - sudo -H zypper remove -y patterns-openSUSE-minimal_base-conflicts - fi -elif [ -x '/usr/bin/apt-get' ]; then - OS_FAMILY="Debian" - INSTALLER_CMD="sudo -H -E apt-get -y install" - CHECK_CMD="dpkg -l" - PKG_MAP=( [gcc]=gcc - [git]=git - [libffi]=libffi-dev - [libopenssl]=libssl-dev - [net-tools]=net-tools - [python]=python-minimal - [python-devel]=libpython-dev - [venv]=python-virtualenv - [wget]=wget - ) - EXTRA_PKG_DEPS=() -elif [ -x '/usr/bin/dnf' ] || [ -x '/usr/bin/yum' ]; then - OS_FAMILY="RedHat" - PKG_MANAGER=$(which dnf || which yum) - INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -y install" - CHECK_CMD="rpm -q" - PKG_MAP=( - [gcc]=gcc - [git]=git - [libffi]=libffi-devel - [libopenssl]=openssl-devel - [net-tools]=net-tools - [python]=python - [python-devel]=python-devel - [venv]=python-virtualenv - [wget]=wget - ) - EXTRA_PKG_DEPS=() -else - echo "ERROR: Supported package manager not found. Supported: apt,yum,zypper" -fi - -if ! $(python --version &>/dev/null); then - ${INSTALLER_CMD} ${PKG_MAP[python]} -fi -if ! $(gcc -v &>/dev/null); then - ${INSTALLER_CMD} ${PKG_MAP[gcc]} -fi -if ! $(git --version &>/dev/null); then - ${INSTALLER_CMD} ${PKG_MAP[git]} -fi -if ! $(wget --version &>/dev/null); then - ${INSTALLER_CMD} ${PKG_MAP[wget]} -fi - -for pkg in ${CHECK_CMD_PKGS[@]}; do - if ! $(${CHECK_CMD} ${PKG_MAP[$pkg]} &>/dev/null); then - ${INSTALLER_CMD} ${PKG_MAP[$pkg]} - fi -done - -if [ -n "${EXTRA_PKG_DEPS-}" ]; then - for pkg in ${EXTRA_PKG_DEPS}; do - if ! $(${CHECK_CMD} ${pkg} &>/dev/null); then - ${INSTALLER_CMD} ${pkg} - fi - done -fi - -# If we're using a venv, we need to work around sudo not -# keeping the path even with -E. -PYTHON=$(which python) - -# To install python packages, we need pip. -# -# We can't use the apt packaged version of pip since -# older versions of pip are incompatible with -# requests, one of our indirect dependencies (bug 1459947). -# -# Note(cinerama): We use pip to install an updated pip plus our -# other python requirements. pip breakages can seriously impact us, -# so we've chosen to install/upgrade pip here rather than in -# requirements (which are synced automatically from the global ones) -# so we can quickly and easily adjust version parameters. -# See bug 1536627. -# -# Note(cinerama): If pip is linked to pip3, the rest of the install -# won't work. Remove the alternatives. This is due to ansible's -# python 2.x requirement. -if [[ $(readlink -f /etc/alternatives/pip) =~ "pip3" ]]; then - sudo -H update-alternatives --remove pip $(readlink -f /etc/alternatives/pip) -fi - -if ! which pip; then - wget -O /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py - sudo -H -E ${PYTHON} /tmp/get-pip.py -fi - -PIP=$(which pip) - -${PIP} install --user "pip>6.0" - -${PIP} install --user --upgrade ansible==$XCI_ANSIBLE_PIP_VERSION diff --git a/prototypes/xci/file/mini/flavor-vars.yml b/prototypes/xci/file/mini/flavor-vars.yml deleted file mode 100644 index 0d446ba20..000000000 --- a/prototypes/xci/file/mini/flavor-vars.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -host_info: { - 'opnfv': { - 'VLAN_IP': '192.168.122.2', - 'MGMT_IP': '172.29.236.10', - 'VXLAN_IP': '172.29.240.10', - 'STORAGE_IP': '172.29.244.10' - }, - 'controller00': { - 'VLAN_IP': '192.168.122.3', - 'MGMT_IP': '172.29.236.11', - 'VXLAN_IP': '172.29.240.11', - 'STORAGE_IP': '172.29.244.11' - }, - 'compute00': { - 'VLAN_IP': '192.168.122.4', - 'MGMT_IP': '172.29.236.12', - 'VXLAN_IP': '172.29.240.12', - 'STORAGE_IP': '172.29.244.12' - }, -} diff --git a/prototypes/xci/file/mini/inventory b/prototypes/xci/file/mini/inventory deleted file mode 100644 index eb73e5e34..000000000 --- a/prototypes/xci/file/mini/inventory +++ /dev/null @@ -1,8 +0,0 @@ -[opnfv] -opnfv ansible_ssh_host=192.168.122.2 - -[controller] -controller00 ansible_ssh_host=192.168.122.3 - -[compute] -compute00 ansible_ssh_host=192.168.122.4 diff --git a/prototypes/xci/file/mini/openstack_user_config.yml b/prototypes/xci/file/mini/openstack_user_config.yml deleted file mode 100644 index f9ccee24f..000000000 --- a/prototypes/xci/file/mini/openstack_user_config.yml +++ /dev/null @@ -1,170 +0,0 @@ ---- -cidr_networks: - container: 172.29.236.0/22 - tunnel: 172.29.240.0/22 - storage: 172.29.244.0/22 - -used_ips: - - "172.29.236.1,172.29.236.50" - - "172.29.240.1,172.29.240.50" - - "172.29.244.1,172.29.244.50" - - "172.29.248.1,172.29.248.50" - -global_overrides: - internal_lb_vip_address: 172.29.236.11 - external_lb_vip_address: 192.168.122.3 - tunnel_bridge: "br-vxlan" - management_bridge: "br-mgmt" - provider_networks: - - network: - container_bridge: "br-mgmt" - container_type: "veth" - container_interface: "eth1" - ip_from_q: "container" - type: "raw" - group_binds: - - all_containers - - hosts - is_container_address: true - is_ssh_address: true - - network: - container_bridge: "br-vxlan" - container_type: "veth" - container_interface: "eth10" - ip_from_q: "tunnel" - type: "vxlan" - range: "1:1000" - net_name: "vxlan" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-vlan" - container_type: "veth" - container_interface: "eth12" - host_bind_override: "eth12" - type: "flat" - net_name: "flat" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-vlan" - container_type: "veth" - container_interface: "eth11" - type: "vlan" - range: "1:1" - net_name: "vlan" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-storage" - container_type: "veth" - container_interface: "eth2" - ip_from_q: "storage" - type: "raw" - group_binds: - - glance_api - - cinder_api - - cinder_volume - - nova_compute - -# ## -# ## Infrastructure -# ## - -# galera, memcache, rabbitmq, utility -shared-infra_hosts: - controller00: - ip: 172.29.236.11 - -# repository (apt cache, python packages, etc) -repo-infra_hosts: - controller00: - ip: 172.29.236.11 - -# load balancer -# Ideally the load balancer should not use the Infrastructure hosts. -# Dedicated hardware is best for improved performance and security. -haproxy_hosts: - controller00: - ip: 172.29.236.11 - -# rsyslog server -# log_hosts: -# log1: -# ip: 172.29.236.14 - -# ## -# ## OpenStack -# ## - -# keystone -identity_hosts: - controller00: - ip: 172.29.236.11 - -# cinder api services -storage-infra_hosts: - controller00: - ip: 172.29.236.11 - -# glance -# The settings here are repeated for each infra host. -# They could instead be applied as global settings in -# user_variables, but are left here to illustrate that -# each container could have different storage targets. -image_hosts: - controller00: - ip: 172.29.236.11 - container_vars: - limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.12" - remote_path: "/images" - local_path: "/var/lib/glance/images" - type: "nfs" - options: "_netdev,auto" - -# nova api, conductor, etc services -compute-infra_hosts: - controller00: - ip: 172.29.236.11 - -# heat -orchestration_hosts: - controller00: - ip: 172.29.236.11 - -# horizon -dashboard_hosts: - controller00: - ip: 172.29.236.11 - -# neutron server, agents (L3, etc) -network_hosts: - controller00: - ip: 172.29.236.11 - -# nova hypervisors -compute_hosts: - compute00: - ip: 172.29.236.12 - -# cinder volume hosts (NFS-backed) -# The settings here are repeated for each infra host. -# They could instead be applied as global settings in -# user_variables, but are left here to illustrate that -# each container could have different storage targets. -storage_hosts: - controller00: - ip: 172.29.236.11 - container_vars: - cinder_backends: - limit_container_types: cinder_volume - nfs_volume: - volume_backend_name: NFS_VOLUME1 - volume_driver: cinder.volume.drivers.nfs.NfsDriver - nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120" - nfs_shares_config: /etc/cinder/nfs_shares - shares: - - ip: "172.29.244.12" - share: "/volumes" diff --git a/prototypes/xci/file/mini/user_variables.yml b/prototypes/xci/file/mini/user_variables.yml deleted file mode 100644 index 7a0b8064d..000000000 --- a/prototypes/xci/file/mini/user_variables.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# Copyright 2014, Rackspace US, Inc. -# -# 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. - -# ## -# ## This file contains commonly used overrides for convenience. Please inspect -# ## the defaults for each role to find additional override options. -# ## - -# # Debug and Verbose options. -debug: false - -haproxy_keepalived_external_vip_cidr: "192.168.122.3/32" -haproxy_keepalived_internal_vip_cidr: "172.29.236.11/32" -haproxy_keepalived_external_interface: br-vlan -haproxy_keepalived_internal_interface: br-mgmt -gnocchi_db_sync_options: "" diff --git a/prototypes/xci/file/noha/flavor-vars.yml b/prototypes/xci/file/noha/flavor-vars.yml deleted file mode 100644 index 3c69a34bb..000000000 --- a/prototypes/xci/file/noha/flavor-vars.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -host_info: { - 'opnfv': { - 'VLAN_IP': '192.168.122.2', - 'MGMT_IP': '172.29.236.10', - 'VXLAN_IP': '172.29.240.10', - 'STORAGE_IP': '172.29.244.10' - }, - 'controller00': { - 'VLAN_IP': '192.168.122.3', - 'MGMT_IP': '172.29.236.11', - 'VXLAN_IP': '172.29.240.11', - 'STORAGE_IP': '172.29.244.11' - }, - 'compute00': { - 'VLAN_IP': '192.168.122.4', - 'MGMT_IP': '172.29.236.12', - 'VXLAN_IP': '172.29.240.12', - 'STORAGE_IP': '172.29.244.12' - }, - 'compute01': { - 'VLAN_IP': '192.168.122.5', - 'MGMT_IP': '172.29.236.13', - 'VXLAN_IP': '172.29.240.13', - 'STORAGE_IP': '172.29.244.13' - } -} diff --git a/prototypes/xci/file/noha/inventory b/prototypes/xci/file/noha/inventory deleted file mode 100644 index b4f9f6d0c..000000000 --- a/prototypes/xci/file/noha/inventory +++ /dev/null @@ -1,9 +0,0 @@ -[opnfv] -opnfv ansible_ssh_host=192.168.122.2 - -[controller] -controller00 ansible_ssh_host=192.168.122.3 - -[compute] -compute00 ansible_ssh_host=192.168.122.4 -compute01 ansible_ssh_host=192.168.122.5 diff --git a/prototypes/xci/file/noha/openstack_user_config.yml b/prototypes/xci/file/noha/openstack_user_config.yml deleted file mode 100644 index fb12655e7..000000000 --- a/prototypes/xci/file/noha/openstack_user_config.yml +++ /dev/null @@ -1,172 +0,0 @@ ---- -cidr_networks: - container: 172.29.236.0/22 - tunnel: 172.29.240.0/22 - storage: 172.29.244.0/22 - -used_ips: - - "172.29.236.1,172.29.236.50" - - "172.29.240.1,172.29.240.50" - - "172.29.244.1,172.29.244.50" - - "172.29.248.1,172.29.248.50" - -global_overrides: - internal_lb_vip_address: 172.29.236.11 - external_lb_vip_address: 192.168.122.3 - tunnel_bridge: "br-vxlan" - management_bridge: "br-mgmt" - provider_networks: - - network: - container_bridge: "br-mgmt" - container_type: "veth" - container_interface: "eth1" - ip_from_q: "container" - type: "raw" - group_binds: - - all_containers - - hosts - is_container_address: true - is_ssh_address: true - - network: - container_bridge: "br-vxlan" - container_type: "veth" - container_interface: "eth10" - ip_from_q: "tunnel" - type: "vxlan" - range: "1:1000" - net_name: "vxlan" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-vlan" - container_type: "veth" - container_interface: "eth12" - host_bind_override: "eth12" - type: "flat" - net_name: "flat" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-vlan" - container_type: "veth" - container_interface: "eth11" - type: "vlan" - range: "1:1" - net_name: "vlan" - group_binds: - - neutron_linuxbridge_agent - - network: - container_bridge: "br-storage" - container_type: "veth" - container_interface: "eth2" - ip_from_q: "storage" - type: "raw" - group_binds: - - glance_api - - cinder_api - - cinder_volume - - nova_compute - -# ## -# ## Infrastructure -# ## - -# galera, memcache, rabbitmq, utility -shared-infra_hosts: - controller00: - ip: 172.29.236.11 - -# repository (apt cache, python packages, etc) -repo-infra_hosts: - controller00: - ip: 172.29.236.11 - -# load balancer -# Ideally the load balancer should not use the Infrastructure hosts. -# Dedicated hardware is best for improved performance and security. -haproxy_hosts: - controller00: - ip: 172.29.236.11 - -# rsyslog server -# log_hosts: -# log1: -# ip: 172.29.236.14 - -# ## -# ## OpenStack -# ## - -# keystone -identity_hosts: - controller00: - ip: 172.29.236.11 - -# cinder api services -storage-infra_hosts: - controller00: - ip: 172.29.236.11 - -# glance -# The settings here are repeated for each infra host. -# They could instead be applied as global settings in -# user_variables, but are left here to illustrate that -# each container could have different storage targets. -image_hosts: - controller00: - ip: 172.29.236.11 - container_vars: - limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.12" - remote_path: "/images" - local_path: "/var/lib/glance/images" - type: "nfs" - options: "_netdev,auto" - -# nova api, conductor, etc services -compute-infra_hosts: - controller00: - ip: 172.29.236.11 - -# heat -orchestration_hosts: - controller00: - ip: 172.29.236.11 - -# horizon -dashboard_hosts: - controller00: - ip: 172.29.236.11 - -# neutron server, agents (L3, etc) -network_hosts: - controller00: - ip: 172.29.236.11 - -# nova hypervisors -compute_hosts: - compute00: - ip: 172.29.236.12 - compute01: - ip: 172.29.236.13 - -# cinder volume hosts (NFS-backed) -# The settings here are repeated for each infra host. -# They could instead be applied as global settings in -# user_variables, but are left here to illustrate that -# each container could have different storage targets. -storage_hosts: - controller00: - ip: 172.29.236.11 - container_vars: - cinder_backends: - limit_container_types: cinder_volume - nfs_volume: - volume_backend_name: NFS_VOLUME1 - volume_driver: cinder.volume.drivers.nfs.NfsDriver - nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120" - nfs_shares_config: /etc/cinder/nfs_shares - shares: - - ip: "172.29.244.12" - share: "/volumes" diff --git a/prototypes/xci/file/noha/user_variables.yml b/prototypes/xci/file/noha/user_variables.yml deleted file mode 100644 index 7a0b8064d..000000000 --- a/prototypes/xci/file/noha/user_variables.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# Copyright 2014, Rackspace US, Inc. -# -# 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. - -# ## -# ## This file contains commonly used overrides for convenience. Please inspect -# ## the defaults for each role to find additional override options. -# ## - -# # Debug and Verbose options. -debug: false - -haproxy_keepalived_external_vip_cidr: "192.168.122.3/32" -haproxy_keepalived_internal_vip_cidr: "172.29.236.11/32" -haproxy_keepalived_external_interface: br-vlan -haproxy_keepalived_internal_interface: br-mgmt -gnocchi_db_sync_options: "" diff --git a/prototypes/xci/file/setup-openstack.yml b/prototypes/xci/file/setup-openstack.yml deleted file mode 100644 index 415c48993..000000000 --- a/prototypes/xci/file/setup-openstack.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# Copyright 2014, Rackspace US, Inc. -# -# 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. - -- include: os-keystone-install.yml -- include: os-glance-install.yml -- include: os-cinder-install.yml -- include: os-nova-install.yml -- include: os-neutron-install.yml -- include: os-heat-install.yml -- include: os-horizon-install.yml -- include: os-swift-install.yml -- include: os-ironic-install.yml -- include: os-tempest-install.yml diff --git a/prototypes/xci/playbooks/configure-localhost.yml b/prototypes/xci/playbooks/configure-localhost.yml deleted file mode 100644 index b6d0fccb7..000000000 --- a/prototypes/xci/playbooks/configure-localhost.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -- hosts: localhost - connection: local - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../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 }}" } - -- hosts: localhost - connection: local - gather_facts: false - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/opnfv.yml - tasks: - - name: Synchronize local development releng repository to XCI paths - synchronize: - src: "{{ OPNFV_RELENG_DEV_PATH }}" - dest: "{{ OPNFV_RELENG_PATH }}" - recursive: yes - delete: yes - when: - - OPNFV_RELENG_DEV_PATH != "" - -- hosts: localhost - connection: local - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/opnfv.yml - tasks: - - name: create log directory {{LOG_PATH}} - file: - path: "{{LOG_PATH}}" - state: directory - recurse: no - # when the deployment is aio, we overwrite and use playbook, configure-opnfvhost.yml, since everything gets installed on opnfv host - - name: copy aio playbook - copy: - src: "{{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/configure-opnfvhost.yml" - dest: "{{OPNFV_RELENG_PATH}}/prototypes/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" - - name: copy flavor vars - copy: - src: "{{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/flavor-vars.yml" - dest: "{{OPNFV_RELENG_PATH}}/prototypes/xci/var" diff --git a/prototypes/xci/playbooks/configure-opnfvhost.yml b/prototypes/xci/playbooks/configure-opnfvhost.yml deleted file mode 100644 index a7ce5216c..000000000 --- a/prototypes/xci/playbooks/configure-opnfvhost.yml +++ /dev/null @@ -1,109 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -- hosts: opnfv - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/flavor-vars.yml - - ../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: "openstack/openstack-ansible", repo: "{{ OPENSTACK_OSA_GIT_URL }}", dest: "{{ OPENSTACK_OSA_PATH }}", version: "{{ OPENSTACK_OSA_VERSION }}" } - -- hosts: opnfv - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/opnfv.yml - tasks: - - name: Synchronize local development releng repository to XCI paths - synchronize: - src: "{{ OPNFV_RELENG_DEV_PATH }}" - dest: "{{ OPNFV_RELENG_PATH }}" - recursive: yes - delete: yes - when: - - OPNFV_RELENG_DEV_PATH != "" - - name: Synchronize local development openstack-ansible repository to XCI paths - synchronize: - src: "{{ OPENSTACK_OSA_DEV_PATH }}" - dest: "{{ OPENSTACK_OSA_PATH }}" - recursive: yes - delete: yes - when: - - OPENSTACK_OSA_DEV_PATH != "" - -- hosts: opnfv - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/flavor-vars.yml - - ../var/opnfv.yml - roles: - # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros - - { role: configure-network, when: ansible_distribution_release == "xenial", src: "../template/opnfv.interface.j2", dest: "/etc/network/interfaces" } - tasks: - - name: generate SSH keys - shell: ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N "" - args: - creates: /root/.ssh/id_rsa - - name: ensure ssh key storage directory exists - file: - path: "{{ OPNFV_SSH_HOST_KEYS_PATH }}" - state: directory - - 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" - - name: copy flavor vars - shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/flavor-vars.yml {{OPNFV_RELENG_PATH}}/prototypes/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 - shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/openstack_user_config.yml {{OPENSTACK_OSA_ETC_PATH}}" - - 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" - # 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: - dest: "{{OPENSTACK_OSA_PATH}}/playbooks/os-keystone-install.yml" - 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" - - name: copy OPNFV role requirements - shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/prototypes/xci/file/ansible-role-requirements.yml {{OPENSTACK_OSA_PATH}}" - - name: bootstrap ansible on opnfv host - command: "/bin/bash ./scripts/bootstrap-ansible.sh" - args: - chdir: "{{OPENSTACK_OSA_PATH}}" - - name: install python Crypto module - package: - name: "{{ python_crypto_package_name }}" - - name: install PyYAML - pip: - name: pyyaml - state: present - - name: generate password token - command: "python pw-token-gen.py --file {{OPENSTACK_OSA_ETC_PATH}}/user_secrets.yml" - args: - chdir: "{{OPENSTACK_OSA_PATH}}/scripts" -- hosts: localhost - remote_user: root - vars_files: - - ../var/opnfv.yml - tasks: - - name: Generate authorized_keys - shell: "/bin/cat {{ OPNFV_SSH_HOST_KEYS_PATH }}/opnfv/root/.ssh/id_rsa.pub >> ../file/authorized_keys" - - name: Append public keys to authorized_keys - shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> ../file/authorized_keys" diff --git a/prototypes/xci/playbooks/configure-targethosts.yml b/prototypes/xci/playbooks/configure-targethosts.yml deleted file mode 100644 index 50da1f223..000000000 --- a/prototypes/xci/playbooks/configure-targethosts.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- hosts: all - remote_user: root - tasks: - - name: add public key to host - copy: - src: ../file/authorized_keys - dest: /root/.ssh/authorized_keys - -- hosts: controller - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/flavor-vars.yml - roles: - # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros - - { role: configure-network, src: "../template/controller.interface.j2", dest: "/etc/network/interfaces" } - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time - -- hosts: compute - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/flavor-vars.yml - roles: - # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros - - { role: configure-network, src: "../template/compute.interface.j2", dest: "/etc/network/interfaces" } - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time - -- hosts: compute00 - remote_user: root - # TODO: this role is for configuring NFS on xenial and adjustment needed for other distros - roles: - - role: configure-nfs diff --git a/prototypes/xci/playbooks/inventory b/prototypes/xci/playbooks/inventory deleted file mode 100644 index fd9af9016..000000000 --- a/prototypes/xci/playbooks/inventory +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -[opnfv] -opnfv ansible_ssh_host=192.168.122.2 diff --git a/prototypes/xci/playbooks/provision-vm-nodes.yml b/prototypes/xci/playbooks/provision-vm-nodes.yml deleted file mode 100644 index 92b5c5535..000000000 --- a/prototypes/xci/playbooks/provision-vm-nodes.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -- hosts: localhost - connection: local - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/opnfv.yml - 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/bifrost", repo: "{{ OPENSTACK_BIFROST_GIT_URL }}", dest: "{{ OPENSTACK_BIFROST_PATH }}", version: "{{ OPENSTACK_BIFROST_VERSION }}" } - -- hosts: localhost - connection: local - gather_facts: false - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/opnfv.yml - tasks: - - 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: "{{ OPENSTACK_BIFROST_PATH }}" - recursive: yes - delete: yes - when: - - OPENSTACK_BIFROST_DEV_PATH != "" - - name: Synchronize local development releng repository to XCI paths - synchronize: - src: "{{ OPNFV_RELENG_DEV_PATH }}" - dest: "{{ OPNFV_RELENG_PATH }}" - recursive: yes - delete: yes - when: - - OPNFV_RELENG_DEV_PATH != "" - - name: Copy extra vars to releng and bifrost - synchronize: - src: "{{ XCI_EXTRA_VARS_PATH }}" - dest: "{{ item }}" - with_items: - - "{{ OPNFV_RELENG_PATH }}/prototypes/xci/playbooks" - - "{{ OPENSTACK_BIFROST_PATH }}/playbooks/inventory" - when: - - XCI_EXTRA_VARS_PATH != "" - -- hosts: localhost - connection: local - gather_facts: false - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/opnfv.yml - tasks: - - name: combine opnfv/releng and openstack/bifrost scripts/playbooks - copy: - src: "{{ OPNFV_RELENG_PATH }}/prototypes/bifrost/" - dest: "{{ OPENSTACK_BIFROST_PATH }}" - -- hosts: localhost - connection: local - become: yes - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/opnfv.yml - tasks: - - name: destroy VM nodes created by previous deployment - command: "/bin/bash ./scripts/destroy-env.sh" - args: - chdir: "{{ OPENSTACK_BIFROST_PATH }}" - -- hosts: localhost - connection: local - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/opnfv.yml - tasks: - - name: create and provision VM nodes for the flavor {{ XCI_FLAVOR }} - command: "/bin/bash ./scripts/bifrost-provision.sh" - args: - chdir: "{{ OPENSTACK_BIFROST_PATH }}" diff --git a/prototypes/xci/playbooks/roles/clone-repository/tasks/main.yml b/prototypes/xci/playbooks/roles/clone-repository/tasks/main.yml deleted file mode 100644 index 3f7e09103..000000000 --- a/prototypes/xci/playbooks/roles/clone-repository/tasks/main.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -- name: clone "{{ project }}" and checkout "{{ version }}" - git: - repo: "{{ repo }}" - dest: "{{ dest }}" - version: "{{ version }}" diff --git a/prototypes/xci/playbooks/roles/configure-network/tasks/main.yml b/prototypes/xci/playbooks/roles/configure-network/tasks/main.yml deleted file mode 100644 index aafadf712..000000000 --- a/prototypes/xci/playbooks/roles/configure-network/tasks/main.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -# TODO: this role needs to be adjusted for different distros -- block: - - name: configure modules - lineinfile: - dest: /etc/modules - state: present - create: yes - line: "8021q" - - name: add modules - modprobe: - name: 8021q - state: present - - name: ensure glean rules are removed - file: - path: "/etc/udev/rules.d/99-glean.rules" - state: absent - - name: ensure interfaces.d folder is empty - shell: "/bin/rm -rf /etc/network/interfaces.d/*" - - name: ensure interfaces file is updated - template: - src: "{{ src }}" - dest: "{{ dest }}" - - name: restart network service - shell: "/sbin/ifconfig {{ interface }} 0 && /sbin/ifdown -a && /sbin/ifup -a" - when: ansible_distribution_release == "xenial" diff --git a/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml b/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml deleted file mode 100644 index c52da0bf3..000000000 --- a/prototypes/xci/playbooks/roles/configure-nfs/tasks/main.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -# TODO: this is for xenial and needs to be adjusted for different distros -- block: - - name: make NFS directories - file: - dest: "{{ item }}" - mode: 0777 - state: directory - with_items: - - "/images" - - "/volumes" - - name: configure NFS service - lineinfile: - dest: /etc/services - state: present - create: yes - line: "{{ item }}" - with_items: - - "nfs 2049/tcp" - - "nfs 2049/udp" - - name: configure NFS exports - lineinfile: - dest: /etc/exports - state: present - create: yes - line: "{{ item }}" - with_items: - - "/images *(rw,sync,no_subtree_check,no_root_squash)" - - "/volumes *(rw,sync,no_subtree_check,no_root_squash)" - # TODO: the service name might be different on other distros and needs to be adjusted - - name: restart ubuntu xenial NFS service - service: - name: nfs-kernel-server - state: restarted - when: ansible_distribution_release == "xenial" diff --git a/prototypes/xci/playbooks/roles/remove-folders/tasks/main.yml b/prototypes/xci/playbooks/roles/remove-folders/tasks/main.yml deleted file mode 100644 index 425b8dbf4..000000000 --- a/prototypes/xci/playbooks/roles/remove-folders/tasks/main.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -- name: cleanup leftovers of previous deployment - file: - path: "{{ item }}" - state: absent - recurse: no - with_items: - - "{{ OPNFV_RELENG_PATH }}" - - "{{ OPENSTACK_BIFROST_PATH }}" - - "{{ OPENSTACK_OSA_PATH }}" - - "{{ OPENSTACK_OSA_ETC_PATH }}" - - "{{ LOG_PATH }} " - - "{{ OPNFV_SSH_HOST_KEYS_PATH }}" diff --git a/prototypes/xci/playbooks/roles/synchronize-time/tasks/main.yml b/prototypes/xci/playbooks/roles/synchronize-time/tasks/main.yml deleted file mode 100644 index 5c39d897b..000000000 --- a/prototypes/xci/playbooks/roles/synchronize-time/tasks/main.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -# TODO: this role needs to be adjusted for different distros -- block: - - name: restart chrony - service: - name: chrony - state: restarted - - name: synchronize time - shell: "chronyc -a 'burst 4/4' && chronyc -a makestep" - when: ansible_distribution_release == "xenial" diff --git a/prototypes/xci/scripts/update-osa-version-files.sh b/prototypes/xci/scripts/update-osa-version-files.sh deleted file mode 100755 index d822d2575..000000000 --- a/prototypes/xci/scripts/update-osa-version-files.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 SUSE LINUX GmbH and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# This script is used to pin the SHAs for the various roles in the -# ansible-role-requirements file. It will also update the SHAs for -# OSA and bifrost. - -set -e - -# NOTE(hwoarang) This could break if files are re-arranged in the future -releng_xci_base="$(dirname $(readlink -f $0))/.." - -usage() { - echo """ - ${0} [] - """ - exit 0 -} - -cleanup() { - [[ -d $tempdir ]] && rm -rf $tempdir -} - -printme() { - echo "===> $1" -} - -# Only need a single argument -[[ $# -lt 1 || $# -gt 2 ]] && echo "Invalid number of arguments!" && usage - -tempdir="$(mktemp -d)" - -trap cleanup EXIT - -pushd $tempdir &> /dev/null - -printme "Downloading the sources-branch-updater-lib.sh library" - -printme "Cloning the openstack-ansible repository" -( - git clone -q git://git.openstack.org/openstack/openstack-ansible && cd openstack-ansible && git checkout -q $1 -) - -popd &> /dev/null - -pushd $tempdir/openstack-ansible &> /dev/null -source scripts/sources-branch-updater-lib.sh -printme "Synchronize roles and packages" -update_ansible_role_requirements "master" "true" "true" - -# Construct the ansible-role-requirements-file -echo """--- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -# these versions are extracted based on the osa commit ${1} on $(git --no-pager log -1 --format=%cI $1) -# https://review.openstack.org/gitweb?p=openstack/openstack-ansible.git;a=commit;h=$1""" > $releng_xci_base/file/ansible-role-requirements.yml -cat $tempdir/openstack-ansible/ansible-role-requirements.yml >> $releng_xci_base/file/ansible-role-requirements.yml - -# Update the pinned OSA version -sed -i -e "/^export OPENSTACK_OSA_VERSION/s@:-\"[a-z0-9]*@:-\"${1}@" \ - -e "s/\(^# HEAD of osa.*of \).*/\1$(date +%d\.%m\.%Y)/" $releng_xci_base/config/pinned-versions - -# Update the pinned bifrost version -[[ -n ${2:-} ]] && \ - sed -i -e "/^export OPENSTACK_BIFROST_VERSION/s@:-\"[a-z0-9]*@:-\"${2}@" \ - -e "s/\(^# HEAD of bifrost.*of \).*/\1$(date +%d\.%m\.%Y)/" $releng_xci_base/config/pinned-versions - -popd &> /dev/null - -printme "" -printme "======================= Report ============================" -printme "" -printme "The $releng_xci_base/file/ansible-role-requirements.yml and" -printme "$releng_xci_base/config/pinned-versions files have been" -printme "updated. Please make sure you test the end result before" -printme "committing it!" -printme "" -printme "===========================================================" diff --git a/prototypes/xci/template/compute.interface.j2 b/prototypes/xci/template/compute.interface.j2 deleted file mode 100644 index 094544c3b..000000000 --- a/prototypes/xci/template/compute.interface.j2 +++ /dev/null @@ -1,73 +0,0 @@ -# The loopback network interface -auto lo -iface lo inet loopback - -# Physical interface -auto {{ interface }} -iface {{ interface }} inet manual - -# Container/Host management VLAN interface -auto {{ interface }}.10 -iface {{ interface }}.10 inet manual - vlan-raw-device {{ interface }} - -# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface -auto {{ interface }}.30 -iface {{ interface }}.30 inet manual - vlan-raw-device {{ interface }} - -# Storage network VLAN interface -auto {{ interface }}.20 -iface {{ interface }}.20 inet manual - vlan-raw-device {{ interface }} - -# Container/Host management bridge -auto br-mgmt -iface br-mgmt inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }}.10 - address {{host_info[inventory_hostname].MGMT_IP}} - netmask 255.255.252.0 - -# compute1 VXLAN (tunnel/overlay) bridge config -auto br-vxlan -iface br-vxlan inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }}.30 - address {{host_info[inventory_hostname].VXLAN_IP}} - netmask 255.255.252.0 - -# OpenStack Networking VLAN bridge -auto br-vlan -iface br-vlan inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }} - address {{host_info[inventory_hostname].VLAN_IP}} - netmask 255.255.255.0 - gateway 192.168.122.1 - dns-nameserver 8.8.8.8 8.8.4.4 - offload-sg off - # Create veth pair, don't bomb if already exists - pre-up ip link add br-vlan-veth type veth peer name eth12 || true - # Set both ends UP - pre-up ip link set br-vlan-veth up - pre-up ip link set eth12 up - # Delete veth pair on DOWN - post-down ip link del br-vlan-veth || true - bridge_ports br-vlan-veth - -# OpenStack Storage bridge -auto br-storage -iface br-storage inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }}.20 - address {{host_info[inventory_hostname].STORAGE_IP}} - netmask 255.255.252.0 diff --git a/prototypes/xci/template/controller.interface.j2 b/prototypes/xci/template/controller.interface.j2 deleted file mode 100644 index 638e78e18..000000000 --- a/prototypes/xci/template/controller.interface.j2 +++ /dev/null @@ -1,64 +0,0 @@ -# The loopback network interface -auto lo -iface lo inet loopback - -# Physical interface -auto {{ interface }} -iface {{ interface }} inet manual - -# Container/Host management VLAN interface -auto {{ interface }}.10 -iface {{ interface }}.10 inet manual - vlan-raw-device {{ interface }} - -# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface -auto {{ interface }}.30 -iface {{ interface }}.30 inet manual - vlan-raw-device {{ interface }} - -# Storage network VLAN interface (optional) -auto {{ interface }}.20 -iface {{ interface }}.20 inet manual - vlan-raw-device {{ interface }} - -# Container/Host management bridge -auto br-mgmt -iface br-mgmt inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }}.10 - address {{host_info[inventory_hostname].MGMT_IP}} - netmask 255.255.252.0 - -# OpenStack Networking VXLAN (tunnel/overlay) bridge -auto br-vxlan -iface br-vxlan inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }}.30 - address {{host_info[inventory_hostname].VXLAN_IP}} - netmask 255.255.252.0 - -# OpenStack Networking VLAN bridge -auto br-vlan -iface br-vlan inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }} - address {{host_info[inventory_hostname].VLAN_IP}} - netmask 255.255.255.0 - gateway 192.168.122.1 - dns-nameserver 8.8.8.8 8.8.4.4 - -# OpenStack Storage bridge -auto br-storage -iface br-storage inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }}.20 - address {{host_info[inventory_hostname].STORAGE_IP}} - netmask 255.255.252.0 diff --git a/prototypes/xci/template/opnfv.interface.j2 b/prototypes/xci/template/opnfv.interface.j2 deleted file mode 100644 index e9f8649c6..000000000 --- a/prototypes/xci/template/opnfv.interface.j2 +++ /dev/null @@ -1,64 +0,0 @@ -# The loopback network interface -auto lo -iface lo inet loopback - -# Physical interface -auto {{ interface }} -iface {{ interface }} inet manual - -# Container/Host management VLAN interface -auto {{ interface }}.10 -iface {{ interface }}.10 inet manual - vlan-raw-device {{ interface }} - -# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface -auto {{ interface }}.30 -iface {{ interface }}.30 inet manual - vlan-raw-device {{ interface }} - -# Storage network VLAN interface (optional) -auto {{ interface }}.20 -iface {{ interface }}.20 inet manual - vlan-raw-device {{ interface }} - -# Container/Host management bridge -auto br-mgmt -iface br-mgmt inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }}.10 - address {{host_info[inventory_hostname].MGMT_IP}} - netmask 255.255.252.0 - -# OpenStack Networking VXLAN (tunnel/overlay) bridge -auto br-vxlan -iface br-vxlan inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }}.30 - address {{ host_info[inventory_hostname].VXLAN_IP }} - netmask 255.255.252.0 - -# OpenStack Networking VLAN bridge -auto br-vlan -iface br-vlan inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }} - address {{host_info[inventory_hostname].VLAN_IP}} - netmask 255.255.255.0 - gateway 192.168.122.1 - dns-nameserver 8.8.8.8 8.8.4.4 - -# OpenStack Storage bridge -auto br-storage -iface br-storage inet static - bridge_stp off - bridge_waitport 0 - bridge_fd 0 - bridge_ports {{ interface }}.20 - address {{host_info[inventory_hostname].STORAGE_IP}} - netmask 255.255.252.0 diff --git a/prototypes/xci/var/Debian.yml b/prototypes/xci/var/Debian.yml deleted file mode 100644 index 33f110593..000000000 --- a/prototypes/xci/var/Debian.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -# this is the interface the VM nodes are connected to libvirt network "default" -interface: "ens3" -python_crypto_package_name: python-crypto diff --git a/prototypes/xci/var/RedHat.yml b/prototypes/xci/var/RedHat.yml deleted file mode 100644 index eae7d127f..000000000 --- a/prototypes/xci/var/RedHat.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -# this is placeholder and left blank intentionally to complete later on -python_crypto_package_name: python-crypto diff --git a/prototypes/xci/var/Suse.yml b/prototypes/xci/var/Suse.yml deleted file mode 100644 index 9674ed2d9..000000000 --- a/prototypes/xci/var/Suse.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -# this is placeholder and left blank intentionally to complete later on -python_crypto_package_name: python-pycrypto diff --git a/prototypes/xci/var/opnfv.yml b/prototypes/xci/var/opnfv.yml deleted file mode 100644 index aeafaceb1..000000000 --- a/prototypes/xci/var/opnfv.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017 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 -############################################################################## -OPNFV_RELENG_GIT_URL: "{{ lookup('env','OPNFV_RELENG_GIT_URL') }}" -OPNFV_RELENG_PATH: "{{ lookup('env','OPNFV_RELENG_PATH') }}" -OPNFV_RELENG_DEV_PATH: "{{ lookup('env','OPNFV_RELENG_DEV_PATH') }}" -OPNFV_RELENG_VERSION: "{{ lookup('env','OPNFV_RELENG_VERSION') }}" -OPENSTACK_BIFROST_GIT_URL: "{{ lookup('env','OPENSTACK_BIFROST_GIT_URL') }}" -OPENSTACK_BIFROST_PATH: "{{ lookup('env','OPENSTACK_BIFROST_PATH') }}" -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_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_FLAVOR: "{{ lookup('env','XCI_FLAVOR') }}" -XCI_FLAVOR_ANSIBLE_FILE_PATH: "{{ lookup('env','XCI_FLAVOR_ANSIBLE_FILE_PATH') }}" -XCI_LOOP: "{{ lookup('env','XCI_LOOP') }}" -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') }}" diff --git a/prototypes/xci/xci-deploy.sh b/prototypes/xci/xci-deploy.sh deleted file mode 100755 index d71125651..000000000 --- a/prototypes/xci/xci-deploy.sh +++ /dev/null @@ -1,213 +0,0 @@ -#!/bin/bash -set -o errexit -set -o nounset -set -o pipefail - -#------------------------------------------------------------------------------- -# This script should not be run as root -#------------------------------------------------------------------------------- -if [[ $(whoami) == "root" ]]; then - echo "WARNING: This script should not be run as root!" - echo "Elevated privileges are aquired automatically when necessary" - echo "Waiting 10s to give you a chance to stop the script (Ctrl-C)" - for x in $(seq 10 -1 1); do echo -n "$x..."; sleep 1; done -fi - -#------------------------------------------------------------------------------- -# Set environment variables -#------------------------------------------------------------------------------- -# The order of sourcing the variable files is significant so please do not -# change it or things might stop working. -# - user-vars: variables that can be configured or overriden by user. -# - pinned-versions: versions to checkout. These can be overriden if you want to -# use different/more recent versions of the tools but you might end up using -# something that is not verified by OPNFV XCI. -# - flavor-vars: settings for VM nodes for the chosen flavor. -# - env-vars: variables for the xci itself and you should not need to change or -# override any of them. -#------------------------------------------------------------------------------- -# find where are we -XCI_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -# source user vars -source $XCI_PATH/config/user-vars -# source pinned versions -source $XCI_PATH/config/pinned-versions -# source flavor configuration -source "$XCI_PATH/config/${XCI_FLAVOR}-vars" -# source xci configuration -source $XCI_PATH/config/env-vars - -#------------------------------------------------------------------------------- -# Sanitize local development environment variables -#------------------------------------------------------------------------------- -user_local_dev_vars=(OPNFV_RELENG_DEV_PATH OPNFV_OSA_DEV_PATH OPNFV_BIFROST_DEV_PATH) -for local_user_var in ${user_local_dev_vars[@]}; do - [[ -n ${!local_user_var:-} ]] && export $local_user_var=${!local_user_var%/}/ -done -unset user_local_dev_vars local_user_var - -#------------------------------------------------------------------------------- -# Log info to console -#------------------------------------------------------------------------------- -echo "Info: Starting XCI Deployment" -echo "Info: Deployment parameters" -echo "-------------------------------------------------------------------------" -echo "xci flavor: $XCI_FLAVOR" -echo "opnfv/releng version: $OPNFV_RELENG_VERSION" -echo "openstack/bifrost version: $OPENSTACK_BIFROST_VERSION" -echo "openstack/openstack-ansible version: $OPENSTACK_OSA_VERSION" -echo "-------------------------------------------------------------------------" - -#------------------------------------------------------------------------------- -# Install ansible on localhost -#------------------------------------------------------------------------------- -source file/install-ansible.sh - -# TODO: The xci playbooks can be put into a playbook which will be done later. - -#------------------------------------------------------------------------------- -# Start provisioning VM nodes -#------------------------------------------------------------------------------- -# 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 -# - destorys VMs, removes ironic db, leases, logs -# - creates and provisions VMs for the chosen flavor -#------------------------------------------------------------------------------- -echo "Info: Starting provisining VM nodes using openstack/bifrost" -echo "-------------------------------------------------------------------------" -cd $XCI_PATH/playbooks -ansible-playbook $ANSIBLE_VERBOSITY -i inventory provision-vm-nodes.yml -echo "-----------------------------------------------------------------------" -echo "Info: VM nodes are provisioned!" -source $OPENSTACK_BIFROST_PATH/env-vars -ironic node-list -echo -#------------------------------------------------------------------------------- -# Configure localhost -#------------------------------------------------------------------------------- -# This playbook -# - removes directories that were created by the previous xci run -# - clones opnfv/releng repository -# - creates log directory -# - copies flavor files such as playbook, inventory, and var file -#------------------------------------------------------------------------------- -echo "Info: Configuring localhost for openstack-ansible" -echo "-----------------------------------------------------------------------" -cd $XCI_PATH/playbooks -ansible-playbook $ANSIBLE_VERBOSITY -i inventory configure-localhost.yml -echo "-----------------------------------------------------------------------" -echo "Info: Configured localhost host for openstack-ansible" - -#------------------------------------------------------------------------------- -# Configure openstack-ansible deployment host, opnfv -#------------------------------------------------------------------------------- -# This playbook -# - removes directories that were created by the previous xci run -# - clones opnfv/releng and openstack/openstack-ansible repositories -# - configures network -# - generates/prepares ssh keys -# - bootstraps ansible -# - copies flavor files to be used by openstack-ansible -#------------------------------------------------------------------------------- -echo "Info: Configuring opnfv deployment host for openstack-ansible" -echo "-----------------------------------------------------------------------" -cd $OPNFV_RELENG_PATH/prototypes/xci/playbooks -ansible-playbook $ANSIBLE_VERBOSITY -i inventory configure-opnfvhost.yml -echo "-----------------------------------------------------------------------" -echo "Info: Configured opnfv deployment host for openstack-ansible" - -#------------------------------------------------------------------------------- -# Skip the rest if the flavor is aio since the target host for aio is opnfv -#------------------------------------------------------------------------------- -if [[ $XCI_FLAVOR == "aio" ]]; then - echo "xci: aio has been installed" - exit 0 -fi - -#------------------------------------------------------------------------------- -# Configure target hosts for openstack-ansible -#------------------------------------------------------------------------------- -# This playbook -# - adds public keys to target hosts -# - configures network -# - configures nfs -#------------------------------------------------------------------------------- -echo "Info: Configuring target hosts for openstack-ansible" -echo "-----------------------------------------------------------------------" -cd $OPNFV_RELENG_PATH/prototypes/xci/playbooks -ansible-playbook $ANSIBLE_VERBOSITY -i inventory configure-targethosts.yml -echo "-----------------------------------------------------------------------" -echo "Info: Configured target hosts" - -#------------------------------------------------------------------------------- -# Set up target hosts for openstack-ansible -#------------------------------------------------------------------------------- -# This is openstack-ansible playbook. Check upstream documentation for details. -#------------------------------------------------------------------------------- -echo "Info: Setting up target hosts for openstack-ansible" -echo "-----------------------------------------------------------------------" -ssh root@$OPNFV_HOST_IP "openstack-ansible \ - $OPENSTACK_OSA_PATH/playbooks/setup-hosts.yml" | \ - tee $LOG_PATH/setup-hosts.log -echo "-----------------------------------------------------------------------" -# check the log to see if we have any error -if grep -q 'failed=1\|unreachable=1' $LOG_PATH/setup-hosts.log; then - echo "Error: OpenStack node setup failed!" - exit 1 -fi -echo "Info: Set up target hosts for openstack-ansible successfuly" - -#------------------------------------------------------------------------------- -# Set up infrastructure -#------------------------------------------------------------------------------- -# This is openstack-ansible playbook. Check upstream documentation for details. -#------------------------------------------------------------------------------- -echo "Info: Setting up infrastructure" -echo "-----------------------------------------------------------------------" -echo "xci: running ansible playbook setup-infrastructure.yml" -ssh root@$OPNFV_HOST_IP "openstack-ansible \ - $OPENSTACK_OSA_PATH/playbooks//setup-infrastructure.yml" | \ - tee $LOG_PATH/setup-infrastructure.log -echo "-----------------------------------------------------------------------" -# check the log to see if we have any error -if grep -q 'failed=1\|unreachable=1' $LOG_PATH/setup-infrastructure.log; then - echo "Error: OpenStack node setup failed!" - exit 1 -fi - -#------------------------------------------------------------------------------- -# Verify database cluster -#------------------------------------------------------------------------------- -echo "Info: Verifying database cluster" -echo "-----------------------------------------------------------------------" -ssh root@$OPNFV_HOST_IP "ansible -i $OPENSTACK_OSA_PATH/playbooks/inventory/ \ - galera_container -m shell \ - -a "mysql -h localhost -e 'show status like \"%wsrep_cluster_%\";'"" \ - | tee $LOG_PATH/galera.log -echo "-----------------------------------------------------------------------" -# check the log to see if we have any error -if grep -q 'FAILED' $LOG_PATH/galera.log; then - echo "Error: Database cluster verification failed!" - exit 1 -fi -echo "Info: Database cluster verification successful!" - -#------------------------------------------------------------------------------- -# Install OpenStack -#------------------------------------------------------------------------------- -# This is openstack-ansible playbook. Check upstream documentation for details. -#------------------------------------------------------------------------------- -echo "Info: Installing OpenStack on target hosts" -echo "-----------------------------------------------------------------------" -ssh root@$OPNFV_HOST_IP "openstack-ansible \ - $OPENSTACK_OSA_PATH/playbooks/setup-openstack.yml" | \ - tee $LOG_PATH/opnfv-setup-openstack.log -echo "-----------------------------------------------------------------------" -# check the log to see if we have any error -if grep -q 'failed=1\|unreachable=1' $LOG_PATH/opnfv-setup-openstack.log; then - echo "Error: OpenStack installation failed!" - exit 1 -fi -echo "Info: OpenStack installation is successfully completed!" -- cgit 1.2.3-korg