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

Remove staging volume management old commands

parent fe8da389
No related branches found
No related tags found
No related merge requests found
...@@ -152,12 +152,6 @@ production-deploy: ...@@ -152,12 +152,6 @@ production-deploy:
- openstack server remove volume $prod_instance_id $prod_volume - openstack server remove volume $prod_instance_id $prod_volume
- openstack server stop $prod_instance_id - openstack server stop $prod_instance_id
- export staging_volume=$(openstack server show $instance_id -c volumes_attached -f value | awk -F"'" '{print $4}')
- echo "Detaching staging_volume_id=${staging_volume} from staging_instance_id=${instance_id}"
- ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$staging_floating_ip sudo systemctl stop mariadb
- ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$staging_floating_ip sudo umount /var/lib/mysql && df -h
- openstack server remove volume $instance_id $staging_volume
# 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_volume1=$(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_volume2=$(openstack server show $instance_id -c volumes_attached -f value | awk -F"'" '{print $4}' | awk 'NR==2')
...@@ -181,6 +175,7 @@ production-deploy: ...@@ -181,6 +175,7 @@ production-deploy:
- openstack volume create --snapshot xdmod-prod-data-vol-snapshot-$BUILD_DATE --size 150 xdmod-prod-vol-$BUILD_DATE - openstack volume create --snapshot xdmod-prod-data-vol-snapshot-$BUILD_DATE --size 150 xdmod-prod-vol-$BUILD_DATE
- openstack server add volume $instance_id xdmod-prod-vol-$BUILD_DATE --device /dev/vdb - openstack server add volume $instance_id xdmod-prod-vol-$BUILD_DATE --device /dev/vdb
- echo "swap the floating IP between prod and staging instances" - echo "swap the floating IP between prod and staging instances"
- openstack server remove floating ip $prod_instance_id $prod_floating_ip - openstack server remove floating ip $prod_instance_id $prod_floating_ip
- openstack server remove floating ip $instance_id $staging_floating_ip - openstack server remove floating ip $instance_id $staging_floating_ip
......
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