This file contains hidden or 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
[ | |
{ | |
"ParameterKey": "InstanceType", | |
"ParameterValue": "t2.small" | |
} | |
] |
This file contains hidden or 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
$ aws cloudformation create-stack --stack-name ec2-$(date +%s) --template-body file://ec2-param.yml --parameters "ParameterKey=InstanceType,ParameterValue=t2.small" |
This file contains hidden or 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
Parameters: | |
InstanceType: | |
Description: EC2 instance type | |
Type: String | |
Default: t2.micro | |
Resources: | |
EC2Instance: | |
Type: AWS::EC2::Instance | |
Properties: | |
InstanceType: !Ref InstanceType |
This file contains hidden or 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
$ aws cloudformation describe-stacks --stack-name ec2 | |
{ | |
"Stacks": [ | |
{ | |
"StackId": "arn:aws:cloudformation:us-east-1:160619113767:stack/ec2/fbbfc9f0-c026-11e7-b32e-503aca2616d1", | |
"Tags": [], | |
"CreationTime": "2017-11-02T23:38:52.308Z", | |
"StackName": "ec2", | |
"NotificationARNs": [], | |
"StackStatus": "CREATE_COMPLETE", |
This file contains hidden or 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
$ aws cloudformation create-stack --stack-name ec2 --template-body file://ec2.yml | |
{ | |
"StackId": "arn:aws:cloudformation:us-east-1:160619113767:stack/ec2/fbbfc9f0-c026-11e7-b32e-503aca2616d1" | |
} |
This file contains hidden or 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
Resources: | |
EC2Instance: | |
Type: AWS::EC2::Instance | |
Properties: | |
InstanceType: t2.micro | |
KeyName: 'default' # keypair must already exist | |
ImageId: ami-6869aa05 # AMI us-east-1 |
This file contains hidden or 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
root /var/www/react/build; | |
index index.html index.htm; |
This file contains hidden or 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
#!/bin/bash | |
TARGET="/var/www/react" | |
GIT_DIR="/var/www/react.git" | |
BRANCH="master" | |
while read oldrev newrev ref | |
do | |
# only checking out the master (or whatever branch you would like to deploy) | |
if [[ $ref = refs/heads/$BRANCH ]]; | |
then |
This file contains hidden or 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
# Credit to John Creecy | |
# Original can be found at https://gist.github.com/zugdud/b39eea02faa6926305f57fbde8d31b68 | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: OpenVPN Stack | |
Parameters: | |
OpenVPNPort: | |
Type: Number | |
Default: 1194 |
This file contains hidden or 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
# Credit to John Creecy | |
# Original can be found at https://gist.github.com/zugdud/f5453af2c827eba38bb036b19e10b371 | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: OpenVPN Stack | |
Parameters: | |
OpenVPNPort: | |
Type: Number | |
Default: 1194 |