summaryrefslogtreecommitdiffstats
path: root/xci
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-03-07 16:36:03 +0000
committerMarkos Chandras <mchandras@suse.de>2018-03-07 17:48:21 +0000
commite66847184999a84c472648e78d71e12b7c5b23d2 (patch)
tree36f1eb5e1eda84aa6406bff0f7951f6a10d643d0 /xci
parentc4651cc986ac5277d95027df77bc42cc783f2777 (diff)
bifrost: Use the pre-built XCI OS images instead of dib
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>
Diffstat (limited to 'xci')
-rwxr-xr-xxci/config/user-vars1
-rwxr-xr-xxci/scripts/vm/start-new-vm.sh9
2 files changed, 7 insertions, 3 deletions
diff --git a/xci/config/user-vars b/xci/config/user-vars
index 06e91cf0..451b6b85 100755
--- a/xci/config/user-vars
+++ b/xci/config/user-vars
@@ -46,5 +46,6 @@ export XCI_INSTALLER=${XCI_INSTALLER:-osa}
export XCI_ANSIBLE_VERBOSITY=${XCI_ANSIBLE_VERBOSITY:-""}
export RUN_TEMPEST=${RUN_TEMPEST:-false}
export CORE_OPENSTACK_INSTALL=${CORE_OPENSTACK_INSTALL:-false}
+export BIFROST_USE_PREBUILT_IMAGES=${BIFROST_USE_PREBUILT_IMAGES:-false}
# Set this to to true to force XCI to re-create the target OS images
export CLEAN_DIB_IMAGES=${CLEAN_DIB_IMAGES:-false}
diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index 59d1ee2e..e2a918b3 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -179,7 +179,7 @@ sudo rm -f ${BASE_PATH}/${OS}.qcow2
# Fix perms again...
sudo chmod 777 -R $XCI_CACHE_DIR/clean_vm/images/
sudo chown $uid:$gid -R $XCI_CACHE_DIR/clean_vm/images/
-cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2 ${BASE_PATH}/
+cp ${XCI_CACHE_DIR}/clean_vm/images/${OS}.qcow2* ${BASE_PATH}/
declare -r OS_IMAGE_FILE=${OS}.qcow2
[[ ! -e ${OS_IMAGE_FILE} ]] && echo "${OS_IMAGE_FILE} not found! This should never happen!" && exit 1
@@ -324,9 +324,7 @@ EOF
do_copy() {
rsync -a \
--exclude "${VM_NAME}*" \
- --exclude "${OS}*" \
--exclude "build.log" \
- --exclude "*.qcow2*" \
-e "$vm_ssh" ${BASE_PATH}/ ${VM_NAME}:~/releng-xci/
}
@@ -340,6 +338,10 @@ $vm_ssh ${VM_NAME} "sudo mv /home/devuser/releng-xci/vm_hosts.txt /etc/hosts"
# Disable 3-level nested virtualization since it makes things terribly slow
$vm_ssh ${VM_NAME} "sudo bash -c 'echo \"options kvm_intel nested=0\" > /etc/modprobe.d/qemu-system-x86.conf'"
$vm_ssh ${VM_NAME} "sudo modprobe -r kvm_intel && sudo modprobe -a kvm_intel"
+# Copy image files over
+$vm_ssh ${VM_NAME} "sudo mkdir /httpboot"
+$vm_ssh ${VM_NAME} "sudo mv /home/devuser/releng-xci/${OS}.qcow2.sha256.txt /httpboot"
+$vm_ssh ${VM_NAME} "sudo mv /home/devuser/releng-xci/${OS}.qcow2 /httpboot/deployment_image.qcow2"
set +e
@@ -354,6 +356,7 @@ if [[ $? != 0 ]]; then
#!/bin/bash
set -o pipefail
export XCI_FLAVOR=mini
+export BIFROST_USE_PREBUILT_IMAGES=true
cd ~/releng-xci/xci
./xci-deploy.sh | ts
EOF