summaryrefslogtreecommitdiffstats
path: root/xci/xci-deploy.sh
AgeCommit message (Collapse)AuthorFilesLines
2018-03-23xci: install: Move all pip installations to virtualenvMarkos Chandras1-0/+2
Now that all pip installations are managed in the same way we can move them inside a global virtual environment to further isolate the XCI artifacts from the rest of the system. Moreover, we further simplify the initial package installation to install everything at once instead of calling the package manager for every single package that we need. Change-Id: I6a170d2439fae8b0653f3141e0e8bb8ead67657e Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-21xci: Install the ARA callback pluginMarkos Chandras1-2/+12
The ARA Ansible plugin can be used to visualize the entire XCI run so lets install it by default and generate a report at the end of the execution. Change-Id: I66c3230b371001c110e81755c5f0dad4b1756606 Link: https://github.com/openstack/ara Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-21xci: files: Move Ansible installation to a library fileMarkos Chandras1-1/+4
Installing Ansible is just one of the functions we need during XCI deployment, as such move it to a library file which can contain more functions in the future. Change-Id: I708a4e51b2b1d624d6827a8c99f3719b59227ec0 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-21Clean up opnfv ansible vars and switch to lowercaseFatih Degirmenci1-1/+1
This change removes the variables that are not used in any of the playbooks/roles from opnfv ansible vars. Apart from that, all caps ansible vars replaced with lowercase ones and impacted playbooks/roles are updated. installer-type:osa deploy-scenario:os-nosdn-nofeature Change-Id: I99ebdc155b3903176ac5940b64cef0c0f3aa0f0d Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-03-20xci: Move cleanup script outside of bifrostMarkos Chandras1-0/+11
The cleanup script has grown quite a bit over time and it now does more things than cleaning up old 'bifrost' artifacts to move it to the global files directory so it can be used by all installers. Change-Id: Ibf70ff255f14e798216cedc71fb7c5f5476b964a Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-20Add initial support for multiple infra deployersMarkos Chandras1-23/+8
bifrost is currently the only way to deploy the infrastructure but in the future other solutions will be added so we need to do some preparation for XCI integration. Change-Id: I961dd42157c924d88747074ddba6a318f8b537ac Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-13Merge "Set VM node names and log the installer version based on installer"Fatih Degirmenci1-2/+3
2018-03-13Merge changes from topics 'allow-pass-ansible-arguments', ↵Markos Chandras1-2/+4
'allow-pass-ansible-arguments-force-verify' * changes: xci: OSA: Fix warning about missing inventory file xci: Pass the XCI_PATH variable to all Ansible calls xci: Rename XCI_ANSIBLE_VERBOSITY to XCI_ANSIBLE_PARAMS
2018-03-12Set VM node names and log the installer version based on installerFatih Degirmenci1-2/+3
The VM nodes are named using OpenStack terminology but since we now have Kubernetes scenario, it is appropriate to name the nodes accordingly. Apart from that, we normally log the version of OSA which is not correct for kubernetes deployments. Logging Kubespray version would be correct for this scenario. Change-Id: I3964574c8592450f9fa3126f19e27bb78fd9d174 Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-03-12Combine vars setting installer type in INSTALLER_TYPEFatih Degirmenci1-6/+6
Change-Id: I330bc036f901d4ba61bc94ee6e085cadf54b4d8b Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-03-12xci: Pass the XCI_PATH variable to all Ansible callsMarkos Chandras1-0/+2
The XCI_PATH variable is used by various playbooks to find the root directory of the XCI repository so it's much cleaner to pass it on every Ansible call. Change-Id: Ifc0b77fa767e48bd1dc6daa44c6251c02983fd4d Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-12xci: Rename XCI_ANSIBLE_VERBOSITY to XCI_ANSIBLE_PARAMSMarkos Chandras1-2/+2
We don't quite need a specific env variable just for Ansible verbosity so we can rename this variable to make it clear that it can be used to pass any Ansible option to XCI. Change-Id: Ie20517d4b563bfc6daeb27848168d36da7014cee Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-12Merge "xci: Fix warning about missing inventory file"Markos Chandras1-2/+2
2018-03-10Merge "bifrost: Move DIB configuration variables to bifrost"Markos Chandras1-19/+0
2018-03-09xci: Fix warning about missing inventory fileMarkos Chandras1-2/+2
We no longer have a global inventory file and we don't need one right now since the bootstrapping opearations happen on the localhost anyway so we could be explicit and get rid of the following warning: [WARNING]: Host file not found: inventory [WARNING]: provided hosts list is empty, only localhost is available Change-Id: I5cfe7b0971397665cf9eae9c54985c44c4506449 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-09bifrost: Move DIB configuration variables to bifrostMarkos Chandras1-19/+0
The DIB variables only make sense on bifrost so they should live in the bifrost provision script. Change-Id: I05baca7b9c6889a0d401a9288998991324d270af Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-09xci: Rename provision-vm-nodes playbookMarkos Chandras1-1/+1
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>
2018-02-19xci: xci-deploy.sh: Calculate and print the total deployment timeMarkos Chandras1-0/+6
It's useful to know how XCI performs in terms of duration time so use the bash $SECONDS variable to calculate the total amount of time it takes for a full XCI deployment. Moreover, use the 'ts' command to print a timestamp for every command executed. This will help developers identify tasks which take a lot of time to complete and possibly optimize them. Change-Id: I75a8cb8c05957bb205e63210d6cafaf54d989f32 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-01-29Merge "correct the lookup logic for scenario's xci_overrides"Markos Chandras1-3/+1
2018-01-26xci: Record deployment scenario when collecting XCI infoMarkos Chandras1-1/+2
Add the DEPLOY_SCENARIO variable to the list of information we collect when deployment fails. Change-Id: I7081b80feea1d3d2ff83e54bd5e614b4ea98964d Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-01-26correct the lookup logic for scenario's xci_overridesPeriyasamy Palanisamy1-3/+1
Previously xci-deploy.sh looks up the xci_overrides files under $XCI_SCENARIOS_CACHE/${DEPLOY_SCENARIO} directory, but actually xci_overrides file resides somewhere in the nested directory level in both inband/outband scenarios. Hence the fix is done by using the find command. Change-Id: Icb507471e368f56290ef91d555673830b598e204 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2018-01-19xci: xci-deploy.sh: Drop warning for CentOSMarkos Chandras1-7/+0
The basic support for CentOS has been merged and it passes the CI so drop the warning. Change-Id: I70e6ba0fcd851d2eb9bfcb24d185276ed68c1005 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-01-15Enable running on CentOS/RedHat familyTapio Tallgren1-5/+3
Changes that make it possible to run XCI on CentOS: - Remove the check on xci-deploy.sh script that exists on RedHat family (including CentOS) and making the error into a warning. - Add centos to a distro in opnfv-scenario-requirements Change-Id: Ief6f1e50d8c7c9d8787641827e57682a6e0549e4 Signed-off-by: Tapio Tallgren <tapio.tallgren@nokia.com>
2018-01-08xci: Rename 'nfvi' to 'installer'Markos Chandras1-7/+7
Using 'installer' to describe the tool that will deploy the foundations of a particular XCI scenario is more appropriate than NFVI which normally describes both the physical and virtual resources needed by an NFV deployment. Change-Id: Ib8b1aac58673bf705ce2ff053574fd10cb390d71 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-01-03xci: Decouple VM distribution from host OSMarkos Chandras1-8/+6
Introduce a new XCI_DISTRO variable to select the distribution to deploy on the VMs in order to make deployments more flexible and decouple the VM OS selection from the host one. The default value for this new variable is to match the host OS but users can always set it to one of the supported distributions. We can now simply execute the install-ansible.sh script instead of sourcing it in order to keep the environment as clean as possible. Change-Id: Ia74eb0422f983848cde0fb7b220ea1035dfa78bc Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-01-03[XCI] move osa files into xci/nfvi/osa/fileswutianwei1-2/+2
we maybe introduce other NFVI in the future in XCI. it is necessary to put the nfvi files to corresponding directory xci/nfvi/$NFVI/files, otherwise the files directory will be confused. Change-Id: Iea98167ff0bc8d338a94fe1c064ac0ab396c53d3 Signed-off-by: wutianwei <wutianwei1@huawei.com>
2017-12-19Rename variable OPNFV_SCENARIO to DEPLOY_SCENARIOFatih Degirmenci1-3/+3
Rest of the OPNFV projects use the variable DEPLOY_SCENARIO so XCI should be aligned with them as well even though OPNFV_SCENARIO fits better than DEPLOY_SCENARIO. Change-Id: Id48c41fa8a1fa9493cfc7a4906f64b6d8ed27d64 Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2017-12-15xci: Move OpenStack-Ansible out of the main scriptMarkos Chandras1-182/+7
In preparation for supporting more NFVIs in XCI, we need to make the main script NFVI agnostic. Right now, our NFVI is being deployed using bifrost+OSA so we keep bifrost in the main script since the hardware provisioning is NFVI agnostic (at least for now) but we move OSA to its own directory. This should allow more NFVI to plug into XCI by simply providing a nfvi-deploy.sh script. The user can select the preferred NFVI using the XCI_NFVI variable. Change-Id: Ieeacd3b22a64d363feff5d43ff23a80c39038837 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-12-13xci: Fix checkout location for OpenStack-AnsibleMarkos Chandras1-7/+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-12Connect sfc-odl scenario with xciManuel Buil1-0/+1
Change-Id: I5a3f533f61b6572d8070fe5f0a306ef9d418ced8 Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-12-12Merge "xci: Ensure we are in the root directory for bug reports"Markos Chandras1-0/+1
2017-12-12Merge "xci: Use local playbooks for XCI deployments"Markos Chandras1-6/+8
2017-12-11xci: Ensure we are in the root directory for bug reportsMarkos Chandras1-0/+1
During the XCI deployment we change directories in too many places. As a result of which, when something breaks, we may be outside the releng-xci checkout directory so we need to enter it again for all the git commands to work. Change-Id: I6adcff396fc5d7cce8bb07353dec26b76b1825a4 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-12-11xci: Use local playbooks for XCI deploymentsMarkos Chandras1-6/+8
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-12-11xci: Make it easier to use OpenStack-Ansible stable branchesMarkos Chandras1-0/+14
It seems it is desirable for projects to use stable OpenStak-Ansible and OpenStack releases in general. However, merely overriding OPENSTACK_OSA_VERSION doesn't work because role requirements and OpenStack services have to be adapted too. Despite the Documentation warning users about this, seems like nobody remembers to read and do the necessary steps. However, this leads to numerous invalid bug reports due to this stable/master mix. Lets try to help improving this situation by doing all the necessary ground work if we detect that we are using a stable branch. Change-Id: I2ba5d7e7942109973b6a6523aae2c01b65e61fe7 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-12-05Merge "Do not execute ironic node-list"Markos Chandras1-3/+0
2017-12-05Merge "xci: Allow variable overrides from external scenarios"Markos Chandras1-2/+2
2017-12-05Do not execute ironic node-listFatih Degirmenci1-3/+0
This command has been removed in order to solve the issue caused by executing the command outside of venv. Apart from that, it doesn't add much value to the process in general either. Change-Id: Ice7edc5adbd3dd2e2bbde57b8cebd92416825597 Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2017-12-01xci: Allow variable overrides from external scenariosMarkos Chandras1-2/+2
All scenarios are being cloned to XCI_SCENARIOS_CACHE so look there for the various override files. This will allow external scenarios to influence the XCI environment. Change-Id: I39a48ce55baaa29d09737ce6232867ef1165f099 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-30Replace the OPNFV hardcoded IPVictor Morales1-3/+3
The xci-deploy.sh script has an IP address which has been replaced for OPNFV_HOST_IP environment variable. This commit completes that change. Change-Id: I285b6a5b88fb15e7b68a94e95634d9d289d8659a Signed-off-by: Victor Morales <victor.morales@intel.com>
2017-11-29xci: Drop OPNFV_RELENG_DEV_PATH variableMarkos Chandras1-13/+13
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-22Add the libvirt DNS to resolv.confVictor Morales1-1/+1
This change adds the gateway into the resolv.conf for helping to resolve some routes faster during the execution of start-new-vm.sh main script. Change-Id: I08f361f5e55589f388e6ff6613d213eb79bbbce9 Signed-off-by: Victor Morales <victor.morales@intel.com>
2017-11-21xci: Use the dib pip-and-virtualenv elementMarkos Chandras1-3/+0
The element will ensure that we have a reasonable set of pip and virtualenv packages in place as well as pick the right python version for the distribution. We also make sure that we use python2 everywhere. Change-Id: I8a83af9acffbd8d6d583832956e1685100ec508a Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-17xci: file: install-ansible.sh: Update script from latest BifrostMarkos Chandras1-0/+3
Update our own copy of the Ansible installation script to take some Bifrost fixes into consideration. We also upgrade the pip and setuptools to the latest available version if possible. Change-Id: I5e51099b2698f0b03922d1364e83bc91cfadc00c Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-27Merge "Fix typo in xci-deploy.sh comments"Markos Chandras1-1/+1
2017-10-24Fix typo in xci-deploy.sh commentsVictor Morales1-1/+1
Change-Id: Iac117beb3d4a8df85ad2453c97982adf90958833 Signed-off-by: Victor Morales <victor.morales@intel.com>
2017-10-19xci: Clone all XCI scenarios in advance similar to a-r-rMarkos Chandras1-1/+13
In order to plug the scenarios' roles properly, we need to have all roles physically present in advance. As such, add a opnfv-scenario-requirements.yml file which can be used to populate the roles directory with all the scenarios. Change-Id: I0cdadb63849e4565c31559817660d23217879053 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-17xci: xci-deploy.sh: Allow scenarios to overrides XCI variables.Markos Chandras1-0/+7
Scenario may want to override variables exported by the XCI so allow them to define their own 'xci_overrides' file in the root directory of the role to do so. Change-Id: I6648eb43831a2aecc08d745a8c0fc191ce56e1b2 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-06xci: Bump bifrost SHAMarkos Chandras1-13/+0
The latest bifrost code contains a fix when setting up DNS from a glean configuration drive and also a few virtualenv improvements. This allows us to get rid of all the workarounds we had in the past to switch Ansible versions in the middle of the XCI deployment. Change-Id: If49e290315ec96efdc07d04ff6624439c53aee19 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-03xci: xci-deploy.sh: Extend regexp when collecting env variablesMarkos Chandras1-1/+1
Not all variables start with XCI, OPNFV or OPENSTACK so extend the regexp to look for more variables. Change-Id: If3693d65eec697f6c81c608da3be5799333c28d7 Signed-off-by: Markos Chandras <mchandras@suse.de>