Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Terraform Openstack
Manage
Activity
Members
Labels
Plan
Issues
10
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
Terraform Openstack
Commits
fbf52699
Commit
fbf52699
authored
1 year ago
by
Krish Moodbidri
Browse files
Options
Downloads
Patches
Plain Diff
delete deployment script code for detaching and attaching volumes
parent
24601006
No related branches found
Branches containing commit
No related tags found
1 merge request
!47
Integration Testing: Sequential Merge and Validation of Four Feature Branches (PR #43,#44, #45,#46)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+0
-33
0 additions, 33 deletions
.gitlab-ci.yml
with
0 additions
and
33 deletions
.gitlab-ci.yml
+
0
−
33
View file @
fbf52699
...
@@ -168,39 +168,6 @@ production-deploy:
...
@@ -168,39 +168,6 @@ production-deploy:
ssh-add "${SSH_PRIV_KEY}"
ssh-add "${SSH_PRIV_KEY}"
mkdir ~/.ssh
mkdir ~/.ssh
chmod 700 ~/.ssh
chmod 700 ~/.ssh
-
ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$prod_floating_ip sudo systemctl stop mariadb
-
ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$prod_floating_ip sudo umount /var/lib/mysql && df -h
-
ssh -o StrictHostKeyChecking=no $SSH_USERNAME@$prod_floating_ip sudo umount /data/xdmod/queues && df -h
-
openstack server remove volume $prod_instance_id $prod_volume
-
openstack server remove volume $prod_instance_id $prod_queue_volume
-
openstack server stop $prod_instance_id
# Exporting Staging Volume IDs
-
export staging_volume=$(openstack server show $instance_id -c volumes_attached -f value | awk -F"'" '{print $4}' | awk 'NR==1')
-
export staging_queue_volume=$(openstack server show $instance_id -c volumes_attached -f value | awk -F"'" '{print $4}' | awk 'NR==2')
# Logging Information
-
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
-
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/mysql && 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_volume
-
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 queue volume xdmod-prod-queue-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_queue_volume xdmod-prod-queue-vol-snapshot-$BUILD_DATE
-
openstack volume create --snapshot xdmod-prod-data-vol-snapshot-$BUILD_DATE --size 150 xdmod-prod-vol-$BUILD_DATE
-
openstack volume create --snapshot xdmod-prod-queue-vol-snapshot-$BUILD_DATE --size 1 xdmod-prod-queue-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-queue-vol-$BUILD_DATE --device /dev/vdc
-
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment