Commit 15a783aa authored by AdamSimpson's avatar AdamSimpson
Browse files

fix builder OpenStack credential propagation

parent 557cf061
Pipeline #11550 failed with stages
in 68 minutes and 37 seconds
......@@ -48,12 +48,11 @@ ssh -o StrictHostKeyChecking=no -i ${KEY_FILE} cades@${VM_IP} 'sudo bash -s' < $
# Copy OpenStack credentials to VM and then move to correct directory
# These credentials are available as environment variables to the runners
printenv | grep ^OS_ > ./queue_profile # "Reconstruct"
awk '{print "export "$0}' ./queue_profile > tmp_awk && mv tmp_awk ./queue_profile
scp -o StrictHostKeyChecking=no -i ${KEY_FILE} ./queue_profile cades@${VM_IP}:/home/cades/queue_profile
ssh -o StrictHostKeyChecking=no -i ${KEY_FILE} cades@${VM_IP} 'sudo mv /home/cades/queue_profile /home/queue/.profile'
printenv | grep ^OS_ > ./ # "Reconstruct"
scp -o StrictHostKeyChecking=no -i ${KEY_FILE} ./ cades@${VM_IP}:/home/cades/
ssh -o StrictHostKeyChecking=no -i ${KEY_FILE} cades@${VM_IP} 'sudo mv /home/cades/ /home/queue/'
# Reboot to ensure Queue service, added in provisioning, is started
# Reboot to start queue service added in provisioning
openstack server reboot --wait ${VM_UUID}
echo "Started ${VM_UUID} with external IP ${VM_IP} using ${KEY_FILE}"
......@@ -47,6 +47,7 @@
......@@ -56,6 +57,4 @@ Restart=no
# There appears to be some weird issues with starting systemd services inside of a cloud-init script
# The easiest thing to do is just reboot after enabling the service
systemctl enable builder-queue
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment