turnerlabs / waypoint-plugin-fargate

A waypoint plugin that deploys AWS ECS/Fargate applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

waypoint-plugin-fargate

A waypoint plugin that deploys AWS ECS/Fargate applications.

This plugin is similar to the built-in aws-ecs plugin, however it does not create or provision any cloud infrastructure resources. The plugin assumes that you already have an existing ECS service and simply deploys your application container on top of the infrastructure.

The plugin is optimized to work well with the fargate-create tool which uses Terraform to provision the AWS cloud infrastructure.

The great thing about waypoint is that it enables simple, declarative, and portable build/push/deploy flows that run the same on your laptop as they do in any of your CI/CD pipelines.

install

To install the plugin, download the asset for your platform from releases, unzip it and put it in your ${HOME}/.config/waypoint/plugins/ directory (or use one of the other options).

usage example

The following example will build your application container (assuming you have a Dockerfile), push it to AWS ECR, register a new task definition which references the newly build image, and finally update the service to run the new task definition.

waypoint.hcl

project = "waypoint-test"

app "waypoint-test" {

  build {
    use "docker" {}

    registry {
      use "aws-ecr" {
        region     = "us-east-1"
        repository = "waypoint-test"
        tag        = gitrefpretty()
      }
    }
  }

  deploy {
    use "fargate" {
      cluster = "waypoint-test-dev"
      service = "waypoint-test-dev"
    }
  }
}
waypoint up

If you have more than one container in your app, you can specify which container you'd like to deploy using the container field.

  deploy {
    use "fargate" {
      region    = "us-east-1"
      cluster   = "my-cluster"
      service   = "my-service"
      container = "my-container"
    }
  }

Later, you can list your deployments.

waypoint deployment list

     | ID | PLATFORM |   DETAILS   |    STARTED    |   COMPLETED    
-----+----+----------+-------------+---------------+----------------
  ๐Ÿš€ | 74 | fargate  | artifact:32 | 8 minutes ago | 8 minutes ago  
  โœ”  | 73 | fargate  | artifact:30 | 21 hours ago  | 21 hours ago

build from source

make build
make install

About

A waypoint plugin that deploys AWS ECS/Fargate applications


Languages

Language:Go 74.1%Language:Makefile 16.2%Language:Dockerfile 5.0%Language:Shell 4.8%