# openstack server set --name $OLD_PROD_NAME $OLD_ID;
# openstack server set --name $OLD_PROD_NAME $OLD_ID;
# fi
# fi
-openstack server remove volume $OLD_ID $VOLUME_ID
-openstack server remove volume $OLD_ID $VOLUME_ID
# TODO: The line below is not working because of --property "private_key=$SSH_HOST_PRIVATE_KEY_DWORKER_ESCAPED" => "Error Value ... is too long (HTTP 400)".
# - INSTANCE_ID=`openstack server create -f value -c id --prefix IMAGE_ --flavor s1 --image 149a65b5-aeb8-499f-aaa6-ec966bd28dd6 --user-data cloudinit.yml --property "private_key=$SSH_HOST_PRIVATE_KEY_DWORKER_ESCAPED" --security-group ssh --security-group www --security-group https $WORKER_NAME`
-INSTANCE_ID=`openstack server create -f value -c id --prefix IMAGE_ --flavor s1 --image 149a65b5-aeb8-499f-aaa6-ec966bd28dd6 --user-data cloudinit.yml --security-group ssh --security-group www --security-group https $WORKER_NAME`
-INSTANCE_ID=`openstack server create -f value -c id --prefix IMAGE_ --flavor s1 --image 149a65b5-aeb8-499f-aaa6-ec966bd28dd6 --user-data cloudinit.yml --security-group ssh --security-group www --security-group https $WORKER_NAME`
-while [ "`openstack server show $INSTANCE_ID -c addresses -f value`" = "{}" ]; do sleep 5; done# wait until an address is available to attach the floating ip
-while [ "`openstack server show $INSTANCE_ID -c addresses -f value`" = "{}" ]; do sleep 5; done# wait until an address is available to attach the floating ip
-openstack server add floating ip $INSTANCE_ID $WORKER_IP
-openstack server add floating ip $INSTANCE_ID $WORKER_IP
-sleep 10# ensure that next command reaches the new server, prevents host key problems
-sleep 10# ensure that next command reaches the new server, prevents host key problems
# do the mount /dev/vdb1 stuff
-LOCAL_IP=`openstack port list --server $INSTANCE_ID --network internal -c 'Fixed IP Addresses'`
-echo $LOCAL_IP
# do the mount /dev/vdb stuff
-openstack server add volume $INSTANCE_ID $VOLUME_ID
-openstack server add volume $INSTANCE_ID $VOLUME_ID
-sleep 20# apparently it may take some time until the volume is available to the OS
-sleep 20# apparently it may take some time until the volume is available to the OS
-until ssh -oStrictHostKeyChecking=accept-new airflow@$WORKER_IP ls /finished_cloudinit >/dev/null 2>&1; do sleep 30; done# wait until cloudinit script is complete
-until ssh -oStrictHostKeyChecking=accept-new airflow@$WORKER_IP ls /finished_cloudinit >/dev/null 2>&1; do sleep 30; done# wait until cloudinit script is complete
# add the ssh host private key value
-LOCAL_IP=`openstack port list --server $INSTANCE_ID --network internal -c 'Fixed IP Addresses'`
-echo "{\"data-root\":\"/wf_pipeline_data/docker_volumes\"}" | ssh -oStrictHostKeyChecking=accept-new airflow@$WORKER_IP "sudo tee -a /etc/docker/daemon.json"
-echo "{\"data-root\":\"/wf_pipeline_data/docker_volumes\"}" | ssh -oStrictHostKeyChecking=accept-new airflow@$WORKER_IP "sudo tee -a /etc/docker/daemon.json"
-ssh -oStrictHostKeyChecking=accept-new airflow@$WORKER_IP "sudo service docker restart"# to use the configured docker data path
-ssh -oStrictHostKeyChecking=accept-new airflow@$WORKER_IP "sudo service docker restart"# to use the configured docker data path
-echo "Done"
-echo "Done"
...
@@ -89,5 +82,3 @@ update-dls-testing:
...
@@ -89,5 +82,3 @@ update-dls-testing:
<<:*ssh_setup
<<:*ssh_setup
script:
script:
-echo "$SSH_HOST_PRIVATE_KEY_DWORKER" | ssh -oStrictHostKeyChecking=accept-new airflow@$DLS_PRODUCTION_IP "sudo tee /home/airflow/testme.txt"
-echo "$SSH_HOST_PRIVATE_KEY_DWORKER" | ssh -oStrictHostKeyChecking=accept-new airflow@$DLS_PRODUCTION_IP "sudo tee /home/airflow/testme.txt"