From 057eb837693c87097a1b3ed03400882e4c1784fb Mon Sep 17 00:00:00 2001 From: Matheus Ferreira Date: Wed, 12 Jul 2023 21:02:26 +0000 Subject: [PATCH 1/4] Add new enviroment var --- main.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.sh b/main.sh index 71c6d3c..9a83ddb 100755 --- a/main.sh +++ b/main.sh @@ -2,6 +2,10 @@ set -eo pipefail +if [ ! -z "$MAESTRO_REPO_OVERRIDE" ]; then + REPO_SLUG=$MAESTRO_REPO_OVERRIDE +fi + if [ -z "$REPO_SLUG" ]; then REPO_SLUG=${CODEBUILD_SOURCE_REPO_URL#*://*/} REPO_SLUG=${REPO_SLUG,,} From 98bffb29915cf809a82b29591cb450800029614d Mon Sep 17 00:00:00 2001 From: Matheus Ferreira Date: Wed, 12 Jul 2023 21:12:55 +0000 Subject: [PATCH 2/4] Update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 72d664f..d288094 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ Variable | Description | Examples/Values | Default `DEPLOYMENT_CIRCUIT_BREAKER_RULE` | Enable or disable circuit breaker | `enable=true,rollback=true` `ECS_CONTAINER_STOP_TIMEOUT` | Set stopTimeout on taskdefinition | min: 0, max: 120, default: 30 `TZ`| Set this variable to the desired task timezone | America/Sao_Paulo + `MAESTRO_REPO_OVERRIDE` | Temporary overriding on the repo name ### How to enable scheduled tasks - Create a file tasks/run_tasks.conf with the schedules on your code: From 43a9fe0592d7941bd55994718b2b4c66a68f6635 Mon Sep 17 00:00:00 2001 From: Matheus Ferreira Date: Wed, 12 Jul 2023 21:15:26 +0000 Subject: [PATCH 3/4] Change local in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d288094..39b55da 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ Variable | Description | Examples/Values | Default `ECS_SERVICE_TASK_PROCESSES` | Processes intended to have a service to be created according to Procfile

*Multiple services can be assigned using comma as separator*

*For CPU and RAM assignment use semicolon as separator and curly brackets as container*
*For number of tasks assignment use colon as separator and a dash between numbers to define max task auto scaling value*
*For CPU and RAM usage percentage and ALB request count auto scaling triggers assignment use semicolon as separator and square brackets as container* | `web`
`web,worker`
`web{1024;2048}:2-5[mem=55;cpu=60;alb=1000]`
`web{512;1024}:2,worker{1024;2048}:1-3`

Add `scheduledtasks{256;512}` process to be able to create Scheduled Tasks. Does not create an ECS service, only enables the feature

`{;}:-[;]`

`` = Process name
`` = Desired number of v-cpus per task x1024
`` = Desired allocated MB of RAM per task
`` = Minimum amount of tasks per process, can be used without a max value so as to not use auto scaling
`` = Maximum amount of tasks per process
``= RAM usage percentage auto scaling trigger
`` = CPU usage percentage auto scaling trigger
`` = Load Balancer request count auto scaling trigger

Example using all default values except for `Tasks per Process`:
`test:2-5,scheduledtasks`
Fully disclosed example would be:
`test{512;512}:2-5[cpu=55],scheduledtasks{256;512}` | `` = 512
`` = 512
`` = 1
`` = 55 (if auto scaling is active)

`scheduledtasks ` = 256
`scheduledtasks ` = 512 `ECS_TASK_ROLE_ARN` | IAM Role ARN linked to ECS Task | `arn:aws:iam::0123456789:role/` `MAESTRO_BRANCH_OVERRIDE` | Temporary overriding of the working branch | `staging`
`production` + `MAESTRO_REPO_OVERRIDE` | Temporary overriding on the repo name `MAESTRO_DEBUG` | Amplify verbosity of the build

**Choose only one of the example values** | `true`
`false` `MAESTRO_NO_CACHE` | If the cache layer shouldn't be used in the pack build

**Choose only one of the example values** | `true`
`false` `MAESTRO_ONLY_BUILD` | Stops after build if `true`, leave empty otherwise | `true` @@ -80,7 +81,6 @@ Variable | Description | Examples/Values | Default `DEPLOYMENT_CIRCUIT_BREAKER_RULE` | Enable or disable circuit breaker | `enable=true,rollback=true` `ECS_CONTAINER_STOP_TIMEOUT` | Set stopTimeout on taskdefinition | min: 0, max: 120, default: 30 `TZ`| Set this variable to the desired task timezone | America/Sao_Paulo - `MAESTRO_REPO_OVERRIDE` | Temporary overriding on the repo name ### How to enable scheduled tasks - Create a file tasks/run_tasks.conf with the schedules on your code: From 020be7ab016dd99be689be1be7a6962e1b0465ea Mon Sep 17 00:00:00 2001 From: Matheus Ferreira Date: Wed, 12 Jul 2023 21:17:03 +0000 Subject: [PATCH 4/4] Fix variable description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 39b55da..cf9c8c3 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Variable | Description | Examples/Values | Default `ECS_SERVICE_TASK_PROCESSES` | Processes intended to have a service to be created according to Procfile

*Multiple services can be assigned using comma as separator*

*For CPU and RAM assignment use semicolon as separator and curly brackets as container*
*For number of tasks assignment use colon as separator and a dash between numbers to define max task auto scaling value*
*For CPU and RAM usage percentage and ALB request count auto scaling triggers assignment use semicolon as separator and square brackets as container* | `web`
`web,worker`
`web{1024;2048}:2-5[mem=55;cpu=60;alb=1000]`
`web{512;1024}:2,worker{1024;2048}:1-3`

Add `scheduledtasks{256;512}` process to be able to create Scheduled Tasks. Does not create an ECS service, only enables the feature

`{;}:-[;]`

`` = Process name
`` = Desired number of v-cpus per task x1024
`` = Desired allocated MB of RAM per task
`` = Minimum amount of tasks per process, can be used without a max value so as to not use auto scaling
`` = Maximum amount of tasks per process
``= RAM usage percentage auto scaling trigger
`` = CPU usage percentage auto scaling trigger
`` = Load Balancer request count auto scaling trigger

Example using all default values except for `Tasks per Process`:
`test:2-5,scheduledtasks`
Fully disclosed example would be:
`test{512;512}:2-5[cpu=55],scheduledtasks{256;512}` | `` = 512
`` = 512
`` = 1
`` = 55 (if auto scaling is active)

`scheduledtasks ` = 256
`scheduledtasks ` = 512 `ECS_TASK_ROLE_ARN` | IAM Role ARN linked to ECS Task | `arn:aws:iam::0123456789:role/` `MAESTRO_BRANCH_OVERRIDE` | Temporary overriding of the working branch | `staging`
`production` - `MAESTRO_REPO_OVERRIDE` | Temporary overriding on the repo name + `MAESTRO_REPO_OVERRIDE` | Temporary overriding of the repo name `MAESTRO_DEBUG` | Amplify verbosity of the build

**Choose only one of the example values** | `true`
`false` `MAESTRO_NO_CACHE` | If the cache layer shouldn't be used in the pack build

**Choose only one of the example values** | `true`
`false` `MAESTRO_ONLY_BUILD` | Stops after build if `true`, leave empty otherwise | `true`