summaryrefslogtreecommitdiffstats
path: root/xci/infra/bifrost/scripts
AgeCommit message (Collapse)AuthorFilesLines
2018-06-28Use PDF to set up the XCI VMsManuel Buil2-176/+33
This patch is doing the first work item of the spec: https://github.com/opnfv/releng-xci/blob/master/docs/specs/infra_manager.rst It creates the required VMs by XCI to afterwards deploy the VIM. It does that by reading the pdf provided by the user. - It is currently assumed that the OS for the VM will be installed in the first disk of the node described by the pdf - It is assumed that the opnfv VM characteristics are not described in the pdf but in a similar document called opnfv_vm.yml - All references to csv from bifrost-create-vm-nodes were removed Change-Id: I46a85284e4ce7df21cbf66f66619b35f74251e68 Signed-off-by: Manuel Buil <mbuil@suse.com> Co-Authored-by: Markos Chandras <mchandras@suse.de>
2018-04-17xci: infra: bifrost: Use XCI virtual environment for bifrostMarkos Chandras1-2/+10
We have already prepared a virtual environment for XCI so we may as well use it for bifrost as well. Change-Id: I084e5da7259a392c5d58e62e7985feb75bb45fb2 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-04-06xci: bifrost: Fix unbound variable errorMarkos Chandras1-1/+1
If we are not in a virtual environment, then VIRTUAL_ENV is going to be unset and we will fail with the following error: ./scripts/bifrost-provision.sh: line 105: VIRTUAL_ENV: unbound variable As such, we need to provide a default value if that variable is unset. We also fix a typo in the _sudo variable. Change-Id: Ic018716c03ffba6e8e742e34720ea462b85341be Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-04-04xci: bifrost: Use 'sudo' to install dependencies for bifrost jobsMarkos Chandras1-2/+4
When bifrost jobs are being executed, the virtual environment hasn't been prepared yet because that's something that bifrost does later on. As such, we need to use sudo to install the required dependencies to avoid the following issue: Exception: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install **kwargs File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files isolated=self.isolated, File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files clobber(source, lib_dir, True) File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 316, in clobber ensure_dir(destdir) File "/usr/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir os.makedirs(path) File "/usr/lib64/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/pbr' Change-Id: I081884ec18d27af19a053bf5b734f6f3846c60f1 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-28xci: infra: bifrost: Make sure XCI variables are defined firstMarkos Chandras1-7/+7
It's best to define all the XCI variables before everything else to ensure that all subsequent bifrost variables are properly defined. Change-Id: Id4a9e0c89e8dd32b852cfef6b9bb336c4b75f5a7 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-26xci: infra: bifrost: Define more XCI variables for bifrost jobsMarkos Chandras1-0/+3
This is similar to eeb906a553d6ddf70ffc5af1acadb33a13ff5990 ("xci: infra: bifrost: Set XCI_DISTRO if it's not defined") so we need to define more XCI variables if we are running the standalone bifrost jobs. Change-Id: I112cfbfdda677174bdb0d0afef73f035c74cb79e Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-23Merge "xci: install: Move all pip installations to virtualenv"Fatih Degirmenci1-2/+3
2018-03-23xci: install: Move all pip installations to virtualenvMarkos Chandras1-2/+3
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-23xci: infra: bifrost: Set XCI_DISTRO if it's not definedMarkos Chandras1-0/+4
The XCI_DISTRO variable is normally set from the XCI deployment script. However, on bifrost jobs, we don't run this script as part of XCI so we need to ensure that this variable is set properly. Change-Id: I295b65176bab6ccbdd12aa50449d3c021a88b43d Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-20xci: Move cleanup script outside of bifrostMarkos Chandras1-78/+0
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-20xci: infra: bifrost: Avoid installing Ansible twiceMarkos Chandras1-27/+4
We already install Ansible globally and we also install another version of it in the bifrost venv. Even though the OSA Ansible may move faster than the bifrost one, we normally pin both projects so we can move them when they can work with the same Ansible version. As such, lets make the deployment a little bit faster by simply not installing Ansible twice. Change-Id: I121ef5979607b62e76300db1bc6d51fc27362d5b Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-03-20Add initial support for multiple infra deployersMarkos Chandras2-0/+259
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>