summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/configure-opnfvhost.yml
AgeCommit message (Collapse)AuthorFilesLines
2017-12-14xci: Drop AIO specific playbookMarkos Chandras1-0/+4
The configure-opnfvhost playbook which is used for all flavors except AIO can also be used for AIO if it's adapted to not configure networking on the host and also do not fail if there aren't any OSA variables files available so lets do all that in order to avoid duplicating code across flavors. Change-Id: I58379d8b52094294b9349494753ffcdd44982013 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-12-13xci: Fix checkout location for OpenStack-AnsibleMarkos Chandras1-23/+6
The OPENSTACK_OSA_PATH only makes sense on localhost. As such, when we use it on playbooks that operate on remote hosts, the result is not predictable. However, we rsync the entire releng-xci repository to the opfnv host so we can make everything predictable by simply clone everything in advance in the .cache directory. That directory is then rsync'd to the opnfv host. As such, we can repurpose the OPENSTACK_OSA_PATH to point to the path into the OPNFV host. Moreover, all external repositories are being cloned to .cache/repos so we can eliminate some variables in order to simplify the code. Finally, we bring back the ability to use an external OSA repository for development purposes. Change-Id: Ieef3e22ae2085f6735185634d555cfc0d4b69b39 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-12-11xci: Use local playbooks for XCI deploymentsMarkos Chandras1-52/+47
Previously, we used to clone the releng-xci repository under a directory in /tmp, copy our changes to that repository and then run the xci-deploy.sh script from it. However, this made things far too complex for deployers and developers since some playbooks were used from the local repo whereas others were used from teh /tmp checkout. By running everything from our local repository simplifies things a lot since we can directly test our changes and also reduces the code we have in our playbooks. Change-Id: If16aa51b2846c170676df82d25cb90e26b1568b2 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-30Merge "xci: Drop OPNFV_RELENG_DEV_PATH variable"Markos Chandras1-3/+1
2017-11-29Make sure the docker service is startedManuel Buil1-0/+6
We are installing the docker package but not checking if it is started The service name for the three distros is the same but I still added the variable in each distro variables file to keep best practices Change-Id: I0c73069ea7edc366e824cf39d14d24d1416fd6c3 Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-11-29xci: Drop OPNFV_RELENG_DEV_PATH variableMarkos Chandras1-3/+1
The OPNFV_RELENG_DEV_PATH variable was used to point to a releng-xci development repository. However, people normally set the current directory as the development one and they almost always want to test the current code in XCI. Using an secondary releng-xci tree as development repo is a very obscure case and it normally complicates things. As such, let drop this option and always use the current repository for development purposes. Change-Id: If111bf29a32a5f6ea28694f191645af0c6a87abc Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-22Use RUN_TEMPEST global envVictor Morales1-0/+8
The RUN_TEMPEST global environment has been defined in *user-vars* but never used in the playbooks. This change pretends to enable the use of that value. Change-Id: I49ca092546494c0cdcb015a549828bf79fa5f889 Signed-off-by: Victor Morales <victor.morales@intel.com>
2017-11-17playbooks: configure-opnfvhost: Be explicit when copying user filesMarkos Chandras1-1/+1
The flavors may contain deployment specific user_variables.yml files so we should only copy the generic one in the common tasks and leave the rest for scenarios to copy them if necessary. Change-Id: I39e3e090dc40d4f13bb42028a24e8574e19cf6dd Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-14Merge "Integrate ceph in XCI"Markos Chandras1-0/+8
2017-10-26Integrate ceph in XCIwutianwei1-0/+8
Openstack ansible support to deploy ceph. The purpose of this patch is to configure the ceph, just like we configure other openstack components. The default is to not deploy ceph. If you want to deploy ceph you just need to export XCI_CEPH_ENABLED=true before running xci-deploy.sh. When deployed successfully, the openstack storage will use ceph. Change-Id: Ifd8d16fdce2914b6316842e72bbfd93228ea059d Signed-off-by: wutianwei <wutianwei1@huawei.com>
2017-10-19xci: playbooks: Add generic playbook for scenarios to plug their rolesMarkos Chandras1-0/+1
The new bootstrap-scenarios.yml playbook is aimed to be used by scenarios to configure themselves right before we proceed with the bootstrapping. This way we can avoid having scenario specific stuff into the generic code. Change-Id: I3026013719a50458c65405439712270f25f569ff Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-06xci: playbooks: configure-opnfvhost: Copy all user_*.yml filesMarkos Chandras1-2/+2
OpenStack-Ansible can make use of all the user_*.yml files so scenarios can make use of this facility to override the default ones we provide for every flavor. As such, lets copy all the user_*.yml files to the deployment host. Change-Id: I5ddce48677f66a3ff3ec127f0fc0163f9f45b200 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-04Install docker-py when running xci as part of CIManuel Buil1-6/+4
docker-py package is required by the docker_container module in ansible: http://docs.ansible.com/ansible/latest/docker_container_module.html#docker-container Change-Id: Ib051ae09c84cfa973ef814852e78626499471d0f Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-10-02Install python-openstackclient by defaultFatih Degirmenci1-2/+0
It is important to have the client installed for the ease of the users so they can use the client for trying out their new deployment. Change-Id: I091c1e23ff320cb9fcdb2743998483a6bc1fcdad Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-09-29Check if /etc/ssl/certs exists before creating itTapio Tallgren1-2/+4
In CentOS and Suse, /etc/ssl/certs is a symbolic link to /etc/ssl/pki/tls/certs. The Ansible module "file" will fail if it is asked to create a directory which is already a symbolic link. This patch will check if /etc/ssl/certs exists before trying to create it. The same check is done both on the host and the opnfv guest VM. Also, /etc/certs is only writable by root, so we need a "become: true" clause to be able to modify it in localhost (but not in opnvf VM). Change-Id: Iab6c3c162548f84ad6082829e4a7c2ab63d2cfa0 Signed-off-by: Tapio Tallgren <tapio.tallgren@nokia.com>
2017-09-29Merge changes from topic 'fix-vm-on-jenkins'Markos Chandras1-13/+1
* changes: xci: xci-deploy.sh: Apply workaround for checking db cluster on SUSE xci: playbooks: synchronize-time: Fix service name for openSUSE xci: configure-opnfvhost: Do not run 'remove-folders' xci: scripts: build-dib-os.sh: Pin diskimage-builder xci: configure-opnfvhost: Do not check /etc/ssl/certs on SUSE
2017-09-28Ensure the pinned versions of components match to the pinned OSAFatih Degirmenci1-2/+9
The versions for the OpenStack services and global requirements need to be pinned alongside with the OSA SHA1 and the role versions to ensure we pinned everything. This change is required for osa-periodic jobs as well since that job will use sources-branch-updater.sh script and the script updates these files to ensure things are pinned correctly. modified: ansible-role-requirements.yml modified: global-requirement-pins.txt modified: playbooks/defaults/repo_packages/openstack_services.yml modified: releasenotes/notes/glance-init-config-overrides-d1c8c3dcc50c109a.yaml modified: releasenotes/notes/neutron-init-config-overrides-9d1d2b3b908705ed.yaml modified: releasenotes/notes/trove-init-config-overrides-a78ed428a32adef8.yaml By doing this change, we do not need to have any magic to capture updates to those files. Just updating the files we keep in xci/file folder will be sufficient and they get copied over during the playbook execution. Change-Id: Iae0db22574a0368e896132469a8587d1457ce177 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-09-28xci: configure-opnfvhost: Do not run 'remove-folders'Markos Chandras1-13/+0
The OPNFV node is brand new and it doesn't have any traces of XCI directories so there is no point in running the 'remove-folders' role. Change-Id: Ic9b9203cc14abda2dab406de6a5feeef6a1b7e2a Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-28xci: configure-opnfvhost: Do not check /etc/ssl/certs on SUSEMarkos Chandras1-0/+1
This is similar to Ibc188b76f47c4f7d1c5aa452a21e838420d65e6a /etc/ssl/certs is a symlink so skip this task on SUSE. Change-Id: Iae38640501748dc3dd802ce795acfaeefd836c97 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-27Create a role which prepares xci for functestManuel Buil1-3/+3
Functest requires xci deployment to have: - A public neutron network - A subnet attached to the public neutron network - The gateway from the subnet attached to one interface The network and subnet creation are done via a script instead of using Ansible OpenStack module in order to get things working asap. These three tasks are implemented in a role This patch depends on a pending patch: https://gerrit.opnfv.org/gerrit/#/c/39517/2 Change-Id: I0635227153087fd9e25b76f0859f82bf48bfb930 Signed-off-by: Manuel Buil <mbuil@suse.com> Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-09-22Merge "Install docker and shade on opnfv host"Fatih Degirmenci1-0/+12
2017-09-22Merge "Override ansible role versions only if OSA version is not master"Markos Chandras1-0/+2
2017-09-22Install docker and shade on opnfv hostFatih Degirmenci1-0/+12
Docker is needed for running tests against the deployment. Shade is needed for managing OpenStack via Ansible. This change adds tasks to install docker and shade on opnfv host if it is run as part of CI. Users should be free to install these if they want so it is not installed for them by default. Change-Id: Idfd0f02312cc5e1b0180ed2408755a8c730b987b Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-09-21xci: playbooks: Include distribution var files dynamicallyMarkos Chandras1-1/+0
This is a continuation of I0a49e2ed8d811bb40a99612462752f8691133e0f We need to convert these two plays to include the variable files dynamically similar to the rest of the playbook. Change-Id: I43203651ccafb03e015bfe4d1b075a7ee96b5adc Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-21xci: Gain elevated privileges to remove the XCI_DEVEL_ROOT directoryMarkos Chandras1-0/+12
This is similar to 0927671781f6875926dac2e5f4bb10816e67070c. We need elevated privileges to remove the XCI_DEVEL_ROOT directory so move this role to its own play. Change-Id: Ice4f030eeb28cd24a6166f11a5a792ab3df8880c Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-17Override ansible role versions only if OSA version is not masterFatih Degirmenci1-0/+2
If OSA version is set to master, we should use the role versions directly from upstream to ensure we do not cause issues by the use of wrong role versions. Change-Id: I26005d23944445bf287384f90c7f2e139224ab23 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-09-15xci: playbooks: Add task for loading distribution variablesMarkos Chandras1-4/+15
vars_files doesn't support loading files with variables in their names. As such we add a new task to include these files before running any of the roles. This fixes warnings like this: Info: Starting provisining VM nodes using openstack/bifrost ------------------------------------------------------------------------- No config file found; using defaults skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable skipping vars_file '../var/{{ ansible_os_family }}.yml' due to an undefined variable Change-Id: I0a49e2ed8d811bb40a99612462752f8691133e0f Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-14Generate and use certificates for OSAYolanda Robla1-0/+45
Instead of making OSA to generate self signed certs, bring our own and pass them. By this way we will be able to trust in that certs, and start consuming OpenStack easily. It will also generate proper openrc file to source it and start consuming the cloud properly. Change-Id: Ic72a8b05e6efb222926fc5fa0800e033b2dbd22f Closes-Bug: RELENG-266 Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
2017-08-25xci: playbooks: configure-network: Prepare for multi-distro supportMarkos Chandras1-2/+1
Move the network templates inside the role since it's their only user. Moreover, remove the arguments when we include the role in playbooks and move the distro logic to the role itself. Change-Id: I938686fdb31b9896b9e97339799a0edd4c34bf36 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-16Refactor releng/prototypes/xci to releng-xci/xci in the codeDave Urschatz1-7/+7
These changes are needed as part of migrating xci from releng repo to the releng-xci repo. They cover: - README updates - Re-point configuration from releng/prototypes to releng-xci The changes have been tested as follows: - XCI_FLAVOR=aio - OPENSTACK_OSA_VERSION=adfaa66d6108f87599e0595591b39cad2c8fb658 xci: aio has been installed real 107m5.310s user 11m50.180s sys 4m11.152s ubuntu@rack-IRA2-SymKloudBlade4:~/releng-xci/xci$ Change-Id: I8fd86c2442ee3a7c6996eedb6510dbc6eebd30b0 Signed-off-by: Dave Urschatz <dave.urschatz@cengn.ca>
2017-08-11Fix missing python packages for password generationJuan Vidal Allende1-0/+7
These packages are needed by pw-token-gen.py tool Change-Id: Ib9d165274449551a469e201da9feeffac5a7a4cf Signed-off-by: Juan Vidal Allende <juan.vidal.allende@ericsson.com>
2017-08-11prototypes: xci: Look for SSH keys in $HOME directoryMarkos Chandras1-1/+1
We no longer run everything as root so we need to look for SSH keys in the appropriate home directory. Change-Id: Iae1f7eb80059e7d369c8e0c8b6c33c6a4f673f94 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: xci: Move host keys away from / directoryMarkos Chandras1-2/+8
Putting the host keys in '/' requires root privileges so it's best if we place them in the same directory like the rest of the XCI files. Change-Id: I030ed3d6cbb57bb984a78aeffb4eca2bd5c10bb0 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: xci: Add ability to use local repositories for testingMarkos Chandras1-0/+31
When developing XCI features it's useful to be able to use the local repositories rather than cloning them from git since that makes it harder to test local modifications against XCI. As such, we add three new variables which can be used to hold local paths to the bifrost, releng and openstack-ansible repositories. We are still cloning the repositories but we then use the 'synchronize' Ansible module to copy modified files from the local repositories. Change-Id: I6d593ea48d8b9c51415d9d0848f77a498ef2f486 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11xci: Ensure ansible is bootstrapped as last stepFatih Degirmenci1-8/+8
Role requirements file is used during ansible bootstrap on opnfv host so we must ensure the right ansible role requirements is there in advance. Change-Id: I2c5a1edd82a51cbbe1469c31f37b5d638d32ec27 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Always use pinned versions of openstack-ansible-requirementsJuan Vidal1-2/+0
Pinned versions used to be used only if XCI_LOOP == 'daily', but it seems to be required, otherwise this is very likely to fail Change-Id: I21f638bba75846a58b12373a903d414fa89b4bc6 Signed-off-by: Juan Vidal <juan.vidal.allende@ericsson.com>
2017-08-11xci: Introduce XCI_LOOP variable to control what to do properlyFatih Degirmenci1-0/+2
XCI has different jobs/loops to run - patchset verification jobs (currently bifrost and osa in future) - periodic jobs (bifrost and osa) - daily jobs (for OPNFV platform deployment and testing) The same scripts/playbooks used by XCI will also be used by developers. We need to do different things depending on the context the scripts and playbooks are executed. - periodic jobs will use latest of everything to find working versions of the components. (periodic osa will use unpinned role requirements for example) - daily jobs will use pinned versions in order to bring up the platform and run OPNFV testing against it. (daily deployment will use pinned versions and role requirements for example) - developers might choose to use pinned versions or latest Depending on what loop we are running, we need to do things differently in scripts and playbooks. This variable will help us to do this in easy way. We can of course do pattern matching of the job name but it will not work if the scripts are used outside of Jenkins. The default loop for non-Jenkins execution is set to daily as we want developers to use working versions unless they change it to something else intentionally. Change-Id: Iff69c77ae3d9db2c14de1783ce098da9e9f0c83d Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Fix the haproxy service and gnocchi db sync problemFatih Degirmenci1-0/+6
This patch reflects the fix Tianwei found for the keystone and gnocchi issues with HA deployment. https://gerrit.opnfv.org/gerrit/#/c/32367/ The keystone issue should be fixed upstream but until that happens, we can use the patch here to move us forward. Previously removed OpenStack services have also been enabled to try as close deployment as possible to upstream openstack-ansible. Change-Id: Ib7b1cfe0f363381466b43a3249667c638c09d9fd Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Move role configure-network to the right placeFatih Degirmenci1-3/+2
Incorrectly placed role configure-network causes ansible to skip the roles at the beginning of the playbook. Change-Id: Id85e9684eb86acad7c11104b434a319c37e16903 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Networking fixes to introduce role and interface varFatih Degirmenci1-11/+2
Network configuration task and accompanied handler put into a role and handler is converted to task. Distro specific var, interface, is introduced to ensure we do not hardcode the interface which might not be available. Update the templates accordingly. Change-Id: I667620fe22c93a9b20a1d8c1b7b0051d7647b591 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Add common and OS family ansible var filesFatih Degirmenci1-0/+1
OS family vars_files are currently empty and put there to show the intend. (kind of TODO) opnfv.yml holds non-distro and non-flavor specific variables. Change-Id: I65aff2650257f2df00fd1f0a0638fd1aff596ac4 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Add main playbooks and filesFatih Degirmenci1-0/+68
This patch adds the main/common playbooks, files, and templates to be used for all flavors. The provisioning and OpenStack installation process will be as below - provision VMs for flavor using bifrost - once the VMs are provisioned, configure-localhost.yml playbook will be run, preparing the localhost in order to ensure the right playbooks (configure-opnfvhost.yml and configure-targethosts.yml), inventory files and var files are in place before we proceed with configuring opnfv host. - after getting the right files for the flavor, opnfv host will be configured using configure-opnfvhost.yml playbook. - finally, the target hosts will be configured. - once the above process is completed, openstack-ansible playbooks will be run, setting up hosts, infrastructure and OpenStack. Change-Id: I6e08b2cfdab9627f765e6fc414917b09f953cab2 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>