Skip to main content

AWS

Amazon ECS migration

A deploy was an SSH session onto a VM open to the internet: pull the code, build the image, run it with Docker. A few services, each in its own repository, now build and deploy from CI and run as more than one replica.

Client

A team with no Kubernetes experience, and no long-term DevOps owner to hand a cluster to. A few services, each in its own repository, were released by SSH onto a VM that was open to the internet.

Stack

  • Amazon ECS
  • Docker
  • CI/CD

Situation

A deploy meant SSH to that VM, then local scripts that pulled the code and built an image to serve with Docker. The box was a single point of failure, and it was reachable from the internet. The system was a few services, not one. Kubernetes would have removed the single box, and there was nobody to inherit the cluster.

What we did

Each service builds and deploys from CI onto ECS, with its own task configuration and more than one replica. Nobody SSHs to a public VM to release. Kubernetes was the wrong thing to hand this team.

  1. 1.ECS, not a cluster to inherit

    ECS was the orchestrator because the team could deploy into it without learning Kubernetes. There was no long-term DevOps role to take a cluster over.

  2. 2.Off the public VM

    Each service left the SSH-and-script release. The repository no longer depended on someone logging into a machine that was open to the internet, pulling the code, and building the image there.

  3. 3.CI, and a task per service

    CI builds and deploys each service. Each one holds its own ECS task configuration, in its own repository, and runs as more than one replica. One copy stopping does not take the service down.

  4. 4.Dashboards

    The team got dashboards they can read, so the environment is visible without going onto the box.

What changed

  • Deploys no longer start with SSH to a VM open to the internet
  • CI builds and deploys each service
  • Each service has its own task configuration, in its own repository
  • Each service runs as more than one replica
  • The team did not have to take on Kubernetes