Skip to content
Snippets Groups Projects

feat: Add new data volume for XDMod queue data

1 file
+ 18
0
Compare changes
  • Side-by-side
  • Inline
  • fe8da389
    Detach and Remove Staging Volumes · fe8da389
    Krish Moodbidri authored
    This commit optimizes the process of detaching and removing staging volumes from the staging instance. It replaces the previous approach of using a single staging volume with a new approach that involves two distinct volumes. 
+ 18
0
@@ -158,6 +158,24 @@ production-deploy:
- 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
- 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')
# Logging Information
- echo "Detaching staging_volume1_id=${staging_volume1} and staging_volume2_id=${staging_volume2} from staging_instance_id=${instance_id}"
# Stopping MariaDB Service on Staging Instance
- ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$staging_floating_ip sudo systemctl stop mariadb
# Unmounting MySQL Data Directories
- ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$staging_floating_ip sudo umount /var/lib/mysql1 && df -h
- ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$staging_floating_ip sudo umount /data/xdmod/queues && df -h
# Removing Volumes from Server
- openstack server remove volume $instance_id $staging_volume1
- openstack server remove volume $instance_id $staging_volume2
- 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 create --snapshot xdmod-prod-data-vol-snapshot-$BUILD_DATE --size 150 xdmod-prod-vol-$BUILD_DATE
Loading