Skip to content

Commit 2c0b5fc

Browse files
committed
updates for building stack
1 parent 9657842 commit 2c0b5fc

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Collection of Amazon Web Services Cloud resources and Utilities
44
Utilities I could use
55
* script that ensured an S3 bucket is created with the given name and prefix - to use in SAM based scripts that require a S3 bucket
66

7+
## TODO
8+
9+
- add SSL, hostname, domainname
10+
- pass in S3 and stack name config better
711

812
Feb 27, 2019; repurpose this repository; it will contain resources that can launch various AWS stacks and implementations; it will be 100% self-contained with the caveat that Docker images have been built and deployed to Docker Hub (using the Docker resources in this git) to push the other implementations. The Dockerfile is a helper to build the stack as long as there is an AWS credentials available to the container.
913

Diff for: bootstrap.sh

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
#!/bin/bash
2+
#
3+
# expects variables
4+
# CI_BUCKET - an s3 bucket that is used for build/deploy resources
5+
# STACK_NAME - name of the stack that will be created
6+
#
7+
# HOSTNAME
8+
# DOMAINNAME
9+
# SSL CERT
10+
#
211
date
3-
ls -a
412

513
# if the bucket exists list it, else make it
614
aws s3 ls $CI_BUCKET > /dev/null 2> /dev/null || aws s3 mb s3://$CI_BUCKET
715
aws sts get-caller-identity
816

917
echo "Stack name is $STACK_NAME"
1018

11-
echo "params are $@"
12-
1319
# run aws create-stack with / ???
1420
# check to see if the bucket exists
1521

1622
# or maybe instead run SAM command ???
1723
sam validate
1824

19-
sam package --template-file template.yaml --s3-bucket ${CI_BUCKET} --s3-prefix=${STACK_NAME} --output-template-file interim-template-file.yaml
25+
sam package --template-file template.yaml --s3-bucket ${CI_BUCKET} --s3-prefix=${STACK_NAME} --output-template-file ${HOME}/interim-template-file.yaml
2026

21-
sam deploy --paramater-overrides Hostname=${STACK_NAME} --template-file interim-template-file.yaml --stack-name=${STACK_NAME} --capabilities CAPABILITY_IAM
27+
echo STACK_NAME is $STACK_NAME
28+
sam deploy --parameter-overrides Hostname=${STACK_NAME} --template-file interim-template-file.yaml --stack-name $STACK_NAME --capabilities CAPABILITY_IAM

0 commit comments

Comments
 (0)