summaryrefslogtreecommitdiffstats
path: root/xci/xci-deploy.sh
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-10-03Merge "xci: xci-deploy: Add simple error handler"Markos Chandras1-1/+29
2017-10-03xci: xci-deploy: Add simple error handlerMarkos Chandras1-1/+29
Add a simple function to collect useful information when submitting bug reports. Change-Id: If24b76d2742edffa2269d39dcc998675d1388214 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-02xci: xci-deploy.sh: Fix variable names for bifrost and OSAMarkos Chandras1-1/+1
The correct variable name is OPENSTACK_{BIFROST,OSA}_DEV_PATH instead of OPNFV_{BIFROST,OSA}_DEV_PATH. JIRA: RELENG-312 Change-Id: I6c1349434d2ff8f82e1bccd1a758467c3ee0a61f Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-28xci: xci-deploy.sh: Apply workaround for checking db cluster on SUSEMarkos Chandras1-0/+7
The mysql socket path is wrong on SUSE which leads to problems when trying to verify the status of the db cluster. Apply workaround until it's fixed upstream controller00_galera_container-56c89184 | FAILED | rc=1 >> ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") Change-Id: I23192f4079526ae7820a1db023a097a651a09140 Link: https://review.openstack.org/508154 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-27xci: Replace ANSIBLE_VERBOSITY with XCI_ANSIBLE_VERBOSITYMarkos Chandras1-9/+9
The ANSIBLE_VERBOSITY env variable is actually used internally by Ansible and exporting it actually makes Ansible super verbose even if the variable is empty. This feature is going away in the future so we introduce our own XCI_ANSIBLE_VERBOSITY variable which is simply passed to the command line to control verbosity in a proper and deterministic way. Change-Id: I8a32eeb1a86b4cb0a9872a51bbe9f9624d096e39 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-27xci: xci-deploy.sh: Make sure all local Ansible installations are goneMarkos Chandras1-1/+8
We need to ensure that all Ansible installations are gone before we install it again so we can ensure that a local or system wide installation will not take precedence over the one we try to install. Change-Id: I9daf66d661697baf63340ba4af1cd58fbd81f143 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-23Log Horizon URL, admin username and password on console.Taseer Ahmed1-0/+21
Added so that user need not traverse files for these parameters JIRA: RELENG-221 Change-Id: I1c445ea34ef9494d5bef3a6cba0c8d40bacba29f Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
2017-09-21xci: xci-deploy.sh: Ensure env_reset is not presentMarkos Chandras1-0/+2
We are making use of 'sudo -E' to preserve environment variables when using 'sudo' so we need to make sure that we don't use env_reset in the configuration file. Change-Id: I45a818da6c5c090ece67898e54f2dc4ba48cb452 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-21xci: Move the destroy-env.sh script to xci-deploy.shMarkos Chandras1-0/+2
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: Move VM provisioning to xci-deploy.shMarkos Chandras1-0/+9
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-17xci: synchronize-time: Install the chrony package and drop Xenial referenceMarkos Chandras1-1/+1
The roles should pull all the packages they need so we need to install the 'chrony' package everywhere and also drop the Xenial reference since there is nothing Ubuntu specific here. Change-Id: I51fb24573c0e884f8a96868e304b23140cc23b41 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-17xci: configure-nfs: Install the NFS server packageMarkos Chandras1-3/+3
We need to explicitly install the nfs server package instead of bundling it to the dib image since not every node needs it. Change-Id: I73f59f4ed582359df80ea08712b433537c087aea Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-16xci: xci-deploy.sh: Allow xci-deploy.sh to run on SUSE hostsMarkos Chandras1-4/+4
SUSE support is slowly being added to XCI. Change-Id: I1ab6c01d3a33a9b2264992b5e1d202146972743f Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-16xci: xci-deploy.sh: Configure dib so VMs match the hostMarkos Chandras1-0/+24
In preparation for adding SUSE support, we need to configure the dib build process to build images which match the host's OS. Change-Id: I4944245d526f916b2033abc5d219fa7a69db54ab Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-15xci: env-vars: Bump Ansible version to 2.3.2.0Markos Chandras1-4/+4
Now that bifrost uses virtual env for Ansible we can go ahead and bump the Ansible version to match the one from OSA so we can make use of the latest features. Furthremore, we stop passing ANSIBLE_VERBOSITY to the command line since it's an environment variable so Ansible already knows about it. Change-Id: I52d9a211fc0ced1f7830f6945b2943f35d38109b Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-15Disable strict host key checking for galera cluster checkFatih Degirmenci1-3/+3
The command to check the galera cluster fails due to having strict host key checking enabled. This change disables strict host key checking for galera_container to ensure we can verify if the database cluster is operational. OSA does this for aio on their gate and put host key checking configuration to group_vars which we might need to do as well. Change-Id: Ifc59581d979c71f1db1b87126659470dc85cc2db Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-09-14Generate and use certificates for OSAYolanda Robla1-2/+2
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-09-14Merge "xci: xci-deploy.sh: Do not 'tee' ssh output"Markos Chandras1-10/+10
2017-09-14xci: xci-deploy.sh: Do not 'tee' ssh outputMarkos Chandras1-10/+10
Using 'tee' to capture 'ssh' command output randomly breaks with the following error: tee: standard output: Resource temporarily unavailable Lets just store the log on the host and copy it back in the end. Change-Id: I41edac138b8642e8765d5c1e5974b375b5b3203b Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-08Add ~/.local/bin to PATH if it is not there alreadyTapio Tallgren1-0/+4
Change-Id: Ie9481ce8ec891313b613d824a8f8943e706884f7 Signed-off-by: Tapio Tallgren <tapio.tallgren@nokia.com>
2017-08-31keepalived: Bring in the fix for iteritems for python3Fatih Degirmenci1-10/+0
This change moves the keepalived role version to commit b13e08 in order to bring the fix applied in upstream, switching from iteritems to items for python3. [1] The flavor ha is enabled back due to incorporating the fix to xci and the note in README.rst is removed as well. https://github.com/evrardjp/ansible-keepalived/commit/b13e0840b09154a6d2470f71fea8eaa968525c5b Change-Id: I6e03f579f1107475f4b4adf54699fc4f924beec3 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-23xci: Bump OSA SHA to Pre-PikeFatih Degirmenci1-19/+40
This change bumps osa sha to 4d39f2cc. [1] The reason for going to a later osa sha is to include ODL and Tacker commits in upstream to ease the work done for ODL and SFC scenarios. However, this osa sha seems to be having issues with the flavor ha so the users should be aware of the problems which is added into the readme as known issue and the flavor is disabled in xci-deploy.sh. Another reason to bump sha right now is that upstream changed a lot during last 2 months and waiting longer will probably result in more changes, making it harder to move to a later osa sha even harder. Other changes included by this change are - update ansible role requirements to move to shas pinned by upstream for pike. - add odl and tacker roles into ansible role requirements. - update how aio is deployed due to removal of an upstream script. (this could perhaps have been done in a better way but the time pressure required this to be fixed in the way as proposed.) - ensure facts are gathered for all the hosts and containers before running setup-infrastructure.yml playbook. - stop grepping for failed in the log of setup-hosts.yml playbook due to existence of rescue block in rabbitmq_cluster_create.yml [2]. - reduce the resource needs by updating the user_variables that are based on upstream osa gate which uses aio. The values for none-aio xci flavors will be adjusted in a separate change once the sha bump is complete. - fix a bug in ha-vars. [1] https://review.openstack.org/gitweb?p=openstack/openstack-ansible.git;a=commit;h=4d39f2cc29417153780210fc0bb86223387e9968 [2] https://review.openstack.org/gitweb?p=openstack/openstack-ansible-rabbitmq_server.git;a=blob;f=tasks/rabbitmq_cluster_create.yml;h=4aaad5adafa42684c0d791b49539069fe1b45635;hb=HEAD#l24 Change-Id: Ia7fc495e315e4a41359641f8be4b3c8bbf7b61fa Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-17Merge "Refactor releng/prototypes/xci to releng-xci/xci in the code"Fatih Degirmenci1-7/+7
2017-08-17prototypes: xci: xci-deploy.sh: Only allow XCI on UbuntuMarkos Chandras1-0/+9
There is no support for openSUSE or CentOS right now yet the script runs happily on these hosts until it breaks in horrible ways. The only place we explicitly ask for Ubuntu hosts is the wiki which can easily be missed by newcomers. As such, modify the script to only run on Ubuntu hosts. Change-Id: If9b355da51367fc95948a2b12a7f6c4d6b3bbbbf 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-11prototypes: xci: xci-deploy: Set default value for devel parametersMarkos Chandras1-1/+1
Commit 68412ffc734e ("prototypes: xci: xci-deploy.sh: Append trailing slash for rsync vars") modified xci-deploy.sh script to append a trailing slash to the devel variables but it broke the script when one of these variables was not set (since we run with 'set -eu') with the following error: ./xci-deploy.sh: line 45: !local_user_var: unbound variable Fixes: I0103b754585931fa1dcd3966c52d7e4a8f2f63f6 Change-Id: Ic2465ff07348b61e74e191516425cd10d80c1fce Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: xci: xci-deploy.sh: Append trailing slash for rsync varsMarkos Chandras1-0/+9
The 'synchronize' Ansible module uses rsync and for that we need to indicate that we want to copy the contents of the development path and not the development path itself. As such we need to ensure that a trailing slash is always appended to the user variables but we need to also ensure that we will not end up with double slashes. Change-Id: I0103b754585931fa1dcd3966c52d7e4a8f2f63f6 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: xci: xci-deploy: Do not use sudo when connecting to remote hostsMarkos Chandras1-4/+4
In preparation for running xci-deploy as normal user, we do not need to gain elevated privileges in order to connect to remote hosts. SSH keys will be placed in user's ssh directory so we can ssh as normal user. Change-Id: Ieb705515ec191955a646839e8f195d089df184bd Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: xci: Do not require root privileges in xci-deployMarkos Chandras1-4/+6
There is no good reason to run the script as root. If elevated privileges are required then we will do it on a per case basis. Change-Id: I7195fb3a0026ea20ce04e0b652dd3c1c56ca5741 Signed-off-by: Markos Chandras <mchandras@suse.de>