summaryrefslogtreecommitdiffstats
path: root/bifrost/playbooks
AgeCommit message (Collapse)AuthorFilesLines
2018-03-09bifrost: Optimize the OPNFV bifrost playbookMarkos Chandras1-31/+11
We could combine several plays into a single one when they are executed to the same set of nodes. This has the added benefit that we avoid all the Ansible warm-up operations when a new play is started. Change-Id: Ibcad07d1b74f1d7cc5a9c60e4b2a6130fb6178fd Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-08bifrost: Ensure OS images are present in the PXE directoryMarkos Chandras1-2/+2
The XCI deployment script may wipe the PXE directories so we need to place the OS images after this has happened so we don't download them every time. Change-Id: Iccf943bc75592e7f5dddea59dfee14b2b080e7ef Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-07bifrost: Use the pre-built XCI OS images instead of dibMarkos Chandras1-2/+46
We already have images for all 3 distros which we could simply re-use for all the XCI VM deployments instead of building new ones everytime with DIB. The images will be copied to the new VM from the cache directory if they are available otherwise we will simply download them during the XCI execution phase. Change-Id: I2a8391650558511668654c6b54a10db316f867a2 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-12-20bifrost: Bump bifrost SHAMarkos Chandras1-62/+0
Bump the bifrost SHA so we can get rid of the testvm.xml.j2 template which has now made it upstream. Change-Id: Ia9cdd999a5702f37125d38e0ba68bb31920d2117 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-12-18bifrost: Set vCPU model to 'host-passthrough'Markos Chandras1-0/+62
The default CPU model of QEMU GenuineIntel/QEMU Virtual CPU is not the best option for vCPU in terms of performance. As such, lets use the real host CPU. This has also been submitted upstream and the template should be removed once the upstream patch has been merged and the SHA for bifrost is bumped. Change-Id: I23d86933604c290d5650b73f420972d0a2b23dc8 Link: https://review.openstack.org/#/c/528677/ Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-21xci: Use the dib pip-and-virtualenv elementMarkos Chandras1-1/+3
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-08-11prototypes: bifrost: Do not use tmpfs for dib buildsMarkos Chandras1-0/+2
Using tmpfs seems somewhat unstable. For example the following error is observed on openSUSE hosts ERROR: failed to umount the /tmp/dib_image.RJBbahUd tmpfs As such, we set the dib_notmpfs variable to 'true' which mimics what upstream OpenStack scripts are doing already in project-config:tools/build-image.sh Change-Id: If050ab70303b3556fc1880a956f0ba1505d62050 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: bifrost: Remove OPNFV specific group_vars fileMarkos Chandras1-53/+0
The only reason we had this file was because we had to define our own 'ssh_public_key_path' variable to look in the /root directory since we were running everything as root. Since we are now moving away from this approach, this file is not needed anymore. Change-Id: Ic938c4c8c877c95ce261721dc32fc5147081e236 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: bifrost: Write clouds.yaml file for regular usersMarkos Chandras1-6/+1
This is similar to commit 6769ae9bcbf6 ("prototypes: bifrost: Add keystone roles"). In preparation for running the bifrost jobs as normal user we need to write a clouds.yaml file to users home directory. This is similar to the bifrost upstream testing playbook. Change-Id: Iae4bc73906649707667925280a19282ec5c93998
2017-08-11prototypes: bifrost: Add keystone rolesMarkos Chandras1-0/+15
The os_client_config Ansible module used by all the ironic-* roles depends on the keystone roles so we need to make use of them even though they do not affect the end result. This fixes the following OPNFV CI problem due to not having a clouds.yaml file present to be consumed by the os_client_config Ansible module. fatal: [controller00]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"} An exception occurred during task execution. The full traceback is: Traceback (most recent call last): File "/tmp/ansible_ApkCUQ/ansible_module_os_client_config.py", line 75, in <module> main() File "/tmp/ansible_ApkCUQ/ansible_module_os_client_config.py", line 63, in main for cloud in config.get_all_clouds(): File "/usr/lib/python2.7/site-packages/os_client_config/config.py", line 798, in get_all_clouds cloud, region_name=region['name'])) File "/usr/lib/python2.7/site-packages/os_client_config/config.py", line 1071, in get_one_cloud auth_plugin = loader.load_from_options(**config['auth']) File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/base.py", line 162, in load_from_options raise exceptions.MissingRequiredOptions(missing_required) keystoneauth1.exceptions.auth_plugins.MissingRequiredOptions: Auth plugin requires parameters which were not given: auth_url fatal: [opnfv]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"} Moreover, we cleanup the ~/openstack directory which may contain some bifrost artifacts such as a clouds.yaml file. Finally, we use 'sudo -H' because for the keystone roles we need the HOME variable to be set properly. Change-Id: I45b08bd33dd8ea9505fe10eb4b2b10956b3b683c
2017-08-11prototypes: bifrost: Remove ironic templatesMarkos Chandras2-158/+0
This effectively reverts d8235c3c97f4 and 7c1b8bf89d6ce since upstream has now fixed the issues reported in https://review.openstack.org/#/c/450681/ Change-Id: I35588146654d9141bc9357faa3d44e8799c5b706 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: bifrost: Fix Ironic drivers for VMsMarkos Chandras1-1/+1
Commit d8235c3c97f4("Set database pool_size in ironic.conf and inspector.conf templates") added a copy of the ironic.conf.j2 template file to workaround an upstream bug but it also changed the default ironic drivers leading to broken introspection. We use virtual BMC for controlling the VMs and this expects ipmi ironic drivers so we fix that. Change-Id: Ibb2cc58738ec1693e136bdce7335cd1b861ec613 Fixes: d8235c3c97f4("Set database pool_size in ironic.conf and inspector.conf templates") Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11Set database pool_size in ironic.conf and inspector.conf templatesFatih Degirmenci2-0/+158
min_pool_size and max_pool_size are undefined in ironic.conf and inspector.conf templates, causing issues during ironic-dbsync and ironic-inspector-dbsync. https://build.opnfv.org/ci/job/opnfv-bifrost-verify-trusty-virtual-master/224/console This issue is there for stable/ocata as well. These should be got rid of once the patch on openstack/bifrost is merged. https://review.openstack.org/#/c/450681/ Change-Id: I678835e763022a7168e498047bb65d140895e019 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Updates to releng/bifrost to make it work on JenkinsFatih Degirmenci1-0/+53
- get rid of BAREMETAL_DATA_FILE and use BIFROST_INVENTORY_SOURCE so it works both for master and ocata for osa-bifrost. - set BIFROST_INVENTORY_SOURCE file according to branch bifrost is executed from for osa-bifrost. - explicitly set what the SSH public key file is as ansible copies the wrong public key to nodes if bifrost is executed on Jenkins using sudo. - set branches if they are not set so the scripts can be used manually as well. - rename jumphost to xcimaster so people do not mix it with actual jumphost located in Pharos PODs. Change-Id: Iff7631fa99816ad75316b62c5ac20714f67cd86a Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Enable VM provisioning using bifrost for daily runsFatih Degirmenci1-1/+1
- create script to provision VMs (log upload is not enabled yet) - remove leftover inventory files (baremetal.csv, baremetal.json) - set BIFROST_INVENTORY_SOURCE as needed by stable/ocata - rename playbook used during bifrost and adjust scripts using it - remove puppet-infracloud stuff Change-Id: I1c4412d0725c00ab9a1b3497e358d33998b4e7e6 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11prototypes: bifrost: Fix ELEMENTS_PATH for latest diskimage-builder releaseMarkos Chandras1-1/+1
Upcoming diskimage-builder version (2.0.0) changed the location on where dib elements are installed from /usr/share/diskimage-builder to /usr/lib/$python/diskimage_builder/. However, base elements are included by default so fix the script to set ELEMENTS_PATH to the path of our out-of-tree elements. Change-Id: Ib5c4e1465a67a819c9d495b0e0a64addeb0294cb Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11bifrost: Make use of the new 'openssh-server' dib elementMarkos Chandras1-1/+2
Make use of the new 'openssh-server' dib element to achieve a consistent behavior of ssh server across all distributions. Change-Id: Ib10066a244fe44530969702cd465cdd79454b8fe Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11playbooks: Do not serialize ironic deploymentMarkos Chandras1-4/+4
[This is similar to upstream https://review.openstack.org/389079] This somewhat reverts 0a82e3d8d29f85229e1ed29d90de47346bc1d9b1 ("Serialize localhost actions during final host deployment"). The only point where we want to serialize the steps is when accessing common files on the host. In the bifrost-deploy-nodes-dynamic role, all tasks are accessing files based on the 'inventory_hostname' variable, which means there is no conflict there and tasks on these role can run in parallel. This allows bifrost to provision machines in parallel during pxe boot which speeds up the entire operation. Change-Id: I64b1f2832c333c89e33e8f9d19f03e4d653d74b4 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11bifrost: Serialize localhost actions during final host deploymentMarkos Chandras1-3/+8
Several tasks in the final playbooks run locally and there is a chance to encounter race conditions when multiple tasks run in parallel and all access or modify the same local files. We fix this by splitting the final steps into multiple plays and serializing those that run locally. Change-Id: I38c3465d9c4714d9db772f9ff9e32ec1d4a91db8 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11Set the wait_timeout variable to the deployment scriptMarkos Chandras1-4/+0
There is no point in us keeping our own copy of the upstream bifrost-prepare-for-test-dynamic playbook just for overriding the wait_timeout variable. Delete the duplicate role and move the variable definition to the deployment script instead. Change-Id: Ib8066fefe80e9a3190d878eb5dba7b8d86a85e07 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11Parameterize infracloud playbook by platformsYolanda Robla Mota1-2/+15
This will allow to run on different distros depending on settings exported. Change-Id: I068d7bb2eebfd009dceeff057c8a65361483788b Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
2017-08-11Add missing curl package for infracloudYolanda Robla Mota1-1/+1
It is needed on rabbit install Change-Id: I0ebf66883cc7c66771b3b5b4c2cccc590e61e5ca Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
2017-08-11Adjust bifrost node provisioning timeout and fix file permissionsFatih Degirmenci1-0/+4
This change - increases the node provisioning timeout to 1900 seconds since the original timeout used by upstream bifrost (900 seconds) is not suited for provisioning VMs with Ubuntu. - fixes permissions of the scripts. - removes .gitkeep. This change is not upstreamed since bifrost uses cirros for test & development purposes and it is probably not in their interest to have increased timeout. Change-Id: I4b59a321fa26f8b5895ec577a19d10f5cdcace0f Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11Add initial playbooks and scripts for bifrost POCSYolanda Robla Mota1-0/+66
Change-Id: Ic7e33f53d0111b0e833d7547fff16458506b063b Signed-off-by: Yolanda Robla <yroblamo@redhat.com>