All Projects → h3poteto → ecs-goploy

h3poteto / ecs-goploy

Licence: MIT License
re-implementation of ecs-deploy in Golang

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to ecs-goploy

Ecs Deploy
Simple shell script for initiating blue-green deployments on Amazon EC2 Container Service (ECS)
Stars: ✭ 1,809 (+5735.48%)
Mutual labels:  continuous-deployment, aws-ecs, ecs-deploy
alloy-runner
AlloyCI Runner
Stars: ✭ 16 (-48.39%)
Mutual labels:  continuous-deployment
repotoddy
Repotoddy is a continuous deployment tool that works in conjunction with Reposado. An open source tool that replicates the key functionality of macOS Server's Software Update Service.
Stars: ✭ 26 (-16.13%)
Mutual labels:  continuous-deployment
hygieia
CapitalOne DevOps Dashboard
Stars: ✭ 3,697 (+11825.81%)
Mutual labels:  continuous-deployment
terraform-aws-ecs-fargate-task-definition
AWS ECS Fargate Task Definition Terraform Module
Stars: ✭ 20 (-35.48%)
Mutual labels:  aws-ecs
LocalSupport
A directory of local support services and volunteer opportunities
Stars: ✭ 60 (+93.55%)
Mutual labels:  continuous-deployment
jam-stack-box
Your own self hosted continuous deployment solution for JAM Stack websites.
Stars: ✭ 25 (-19.35%)
Mutual labels:  continuous-deployment
e9-cloudformation-docker-ecs
Docker on Amazon ECS with AWS Fargate using CloudFormation. https://devteds.com/episodes/9-docker-on-amazon-ecs-using-cloudformation
Stars: ✭ 78 (+151.61%)
Mutual labels:  aws-ecs
book-monorepo-cicd
Effectively build, test, and deploy code with monorepos.
Stars: ✭ 59 (+90.32%)
Mutual labels:  continuous-deployment
setup-scheme
Github Actions CI / CD setup for Scheme
Stars: ✭ 13 (-58.06%)
Mutual labels:  continuous-deployment
cloud-s4-sdk-pipeline-docker
The Cloud SDK continuous delivery infrastructure makes heavy use of docker images. This are the docker sources of these images.
Stars: ✭ 13 (-58.06%)
Mutual labels:  continuous-deployment
portainer-stack-utils
CLI client for Portainer
Stars: ✭ 66 (+112.9%)
Mutual labels:  continuous-deployment
chroma-feedback
Turn your RGB powered hardware into a status indicator for continuous integration, continuous deployment and infrastructure monitoring
Stars: ✭ 106 (+241.94%)
Mutual labels:  continuous-deployment
terraform-aws-ecs-task-definition
A Terraform module for creating Amazon ECS Task Definitions
Stars: ✭ 67 (+116.13%)
Mutual labels:  aws-ecs
hookah
Deploying apps directly from a git push
Stars: ✭ 36 (+16.13%)
Mutual labels:  continuous-deployment
Stack-Lifecycle-Deployment
OpenSource self-service infrastructure solution that defines and manages the complete lifecycle of resources used and provisioned into a cloud! It is a terraform UI with rest api for terraform automation
Stars: ✭ 88 (+183.87%)
Mutual labels:  continuous-deployment
flagsmith-js-client
Javascript Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 42 (+35.48%)
Mutual labels:  continuous-deployment
flagsmith-nodejs-client
Flagsmith Node JS Client. Flagsmith lets you manage features flags across web, mobile and server side applications. Get builds out faster. Control who has access to new features.
Stars: ✭ 13 (-58.06%)
Mutual labels:  continuous-deployment
repl.deploy
Automatically deploy from GitHub to Replit, lightning fast ⚡️
Stars: ✭ 63 (+103.23%)
Mutual labels:  continuous-deployment
sharenlearn
A Common File/Resource Sharing Platform for Students & Faculties built using HTML, CSS, Javascript, & Django.
Stars: ✭ 44 (+41.94%)
Mutual labels:  continuous-deployment

ecs-goploy

Build Status GitHub release GoDoc

ecs-goploy is a re-implementation of ecs-deploy in Golang.

This is a command line tool, but you can use deploy as a package. So when you write own deploy script for AWS ECS, you can embed deploy package in your golang source code and customize deploy recipe. Please check godoc.

Install

Get binary from github:

$ wget https://github.com/h3poteto/ecs-goploy/releases/download/v0.5.0/ecs-goploy_v0.5.0_linux_amd64.zip
$ unzip ecs-goploy_v0.5.0_linux_amd64.zip
$ ./ecs-goploy --help

Usage

$ ./ecs-goploy --help
Deploy commands for ECS

Usage:
  ecs-goploy [command]

Available Commands:
  help        Help about any command
  run         Run command
  update      Update some ECS resource
  version     Print the version number

Flags:
  -h, --help             help for ecs-goploy
      --profile string   AWS profile (detault is none, and use environment variables)
      --region string    AWS region (default is none, and use AWS_DEFAULT_REGION)
  -v, --verbose          Enable verbose mode

Use "ecs-goploy [command] --help" for more information about a command.

Deploy an ECS Service

Please specify cluser, service name and image(family:revision).

$ ./ecs-goploy update service --cluster my-cluster --service-name my-service --image nginx:stable --skip-check-deployments --enable-rollback

If you specify --base-task-definition, ecs-goploy updates the task definition with the image and deploy ecs service. If you does not specify --base-task-definition, ecs-goploy get current task definition of the service, and update with the image, and deploy ecs service.

Run Task

At first, you must update the task definition which is used to run ecs task. After that, you can run ecs task.

$ NEW_TASK_DEFINITION=`./ecs-goploy update task-definition --base-task-definition my-task-definition:1 --image nginx:stable`
$ ./ecs-goploy run task --cluster my-cluster --container-name web --task-definition $NEW_TASK_DEFINITION --command "some commands"

Update Scheduled Task

At first, you must update the task definition which is used to run scheduled task. After that, you can update the scheduled task.

$ NEW_TASK_DEFINITION=`./ecs-goploy update task-definition --base-task-definition my-task-definition:1 --image nginx:stable`
$ ./ecs-goploy update scheduled-task --count 1 --name schedule-name --task-definition $NEW_TASK_DEFINITION

Configuration

AWS Configuration

ecs-goploy calls AWS API via aws-skd-go, so you need export environment variables:

$ export AWS_ACCESS_KEY_ID=XXXXX
$ export AWS_SECRET_ACCESS_KEY=XXXXX
$ export AWS_DEFAULT_REGION=XXXXX

or set your credentials in $HOME/.aws/credentials:

[default]
aws_access_key_id = XXXXX
aws_secret_access_key = XXXXX

or prepare IAM Role or IAM Task Role.

AWS region can be set command argument: --region.

AWS IAM Policy

Below is a basic IAM Policy required for ecs-goploy.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowUserToECSDeploy",
      "Effect": "Allow",
      "Action": [
        "ecr:DescribeRepositories",
        "ecr:DescribeImages",
        "ecs:DescribeServices",
        "ecs:DescribeTaskDefinition",
        "ecs:RegisterTaskDefinition",
        "ecs:UpdateService",
        "ecs:RunTask",
        "ecs:DescribeTasks",
        "ecs:ListTasks",
        "events:DescribeRule",
        "events:ListTargetsByRule",
        "events:PutTargets",
        "iam:PassRole"
      ],
      "Resource": "*"
    }
  ]
}

License

The package is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].