forked from brentley/ecsdemo-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3e05241
Showing
7 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Amazon ECS Workshop | ||
|
||
This is part of an Amazon ECS workshop at https://ecsworkshop.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
Resources: | ||
CloudFormationRole: | ||
Type: AWS::IAM::Role | ||
Properties: | ||
RoleName: | ||
Fn::Sub: ${Namespace}-cloudformation-common-${AWS::Region} | ||
AssumeRolePolicyDocument: | ||
Statement: | ||
- Effect: Allow | ||
Principal: | ||
Service: | ||
- cloudformation.amazonaws.com | ||
Action: | ||
- sts:AssumeRole | ||
Path: "/" | ||
Policies: | ||
- PolicyName: update-route53-additional | ||
PolicyDocument: | ||
Version: '2012-10-17' | ||
Statement: | ||
- Action: | ||
- route53:CreateHostedZone | ||
- route53:GetHostedZone | ||
- route53:DeleteHostedZone | ||
- route53:UpdateHostedZoneComment | ||
- route53:ListQueryLoggingConfigs | ||
Resource: '*' | ||
Effect: Allow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
Resources: | ||
DnsBackend: | ||
Type: "AWS::Route53::HostedZone" | ||
Properties: | ||
Name: "internal.service" | ||
VPCs: | ||
- | ||
VPCRegion: | ||
Fn::Sub: ${AWS::Region} | ||
VPCId: | ||
Fn::ImportValue: | ||
Fn::Sub: ${VpcId} | ||
BackendLB: | ||
Type: AWS::ElasticLoadBalancingV2::LoadBalancer | ||
Properties: | ||
Scheme: internal | ||
SecurityGroups: | ||
- Ref: ElbSG | ||
Subnets: | ||
Fn::Split: | ||
- ',' | ||
- Fn::ImportValue: | ||
Fn::Sub: ${ElbSubnetIds} | ||
Tags: | ||
- Key: Name | ||
Value: | ||
Ref: AWS::StackName | ||
BackendLBHttpListener: | ||
Type: AWS::ElasticLoadBalancingV2::Listener | ||
Properties: | ||
DefaultActions: | ||
- TargetGroupArn: | ||
Ref: BackendLBTargetGroup | ||
Type: forward | ||
LoadBalancerArn: | ||
Ref: BackendLB | ||
Port: "80" | ||
Protocol: HTTP | ||
BackendLBTargetGroup: | ||
Type: AWS::ElasticLoadBalancingV2::TargetGroup | ||
Properties: | ||
Port: "8080" | ||
Protocol: HTTP | ||
Tags: | ||
- Key: Name | ||
Value: internal | ||
VpcId: | ||
Fn::ImportValue: | ||
Fn::Sub: ${VpcId} | ||
BackendLBDns: | ||
Type: AWS::Route53::RecordSetGroup | ||
Properties: | ||
Comment: DNS for Internal ELB in ${AWS::StackName} | ||
HostedZoneId: | ||
Ref: DnsBackend | ||
RecordSets: | ||
- AliasTarget: | ||
DNSName: | ||
Fn::GetAtt: BackendLB.DNSName | ||
EvaluateTargetHealth: true | ||
HostedZoneId: | ||
Fn::GetAtt: BackendLB.CanonicalHostedZoneID | ||
Name: api.internal.service. | ||
Type: A | ||
Outputs: | ||
BackendLBHttpListenerArn: | ||
Description: Arn of the Backend ELB HTTP Listener. | ||
Export: | ||
Name: | ||
Fn::Sub: ${AWS::StackName}-BackendLBHttpListenerArn | ||
Value: | ||
Ref: BackendLBHttpListener |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: backend-service | ||
version: 1.0 | ||
|
||
templateUpdateMode: merge | ||
|
||
# Note: the filename must match the asset being extended. | ||
# see https://github.com/stelligent/mu/tree/develop/templates/assets for | ||
# filenames. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
build: | ||
commands: | ||
- echo '...replace with real build commands...' | ||
|
||
artifacts: | ||
files: | ||
- '**/*' | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
environments: | ||
- name: acceptance | ||
provider: ecs-fargate | ||
- name: production | ||
provider: ecs-fargate | ||
service: | ||
acceptance: | ||
disabled: true | ||
production: | ||
disabled: true | ||
extensions: | ||
- url: backend-service |