-echo "Starting the full testing deployment of airflows."
-pip install python-openstackclient
-OLD_ID=`openstack server show $TESTING_NAME -f value -c id` && server_exists=true || echo "No testing server found. It might be a first time deployment"
# openstack server set --name $OLD_TEST_NAME $OLD_ID;
# fi
-openstack server remove volume $OLD_ID $VOLUME_ID
-INSTANCE_ID=`openstack server create -f value -c id --prefix IMAGE_ --flavor l2 --image 149a65b5-aeb8-499f-aaa6-ec966bd28dd6 --user-data scripts/cloudinit.yml --security-group ssh --security-group www --security-group https $TESTING_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
-openstack server add floating ip $INSTANCE_ID $TESTING_IP
-sleep 10# ensure that next command reaches the new server, prevents host key problems
-until ssh -oStrictHostKeyChecking=accept-new airflow@$TESTING_IP ls /finished_cloudinit >/dev/null 2>&1; do sleep 30; done# wait until cloudinit script is complete
-ssh -oStrictHostKeyChecking=accept-new airflow@$TESTING_IP "sudo service docker restart"# to use the configured docker data path
-echo "Starting the full testing deployment of airflows example."
-echo "Starting the full production deployment of airflows."
-pip install python-openstackclient
-pip install python-openstackclient
-OLD_ID=`openstack server show $PRODUCTION_NAME -f value -c id` && server_exists=true || echo "No production server found. It might be a first time deployment"
-OLD_ID=`openstack server show $PRODUCTION_NAME -f value -c id` && server_exists=true || echo "No production server found. It might be a first time deployment"
# - if [ "$server_exists" = true ] ; then
# - if [ "$server_exists" = true ] ; then
...
@@ -110,12 +153,9 @@ full-deploy-production:
...
@@ -110,12 +153,9 @@ full-deploy-production:
# TODO Add proper tests
# TODO Add proper tests
light-deploy-production:
light-deploy-production:
stage:deploy
stage:deploy
# only run when master is updated, unless the pipeline was triggered via the web UI