Skip to content
Snippets Groups Projects
Commit 0bf01341 authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

refactor: Improve Volume Naming in Staging Script

parent d725aef6
No related branches found
No related tags found
3 merge requests!47Integration Testing: Sequential Merge and Validation of Four Feature Branches (PR #43,#44, #45,#46),!43feat: Add new data volume for XDMod queue data,!34feat: Add new data volume for XDMod queue data
Pipeline #9068 failed with stages
in 31 seconds
...@@ -155,11 +155,11 @@ production-deploy: ...@@ -155,11 +155,11 @@ production-deploy:
- openstack server stop $prod_instance_id - openstack server stop $prod_instance_id
# Exporting Staging Volume IDs # Exporting Staging Volume IDs
- export staging_volume1=$(openstack server show $instance_id -c volumes_attached -f value | awk -F"'" '{print $4}' | awk 'NR==1') - export staging_volume=$(openstack server show $instance_id -c volumes_attached -f value | awk -F"'" '{print $4}' | awk 'NR==1')
- export staging_volume2=$(openstack server show $instance_id -c volumes_attached -f value | awk -F"'" '{print $4}' | awk 'NR==2') - export staging_queue_volume=$(openstack server show $instance_id -c volumes_attached -f value | awk -F"'" '{print $4}' | awk 'NR==2')
# Logging Information # Logging Information
- echo "Detaching staging_volume1_id=${staging_volume1} and staging_volume2_id=${staging_volume2} from staging_instance_id=${instance_id}" - echo "Detaching staging_volume_id=${staging_volume} and staging_queue_volume_id=${staging_queue_volume} from staging_instance_id=${instance_id}"
# Stopping MariaDB Service on Staging Instance # Stopping MariaDB Service on Staging Instance
- ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$staging_floating_ip sudo systemctl stop mariadb - ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$staging_floating_ip sudo systemctl stop mariadb
...@@ -169,8 +169,8 @@ production-deploy: ...@@ -169,8 +169,8 @@ production-deploy:
- ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$staging_floating_ip sudo umount /data/xdmod/queues && df -h - ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$staging_floating_ip sudo umount /data/xdmod/queues && df -h
# Removing Volumes from Server # Removing Volumes from Server
- openstack server remove volume $instance_id $staging_volume1 - openstack server remove volume $instance_id $staging_volume
- openstack server remove volume $instance_id $staging_volume2 - openstack server remove volume $instance_id $staging_queue_volume
- echo "Attach prod volume $xdmod-prod-vol-$BUILD_DATE to staging instance $instance_id" - echo "Attach prod volume $xdmod-prod-vol-$BUILD_DATE to staging instance $instance_id"
- openstack volume snapshot create --volume $prod_volume xdmod-prod-data-vol-snapshot-$BUILD_DATE - openstack volume snapshot create --volume $prod_volume xdmod-prod-data-vol-snapshot-$BUILD_DATE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment