Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Deployments? #28

Open
jbrook opened this issue May 27, 2016 · 2 comments
Open

Deployments? #28

jbrook opened this issue May 27, 2016 · 2 comments

Comments

@jbrook
Copy link

jbrook commented May 27, 2016

Thanks very much for building and open sourcing Specs. It's a great dashboard and is so much better for checking things in our clusters than the AWS console.

I am vary curious to know how you handle your actual deployments though. Some of what you do was described in a blog article, for example your usage of Terraform and CircleCI together with a Slack Bot. Would you consider explaining how the CI integration deploys new services and task definitions? Do you call Terraform during your build process? Does the slackbot simply allow you to set existing task definitions on services?

We have a similar infrastructure and are struggling with some of these things. Our cluster infrastructure is built with Terraform and it also sets up our services and task definitions but our CI server puts them out of sync. Finally, have you considered open-sourcing the Slack bot?

@calvinfo
Copy link
Contributor

Thanks @jbrook!

Admittedly this isn't in as good of a place as I'd like it to be, right now deploys get updated out of band from terraform by hitting the ECS API directly. It's convenient and fast (which is nice), but you're right that it does get out of sync with TF.

To mitigate this, we do a few different things:

  1. Tagged releases are not only pushed to docker hub as images with the full version, but major and minor versions as well. For the 1.2.3 release, we'll push the same image as 1.2.3, 1.2.x, and 1.x. It only happens on tags, so it's actually when we want to cut a release.
  2. Terraform should always reference "loose" major or minor versions, so out of band deploys won't break it.

This generally works well in practice, but it does have definite downsides.

We're considering now doing everything through terraform and just providing good tooling around it. That way, deploys are actually immutable, and every one is done via a re-plan. It ensure that your task definition configuration doesn't drift from the code that's deployed.

As far as open soruce, once we have a solution we're happy with, we're definitely going to open source. I think we should have something coming in the next 3-4 weeks on that :)

@akramhussein
Copy link

Hey @calvinfo - just wanted to chime in here and say I'd also be super interested in your slack bot and CI script. I'd be happy to help in any way possible to get it out there.

I've also had the exact same issues with TF-ECS version drift. I work on many client projects as a contractor and always use ECS so I'm seeing this issue a lot and haven't found a great solution yet either. For now I've resorted to doing it locally and just upversioning the tag in terraform.tfvars and running apply :/

Thanks for specs btw! 😎👊🏻

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants