Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove compose and cfn prefixes #242

Closed
wants to merge 2 commits into from
Closed

Conversation

yinshiua
Copy link
Contributor

@yinshiua yinshiua commented May 3, 2017

closes #239

Changes

See #239 for details

  • CFN prefix always use prefix "amazon-ecs-cli-setup-"
  • Remove prefix for compose.

Testing

$ ./bin/local/ecs-cli configure --cluster ecs-cli --profile <aws_profile> --region eu-west-2
INFO[0000] Saved ECS CLI configuration for cluster (ecs-cli) 

$ cat ~/.ecs/config 
[ecs]
cluster              = ecs-cli
aws_profile        = <aws_profile>
region            = eu-west-2 
aws_access_key_id  = 
aws_secret_access_key  = 


$ ./bin/local/ecs-cli down --force                                                     
amazon-ecs-cli-setup-ecs-cli
INFO[0001] Waiting for your cluster resources to be deleted... 
INFO[0002] Cloudformation stack status                   stackStatus="DELETE_IN_PROGRESS"

$ ./bin/local/ecs-cli up --capability-iam --keypair ecs-cli
INFO[0001] Created cluster                               cluster=ecs-cli
INFO[0002] Waiting for your cluster resources to be created... 
INFO[0002] Cloudformation stack status                   stackStatus="CREATE_IN_PROGRESS"

$  ./bin/local/ecs-cli compose up
WARN[0000] Skipping unsupported YAML option...           option name=networks
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=mysql
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=wordpress
INFO[0001] Using ECS task definition                     TaskDefinition="amazon-ecs-cli:1"
INFO[0001] Starting container...                         container="8ce8fbe2-c60e-4124-b95f-ee2ca7041a90/mysql"
INFO[0001] Starting container...                         container="8ce8fbe2-c60e-4124-b95f-ee2ca7041a90/wordpress"
INFO[0001] Describe ECS container status                 container="8ce8fbe2-c60e-4124-b95f-ee2ca7041a90/wordpress" desiredStatus=RUNNING lastStatus=PENDING taskDefinition="amazon-ecs-cli:1"
INFO[0001] Describe ECS container status                 container="8ce8fbe2-c60e-4124-b95f-ee2ca7041a90/mysql" desiredStatus=RUNNING lastStatus=PENDING taskDefinition="amazon-ecs-cli:1"

$ ./bin/local/ecs-cli compose down
WARN[0000] Skipping unsupported YAML option...           option name=networks
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=mysql
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=wordpress
INFO[0000] Stopping container...                         container="8ce8fbe2-c60e-4124-b95f-ee2ca7041a90/wordpress"
INFO[0000] Stopping container...                         container="8ce8fbe2-c60e-4124-b95f-ee2ca7041a90/mysql"
INFO[0001] Describe ECS container status                 container="8ce8fbe2-c60e-4124-b95f-ee2ca7041a90/wordpress" desiredStatus=STOPPED lastStatus=PENDING taskDefinition="amazon-ecs-cli:1"
INFO[0001] Describe ECS container status                 container="8ce8fbe2-c60e-4124-b95f-ee2ca7041a90/mysql" desiredStatus=STOPPED lastStatus=PENDING taskDefinition="amazon-ecs-cli:1"

$ ./bin/local/ecs-cli compose service up
WARN[0000] Skipping unsupported YAML option...           option name=networks
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=mysql
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=wordpress
INFO[0000] Using ECS task definition                     TaskDefinition="amazon-ecs-cli:1"
INFO[0001] Created an ECS service                        service=amazon-ecs-cli taskDefinition="amazon-ecs-cli:1"
INFO[0001] Updated ECS service successfully              desiredCount=1 serviceName=amazon-ecs-cli


$ ./bin/local/ecs-cli compose service down
WARN[0000] Skipping unsupported YAML option...           option name=networks
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=mysql
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=wordpress
INFO[0000] Updated ECS service successfully              desiredCount=0 serviceName=amazon-ecs-cli
INFO[0000] ECS Service has reached a stable state        desiredCount=0 runningCount=0 serviceName=amazon-ecs-cli
INFO[0001] Deleted ECS service                           service=amazon-ecs-cli
INFO[0001] ECS Service has reached a stable state        desiredCount=0 runningCount=0 serviceName=amazon-ecs-cli

With project name:

$ ./bin/local/ecs-cli compose --project-name ecs-cli-service up
WARN[0000] Skipping unsupported YAML option...           option name=networks
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=mysql
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=wordpress
INFO[0001] Using ECS task definition                     TaskDefinition="ecs-cli-service:1"
INFO[0001] Starting container...                         container="4bce5929-daf1-4988-aa8e-fa2db84ca595/mysql"
INFO[0001] Starting container...                         container="4bce5929-daf1-4988-aa8e-fa2db84ca595/wordpress"
INFO[0001] Describe ECS container status                 container="4bce5929-daf1-4988-aa8e-fa2db84ca595/mysql" desiredStatus=RUNNING lastStatus=PENDING taskDefinition="ecs-cli-service:1"
INFO[0001] Describe ECS container status                 container="4bce5929-daf1-4988-aa8e-fa2db84ca595/wordpress" desiredStatus=RUNNING lastStatus=PENDING taskDefinition="ecs-cli-service:1"

$ ./bin/local/ecs-cli compose --project-name ecs-cli-service service up  
WARN[0000] Skipping unsupported YAML option...           option name=networks
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=wordpress
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=mysql
INFO[0001] Using ECS task definition                     TaskDefinition="ecs-cli-service:2"
INFO[0001] Created an ECS service                        service=ecs-cli-service taskDefinition="ecs-cli-service:2"
INFO[0001] Updated ECS service successfully              desiredCount=1 serviceName=ecs-cli-service
INFO[0002] Describe ECS Service status                   desiredCount=1 runningCount=0 serviceName=ecs-cli-service

$ ./bin/local/ecs-cli compose --project-name ecs-cli-service service down
WARN[0000] Skipping unsupported YAML option...           option name=networks
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=mysql
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=wordpress
INFO[0001] Updated ECS service successfully              desiredCount=0 serviceName=ecs-cli-service
INFO[0001] ECS Service has reached a stable state        desiredCount=0 runningCount=0 serviceName=ecs-cli-service
INFO[0001] Deleted ECS service                           service=ecs-cli-service
INFO[0001] ECS Service has reached a stable state        desiredCount=0 runningCount=0 serviceName=ecs-cli-service
f45c89a57ca5% 


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove compose default prefix (backward incompatible)
1 participant