summaryrefslogtreecommitdiffstats
path: root/xci/scripts/vm/start-new-vm.sh
AgeCommit message (Collapse)AuthorFilesLines
2017-10-02Merge "xci: scripts: start-new-vm.sh: Use Docker to build OS images"Markos Chandras1-39/+85
2017-10-02xci: scripts: start-new-vm.sh: Use Docker to build OS imagesMarkos Chandras1-39/+85
Use a docker container to build the OS images so we can build images and start new virtual machines on all supported operating systems. This way all developers can now launch a virtual machine to quickly reproduce Jenkins results which should assist with debugging problems. Since the container runs with elevated privileges it's best to ensure that we have exclusive access to devices. Finally, we remove the build-dib-os.sh script which is now part of the container itself. The build image process now becomes more stable since it runs on clean evnironment all the time so the only external factor is the upstream distribution repositories. Change-Id: I6b443192419ee2546a23430f421b152766d16333 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-10-02xci: scripts: start-new-vm.sh: Fix default test caseMarkos Chandras1-1/+2
Export XCI_FLAVOR to mini to minic the CI. Moreover, fix the script to not use relative paths. Change-Id: I16947c596b8bbff20371b6d345dffd215f76aecc Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-27xci: scripts: start-new-vm.sh: Fix paths for default XCI testMarkos Chandras1-2/+2
The XCI test is located in ~/releng-xci inside the new VM so we need to look there for an existing one or for executing it after the default one has been created and copied to the remote host. Change-Id: Ieb195293da7832bcb5d29c8a28cc3477205f2e5e Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-27xci: scripts: start-new-vm.sh: Print dib output when running on CIMarkos Chandras1-2/+6
Until we are able to fetch the dib images from external resources, we need to build them as part of the job. diskimage-builder can sometimes fail so we need to be able to see the log for debug purposes. Change-Id: Iab8bfba08daa7095cf76537f629c8e7bf6330b17 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-27xci: scripts: start-new-vm.sh: Use 'unsafe' cache for the clean vm diskMarkos Chandras1-1/+1
This is not a production virtual machine and we don't care if we lose data in case it's killed unexpectedly so we can just ignore the 'flush' commands from the guest. This will also improve the overall I/O in the VMs. Change-Id: Ib486a073f667e22f4a1e65a220ac553874f708cc Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-27xci: scripts: start-new-vm.sh: Do not allow multiple build-dib-os processesMarkos Chandras1-2/+12
apt-get is really unhappy when another instance is running and fails with the following error: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? Change-Id: I2fe343fdab8438cb112cce0a4f81c7e3977c55f9 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-26xci: scripts: Fix script to run on Jenkins CIMarkos Chandras1-13/+29
A couple of tweaks are necessary to get it working with Jenkins - Jenkins jobs could contain the 'xci' string so make the regexp more accurate. - Rename VMs to use a more accurate name - Fix ssh public key location - Create a fresh /etc/hosts since distro may not have one. - Set hostname on VM Change-Id: I332a424bc8b2de98d7b326c192996b7b12c79dd7 Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-09-25xci: scripts: Add script to use clean virtual machines for testingMarkos Chandras1-0/+190
These scripts will prepare a clean OS image based on diskimage-builder and launch a new VM with it. The purpose of that is to use this virtual machine as a 'host' to run XCI on it. This way we can ensure that all tests are being executed on the same clean environment which is ideal for reproducing and debugging purposes. We also commit the ssh keypair so we can build it in the image and use it to control the virtual machine without user interaction. Needless to say that this keypair MUST NOT be used for anything else apart from the dib build process. Change-Id: Idec0fc06c82435adc1a4d569b8e578616998de5f Signed-off-by: Markos Chandras <mchandras@suse.de>