Skip to content

vaneek/cloudformation_templates

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stelligent CloudFormation Templates

Purpose

This repository contains a collaboration of general and specific Amazon Web Services CloudFormation Template Examples. The basic design is a layered approach so there is less repeat content between all the templates. That way you can build a custom environment by picking the solution templates you wish to use. In other words you won't see a VPC created over and over throughout the templates. You simply use the VPC template then move to the next piece you would like to create.

Also, The general design leans towards not having to refactor the template to fit your account/environment. By using the configured parameters from the console or CLI you should be able to use the template without the need to edit it. The templates generally output all the information you may need for another template. So, be sure to examine the Outputs tab after creating the stack.

The AWS CLI examples can be dropped in a shell script and/or added to your CI/CD solution to spin up solutions in a fully automated fashion. Of course logic around updating stacks, deleting and checking for success/failure should be addressed.

With a simple shell script and a customized parameter json file you can spin up stacks quickly and consistently. Furthermore it's just as easy to tear a CloudFormation stack versus if all the objects where created manually.

Templates

Categories

Orchestrators

Back to Top

One template to rule them all... These are master templates that call nested templates. These are good to build out a full environment without having to run each template individually. Coupled with a custom parameters JSON file can give you a one command solution to a complex setup and eliminate the need to duplicate code.

For instance you could have a VPC, NAT, RDS and Autoscaling Webapp behind an ELB and Update DNS all in one command using various foundational templates that I've creates to be used together.

Select the foundational pieces for building out an infrastructure from the ground up.

Create Details
  1. VPC
  2. Nat Gateway (Optional)
  3. Bastion Host (Optional)
  4. VPN (Optional)
Launch

us-west-2

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/orchestrators/infrastructure.template"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters COMING SOON

Infrastructure

Back to Top

Creates an entire VPC from scratch for Lab or Permanent.

Create Details
  1. Single VPC
  2. 3 Public Subnets
  3. 3 Private Subnets
  4. Public Route Table
  5. Private Route Table
  6. Internet Gateway
    • Attached to the Public Route Table
  7. Public Network ACL
  8. Private Network ACL
  9. VPC Endpoint
  10. Instance Access Security Group
    • Instance to Instance Access
  11. Remote Access Security Group
    • This can be used for to allow site-to-site VPN or Direct Connect Networks access to instances.
Launch

us-west-2

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video
AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/infrastructure/vpc.template"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=Owner,ParameterValue="Levon Becker" ParameterKey=Project,ParameterValue="VPC Creation" ParameterKey=DeleteAfter,ParameterValue="Never" ParameterKey=VPCSubnetCidrBlock,ParameterValue="10.20.0.0/16" ParameterKey=AvailabilityZone1,ParameterValue="a" ParameterKey=AvailabilityZone2,ParameterValue="b" ParameterKey=AvailabilityZone3,ParameterValue="c" ParameterKey=PublicSubnetCidrBlock1,ParameterValue="10.20.1.0/24" ParameterKey=PublicSubnetCidrBlock2,ParameterValue="10.20.2.0/24" ParameterKey=PublicSubnetCidrBlock3,ParameterValue="10.20.3.0/24" ParameterKey=PrivateSubnetCidrBlock1,ParameterValue="10.20.4.0/24" ParameterKey=PrivateSubnetCidrBlock2,ParameterValue="10.20.5.0/24" ParameterKey=PrivateSubnetCidrBlock3,ParameterValue="10.20.6.0/24" ParameterKey=RemoteAccessNetwork,ParameterValue="50.12.34.56/32"

Creates a NAT Gateway on an existing VPC with Public (IGW) and Private subnets. Private route table is updated to route traffic to the NAT gateway a Public subnet that has an Internet Gateway Attached.

Prerequisites
  1. VPC
    • Public Subnet, IGW, Private Subnet/s.
    • Either use an existing VPC Infrastructure or you can use the following VPC Template to create a one.
  2. AWS Privileges
Create Details
  1. NAT Gateway
  2. EIP
  3. Add Route to Private Route Table
Advantages over NAT Instance
  1. Redundancy built in.
  2. Easier setup and management.
Launch

us-west-2

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video
AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/infrastructure/nat-gateway.template"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=Owner,ParameterValue="Levon Becker" ParameterKey=Project,ParameterValue="NAT Gateway Creation" ParameterKey=DeleteAfter,ParameterValue="Never" ParameterKey=VPC,ParameterValue="vpc-b9f488dd" ParameterKey=PublicSubnet,ParameterValue="subnet-14197570" ParameterKey=PrivateRouteTable,ParameterValue="rtb-d5cce3b1" ParameterKey=PublicNetworkAcl,ParameterValue="acl-3d207459"

Creates a Site-to-Site BGP VPN Connection in and existing VPC with public and/or private networks. There is an option to not exclude allowing VPN access to the public networks. Simply select false for the 'Include Public Subnets', leave default value in Public Network ACL and Route Table. The values will just be ignored. This only sets up the AWS side of the VPN. After the CloudFormation creates the objects you'll then need to configure your remote VPN Device. Here's an article that gives the configuration steps for configuring a Sophos UTM v9 VPN endpoint. This assumes that the Private Network ACL allows all outbound. Lastly, the Private Network ACL inbound is updated to allow the remote network block specified.

Prerequisites
  1. VPC
    • Public Subnet, IGW, Private Subnet/s.
    • Either use an existing VPC Infrastructure or you can use the following VPC Template to create a one.
  2. Remote Network (Office) VPN Device WAN IP
  3. Remote Network CIDR Block to Allow Access and Propagate.
Create Details
  1. Customer Gateway
  2. Virtual Private Gateway
  3. VPN Connection
  4. Enable Route Propagation on Route Table/s
  5. Add Network ACL to Allow Remote Network
Launch

us-west-2

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video
AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/infrastructure/vpn-bgp.template"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=Owner,ParameterValue="Levon Becker" ParameterKey=Project,ParameterValue="VPN Creation" ParameterKey=DeleteAfter,ParameterValue="Never" ParameterKey=VPC,ParameterValue="vpc-b9f488dd" ParameterKey=PublicRouteTable,ParameterValue="rtb-d6cce3b2" ParameterKey=PrivateRouteTable,ParameterValue="rtb-d5cce3b1" ParameterKey=PublicNetworkAcl,ParameterValue="acl-3d207459" ParameterKey=PrivateNetworkAcl,ParameterValue="acl-3c207458" ParameterKey=RemoteVpnDeviceIp,ParameterValue="50.23.45.67" ParameterKey=RemoteNetworkCidr,ParameterValue="192.168.100.0/24" ParameterKey=IncludePublicSubnets,ParameterValue="true"

Creates a single Bastion host on a Public subnet in an existing VPC. Select from either a RHEL, Ubuntu or Windows OS.

Prerequisites
  1. VPC
    • Public Subnet, IGW, Private Subnet/s.
    • Either use an existing VPC Infrastructure or you can use the following VPC Template to create a one.
  2. Available EIP
Create Details
  1. EC2 Instance
  2. EIP
  3. IAM Role
  4. IAM Instance Profile
  5. Security Group
Launch
us-west-2

us-west-2

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/infrastructure/bastion.template"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=Owner,ParameterValue="Levon Becker" ParameterKey=Project,ParameterValue="Bastion Creation" ParameterKey=DeleteAfter,ParameterValue="Never" ParameterKey=VPC,ParameterValue="vpc-b9f488dd" ParameterKey=PublicSubnet,ParameterValue="subnet-14197570" ParameterKey=PublicNetworkAcl,ParameterValue="acl-3d207459" ParameterKey=InternalAccessSecurityGroup,ParameterValue="sg-69d8410f" ParameterKey=OsType,ParameterValue="rhel" ParameterKey=NetworkAccessIP,ParameterValue="50.23.45.67/32" ParameterKey=InstanceType,ParameterValue="t2.small" ParameterKey=Ec2KeyPair,ParameterValue="stelligent-dev"

Database

Back to Top

Creates a MySQL RDS Database Instance.

Prerequisites
  1. VPC
    • Public Subnet, IGW, Private Subnet/s.
    • Either use an existing VPC Infrastructure or you can use the following VPC Template to create a one.
Create Details
  1. DB Instance
  2. DB Subnet Group
  3. Security Group
  4. Cloud Watch Alarms
  5. Route 53 Record Set (Optional)
Launch

us-west-2

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/database/mysql-rds.template"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=Owner,ParameterValue="Levon Becker" ParameterKey=Project,ParameterValue="MySQL RDS Creation" ParameterKey=DeleteAfter,ParameterValue="08/01/2016" ParameterKey=VPC,ParameterValue="vpc-b9f488dd" ParameterKey=PrivateSubnet1,ParameterValue="subnet-14197570" ParameterKey=PrivateSubnet2,ParameterValue="subnet-14197571" ParameterKey=PrivateSubnet3,ParameterValue="subnet-14197572" ParameterKey=PublicNetworkAcl,ParameterValue="acl-3d207459" ParameterKey=MasterUsername,ParameterValue="superman" ParameterKey=MasterUserPassword,ParameterValue="Kryptonite" ParameterKey=BackupRetentionPeriod,ParameterValue="30" ParameterKey=MultiAvailabilityZone,ParameterValue="true" ParameterKey=ConfigureDns,ParameterValue="true" ParameterKey=Cname,ParameterValue="justice.league.com" ParameterKey=R53HostedZoneName,ParameterValue="league.com" ParameterKey=AlertSnsTopicArn,ParameterValue="arn:aws:sns:us-west-2:000000000000:rds-alerts" ParameterKey=AllocatedStorage,ParameterValue="30" ParameterKey=InstanceType,ParameterValue="db.t2.medium"

Autoscaling

Back to Top

Create an Autoscaling group in 3 private subnets from a baked AMI, an Elastic Load Balancer in 3 public subnets and S3 ELB Logging Bucket. Option to use SSL/TLS on ELB. Option to update Route 53 Hosted DNS alias to point to the ELB. Setup to add RDS Access Security Group. Does not create an RDS Instance. Use an RDS Instance Cloudformation Template first.

Create Details
  1. EC2 Instances
  2. AutoScaling
  3. Launch Configuration
  4. Elastic Load Balancer
  5. IAM Role
  6. IAM Instance Profile
  7. Security Group
  8. Scale Up Policy
  9. Scale Down Policy
  10. Cloud Watch Alarm
  11. Network ACL Entry
  12. Route 53 Record Set (Optional)
  13. S3 Bucket (Optional)
  14. S3 Bucket Policy (Optional)
Launch

us-west-2

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/webapp/autoscaling-bakedami-rdsbackend.template"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=Owner,ParameterValue="Levon Becker" ParameterKey=Project,ParameterValue="Autoscaling Baked AMI Webapp Stack Creation" ParameterKey=DeleteAfter,ParameterValue="08/01/2016" ParameterKey=VPC,ParameterValue="vpc-b9f488dd" ParameterKey=PublicSubnet1,ParameterValue="subnet-24197570" ParameterKey=PublicSubnet2,ParameterValue="subnet-24197571" ParameterKey=PublicSubnet3,ParameterValue="subnet-24197572" ParameterKey=PrivateSubnet1,ParameterValue="subnet-14197570" ParameterKey=PrivateSubnet2,ParameterValue="subnet-14197571" ParameterKey=PrivateSubnet3,ParameterValue="subnet-14197572" ParameterKey=PublicNetworkAcl,ParameterValue="acl-3d207459" ParameterKey=InstanceType,ParameterValue="t2.small" ParameterKey=AMI,ParameterValue="ami-00000000" ParameterKey=Ec2KeyPair,ParameterValue="stelligent-dev" ParameterKey=MinAutoScaleCount,ParameterValue="3" ParameterKey=MaxAutoScaleCount,ParameterValue="6" ParameterKey=InternalAccessSecurityGroup,ParameterValue="sg-69d8410f" ParameterKey=RemoteSecurityGroup,ParameterValue="sg-50d8410d" ParameterKey=RDSAccessSecurityGroup,ParameterValue="sg-40d8410e" ParameterKey=ConfigureDns,ParameterValue="true" ParameterKey=Route53ElbAlias,ParameterValue="www.hecklejeckle.com" ParameterKey=UseSsl,ParameterValue="true" ParameterKey=ElbSslCertArn,ParameterValue="arn:aws:iam::0000000000000:server-certificate/www.hecklejeckle.com" ParameterKey=ElbHttpListeningPort,ParameterValue="443" ParameterKey=InstanceHttpListeningPort,ParameterValue="8443" ParameterKey=ListenOnBothPorts,ParameterValue="false" ParameterKey=SetupElbLogging,ParameterValue="true"

Create an Autoscaling group in 3 private subnets from a baked AMI, an Elastic Load Balancer in 3 public subnets and S3 ELB Logging Bucket. Option to use SSL/TLS on ELB. Option to update Route 53 Hosted DNS alias to point to the ELB.

Create Details
  1. EC2 Instances
  2. AutoScaling
  3. Launch Configuration
  4. Elastic Load Balancer
  5. IAM Role
  6. IAM Instance Profile
  7. Security Group
  8. Scale Up Policy
  9. Scale Down Policy
  10. Cloud Watch Alarm
  11. Network ACL Entry
  12. Route 53 Record Set (Optional)
  13. S3 Bucket (Optional)
  14. S3 Bucket Policy (Optional)
Launch

us-west-2

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/webapp/autoscaling-bakedami.template"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=Owner,ParameterValue="Levon Becker" ParameterKey=Project,ParameterValue="Autoscaling Baked AMI Webapp Stack Creation" ParameterKey=DeleteAfter,ParameterValue="08/01/2016" ParameterKey=VPC,ParameterValue="vpc-b9f488dd" ParameterKey=PublicSubnet1,ParameterValue="subnet-24197570" ParameterKey=PublicSubnet2,ParameterValue="subnet-24197571" ParameterKey=PublicSubnet3,ParameterValue="subnet-24197572" ParameterKey=PrivateSubnet1,ParameterValue="subnet-14197570" ParameterKey=PrivateSubnet2,ParameterValue="subnet-14197571" ParameterKey=PrivateSubnet3,ParameterValue="subnet-14197572" ParameterKey=PublicNetworkAcl,ParameterValue="acl-3d207459" ParameterKey=InstanceType,ParameterValue="t2.small" ParameterKey=AMI,ParameterValue="ami-00000000" ParameterKey=Ec2KeyPair,ParameterValue="stelligent-dev" ParameterKey=MinAutoScaleCount,ParameterValue="3" ParameterKey=MaxAutoScaleCount,ParameterValue="6" ParameterKey=InternalAccessSecurityGroup,ParameterValue="sg-69d8410f" ParameterKey=RemoteSecurityGroup,ParameterValue="sg-50d8410d" ParameterKey=ConfigureDns,ParameterValue="true" ParameterKey=Route53ElbAlias,ParameterValue="www.hecklejeckle.com" ParameterKey=UseSsl,ParameterValue="true" ParameterKey=ElbSslCertArn,ParameterValue="arn:aws:iam::0000000000000:server-certificate/www.hecklejeckle.com" ParameterKey=ElbHttpListeningPort,ParameterValue="443" ParameterKey=InstanceHttpListeningPort,ParameterValue="8443" ParameterKey=ListenOnBothPorts,ParameterValue="false" ParameterKey=SetupElbLogging,ParameterValue="true"

Labs

Back to Top

<tr>
    <th align="left" colspan="2"><h4><a href="https://github.com/stelligent/cloudformation_templates/tree/master/labs/ecs">EC2 Container Service Lab</a></h4></th>
</tr>
<tr>
    <td valign="top">
        <p>Automates the integration between EC2 Container Service (ECS), EC2 Container Registry (ECR), CodeCommit, and CodePipeline</p>
        <h6>Prerequisites</h6>
        <ol>
         <li>EC2 Key Pair</li>
         <li>Existing Docker Image</li>
         <li>CodeCommit Repository</li>
         <li>ECR Repository</li>
        </ol>
        <h6>Supported Regions</h6>
         <ol>
           <li>us-east-1</li>
         </ol>
        <h6>Create Details</h6>
        <ol>
            <li>Virtual Private Cloud (VPC) (and associated resources)</li>
            <li>Auto Scaling Group, Auto Scaling Launch Configuration</li>
            <li>ECS Cluster, ECS Service, ECS Task Definition</li>
            <li>Elastic Load Balancer</li>
            <li>IAM Instance Profile, IAM Roles</li>
            <li>EC2 Instance (Jenkins, Docker)</li>
            <li>CodePipeline with CodeCommit Integration</li>
        </ol>
    </td>
    <td  nowrap width="200" valign="top">
        <table>
            <tr>
                <th align="left">Launch</th>
            </tr>
            <tr>
                <td>
                    <a href="https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?&templateURL=https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/ecs/ecs-pipeline.json" target="_blank"><img src="https://s3.amazonaws.com/stelligent-public/media/images/buttons/cloudformation-launch-stack-button.png"></a>
                    <p>us-east-1</p>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <th align="left">View in Designer</th>
            </tr>
            <tr>
                <td>
                    <a href="https://console.aws.amazon.com/cloudformation/designer/home?region=us-east-1&templateURL=https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/ecs/ecs-pipeline.json" target="_blank"><img src="https://s3.amazonaws.com/stelligent-public/media/cloudformation-diagrams/ecs_codepipeline.jpg" width:100% alt="View in Designer"></a>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <th align="left">How To Video</th>
            </tr>
            <tr>
                <td>
                    <img src="https://s3.amazonaws.com/stelligent-public/media/images/screenshots/HowTo_Stelligent_YouTube_144x81.jpg" width:100% alt="HowTo Video"></a>
                    <p>COMING SOON</p>
                </td>
            </tr>
        </table>
    </td>
</tr>
<tr>
    <td colspan="2">
        <table>
            <tr>
                <th align="left">AWS CLI Example</th>
            </tr>
            <tr>
                <td>
                    <h6>Base Command</h6>
                    <code>aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/ecs/ecs-pipeline.json"</code>
                </td>
            </tr>
            <tr>
                <td>
                    <h5>Parameters</h5>
                </td>
            </tr>
            <tr>
                <td>
                    <h6>Option 1 - Custom Parameters JSON File <a href="https://github.com/stelligent/cloudformation_templates/blob/master/labs/ecs/example-parameters.json">(Example Here)</a></h6>
                    <code>--parameters file:///localpath/to/custom-parameters.json</code>
                </td>
            </tr>
            <tr>
                <td>
                    <h6>Option 2 - Pass Parameters on CLI</h6>
                </td>
            </tr>
            <tr>
                <td>
                    <code> --parameters ParameterKey=RepositoryName,ParameterValue=YOURCCREPO ParameterKey=RepositoryBranch,ParameterValue=master ParameterKey=KeyName,ParameterValue=YOUREC2KEYPAIR ParameterKey=YourIP,ParameterValue=YOURIP/32 ParameterKey=ECSRepoName,ParameterValue=YOURECRREPO ParameterKey=ECSCFNURL,ParameterValue=NOURL ParameterKey=AppName,ParameterValue=app-name-1648"</code>
                </td>
            </tr>
        </table>
    </td>
</tr>
<tr>
    <th align="left" colspan="2"><h4><a href="https://github.com/stelligent/cloudformation_templates/blob/master/labs/test_instances/rhel-ubuntu-win2012.template">Test Instances</a></h4></th>
</tr>
<tr>
    <td valign="top">
        <p>Creates three test instances in an existing VPC. Each instance is a different operating system. They are; Red Hat Enterprise Linux 7, Ubuntu 14 and Windows 2012 R2.</p>
        <h6>Create Details</h6>
        <ol>
         <li>3 EC2 Instances</li>
         <li>IAM Role</li>
         <li>IAM Instance Profile</li>
        </ol>
    </td>
    <td  nowrap width="200" valign="top">
        <table>
            <tr>
                <th align="left">Launch</th>
            </tr>
            <tr>
                <td>
                    <a href="https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?&templateURL=https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/test_instances/rhel-ubuntu-win2012.template" target="_blank"><img src="https://s3.amazonaws.com/stelligent-public/media/images/buttons/cloudformation-launch-stack-button.png"></a>
                    <p>us-west-2</p>
                    <a href="https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?&templateURL=https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/test_instances/rhel-ubuntu-win2012.template" target="_blank"><img src="https://s3.amazonaws.com/stelligent-public/media/images/buttons/cloudformation-launch-stack-button.png"></a>
                    <p>us-east-1</p>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <th align="left">View in Designer</th>
            </tr>
            <tr>
                <td>
                    <a href="https://console.aws.amazon.com/cloudformation/designer/home?region=us-west-2&templateURL=https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/test_instances/rhel-ubuntu-win2012.template" target="_blank"><img src="https://s3.amazonaws.com/stelligent-public/media/cloudformation-diagrams/test-instances-200x200.jpg" width:100% alt="View in Designer"></a>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <th align="left">How To Video</th>
            </tr>
            <tr>
                <td>
                    <img src="https://s3.amazonaws.com/stelligent-public/media/images/screenshots/HowTo_Stelligent_YouTube_144x81.jpg" width:100% alt="HowTo Video"></a>
                    <p>COMING SOON</p>
                </td>
            </tr>
        </table>
    </td>
</tr>
<tr>
    <td colspan="2">
        <table>
            <tr>
                <th align="left">AWS CLI Example</th>
            </tr>
            <tr>
                <td>
                    <h6>Base Command</h6>
                    <code>aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/test_instances/rhel-ubuntu-win2012.template"</code>
                </td>
            </tr>
            <tr>
                <td>
                    <h5>Parameters</h5>
                </td>
            </tr>
            <tr>
                <td>
                    <h6>Option 1 - Custom Parameters JSON File <a href="https://github.com/stelligent/cloudformation_templates/blob/master/labs/test_instances/example-parameters.json">(Example Here)</a></h6>
                    <code>--parameters file:///localpath/to/custom-parameters.json</code>
                </td>
            </tr>
            <tr>
                <td>
                    <h6>Option 2 - Pass Parameters on CLI</h6>
                </td>
            </tr>
            <tr>
                <td>
                    <code>--parameters ... COMING SOON</code>
                </td>
            </tr>
        </table>
    </td>
</tr>

Creates a Chef Compliance Web server in a Public Subnet with Internet Gateway attached on an existing VPC. It then attaches an EIP and finally adds the instance to an existing instance-to-instance security group.

Prerequisites
  1. VPC
    • Public Subnet, IGW, Private Subnet/s.
    • Either use an existing VPC Infrastructure or you can use the following VPC Template to create a one.
  2. Available EIP
Supported Regions
  1. us-west-2
  2. us-east-1
Create Details
  1. EC2 Instance
  2. EIP
  3. IAM Role
  4. IAM Instance Profile
  5. Security Group
Launch

us-west-2

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/chef_compliance/chef-compliance.template"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ... COMING SOON

Creates a Bitbucket Server in a private or public subnet in an existing VPC.

Prerequisites
  1. VPC
    • Public or Private Subnet
    • Internal Instance Access Security Group
    • Either use an existing VPC Infrastructure or you can use the following VPC Template to create a one.
  2. Internet Access from the EC2 Instance or Yum access solution
  3. EC2 Key Pair
  4. Available EIP if Selected Public Facing
  5. IAM Role Creation Permissions
Supported Regions
  1. cn-north-1
  2. us-east-1
  3. us-west-1
  4. us-west-2
  5. eu-west-1
  6. eu-central-1
  7. ap-northeast-1
  8. ap-northeast-2
  9. ap-southeast-1
  10. ap-southeast-2
  11. sa-east-1
Create Details
  1. EC2 Instance (Amazon Linux)
  2. EIP (Optional)
  3. IAM Role
  4. IAM Instance Profile
  5. Security Group
Launch

us-west-2

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/bitbucket/bitbucket.template"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ... COMING SOON

Automates the integration between AWS Elastic Beanstalk and CodePipeline

Prerequisites
  1. CodeCommit Repo
Supported Regions
  1. us-east-1
Create Details
  1. IAM InstanceProfile, Policy, and Roles
  2. Elastic Beanstalk - ConfigurationTemplate, Environment
  3. CodePipeline with CodeCommit Integration
Launch

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/eb/elasticbeanstalk-codepipeline.json"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=RepositoryName,ParameterValue=codecommit-demo"

Automates the integration between AWS CodeCommit and CodePipeline

Prerequisites
  1. EC2 Key Pair
  2. CodeCommit Repo
Supported Regions
  1. us-east-1
Create Details
  1. IAM InstanceProfile, Policy, and Roles
  2. EC2 Instance for CodeDeploy
  3. CodeDeploy
  4. CodePipeline with CodeCommit Integration
Launch

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/codecommit/codepipeline-codecommit.json"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=EC2KeyPairName,ParameterValue=stelligent-dev"

Automates the integration between AWS Lambda and CodePipeline

Prerequisites
  1. N/A
Supported Regions
  1. us-east-1
Create Details
  1. IAM Policy and Roles
  2. Lambda Function
  3. CodePipeline
Launch

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/lambda/lambda-codepipeline.json"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=KeyName,ParameterValue=stelligent-dev"
Outputs
CodePipelineURL - URL for generated pipeline in CodePipeline console.

Automates the integration between AWS OpsWorks, CodeCommit and CodePipeline

Prerequisites
  1. EC2 Key Pair
Supported Regions
  1. us-east-1
Create Details
  1. IAM InstanceProfile, Policy, and Roles
  2. SecurityGroupIngress and SecurityGroup
  3. OpsWorks Stack, Layer, App and Instance
  4. CodePipeline
Launch

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/opsworks/codepipeline-opsworks.json"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=KeyName,ParameterValue=stelligent-dev"

Containerized CI Solutions in AWS: Jenkins in ECS

Prerequisites
  1. EC2 Key Pair
Supported Regions
  1. us-east-1
Create Details
  1. VPC and associated resources
  2. IAM
  3. EFS
  4. EC2 Instances
  5. Auto Scaling
  6. ELB
  7. ECS Service, Cluster, Task Definition
Launch

us-east-1

View in Designer
View in Designer
How To Video
HowTo Video

COMING SOON

AWS CLI Example
Base Command
aws cloudformation create-stack --profile {AWS Profile Name} --stack-name {Stack Name} --capabilities CAPABILITY_IAM --template-url "https://s3.amazonaws.com/stelligent-public/cloudformation-templates/github/labs/containers/docker/build/ecs-jenkins.json"
Parameters
Option 1 - Custom Parameters JSON File (Example Here)
--parameters file:///localpath/to/custom-parameters.json
Option 2 - Pass Parameters on CLI
--parameters ParameterKey=AvailabilityZone1,ParameterValue=us-east-1c ParameterKey=AvailabilityZone2,ParameterValue=us-east-1d ParameterKey=KeyPair,ParameterValue=stelligent-dev ParameterKey=PublicAccessCIDR,ParameterValue=50.23.45.67/32"

Back to Top

About

AWS - CloudFormation Templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%