-
Notifications
You must be signed in to change notification settings - Fork 581
Home
In this section, you learn where to upload CloudFormation templates so that you can use them publicly via a Launch Stack button or for other purposes. There is a CodePipeline that runs in Stelligent's production account that copies all files in this repo to an S3 bucket set to public-read.
- From your user directory, clone this repo (or get the latest via
git pull
):
git clone https://github.com/stelligent/cloudformation_templates.git
- Change the directory to
labs
:
cd ~/cloudformation_templates/labs
- Make a new directory or use an existing directory within
labs
. In this example, I am using_example
:
mkdir _example
- Change to the new directory:
cd _example
- Make an empty CloudFormation template:
touch example.yml
-
Put the CloudFormation template configuration in this file and save
-
After testing against an AWS account, commit the code to GitHub:
git add ~/cloudformation_templates/labs/_example
git commit -am "new CloudFormation template used in Stelligent blog && git push
- Go to the blog you're editing and put the following in the HTML text (making the approriate changes based on the name of your directory/CloudFormation template name and updating
STACK-NAME
to the default name of the stack):
<a href="https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=STACK-NAME&templateURL=https://s3.amazonaws.com/cloudformation-templates-stelligent/labs/_example/example.yml"><img class="alignnone" src="https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png" alt="" width="144" height="27"/></a><div>
The above HTML markup gets converted in this:
- Create a new folder in this repo or commit files to an existing folder if a similar topic. For example, if you're creating a lab, create a new folder under labs.
- Refer to the previously committed CloudFormation template file
- Upload the image you downloaded from CloudFormation Designer to S3. For example:
https://s3.amazonaws.com/stelligent-public/media/cloudformation-diagrams/ecs-jenkins.jpg
. - Create a new section in the CloudFormation Templates README. For example, see Containerized CI Solutions in AWS: Jenkins in ECS Lab. This will include a brief description, create details, launch stack button, design thumbnail/link, video link, and command-line options.