Skip to content

rhelsing/learning_ecs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

#Docker cluster tutorial w/ ecs

This assumes you have aws set up, configured a sub user, have aws cli access.

  1. Install CLI
sudo curl -o /usr/local/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-darwin-amd64-latest

sudo chmod +x /usr/local/bin/ecs-cli

ecs-cli --version
  1. edit ~/.ecs/config

Set the name of the cluster

[ecs]
cluster                     = testing
aws_profile                 = default
region                      = us-east-1
aws_access_key_id           = XXXXX
aws_secret_access_key       = XXXXX
compose-project-name-prefix = ecscompose-
compose-service-name-prefix = ecscompose-service-
cfn-stack-name-prefix       = amazon-ecs-cli-setup-
  1. Tutorial (used docker-compose.yml by default)

###spawn cluster (will take a good bit)

ecs-cli up --keypair aws --capability-iam --size 2 --instance-type t2.medium

###test as a task

ecs-cli compose up

ecs-cli compose down

###run as a service (production)

ecs-cli compose service up

ecs-cli ps #ip address

ecs-cli compose scale 2

####clean up

ecs-cli compose service rm

ecs-cli down --force

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages