{"id":34160145,"url":"https://github.com/openfresh/ecs-formation","last_synced_at":"2026-03-13T04:31:09.615Z","repository":{"id":32750657,"uuid":"36341561","full_name":"openfresh/ecs-formation","owner":"openfresh","description":"Tool to build Docker cluster composition for Amazon EC2 Container Service(ECS)","archived":false,"fork":false,"pushed_at":"2017-11-03T12:37:19.000Z","size":317,"stargazers_count":112,"open_issues_count":9,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-12-18T02:49:31.440Z","etag":null,"topics":["alb","autoscaling","aws","deployment","devops","docker","ec2","ecs","elb"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openfresh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-27T03:57:29.000Z","updated_at":"2025-10-28T13:52:54.000Z","dependencies_parsed_at":"2022-07-17T22:00:33.479Z","dependency_job_id":null,"html_url":"https://github.com/openfresh/ecs-formation","commit_stats":null,"previous_names":["stormcat24/ecs-formation"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/openfresh/ecs-formation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfresh%2Fecs-formation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfresh%2Fecs-formation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfresh%2Fecs-formation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfresh%2Fecs-formation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openfresh","download_url":"https://codeload.github.com/openfresh/ecs-formation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfresh%2Fecs-formation/sbom","scorecard":{"id":709430,"data":{"date":"2025-08-11","repo":{"name":"github.com/openfresh/ecs-formation","commit":"c83230f3e3f2a9c8846976b5f1f991ad5bdedbff"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:8: pin your Docker image by updating gliderlabs/alpine:3.6 to gliderlabs/alpine:3.6@sha256:8debff4c382f191b3bae5dc366043f32f0ceb45787d2781af931339ed2fc0d11","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T07:42:49.906Z","repository_id":32750657,"created_at":"2025-08-22T07:42:49.906Z","updated_at":"2025-08-22T07:42:49.906Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30457998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T03:55:51.346Z","status":"ssl_error","status_checked_at":"2026-03-13T03:55:33.055Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alb","autoscaling","aws","deployment","devops","docker","ec2","ecs","elb"],"created_at":"2025-12-15T08:17:44.411Z","updated_at":"2026-03-13T04:31:09.589Z","avatar_url":"https://github.com/openfresh.png","language":"Go","readme":"ecs-formation\n==========\n\n[![Circle CI](https://circleci.com/gh/openfresh/ecs-formation.svg?style=shield\u0026circle-token=baf60b45ce2de8c5d11b3e6d77a3a23ebf2d5991)](https://circleci.com/gh/openfresh/ecs-formation)\n[![Language](http://img.shields.io/badge/language-go-brightgreen.svg?style=flat)](https://golang.org/)\n[![issues](https://img.shields.io/github/issues/openfresh/ecs-formation.svg?style=flat)](https://github.com/openfresh/ecs-formation/issues?state=open)\n[![License: MIT](http://img.shields.io/badge/license-MIT-orange.svg)](LICENSE)\n\necs-formation is a tool for defining several Docker continers and clusters on [Amazon EC2 Container Service(ECS)](https://aws.amazon.com/ecs/).\n\n# Features\n\n* Define services on ECS cluster, and Task Definitions.\n* Supports YAML definition like docker-compose. Be able to run ecs-formation if copy docker-compose.yml(formerly fig.yml).\n* Manage ECS Services and Task Definitions by AWS API.\n* Support ELB(Classic Load Balancer) and ALB(Application Load Balancer)\n* [Service Auto Scaling](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html)\n* [Task Placement Policy](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement.html)\n\n# Usage\n\n### Setup\n\n#### Installation\n\necs-formation is written by Go. Please run `go get`.\n\n```bash\n$ go get github.com/openfresh/ecs-formation\n```\n\n#### Define environment variables\n\necs-formation use [cobra](https://github.com/spf13/cobra). It supports yaml configuration.\n\nPrepare `~/.ecs-formation.yaml` for project configuration.\n\n```Ruby\nproject_dir: ~/your_project_dir/\naws_region: us-east-1\n```\n\necs-formation requires environment variables to run, as follows.\n\n* AWS_ACCESS_KEY: AWS access key\n* AWS_SECRET_ACCESS_KEY: AWS secret access key\n* AWS_REGION: Target AWS region name\n\n#### Make working directory\n\nMake working directory for ecs-formation. This working directory should be managed by Git.\n\n```bash\n$ mkdir -p path-to-path/test-ecs-formation\n$ mkdir -p path-to-path/test-ecs-formation/task\n$ mkdir -p path-to-path/test-ecs-formation/service\n$ mkdir -p path-to-path/test-ecs-formation/bluegreen\n```\n\n### Manage Task Definition and Services\n\n#### Make ECS Cluster\n\nYou need to create ECS cluster in advance. And also, ECS instance must be join in ECS cluster.\n\n#### Define Task Definitions\n\nMake Task Definitions file in task directory. This file name is used as ECS Task Definition name.\n\n```bash\n(path-to-path/test-ecs-formation/task) $ vim test-definition.yml\nnginx:\n  image: nginx:latest\n  ports:\n    - 80:80\n  environment:\n    PARAM1: value1\n    PARAM2: value2\n  links:\n    - api\n  memory_reservation: 256\n  cpu_units: 512\n  essential: true\n\napi:\n  image: your_namespace/your-api:latest\n  ports:\n    - 8080:8080\n  memory: 1024\n  cpu_units: 1024\n  essential: true\n  links:\n    - redis\n\nredis:\n  image: redis:latest\n  ports:\n    - 6379:6379\n  memory: 512\n  cpu_units: 512\n  essential: true\n```\n\n#### Define Services on Cluster\n\nMake Service Definition file in cluster directory. This file name must be equal ECS cluster name.\n\nFor example, if target cluster name is `test-cluster`, you need to make `test-cluster.yml`.\n\n```bash\n(path-to-path/test-ecs-formation/service) $ vim test-cluster.yml\ntest-service:\n  task_definition: test-definition\n  desired_count: 1\n  role: your-ecs-elb-role\n  load_balancers:\n    -\n      name: test-elb\n      container_name: nginx\n      container_port: 80\n  autoscaling:\n    target:\n      min_capacity: 0\n      max_capacity: 1\n      role: arn:aws:iam::your_account_id:role/ecsAutoscaleRole\n\n```\n\nIn case of ALB, you should specify `target_group_arn`.\n```bash\n(path-to-path/test-ecs-formation/service) $ vim test-cluster.yml\ntest-service:\n  task_definition: test-definition\n  desired_count: 1\n  role: your-ecs-elb-role\n  load_balancers:\n    -\n      target_group_arn: test-target-group-arn\n      container_name: nginx\n      container_port: 80\n```\n\n\n\n#### Keep desired_count at updating service\n\nIf you modify value of `desired_count` by AWS Management Console or aws-cli, you'll fear override value of `desired_count` by ecs-formation. This value should be flexibly changed in the operation.\n\nIf `keep_desired_count` is `true`, keep current `desired_count` at updating service.\n\n```bash\n(path-to-path/test-ecs-formation/service) $ vim test-cluster.yml\ntest-service:\n  task_definition: test-definition\n  desired_count: 1\n  keep_desired_count: true\n```\n\n#### Task Placement Policy\n\nSupports `placement_constraints` and `placement_strategy`. If you update these options, it's necessary to rebuild service once.    \n\n```bash\n(path-to-path/test-ecs-formation/service) $ vim test-cluster.yml\ntest-service:   \n  task_definition: test-definition\n  desired_count: 1\n  keep_desired_count: true\n  placement_constraints:\n    - type: memberOf\n      expression: \"attribute:ecs.instance-type =~ t2.*\"\n  placement_strategy:\n    - type: spread\n      field: \"attribute:ecs.availability-zone\"\n```\n\n\n#### Manage Task Definitions\n\nShow update plan.\n\n```bash\n(path-to-path/test-ecs-formation $ ecs-formation task plan --all\n(path-to-path/test-ecs-formation $ ecs-formation task plan -t test_definition\n```\n\nApply all definition.\n\n```bash\n(path-to-path/test-ecs-formation $ ecs-formation task apply --all\n(path-to-path/test-ecs-formation $ ecs-formation task apply -t test_definition\n```\n\n#### Manage Services on Cluster\n\nShow update plan. Required cluster.\n\n```bash\n(path-to-path/test-ecs-formation $ ecs-formation service plan -c test-cluster --all\n```\n\nApply all services.\n\n```bash\n(path-to-path/test-ecs-formation $ ecs-formation service apply -c test-cluster --all\n```\n\nSpecify cluster and service.\n\n```bash\n(path-to-path/test-ecs-formation $ ecs-formation service apply -c test-cluster -s test-service\n```\n\n### Blue Green Deployment\n\necs-formation supports blue-green deployment.\n\n#### Requirements on ecs-formation\n\n* Requires two ECS cluster. Blue and Green.\n* Requires two ELB. Primary ELB and Standby ELB.\n* ECS cluster should be built by EC2 Autoscaling group.\n\n#### Define Blue Green Deployment\n\nMake management file of Blue Green Deployment file in bluegreen directory.\n\n```bash\n(path-to-path/test-ecs-formation/bluegreen) $ vim test-bluegreen.yml\nblue:\n  cluster: test-blue\n  service: test-service\n  autoscaling_group: test-blue-asg\ngreen:\n  cluster: test-green\n  service: test-service\n  autoscaling_group: test-green-asg\nprimary_elb: test-elb-primary\nstandby_elb: test-elb-standby\n```\n\nShow blue green deployment plan.\n\n```bash\n(path-to-path/test-ecs-formation $ ecs-formation bluegreen plan\n```\n\nApply blue green deployment.\n\n```bash\n(path-to-path/test-ecs-formation $ ecs-formation bluegreen apply -g test-bluegreen\n```\n\nif with `--nodeploy` option, not update services. Only swap ELB on blue and green groups.\n\n```bash\n(path-to-path/test-ecs-formation $ ecs-formation bluegreen apply --nodeploy -g test-bluegreen\n```\n\nIf autoscaling group have several different classic ELB, you should specify array property of `chain_elb`. ecs-formation can swap `chain_elb` ELB group with main ELB group at the same time.\n\n```Ruby\n(path-to-path/test-ecs-formation/bluegreen) $ vim test-bluegreen.yml\nblue:\n  cluster: test-blue\n  service: test-service\n  autoscaling_group: test-blue-asg\ngreen:\n  cluster: test-green\n  service: test-service\n  autoscaling_group: test-green-asg\nprimary_elb: test-elb-primary\nstandby_elb: test-elb-standby\nchain_elb:\n  - primary_elb: test-internal-elb-primary\n    standby_elb: test-internal-elb-standby\n```\n\nIn case of ALB(Application Load Balancer), as follows.\n\n```Ruby\n(path-to-path/test-ecs-formation/bluegreen) $ vim test-bluegreen.yml\nblue:\n  cluster: test-blue\n  service: test-service\n  autoscaling_group: test-blue-asg\ngreen:\n  cluster: test-green\n  service: test-service\n  autoscaling_group: test-green-asg\nelbv2:\n  target_groups:\n    - primary_group: test-internal-primary\n      standby_group: test-internal-default\n```\n\n### Others\n#### Passing custom parameters\n\nYou can use custom parameters. Define parameters in yaml file(task, service, bluegreen) as follows.\n\n```Ruby\nnginx:\n    image: openfresh/nginx:${NGINX_VERSION}\n    ports:\n        - 80:${NGINX_PORT}\n```\n\nYou can set value for these parameters by using `-p` option.\n\n```bash\necs-formation task -p NGINX_VERSION=1.0 -p NGINX_PORT=80 plan -t your-web-task\n```\n\nAlso, support default parameter value.\n\n```Ruby\nnginx:\n    image: openfresh/nginx:${NGINX_VERSION|latest}\n    ports:\n        - 80:${NGINX_PORT|80}\n```\n\n#### env_file\n\nYou can use `env_file` like docker-compose. https://docs.docker.com/compose/compose-file/#env-file\n\n```Ruby\nnginx:\n    image: openfresh/nginx:${NGINX_VERSION}\n    ports:\n        - 80:${NGINX_PORT}\n    env_file:\n        - ./test1.env\n        - ../test2.env\n```\n\nLicense\n===\nSee [LICENSE](LICENSE).\n\nCopyright © FRESH!. All Rights Reserved.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfresh%2Fecs-formation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfresh%2Fecs-formation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfresh%2Fecs-formation/lists"}