summaryrefslogtreecommitdiffstats
path: root/xci/xci-deploy.sh
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-08-11prototypes: xci: Make sure Ansible dependencies are installedMarkos Chandras1-1/+1
'pip install ansible' is not enough on newly installed hosts which may lack the necessary build tools to install Ansible's dependencies. As such, we add a script similar to the bifrost/scripts/install-deps.sh one to pull in all the necessary distro-specific packages so Ansible and it's dependencies can be installed from scratch. Change-Id: I4b1e74644db9ace451ad763e4c54f1a3a43214fd
2017-08-11xci: Log info about provisioned VMs to consoleFatih Degirmenci1-1/+3
Change-Id: If29aaf0be6ddd860450eeb10432fe75e12b1d03b Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Adjust and fix jobs and scriptsFatih Degirmenci1-1/+1
This change - fixes GIT_BASE in jobs - adjusts build blockers - fixes where the flavor vars should be sourced from - sources flavor vars for bifrost periodic jobs - renames the xcimaster node to opnfv to be consistent - removes obsolete xci-provision.sh script - enable additional openstack services including tempest to ensure the deployment is sane Change-Id: Ifdce1da52d68a26c2b87e1bd3b1996ec119d8d90 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Update main script and readmeFatih Degirmenci1-7/+156
This change - updates the main script to run the playbooks - creates the initial version of the readme file Change-Id: I4110433bce541a5d9645f34457f9e1b1ee93df19 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Create playbook to destroy, create and provision VM nodesFatih Degirmenci1-29/+4
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>
2017-08-11prototypes: bifrost: Remove /opt/stack from previous deploymentsMarkos Chandras1-1/+1
/opt/stack is being created by bifrost so the destroy-env.sh script should be responsible for cleaning up all the remnants. That way we can use the destroy-env.sh script outside of Jenkins as well. Change-Id: I72d9737cf2446ff3ffc02f195337a6873eceb5c0 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11xci: Rename the deployment host to opnfvFatih Degirmenci1-3/+3
Reflect the changes to other impacted files as well. Change-Id: I106f4e47fe5c75d288f4878fe6ec9f8ff39c652e Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Yet another try to find how best to structure stuffFatih Degirmenci1-1/+1
Summary of changes are - flavors directory has been removed and the flavor config files are moved into config and renamed to <flavor>-vars - common files are put under file - files specific to flavors are put under file/<flavor> directories - templates and var files are stored in template and var directories respectively - 3 playbooks are created Change-Id: I8a93e0947ccb02f93a6c8f00da27e0cc6b4dc21e Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Enable node provisioning and shuffle/rename stuffFatih Degirmenci1-1/+60
This change enables node provisioning using bifrost based on the chosen flavor. Other changes include - move flavor specific stuff (playbooks, inventory, vars) into their own folders so it is easier to copy them over. - rename flavors and get rid of xci from them. - introduce env-vars to keep variables that are not really user variables. Please note that this patch contains empty files and so on due to still trying to find best way to structurei things. Apart from this, there will probably be lots of duplications here and there which will be taken care of once things settle. Change-Id: I04a5d422e5b018439bafea5e68e65255ae38d22b Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Set up the basics for xci developer sandboxFatih Degirmenci1-0/+17
This change creates - initial version of the script to initiate the VM node creation and provisioning with bifrost and OpenStack installation with openstack-ansible - pinned-versions to hold the "known working" versions. releng will use master until the development is complete. - user-vars to hold user variables - configuration files to keep settings for different flavors - ansible files (playbooks, inventory files, variables) per flavor. These files are empty at the moment in order to save the chosen path makes sense. Once the way is agreed on, these will be similar to the files listed below with different content per flavor. https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=blob;f=prototypes/openstack-ansible/playbooks/inventory https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=blob;f=prototypes/openstack-ansible/playbooks/configure-xcimaster.yml https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=blob;f=prototypes/openstack-ansible/var/ubuntu.yml These new files will be the ones used when the actual deployment is done with openstack-ansible based on the flavor chosen by developer (or CI). Change-Id: Ia2f38416a161abd186cbcca61e105c6a68f78b54 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>