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

Supported AWS Fargate #129

Merged
merged 2 commits into from
Apr 2, 2018
Merged

Conversation

kakakakakku
Copy link
Contributor

@kakakakakku kakakakakku commented Dec 14, 2017

WHAT IS THIS

AWS released new service "AWS Fargate" on November 30, 2017.

This Pull Request goal is supporting AWS Fargate deployment, and solve this Issue ( #127 ).

ERROR

This error occurred by latest ecs-deploy.

An error occurred (InvalidParameterException) when calling the UpdateService operation: Task definition does not support launch_type FARGATE.

Because Launch Types ( parameter name is requiresCompatibilities ) added on Task Definition.

Then requiresCompatibilities set value FARGATE or EC2, but EC2 is default ECS.

REQUIRE

If you deploy AWS Fargate using aws-cli 1.14.0 or later please.

DETAILS

  • Check requiresCompatibilities via Task Definition (JSON)
  • If value equal FARGATE jq filters updated

Deployment is successful in my Fargate Cluster.

New task definition: arn:aws:ecs:us-east-1:111111111111:task-definition/xxx:13
Service updated successfully, new task definition running.
Waiting for service deployment to complete...
Service deployment successful.

ANY HELP

I am little worried about deployment for other Fargate Cluster.

If someone has own Fargate Cluster, please check deployment with my version ??? 🙏
( This is reason why this Pull Request is [WIP] . )

Thanks 👍 👍 👍

@tacchino
Copy link

Worked perfectly for me

@kakakakakku
Copy link
Contributor Author

@tacchino
Wow! Thank you for your testing 👍

@kakakakakku kakakakakku changed the title [WIP] Supported AWS Fargate Supported AWS Fargate Dec 15, 2017
@zeroasterisk
Copy link

@kakakakakku it is not working for me yet, sadly

$ ecs-deploy -c portal -n "etx-onspot-prod" -i "000000000000.dkr.ecr.us-east-1.amazonaws.com/etx-onspot:latest"
Using image name: 000000000000.dkr.ecr.us-east-1.amazonaws.com/etx-onspot:latest
Current task definition: arn:aws:ecs:us-east-1:000000000000:task-definition/etx-onspot-prod:1
jq: error (at <stdin>:131): Cannot iterate over null (null)

Here's a verbose dump, with env. vars truncated and account id redacted
http://sebsauvage.net/paste/?3f76a75b911230c8#FDlFZAxjQJwA1oAPflGIrsogE6Ll/A10wAFodUpNPcs=

@fillup
Copy link
Contributor

fillup commented Dec 18, 2017

@kakakakakku thank you for your work on this. I am getting the same error as @zeroasterisk. I upgraded my local awscli to 1.14.10 in case it was a change to the API but that didn't help. For reference I am testing updating a task/service that is NOT using Fargate.

Also unit tests fail. If you have Docker and Docker Compose installed you can run docker-compose run --rm test to work through tests and updating them. Here is the output from me running the tests right now:

$ docker-compose run --rm test
fetch http://dl-3.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/1) Installing bats (0.4.0-r2)
Executing busybox-1.25.1-r0.trigger
OK: 64 MiB in 31 packages
1..32
ok 1 # skip (0) check that usage() returns string and exits with status code 20
ok 2 # skip (0) test assertRequiredArgumentsSet success
ok 3 # skip (0) test assertRequiredArgumentsSet status=5
ok 4 # skip (0) test assertRequiredArgumentsSet status=6
ok 5 # skip (0) test assertRequiredArgumentsSet status=7
ok 6 # skip (0) test assertRequiredArgumentsSet status=8
ok 7 # skip (0) test assertRequiredArgumentsSet status=9
ok 8 # skip (0) test parseImageName missing image name
ok 9 # skip (0) test parseImageName invalid image name 1
ok 10 # skip (0) test parseImageName invalid port
ok 11 # skip (0) test parseImageName root image no tag
ok 12 # skip (0) test parseImageName root image with tag
ok 13 # skip (0) test parseImageName repo image no tag
ok 14 # skip (0) test parseImageName repo image with tag
ok 15 # skip (0) test parseImageName repo multilevel image no tag
ok 16 # skip (0) test parseImageName repo multilevel image with tag
ok 17 # skip (0) test parseImageName domain plus repo image no tag
ok 18 # skip (0) test parseImageName domain plus repo image with tag
ok 19 # skip (0) test parseImageName domain plus repo multilevel image no tag
ok 20 # skip (0) test parseImageName domain plus repo multilevel image with tag
ok 21 # skip (0) test parseImageName domain plus port plus repo image no tag
ok 22 # skip (0) test parseImageName domain plus port plus repo image with tag
ok 23 # skip (0) test parseImageName domain plus port plus repo multilevel image no tag
ok 24 # skip (0) test parseImageName domain plus port plus repo multilevel image with tag
ok 25 # skip (0) test parseImageName domain plus port plus repo image with tag from var
ok 26 # skip (0) test parseImageName domain plus port plus repo multilevel image with tag from var
ok 27 # skip (0) test parseImageName using ecr style domain
ok 28 # skip (0) test parseImageName using ecr style image name and tag from var
not ok 29 test createNewTaskDefJson with single container in definition
# (in test file test.bats, line 281)
#   `[ $output == $expected ]' failed with status 2
# /tmp/bats.40.src: line 281: [: too many arguments
not ok 30 test createNewTaskDefJson with multiple containers in definition
# (in test file test.bats, line 365)
#   `[ $output == $expected ]' failed with status 2
# /tmp/bats.40.src: line 365: [: too many arguments
ok 31 # skip (0) test parseImageName with tagonly option
not ok 32 test createNewTaskDefJson with multiple containers in definition and replace only tags
# (in test file test.bats, line 463)
#   `[ $output == $expected ]' failed with status 2
# jq: error (at <stdin>:70): Cannot iterate over null (null) { "family": "app-task-def", "volumes": [], "containerDefinitions": [ { "environment": [ { "name": "KEY", "value": "value" } ], "name": "API", "links": [], "mountPoints": [], "image": "121212345678.dkr.ecr.us-east-1.amazonaws.com/acct/repo:newtag", "essential": true, "portMappings": [ { "protocol": "tcp", "containerPort": 80, "hostPort": 10080 } ], "entryPoint": [], "memory": 128, "command": [ "/data/run.sh" ], "cpu": 200, "volumesFrom": [] }, { "environment": [ { "name": "KEY", "value": "value" } ], "name": "cache", "links": [], "mountPoints": [], "image": "redis:newtag", "essential": true, "portMappings": [ { "protocol": "tcp", "containerPort": 6376, "hostPort": 10376 } ], "entryPoint": [], "memory": 128, "command": [ "/data/run.sh" ], "cpu": 200, "volumesFrom": [] } ], "placementConstraints": null, "networkMode": "bridge" }
# /tmp/bats.40.src: line 463: [: too many arguments

@kakakakakku kakakakakku changed the title Supported AWS Fargate [WIP] Supported AWS Fargate Dec 19, 2017
@kakakakakku
Copy link
Contributor Author

@zeroasterisk @fillup
Thanks for your reports !
I will check error, and title changed to [WIP] 👍

@kakakakakku kakakakakku force-pushed the fargate-support branch 2 times, most recently from 3e3b592 to 675e0e0 Compare December 19, 2017 05:12
@kakakakakku kakakakakku changed the title [WIP] Supported AWS Fargate Supported AWS Fargate Dec 19, 2017
@kakakakakku
Copy link
Contributor Author

@zeroasterisk @fillup

Your task definition (JSON) seem doesn't have requiresCompatibilities key.
Thank you for your information.

So, We must support these patterns.

  • [1] requiresCompatibilities key doesn't exist
  • [2] requiresCompatibilities key equals null
  • [3] requiresCompatibilities key equals EC2
  • [4] requiresCompatibilities key equals FARGATE

Then I fixed with using jq select.

Before

# [1]
$ echo '{ "status": "ACTIVE" }' | jq -r '.requiresCompatibilities[]'
jq: error (at <stdin>:1): Cannot iterate over null (null)

# [2]
$ echo '{ "status": "ACTIVE", "requiresCompatibilities": null }' | jq -r '.requiresCompatibilities[]'
jq: error (at <stdin>:1): Cannot iterate over null (null)

# [3]
$ echo '{ "status": "ACTIVE", "requiresCompatibilities": [ "EC2" ] }' | jq -r '.requiresCompatibilities[]'
EC2

# [4]
$ echo '{ "status": "ACTIVE", "requiresCompatibilities": [ "FARGATE" ] }' | jq -r '.requiresCompatibilities[]'
FARGATE

After

# [1]
$ echo '{ "status": "ACTIVE" }' | jq -r '. | select(.requiresCompatibilities != null) | .requiresCompatibilities[]'

# [2]
$ echo '{ "status": "ACTIVE", "requiresCompatibilities": null }' | jq -r '. | select(.requiresCompatibilities != null) | .requiresCompatibilities[]'

# [3]
$ echo '{ "status": "ACTIVE", "requiresCompatibilities": [ "EC2" ] }' | jq -r '. | select(.requiresCompatibilities != null) | .requiresCompatibilities[]'
EC2

# [4]
$ echo '{ "status": "ACTIVE", "requiresCompatibilities": [ "FARGATE" ] }' | jq -r '. | select(.requiresCompatibilities != null) | .requiresCompatibilities[]'
FARGATE

tests

I added tests, and pass succsessflly.

$ docker-compose run --rm test
fetch http://dl-3.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/1) Installing bats (0.4.0-r2)
Executing busybox-1.25.1-r1.trigger
OK: 64 MiB in 31 packages
1..33
ok 1 # skip (0) check that usage() returns string and exits with status code 20
ok 2 # skip (0) test assertRequiredArgumentsSet success
ok 3 # skip (0) test assertRequiredArgumentsSet status=5
ok 4 # skip (0) test assertRequiredArgumentsSet status=6
ok 5 # skip (0) test assertRequiredArgumentsSet status=7
ok 6 # skip (0) test assertRequiredArgumentsSet status=8
ok 7 # skip (0) test assertRequiredArgumentsSet status=9
ok 8 # skip (0) test parseImageName missing image name
ok 9 # skip (0) test parseImageName invalid image name 1
ok 10 # skip (0) test parseImageName invalid port
ok 11 # skip (0) test parseImageName root image no tag
ok 12 # skip (0) test parseImageName root image with tag
ok 13 # skip (0) test parseImageName repo image no tag
ok 14 # skip (0) test parseImageName repo image with tag
ok 15 # skip (0) test parseImageName repo multilevel image no tag
ok 16 # skip (0) test parseImageName repo multilevel image with tag
ok 17 # skip (0) test parseImageName domain plus repo image no tag
ok 18 # skip (0) test parseImageName domain plus repo image with tag
ok 19 # skip (0) test parseImageName domain plus repo multilevel image no tag
ok 20 # skip (0) test parseImageName domain plus repo multilevel image with tag
ok 21 # skip (0) test parseImageName domain plus port plus repo image no tag
ok 22 # skip (0) test parseImageName domain plus port plus repo image with tag
ok 23 # skip (0) test parseImageName domain plus port plus repo multilevel image no tag
ok 24 # skip (0) test parseImageName domain plus port plus repo multilevel image with tag
ok 25 # skip (0) test parseImageName domain plus port plus repo image with tag from var
ok 26 # skip (0) test parseImageName domain plus port plus repo multilevel image with tag from var
ok 27 # skip (0) test parseImageName using ecr style domain
ok 28 # skip (0) test parseImageName using ecr style image name and tag from var
ok 29 # skip (0) test createNewTaskDefJson with single container in definition
ok 30 # skip (0) test createNewTaskDefJson with single container in definition for AWS Fargate
ok 31 # skip (0) test createNewTaskDefJson with multiple containers in definition
ok 32 # skip (0) test parseImageName with tagonly option
ok 33 # skip (0) test createNewTaskDefJson with multiple containers in definition and replace only tags

Please review again 👍

@zeroasterisk
Copy link

@kakakakakku I am looking at https://github.com/kakakakakku/ecs-deploy/tree/fargate-support and your last commit is 675e0e064bc20ad81634efdfe41d802fbe3c30e3 <-- did this change? force push?

I updated it and ran it and got:

An error occurred (ClientException) when calling the RegisterTaskDefinition operation: Invalid setting for container 'etx-onspot'. At least one of 'memory' or 'memoryReservation' must be specified.

@kakakakakku
Copy link
Contributor Author

@zeroasterisk
Yes, many PRs was merged yesterday then I rebase master and push force.

did this change? force push?

Thank you for your reports.
I have questions.

  • Do you try EC2 mode or Fargate mode ?
  • If you use ecs-deploy with master branch, how about occurring such error ?

If you try EC2 mode, memory or memoryReservation is necessary in task definition.
Your task definition ( #129 (comment) ) doesn't have memory or memoryReservation.

For containers that will be part of a task using the EC2 launch type, you must specify a non-zero integer for one or both of memory or memoryReservation in container definitions.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html

Thanks 👍

@zeroasterisk
Copy link

zeroasterisk commented Dec 19, 2017

These are fargate type of ECS deployments... both the task and the service were created as fargate (not updated from ec2) and are working when using their UI to update.

I do have a memory allocation at the task level, but not in the container level... I only have 1 container in the task.

@richardbolt
Copy link

I found success or failure to be AWS CLI version dependent. Older aws cli versions didn't work, newer ones did. For example we had aws v0.11.39 on a build machine which failed to update a Fargate service, but updating aws to 0.14.9 worked just fine for the same service.

@kakakakakku
Copy link
Contributor Author

@richardbolt
I forgot to write !
Added require version, Thanks 👍

@kakakakakku
Copy link
Contributor Author

@zeroasterisk
OK, I will try reproducing my Fargate Cluster.

Please give me your task definition (JSON), or http://sebsauvage.net/paste/?3f76a75b911230c8#FDlFZAxjQJwA1oAPflGIrsogE6Ll/A10wAFodUpNPcs= is it ?

@zeroasterisk
Copy link

@kakakakakku
Correct - after I updated my AWS CLI with $ pip install awscli --upgrade --user your fork now works for me.
Also Correct - the link you sent is my (redacted) task definition/log.

@kakakakakku
Copy link
Contributor Author

@zeroasterisk
Nice, thank you for your review👍

@tacchino
Copy link

Is this ready to go now?

@kakakakakku
Copy link
Contributor Author

Yes, I'm OK !
Please review :)

@shimont
Copy link

shimont commented Jan 15, 2018

I tried the code on our system and the deployment worked but did not perform a graceful blue-green deployment. The code killed the running revision immediately and ran the new revision successfully on ECS, but produced a script error:

+echo 'Deploying service:XXX on to cluster:dev with image:XXX.dkr.ecr.us-east-1.amazonaws.com/XXX:dev'
Deploying service:XXX on to cluster:dev with image:XXX.dkr.ecr.us-east-1.amazonaws.com/XXX:dev
+./scripts/ecs-deploy.sh --cluster dev --service-name XXX --image XXX.dkr.ecr.us-east-1.amazonaws.com/XXX:dev
Using image name: XXX.dkr.ecr.us-east-1.amazonaws.com/XXX:dev
Current task definition: arn:aws:ecs:us-east-1:XXX:task-definition/XXX-dev:1
New task definition: arn:aws:ecs:us-east-1:XXX:task-definition/XXX-dev:2
ERROR: New task definition not running within 90 seconds

@kakakakakku
Copy link
Contributor Author

kakakakakku commented Jan 16, 2018

@shimont
Thank you for your reports.
Are you trying "Fargete" deployment right ?

Please give me diff (JSON) of task-definition/XXX-dev:1 and task-definition/XXX-dev:2.
I want to check your diff of task definition.

@shimont
Copy link

shimont commented Jan 16, 2018

@kakakakakku The task diffs looks good - the problem seems to be with the blue-green deployment logic. Task 1 was killed immediately before having task 2 ready.

Diff 1

"taskDefinitionArn": "arn:aws:ecs:us-east-1:XXX:task-definition/gateway-dev:2",
"taskDefinitionArn": "arn:aws:ecs:us-east-1:XXX:task-definition/gateway-dev:1",

Diff 2

"revision": 2,
"revision": 1,

Task Definision 1

{ "executionRoleArn": "arn:aws:iam::XXX:role/gateway-taskrole", "containerDefinitions": [ { "dnsSearchDomains": null, "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "/ecs/gateway-staging-fargate", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "ecs" } }, "entryPoint": null, "portMappings": [ { "hostPort": 8000, "protocol": "tcp", "containerPort": 8000 } ], "command": null, "linuxParameters": null, "cpu": 0, "environment": [ { "name": "NODE_ENV", "value": "staging" } ], "ulimits": null, "dnsServers": null, "mountPoints": [], "workingDirectory": null, "dockerSecurityOptions": null, "memory": null, "memoryReservation": null, "volumesFrom": [], "image": "XXX.dkr.ecr.us-east-1.amazonaws.com/gateway:dev", "disableNetworking": null, "essential": true, "links": null, "hostname": null, "extraHosts": null, "user": null, "readonlyRootFilesystem": null, "dockerLabels": null, "privileged": null, "name": "gateway" } ], "placementConstraints": [], "memory": "512", "taskRoleArn": "arn:aws:iam::XXX:role/gateway-taskrole", "compatibilities": [ "EC2", "FARGATE" ], "taskDefinitionArn": "arn:aws:ecs:us-east-1:XXX:task-definition/gateway-dev:1", "family": "gateway-dev", "requiresAttributes": [ { "targetId": null, "targetType": null, "value": null, "name": "ecs.capability.execution-role-ecr-pull" }, { "targetId": null, "targetType": null, "value": null, "name": "com.amazonaws.ecs.capability.docker-remote-api.1.18" }, { "targetId": null, "targetType": null, "value": null, "name": "ecs.capability.task-eni" }, { "targetId": null, "targetType": null, "value": null, "name": "com.amazonaws.ecs.capability.ecr-auth" }, { "targetId": null, "targetType": null, "value": null, "name": "com.amazonaws.ecs.capability.task-iam-role" }, { "targetId": null, "targetType": null, "value": null, "name": "ecs.capability.execution-role-awslogs" }, { "targetId": null, "targetType": null, "value": null, "name": "com.amazonaws.ecs.capability.logging-driver.awslogs" }, { "targetId": null, "targetType": null, "value": null, "name": "com.amazonaws.ecs.capability.docker-remote-api.1.19" } ], "requiresCompatibilities": [ "FARGATE" ], "networkMode": "awsvpc", "cpu": "256", "revision": 1, "status": "ACTIVE", "volumes": [] }

Task Definition 2

{ "executionRoleArn": "arn:aws:iam::XXX:role/gateway-taskrole", "containerDefinitions": [ { "dnsSearchDomains": null, "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "/ecs/gateway-staging-fargate", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "ecs" } }, "entryPoint": null, "portMappings": [ { "hostPort": 8000, "protocol": "tcp", "containerPort": 8000 } ], "command": null, "linuxParameters": null, "cpu": 0, "environment": [ { "name": "NODE_ENV", "value": "staging" } ], "ulimits": null, "dnsServers": null, "mountPoints": [], "workingDirectory": null, "dockerSecurityOptions": null, "memory": null, "memoryReservation": null, "volumesFrom": [], "image": "XXX.dkr.ecr.us-east-1.amazonaws.com/gateway:dev", "disableNetworking": null, "essential": true, "links": null, "hostname": null, "extraHosts": null, "user": null, "readonlyRootFilesystem": null, "dockerLabels": null, "privileged": null, "name": "gateway" } ], "placementConstraints": [], "memory": "512", "taskRoleArn": "arn:aws:iam::XXX:role/gateway-taskrole", "compatibilities": [ "EC2", "FARGATE" ], "taskDefinitionArn": "arn:aws:ecs:us-east-1:XXX:task-definition/gateway-dev:2", "family": "gateway-dev", "requiresAttributes": [ { "targetId": null, "targetType": null, "value": null, "name": "ecs.capability.execution-role-ecr-pull" }, { "targetId": null, "targetType": null, "value": null, "name": "com.amazonaws.ecs.capability.docker-remote-api.1.18" }, { "targetId": null, "targetType": null, "value": null, "name": "ecs.capability.task-eni" }, { "targetId": null, "targetType": null, "value": null, "name": "com.amazonaws.ecs.capability.ecr-auth" }, { "targetId": null, "targetType": null, "value": null, "name": "com.amazonaws.ecs.capability.task-iam-role" }, { "targetId": null, "targetType": null, "value": null, "name": "ecs.capability.execution-role-awslogs" }, { "targetId": null, "targetType": null, "value": null, "name": "com.amazonaws.ecs.capability.logging-driver.awslogs" }, { "targetId": null, "targetType": null, "value": null, "name": "com.amazonaws.ecs.capability.docker-remote-api.1.19" } ], "requiresCompatibilities": [ "FARGATE" ], "networkMode": "awsvpc", "cpu": "256", "revision": 2, "status": "ACTIVE", "volumes": [] }

@shimont
Copy link

shimont commented Jan 16, 2018

@kakakakakku after performing further tests I think that the problem was on my end. The task didnt register correctly via the ALB due to an error in the configuration of the health check endpoint. I've performed the test again and I can confirm that a full cycle of deployment to FARGATE is working great! The only thing I suggest people do is change the --timeout argument from 90sec to 360sec as FARGATE can take some time to deploy the new container

@kakakakakku
Copy link
Contributor Author

@shimont
Nice deployment 🎉🎉🎉

Yes, I think so too ! (My opinion) Because "Fargate" require awsvpc networking mode, so ENI has attached to all containers and some initial time needed.

FARGATE can take some time to deploy the new container

Owner, please review continuously 👍
Thank you.

@mohuk
Copy link

mohuk commented Jan 16, 2018

any plans for merging this ?

@shimont
Copy link

shimont commented Jan 22, 2018

Could you please merge this?

@bazaglia
Copy link

Tested and approved. +1 for merging this.

@bazaglia bazaglia mentioned this pull request Feb 7, 2018
@himberjack
Copy link

Working! Please merge

@cameronk
Copy link

cameronk commented Mar 5, 2018

Bumping this, looking forward to a merge!

matt-giuliani added a commit to matt-giuliani/ecs-deploy that referenced this pull request Mar 8, 2018
@adambiggs
Copy link

I can also confirm that this fixes Fargate deploys.

Please merge! :octocat:

@myoung34
Copy link

Bumping, need this sooner than later =)

@fillup
Copy link
Contributor

fillup commented Mar 14, 2018

Hi all, I'm really sorry for taking forever to catch up with this. I just pulled this down but one of the new tests is failing, @kakakakakku can you check this?

not ok 30 test createNewTaskDefJson with single container in definition for AWS Fargate
# (in test file test.bats, line 347)
#   `[ $output == $expected ]' failed

Also as an FYI, this does not work with tasks that were created a while ago (dont, maybe pre-fargate?). When running this update against a test service I have it throws a different error that seems to be from the aws-cli itself as it has python type errors:

./ecs-deploy -c staging1 -n ecs-deploy-testing -i silintl/http-to-https:latest
Using image name: silintl/http-to-https:latest
Current task definition: arn:aws:ecs:us-east-1:1234567890:task-definition/staging-ecs-deploy-testing:40

Parameter validation failed:
Invalid type for parameter placementConstraints, value: None, type: <type 'NoneType'>, valid types: <type 'list'>, <type 'tuple'>

I went into the AWS console and created a new revision without changing anything and re-ran ecs-deploy and it worked just fine.

When we get the test issue resolved I'll be happy to get this merged in.

@kakakakakku
Copy link
Contributor Author

@fillup
Thanks !

But all tests are passed on December, see my comment / #129 (comment) .
I will run again 👍

@kakakakakku kakakakakku force-pushed the fargate-support branch 2 times, most recently from 6d40c1a to 9624c4e Compare March 31, 2018 04:11
@kakakakakku
Copy link
Contributor Author

kakakakakku commented Mar 31, 2018

@fillup
Oh, I understand.

on January placementConstraints parameter supported via #114 .
My Pull-Request created on December, so some parameter different.

$ diff -u output.json expected.json
--- output.json	2018-03-31 13:00:13.000000000 +0900
+++ expected.json	2018-03-31 13:00:23.000000000 +0900
@@ -22,7 +22,6 @@
 		"cpu": 200,
 		"volumesFrom": []
 	}],
-	"placementConstraints": null,
 	"networkMode": "awsvpc",
 	"executionRoleArn": "arn:aws:iam::121212345678:role/ecsTaskExecutionRole",
 	"requiresCompatibilities": ["FARGATE"],

So I rebased from develop master and fixed it ( 423b003 ) .

tests

$ docker-compose run --rm test
fetch http://dl-3.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/1) Installing bats (0.4.0-r2)
Executing busybox-1.25.1-r1.trigger
OK: 65 MiB in 31 packages
1..33
ok 1 # skip (0) check that usage() returns string and exits with status code 20
ok 2 # skip (0) test assertRequiredArgumentsSet success
ok 3 # skip (0) test assertRequiredArgumentsSet status=5
ok 4 # skip (0) test assertRequiredArgumentsSet status=6
ok 5 # skip (0) test assertRequiredArgumentsSet status=7
ok 6 # skip (0) test assertRequiredArgumentsSet status=8
ok 7 # skip (0) test assertRequiredArgumentsSet status=9
ok 8 # skip (0) test parseImageName missing image name
ok 9 # skip (0) test parseImageName invalid image name 1
ok 10 # skip (0) test parseImageName invalid port
ok 11 # skip (0) test parseImageName root image no tag
ok 12 # skip (0) test parseImageName root image with tag
ok 13 # skip (0) test parseImageName repo image no tag
ok 14 # skip (0) test parseImageName repo image with tag
ok 15 # skip (0) test parseImageName repo multilevel image no tag
ok 16 # skip (0) test parseImageName repo multilevel image with tag
ok 17 # skip (0) test parseImageName domain plus repo image no tag
ok 18 # skip (0) test parseImageName domain plus repo image with tag
ok 19 # skip (0) test parseImageName domain plus repo multilevel image no tag
ok 20 # skip (0) test parseImageName domain plus repo multilevel image with tag
ok 21 # skip (0) test parseImageName domain plus port plus repo image no tag
ok 22 # skip (0) test parseImageName domain plus port plus repo image with tag
ok 23 # skip (0) test parseImageName domain plus port plus repo multilevel image no tag
ok 24 # skip (0) test parseImageName domain plus port plus repo multilevel image with tag
ok 25 # skip (0) test parseImageName domain plus port plus repo image with tag from var
ok 26 # skip (0) test parseImageName domain plus port plus repo multilevel image with tag from var
ok 27 # skip (0) test parseImageName using ecr style domain
ok 28 # skip (0) test parseImageName using ecr style image name and tag from var
ok 29 # skip (0) test createNewTaskDefJson with single container in definition
ok 30 # skip (0) test createNewTaskDefJson with single container in definition for AWS Fargate
ok 31 # skip (0) test createNewTaskDefJson with multiple containers in definition
ok 32 # skip (0) test parseImageName with tagonly option
ok 33 # skip (0) test createNewTaskDefJson with multiple containers in definition and replace only tags

Please review, Thanks !

@fillup fillup merged commit 9e8038d into silinternational:develop Apr 2, 2018
@fillup
Copy link
Contributor

fillup commented Apr 2, 2018

Thanks @kakakakakku for getting that fixed, it all looks good to me so I've merged it in and will roll out a release shortly

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

Successfully merging this pull request may close these issues.