From dee0e5a278f2df5dcccaaafc48eab374a32cd62f Mon Sep 17 00:00:00 2001 From: Michael Robinson Date: Fri, 15 Jul 2016 20:39:12 +1200 Subject: [PATCH 1/4] Updated LambCI access policy modification section --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d4af9c7..f5c5a8a 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,19 @@ permissions something like this: ```json { - "Effect": "Allow", - "Action": "ecs:RunTask", - "Resource": "arn:aws:ecs:*:*:task-definition/lambci-ecs-BuildTask-1PVABCDEFKFT" + "PolicyName": "LambCIECS", + "PolicyDocument": { + "Statement": { + "Effect": "Allow", + "Action": "ecs:RunTask", + "Resource": "arn:aws:ecs:*:*:task-definition/lambci-ecs-BuildTask-1PVABCDEFKFT" + } + } } ``` +This block should be added as part of the `LambdaExecution > Properties > Policies` section of the `lambci` template. + Where you replace the resource with the name of the ECS task definition created in your `lambci-ecs` stack. Then in the project you want to build using ECS, you'll need to ensure the following LambCI config settings are given: From 753be559cc56b79158223ab24953981093d5379d Mon Sep 17 00:00:00 2001 From: Michael Robinson Date: Fri, 15 Jul 2016 20:44:18 +1200 Subject: [PATCH 2/4] Updated resource value replacement section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f5c5a8a..ca943c9 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ permissions something like this: This block should be added as part of the `LambdaExecution > Properties > Policies` section of the `lambci` template. -Where you replace the resource with the name of the ECS task definition created in your `lambci-ecs` stack. +Replace the `Resource` value with the name of the ECS task definition created in your `lambci-ecs` stack. Then in the project you want to build using ECS, you'll need to ensure the following LambCI config settings are given: From f75ecfd38b994a2e7aca971c3191e695304a39c5 Mon Sep 17 00:00:00 2001 From: Michael Robinson Date: Fri, 15 Jul 2016 20:57:28 +1200 Subject: [PATCH 3/4] Added screenshots and clearer instructions for AWS noobs like myself --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ca943c9..f3d969b 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ # LambCI ECS cluster and Docker image More documentation should be coming soon, but to get up and running quickly, -launch the `cluster.template` file in CloudFormation and give your stack a name like `lambci-ecs` +launch the `cluster.template` file in CloudFormation and give your stack a name like `lambci-ecs`. (You should have already created a LambCI stack as documented at https://github.com/lambci/lambci) This will create an auto-scaling group and an ECS cluster and task definition, which you can find in the AWS console from `Services > EC2 Container Service` +LambCI will automatically send builds to the ECS stack if a `Dockerfile.test` is present in the root of the repository. + ## LambCI configuration You'll need to give the Lambda function in your LambCI stack access to run the task, so will need add to IAM @@ -30,6 +32,10 @@ This block should be added as part of the `LambdaExecution > Properties > Polici Replace the `Resource` value with the name of the ECS task definition created in your `lambci-ecs` stack. +![Example resource location](http://i.imgur.com/3U7NHQr.png) + +## Project configuration + Then in the project you want to build using ECS, you'll need to ensure the following LambCI config settings are given: ```js @@ -41,6 +47,8 @@ Then in the project you want to build using ECS, you'll need to ensure the follo } ``` -(replacing with the actual names of your cluster and task) +(replacing with the actual names of your ECS cluster and task) + +![Example cluster and task location](http://i.imgur.com/DKgcdBU.png) These are normal LambCI config settings which you can set in your `.lambci.js[on]` file or in the config DB. From c0d8017120d237a35485c4e1f23a3115f9401c3b Mon Sep 17 00:00:00 2001 From: Michael Robinson Date: Fri, 15 Jul 2016 20:58:31 +1200 Subject: [PATCH 4/4] Clarified dockerfile.test usage --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3d969b..29eda5c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ launch the `cluster.template` file in CloudFormation and give your stack a name This will create an auto-scaling group and an ECS cluster and task definition, which you can find in the AWS console from `Services > EC2 Container Service` -LambCI will automatically send builds to the ECS stack if a `Dockerfile.test` is present in the root of the repository. +LambCI-ECS will look for a `Dockerfile.test` is in the root of the repository. This is where you put your test/build instructions. ## LambCI configuration