Skip to content

Commit

Permalink
abandon supervisord in favor of compose
Browse files Browse the repository at this point in the history
andrewkrug committed Jul 12, 2017
1 parent db7634b commit e695b62
Showing 4 changed files with 38 additions and 9 deletions.
38 changes: 36 additions & 2 deletions cloudformation/us-west-2.yml
Original file line number Diff line number Diff line change
@@ -236,8 +236,8 @@ Resources:
DependsOn: ApplicationLoadBalancer
Properties:
HealthyThresholdCount: 2
HealthCheckIntervalSeconds: 30
UnhealthyThresholdCount: 5
HealthCheckIntervalSeconds: 10
UnhealthyThresholdCount: 2
HealthCheckPath: /health
HealthCheckPort: 80
Name: DashboardWebServers
@@ -248,6 +248,23 @@ Resources:
Tags:
- Key: Name
Value: SSO-Dashboard
ALBTargetGroup1:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
DependsOn: ApplicationLoadBalancer
Properties:
HealthyThresholdCount: 2
HealthCheckIntervalSeconds: 10
UnhealthyThresholdCount: 2
HealthCheckPath: /health
HealthCheckPort: 80
Name: DashboardContentDelivery
Port: 80
Protocol: HTTP
VpcId:
Ref: SSODashboardVPC
Tags:
- Key: Name
Value: SSO-Dashboard
SSODashboardLaunchConfigProd:
Type: "AWS::AutoScaling::LaunchConfiguration"
Condition: UseProdCondition
@@ -265,6 +282,7 @@ Resources:
- yum update -y
- yum install ruby wget -y
- cd /home/ec2-user
- pip install boto3 --upgrade
- wget https://aws-codedeploy-$REGION.s3.amazonaws.com/latest/install
- chmod +x ./install
- ./install auto
@@ -301,6 +319,7 @@ Resources:
- yum update -y
- yum install ruby wget -y
- cd /home/ec2-user
- pip install boto3 --upgrade
- wget https://aws-codedeploy-$REGION.s3.amazonaws.com/latest/install
- chmod +x ./install
- ./install auto
@@ -318,6 +337,20 @@ Resources:
SecurityGroups:
- Ref: SSODashboardSecGroup
InstanceType: "t2.medium"
ListenerRule:
Type: AWS::ElasticLoadBalancingV2::ListenerRule
Properties:
Actions:
- Type: forward
TargetGroupArn:
Ref: ALBTargetGroup1
Conditions:
- Field: path-pattern
Values:
- "/static/*"
ListenerArn:
Ref: ALBHTTPSListener
Priority: 1
SSODashboardASG:
Type: "AWS::AutoScaling::AutoScalingGroup"
DependsOn: [ SSODashboardSubnet1, SSODashboardSubnet2, SSODashboardSubnet3 ]
@@ -333,6 +366,7 @@ Resources:
PropagateAtLaunch: true
TargetGroupARNs:
- Ref: ALBTargetGroup
- Ref: ALBTargetGroup1
MaxSize: "5"
MinSize: "3"
VPCZoneIdentifier:
4 changes: 0 additions & 4 deletions conf/supervisor-ansible.ini

This file was deleted.

3 changes: 2 additions & 1 deletion scripts/post-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

/etc/init.d/supervisord start
cd /home/ec2-user/app
/usr/local/bin/docker-compose up -d
2 changes: 0 additions & 2 deletions scripts/prep-deploy.sh
Original file line number Diff line number Diff line change
@@ -6,8 +6,6 @@ cd /home/ec2-user/app
/usr/local/bin/docker-compose stop
/usr/local/bin/docker-compose rm -f

cp /home/ec2-user/app/conf/supervisor-ansible.ini /etc/supervisord.d/

rm -rf /home/ec2-user/app

mkdir -p /home/ec2-user/app

0 comments on commit e695b62

Please sign in to comment.