Skip to content

Commit

Permalink
Fix names.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgfindl committed Jan 3, 2018
1 parent 2f22e86 commit 9e431d3
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 22 deletions.
3 changes: 2 additions & 1 deletion _cim.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 0.1
stack:
name: services-cicd # Note: Update this with your stack name
name: app-bootstrap # Note: Update this with your stack name
template:
file: bootstrap.stack.yml
# Stacks are uploaded here prior to deployment. The bucket is created if it doesn't exist.
Expand All @@ -16,6 +16,7 @@ stack:
GitHubToken: '${kms.decrypt(AQICAHgiu9XuQb4FZRXrLn/77g1P99ZhS7/g3xOsvbvNpb+/qQH+sxP+if0SN0/QR0I3M9ehAAAAhzCBhAYJKoZIhvcNAQcGoHcwdQIBADBwBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDNTJCu1YrFM64MUL4AIBEIBD8zDL0Oc+8rQwr/7fJq+NyPB7vKJ/lNqqcmBBN9QS8XDFAqB9Vh9fkCUSilXs3HG3NL6EdLYaR9Z5blo7p2/HTmJrnw==)}'

KeyPairName: 'bluefineng'
AppName: 'app'

# Build Notification
# NotificationEmail: '[email protected]'
Expand Down
42 changes: 24 additions & 18 deletions bootstrap.stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Parameters:
KeyPairName:
Type: String
Description: EC2 KeyPair
AppName:
Type: String
Description: Application name

Resources:

Expand Down Expand Up @@ -176,14 +179,14 @@ Resources:
Value:
Fn::Join:
- ''
- - Ref: AWS::StackName
- - Ref: AppName
- '-vpc-prod'
- Name: KeyPairName
Value: !Ref KeyPairName
Name:
Fn::Join:
- ''
- - Ref: AWS::StackName
- - Ref: AppName
- '-code-build-prod'
ServiceRole: !GetAtt CodeBuildRole.Arn
Source:
Expand All @@ -204,14 +207,14 @@ Resources:
Value:
Fn::Join:
- ''
- - Ref: AWS::StackName
- - Ref: AppName
- '-vpc-sandbox'
- Name: KeyPairName
Value: !Ref KeyPairName
Name:
Fn::Join:
- ''
- - Ref: AWS::StackName
- - Ref: AppName
- '-code-build-sandbox'
ServiceRole: !GetAtt CodeBuildRole.Arn
Source:
Expand Down Expand Up @@ -287,13 +290,13 @@ Resources:
StackName:
Fn::Join:
- ''
- - Ref: AWS::StackName
- - Ref: AppName
- '-ecs-prod'
ParameterOverrides: !Sub |
{
"Environment": "prod",
"KeyPairName": "${KeyPairName}",
"VPCStack" : "${AWS::StackName}-vpc-prod"
"VPCStack" : "${AppName}-vpc-prod"
}
RunOrder: 1
- Name: Service1
Expand All @@ -318,14 +321,16 @@ Resources:
StackName:
Fn::Join:
- ''
- - Ref: AWS::StackName
- '-service1-prod'
- - Ref: AppName
- '-service1-bootstrap-prod'
ParameterOverrides: !Sub |
{
"Environment": "prod",
"VPCStack" : "${AWS::StackName}-vpc-prod",
"ECSStack" : "${AWS::StackName}-ecs-prod",
"GitHubToken" : "${GitHubToken}"
"VPCStack" : "${AppName}-vpc-prod",
"ECSStack" : "${AppName}-ecs-prod",
"GitHubToken" : "${GitHubToken}",
"AppName" : "${AppName}",
"ServiceName" : "service1"
}
RunOrder: 1

Expand Down Expand Up @@ -397,13 +402,13 @@ Resources:
StackName:
Fn::Join:
- ''
- - Ref: AWS::StackName
- - Ref: AppName
- '-ecs-sandbox'
ParameterOverrides: !Sub |
{
"Environment": "sandbox",
"KeyPairName": "${KeyPairName}",
"VPCStack" : "${AWS::StackName}-vpc-sandbox"
"VPCStack" : "${AppName}-vpc-sandbox"
}
RunOrder: 1
- Name: Service1
Expand All @@ -428,13 +433,14 @@ Resources:
StackName:
Fn::Join:
- ''
- - Ref: AWS::StackName
- '-service1-sandbox'
- - Ref: AppName
- '-service1-bootstrap-sandbox'
ParameterOverrides: !Sub |
{
"Environment": "sandbox",
"VPCStack" : "${AWS::StackName}-vpc-sandbox",
"ECSStack" : "${AWS::StackName}-ecs-sandbox",
"GitHubToken" : "${GitHubToken}"
"VPCStack" : "${AppName}-vpc-sandbox",
"ECSStack" : "${AppName}-ecs-sandbox",
"GitHubToken" : "${GitHubToken}",
"AppName" : "${AppName}"
}
RunOrder: 1
18 changes: 15 additions & 3 deletions stacks/service1.stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ Parameters:
Type: String
Description: ECS Stack Name

AppName:
Type: String
Description: Application name

ServiceName:
Type: String
Description: Service name

Mappings:
Branch:
prod:
Expand Down Expand Up @@ -188,14 +196,18 @@ Resources:
StackName:
Fn::Join:
- ''
- - Ref: AWS::StackName
- '-bootstrap'
- - Ref: AppName
- '-'
- Ref: ServiceName
- '-'
- Ref: Environment
ParameterOverrides: !Sub |
{
"Environment": "${Environment}",
"VPCStack" : "${VPCStack}",
"ECSStack" : "${ECSStack}",
"GitHubToken" : "${GitHubToken}",
"ServiceName" : "service1"
"AppName": "${AppName}",
"ServiceName" : "${ServiceName}"
}
RunOrder: 1

0 comments on commit 9e431d3

Please sign in to comment.