summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/provision-vm-nodes.yml
AgeCommit message (Collapse)AuthorFilesLines
2018-03-09xci: Rename provision-vm-nodes playbookMarkos Chandras1-42/+0
The provision-vm-nodes playbook doesn't do any VM provisioning. It basically just bootstraps the bifrost repository so rename it to make it clear what this is about. Change-Id: I1c10bc6135686c5197d553a885412a94312a41bc Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-12-13xci: Fix checkout location for OpenStack-AnsibleMarkos Chandras1-3/+7
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: playbooks: provision-vm-nodes: Simplify the provision VM playbookMarkos Chandras1-26/+1
The provision-vm-nodes playbook is only responsible for running bifrost to provision the XCI virtual machines. As such, drop all the extra tasks that this playbook performed in order to simplify it. This also drops the XCI_EXTRA_VARS_PATH variable since it had a rather obscure usage and there is not much value in passing inventory information outside of XCI. All these will be handled in the scenarios themselves. Change-Id: If5cb381a3d1e101100eb04478d80fb3045cdfaf8 Signed-off-by: Markos Chandras <mchandras@suse.de>
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-09-21xci: Move the destroy-env.sh script to xci-deploy.shMarkos Chandras1-16/+0
There is no particular need to execute the bash script using Ansible. Lets move it to the xci-deploy.sh script instead. Change-Id: I0fa91195d9c3647bb4766d76c28892e2f13e1e98 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-21xci: provision-vm-nodes.yml: Merge playsMarkos Chandras1-16/+3
There is no need to have multiple plays executed on a single host group so merge them all together into a single one. Change-Id: Ie190cdecfbdcba48f75b21aa5930e1d9b8392aa0 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-21xci: playbooks: Include distribution var files dynamicallyMarkos Chandras1-1/+3
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: Move VM provisioning to xci-deploy.shMarkos Chandras1-11/+0
The bifrost-provision.sh script will provision machines using Ansible playbooks. If we run this script in an Ansible playbook, that means that we will run Ansible with Ansible and this can only lead to further confusion when debugging issues. As such, since we already have a script to provision machines, lets use it directly from the xci-deploy.sh script. This also reverts 3f04e1fd72b14420788af64b14c35a5f74727f82 which added virtualenv support in bifrost since that causes more problems than it fixes for the time being. Change-Id: Id82b7c06a2af28b66f64f1966227888227ec276f Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-18xci: provision-vm-nodes: Use sudo to remove the XCI directoryMarkos Chandras1-2/+9
Since I00d77e1fc62cccda7920af3469af9d44247780f4 the entire XCI_DEVEL_ROOT is being removed. However, some of the files are owned by root so we need elevated privileges to remove these files and directories Change-Id: Ie10018ded198b922077e38fa5776fca098418192 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-15xci: playbooks: Add task for loading distribution variablesMarkos Chandras1-5/+13
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-08-16Refactor releng/prototypes/xci to releng-xci/xci in the codeDave Urschatz1-6/+6
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-11Define an extra vars path and copy into playbooksYolanda Robla1-0/+9
This will allow to define the XCI_EXTRA_VARS_PATH, that can contain group_vars/all (or any other valid files), and those will be copied inside releng and bifrost playbooks. Change-Id: I95e4b0bfb67f26bfa1eb10c97096784eb7f3a87a Signed-Off-By: Yolanda Robla <yroblamo@redhat.com>
2017-08-11prototypes: xci: Add ability to use local repositories for testingMarkos Chandras1-0/+32
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-11prototypes: xci: provision-vm-nodes: Do not provision VMs as root.Markos Chandras1-1/+16
There is no need to provision VM nodes as root. The only thing that we need to run as root is the destroy-env.sh script and for that we move it to its own play so we can use Ansible's become directive. Moreover, since this playbook operates on localhost we can use 'connection: local' so we don't have to execute everything via ssh and possibly speed up the whole process. Change-Id: Ia9efd5f30e95385b5cf193dde352f93551846c0e Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11xci: Create playbook to destroy, create and provision VM nodesFatih Degirmenci1-0/+32
This change moves preparation (cloning repos, combining opnfv/bifrost with openstack/bifrost), destroying and creating VM nodes from the script into a separate playbook. This requires the host to have ansible installed. The version of ansible to install using pip currently matches to what bifrost uses but it is hardcoded and needs to be fixed properly. The reason for having this as a playbook to simplify the script and increase the reuse. This playbook will be used for - developer sandbox - periodic bifrost jobs to run against latest on given branch and promoting bifrost sha1 to pin later on - daily jobs to run using pinned versions of bifrost Change-Id: I033f12290dfea19d4c74be80eea7203211c0369e Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>