Created
September 6, 2016 21:38
-
-
Save dkarchmer/fb34d37458858eeeead456e454e41f1a to your computer and use it in GitHub Desktop.
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
AWSIID=$(aws ec2 run-instances --image-id ami-8da458e6 --count 1 --instance-type t2.micro \ | |
--key-name myKeys --security-group-ids sg-XXXXXXXX \ | |
| json -aH Instances | json -aH InstanceId); time aws ec2 wait instance-running | |
aws ecs register-task-definition --cli-input-json file://elasticsearch.json --region us-east-1 | |
aws ecs register-task-definition --cli-input-json file://redis.json --region us-east-1 | |
aws ecs list-task-definitions --region us-east-1 | |
aws ecs run-task --task-definition foobar-elasticsearch:1 --count 1 --region 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
{ | |
"family": "foobar-elasticsearch", | |
"containerDefinitions": [ | |
{ | |
"name": "elasticsearch", | |
"image": "elasticsearch", | |
"cpu": 384, | |
"memory": 384, | |
"essential": true, | |
"environment": [ | |
{ "name": "HAYSTACK_PORT", "value": "9200" } | |
], | |
"portMappings": [ | |
{ "hostPort": 9200, "containerPort": 9200 } | |
] | |
} | |
] | |
} |
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
{ | |
"family": "foobar-redis", | |
"containerDefinitions": [ | |
{ | |
"name": "redis", | |
"image": "redis:latest", | |
"cpu": 384, | |
"memory": 384, | |
"essential": true, | |
"portMappings": [ | |
{ "hostPort": 6379, "containerPort": 6379 } | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment