ROLLBACK_COMMIT_TAG:aa1f8345d322f2532977643043df18eb4aff3bcf# stable version on master, also tagged as 0.18
# before script copied from gitlab docs
before_script:
...
...
@@ -44,6 +46,7 @@ test:
light-deploy-testing:
stage:deploy
image:alpine:latest
# only run when master is updated, unless the pipeline was triggered via the web UI
only:
-master
...
...
@@ -57,7 +60,8 @@ light-deploy-testing:
light-deploy-production:
stage:deploy
# only run when master is updated, unless the pipeline was triggered via the web UI
image:alpine:latest
# only run when stable tag is updated, unless the pipeline was triggered via the web UI
only:
-tags
except:
...
...
@@ -78,13 +82,13 @@ full-deploy-production:
script:
-echo "Starting the full production deployment."
-pip install python-openstackclient
-OLD_ID=`openstack server show production-deployment -f value -c id`
# TODO rename old instance, so that we can find it in cleanup task
-OLD_ID=`openstack server show datacatalog-production -f value -c id`
-openstack server set --name $OLD_PROD_NAME $OLD_ID
# TODO get and locally store zip of old certificate-docker-volume
# don't create snapshot copy of old instance, we keep the old instance alive as long as possible
# add should work without removing first- openstack server remove floating ip $OLD_ID $PRODUCTION_IP
-openstack server remove volume $OLD_ID $VOLUME_ID
-INSTANCE_ID=`openstack server create -f value -c id --prefix IMAGE_ --flavor s2 --image 149a65b5-aeb8-499f-aaa6-ec966bd28dd6 --user-data deploy_scripts/cloudinit.yml --security-group ssh --security-group www --security-group https production-deployment`
-INSTANCE_ID=`openstack server create -f value -c id --prefix IMAGE_ --flavor s2 --image 149a65b5-aeb8-499f-aaa6-ec966bd28dd6 --user-data deploy_scripts/cloudinit.yml --security-group ssh --security-group www --security-group https datacatalog-production`
-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 $PRODUCTION_IP
# TODO move local zip of certificate-docker-volume to server once startup is complete
-OLD_ID=`openstack server show testing-deployment -f value -c id`
# TODO rename old instance, so that we can find it in cleanup task
-OLD_ID=`openstack server show datacatalog-testing -f value -c id`
-openstack server set --name $OLD_TEST_NAME $OLD_ID
# TODO get and locally store zip of old certificate-docker-volume
# add should work without removing first- openstack server remove floating ip $OLD_ID $TESTING_IP
-INSTANCE_ID=`openstack server create -f value -c id --prefix IMAGE_ --flavor s1 --image 149a65b5-aeb8-499f-aaa6-ec966bd28dd6 --user-data deploy_scripts/cloudinit.yml --security-group ssh --security-group www --security-group https testing-deployment`
-INSTANCE_ID=`openstack server create -f value -c id --prefix IMAGE_ --flavor s1 --image 149a65b5-aeb8-499f-aaa6-ec966bd28dd6 --user-data deploy_scripts/cloudinit.yml --security-group ssh --security-group www --security-group https datacatalog-testing`
-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
# TODO move local zip of certificate-docker-volume to server once startup is complete
-echo "This is the cleanup for the light-redeployment of the testing servers"
-echo "if this job is reached, some earlier job had to have failed, this will return to a previous commit"
-echo "A successfull cleanup can not be guaranteed, depending on the failure reason"
-COMMIT_TAG="$ROLLBACK_COMMIT_TAG"# a stable base version here, shpuld be updated once a release (i.e. a stable-XX tag) has been proven stable in pracice
-COMMIT_TAG="$ROLLBACK_COMMIT_TAG"# a stable base version here, update from time to time