summaryrefslogtreecommitdiffstats
path: root/bifrost/scripts/bifrost-provision.sh
AgeCommit message (Collapse)AuthorFilesLines
2018-03-20Add initial support for multiple infra deployersMarkos Chandras1-181/+0
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-12xci: Rename XCI_ANSIBLE_VERBOSITY to XCI_ANSIBLE_PARAMSMarkos Chandras1-3/+3
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-09bifrost: Move DIB configuration variables to bifrostMarkos Chandras1-0/+20
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-08bifrost: Ensure OS images are present in the PXE directoryMarkos Chandras1-0/+6
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-1/+3
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>
2018-03-07Bump bifrost sha and set UPPER_CONSTRAINTS_FILEFatih Degirmenci1-0/+3
The lack of UC means that pip is attempting to install libvirt-python 4.1.0, which is failing on Ubuntu due to https://bugs.launchpad.net/openstack-requirements/+bug/1753539. Currently upper-constraints limits libvirt-python to 4.0.0, which does not have this issue. Change-Id: Idc97a0d9928cebafc9167614723236d2584cc93f Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2018-02-23xci: Switch default CPU model to 'host-model'Markos Chandras1-2/+2
From upstream docs: 'The host-model mode is essentially a shortcut to copying host CPU definition from capabilities XML into domain XML. Since the CPU definition is copied just before starting a domain, exactly the same XML can be used on different hosts while still providing the best guest CPU each host supports' It's probably safer to use that instead of 'host-passthrough' so we can get a CPU (both for main VM and the nested ones) that libvirt understands. Moreover, it's important to present a CPU that the guest OS understands as well. Change-Id: I25a8ff0e8635df9804c793d184f048cc86059ce0 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-02-20xci: Switch VM disk cache to 'unsafe' and use 'iothreads' for I/OMarkos Chandras1-1/+1
According to the docs[1] "writeback: This mode causes the hypervisor to interact with the disk image file or block device with neither O_DSYNC nor O_DIRECT semantics. The host page cache is used and writes are reported to the guest as completed when they are placed in the host page cache. The normal page cache management will handle commitment to the storage device. Additionally, the guest's virtual storage adapter is informed of the writeback cache, so the guest would be expected to send down flush commands as needed to manage data integrity. Analogous to a raid controller with RAM cache." and "writeback: This mode informs the guest of the presence of a write cache, and relies on the guest to send flush commands as needed to maintain data integrity within its disk image. This is a common storage design which is completely accounted for within modern file systems. This mode exposes the guest to data loss in the unlikely case of a host failure, because there is a window of time between the time a write is reported as completed, and that write being committed to the storage device." "unsafe: This mode is similar to writeback caching except for the following: the guest flush commands are ignored, nullifying the data integrity control of these flush commands, and resulting in a higher risk of data loss because of host failure. The name “unsafe” should serve as a warning that there is a much higher potential for data loss because of a host failure than with the other modes. As the guest terminates, the cached data is flushed at that time." It's beneficial to use the host page cache to cache I/O from the guest instead of waiting for data to reach the actual disk device. We do not normally care about data integrity so data loss is not a problem. Moreover, we drop the cache configuration from the flavor files since it's independent of the flavor that's being deployed. [1] https://www.suse.com/documentation/sles-12/singlehtml/book_virt/book_virt.html#cha.cachemodes Change-Id: I118ffdf84b1be672185b3eff60fe5d0b5f1a590d Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-02-19bifrost: scripts: bifrost-provision.sh: Set defaults for Ironic variablesMarkos Chandras1-0/+5
When running the bifrost jobs for the OPNFV 3rd Party CI, the Ironic variables are not defined and we get the following error: ./scripts/bifrost-provision.sh: line 112: BIFROST_IRONIC_INSPECTOR_VERSION: unbound variable As such, we need to provide reasonable defaults when we are running this script outside of XCI. Change-Id: I9cc3ae1b70494637a85558b9cae99fc1eeaebc74 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-02-13bifrost: Add ability to pin Ironic-{,client,inspector,inspector-client} SHAsMarkos Chandras1-1/+5
We should pin the SHAs for Ironic components as part of the regular bifrost bump to ensure maximum long term stability. This also bumps the bifrost SHA to the latest available one. Change-Id: Ia66d8ab6566db58e2ddab5134eb8445bd84d2a8f Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-02-13bifrost: Always deploy Ironic from masterMarkos Chandras1-1/+4
The Ironic components are currently being installed from PIP but we should install them from the git repo instead so we can always try the latest code from master or the pinned version when such functionality is implemented. Change-Id: I0138c54befe52ed9df8bf617b78e063df3cf8750 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-12-18Merge "Increase ram of XCI VM and change disk cache type for all VMs"Fatih Degirmenci1-1/+1
2017-12-18bifrost: Set vCPU model to 'host-passthrough'Markos Chandras1-0/+2
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-12-18Increase ram of XCI VM and change disk cache type for all VMsFatih Degirmenci1-1/+1
These options seem to help with the functest execution within XCI VM. Change-Id: I3b9b6b02fc571feb42543025f8ab179c6db18e0a Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2017-12-13xci: Reduce noise during bootstrappingMarkos Chandras1-19/+3
There is too much noise when XCI is cloning repositories, installing packages etc so lets make the console output somewhat more readable. Change-Id: I15667e0349f943ad5488daf0e3cea9336c9166d1 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-10Merge "xci: Bump bifrost SHA"Markos Chandras1-1/+1
2017-10-06bifrost: bifrost-provision.sh: Always initialize XCI_ANSIBLE_VERBOSITYMarkos Chandras1-0/+3
The XCI_ANSIBLE_VERBOSITY is normally exported by the XCI bootstrapping process. However, sometimes it's necessary to run bifrost-provision.sh by itself so we can debug machine provisioning. As a result of which, we need to initialize this variable properly so we don't fail with 'unbound variable' errors. Change-Id: I81c59cf8eb3369c001e952c2c0a2846ed8d95cdf Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-06xci: Bump bifrost SHAMarkos Chandras1-1/+1
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-09-27xci: Replace ANSIBLE_VERBOSITY with XCI_ANSIBLE_VERBOSITYMarkos Chandras1-4/+6
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-21xci: Move VM provisioning to xci-deploy.shMarkos Chandras1-1/+1
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-18bifrost: scripts: Do not run env-setup twiceMarkos Chandras1-6/+0
This is already done a few lines above since I94874d600a29247b7826324cc111901995df90dc so there is no need to do it twice. Change-Id: I661516d9aadd265bf6869005718b2f51c57ff84d Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-15xci: env-vars: Bump Ansible version to 2.3.2.0Markos Chandras1-9/+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-15bifrost: Use virtual environment for bifrostMarkos Chandras1-1/+16
bifrost forces us to use an old Ansible version which means we can't take advantage of new features in XCI playbooks. As such, we move the entire bifrost step to a virtual environment so we can have a newer version of Ansible on the host. Change-Id: I94874d600a29247b7826324cc111901995df90dc Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-16bifrost: scripts: Disable selinux on Centos7Markos Chandras1-0/+10
We are seeing issues with selinux enabled from time to time. Having selinux enabled has proven to be rather unstable and Centos7 not being a gate on upstream bifrost does not help in fully testing this scenario. As such, the best we can do right now is to disable selinux until Centos7 becomes a gate upstream. Change-Id: I93a3414cfebc3c3ef4ac063c8e623f36f615455f Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: bifrost: Switch Ubuntu targets to Xenial (16.04)Markos Chandras1-2/+2
Switch default target OS to Ubuntu Xenial (16.04) which is also the version which is supported by OpenStack Ansible. Change-Id: I73adc6472b0fb572177e1508cf831b4d3190245c Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-08-11prototypes: bifrost: Add keystone rolesMarkos Chandras1-2/+2
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-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: Configure ansible verbosity based on job typeFatih Degirmenci1-6/+7
Daily jobs will use pinned versions of bifrost and openstack-ansible in order to make sure we use known good versions for them since focus of the daily jobs is OPNFV platform testing. Ansible log can easily become massive depending on the level it is set and it is not so relevant for daily jobs to have it like this due to less probability of dailies failing to provision/deploy. On the other hand, the jobs that verify/test bifrost and openstack-ansible will have max verbosity enabled to troubleshoot these components themselves. New set of jobs will be created running periodically against the HEAD of master for bifrost and openstack-ansible to catch working versions and help us promote them to use for daily platform jobs. Verbosity of these jobs will be enabled like how we are doing for bifrost-verify jobs. Change-Id: Ic9fd2ff418fdaa3ad7fbfc22d8ec2dc1174df65f Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
2017-08-11xci: Merge bifrost provisioning scripts and renameFatih Degirmenci1-0/+132
Jobs are adjusted as well. Change-Id: I0bc5bdda37277053d81d7da394e0156902da817a Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>