Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2766935
D13095.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D13095.diff
View Options
diff --git a/services/terraform/self-host/aws-deploy.sh b/services/terraform/self-host/aws-deploy.sh
--- a/services/terraform/self-host/aws-deploy.sh
+++ b/services/terraform/self-host/aws-deploy.sh
@@ -18,7 +18,6 @@
# Grab user configuration variables from terraform.tfvars
health_check_domain=$(echo "var.keyserver_domain_name" | terraform console -var-file terraform.tfvars.json | tr -d '"')
health_check_url="https://${health_check_domain}/health"
-num_desired_secondary_nodes=$(echo "var.desired_secondary_nodes" | terraform console -var-file terraform.tfvars.json)
aws_region=$(echo "var.region" | terraform console -var-file terraform.tfvars.json | tr -d '"')
# Set aws-cli region to aws region self-hosted keyserver is deployed on
@@ -56,24 +55,6 @@
fi
}
-check_health() {
- local retry_interval=10
- local total_elapsed_time=0
-
- while true; do
- http_code=$(curl -s -o /dev/null -w "%{http_code}" "$health_check_url")
- if [[ "$http_code" -eq 200 ]]; then
- echo "Health check returned status 200 OK $http_code. Primary keyserver node ready"
- return 0
- fi
- total_elapsed_time="$(( total_elapsed_time + retry_interval ))"
- converted_time="$(convert_seconds $total_elapsed_time)"
-
- echo "Health check returned status $http_code. Elapsed time: ${converted_time}."
- sleep $retry_interval
- done
-}
-
disable_general_lb_traffic() {
# disables general ip access
aws ec2 revoke-security-group-ingress \
@@ -179,19 +160,4 @@
echo "Applying terraform changes"
terraform apply -auto-approve
-echo "Redisabling general lb traffic"
-disable_general_lb_traffic
-
-echo "Redeploying primary service in $cluster_name"
-aws ecs update-service --cluster "$cluster_name" --service "$primary_service_name" --force-new-deployment --desired-count 1 > /dev/null
-
-echo "Waiting for health check at $health_check_domain to return status 200 OK"
-check_health
-
-echo "Primary node successfully running. Re-enabling public access to load balancer"
-enable_lb_traffic
-
-echo "Setting desired count of secondary service to $num_desired_secondary_nodes".
-aws ecs update-service --cluster "$cluster_name" --service "$secondary_service_name" --desired-count "$num_desired_secondary_nodes" --force-new-deployment > /dev/null
-
echo "Successfully ran migration"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Sep 20, 3:50 PM (21 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2151533
Default Alt Text
D13095.diff (2 KB)
Attached To
Mode
D13095: [terraform] remove unnecessary redeploy
Attached
Detach File
Event Timeline
Log In to Comment