empire icon indicating copy to clipboard operation
empire copied to clipboard

Feature Request: Pre-deploy tasks

Open ejholmes opened this issue 9 years ago • 4 comments

In some cases, you want to run something before a deployment goes out. For example, a frontend application may need to upload assets to s3, or a backend application may need to run some migrations automatically.

It would be handy if you could specify a command to run (using the newly deployed image) before the ECS services are swapped over to it.

ejholmes avatar Jun 24 '16 00:06 ejholmes

This seems to me more like a build server thing than a deploy thing.

It seems like this goes against the concept of docker and ECS where you just say "here is an image, run it".

https://github.com/drone is a great option for a build server.

ie. for the frontend, i have drone build the docker image and upload assets to s3, then empire just deploys the docker image.

mwildehahn avatar Jun 24 '16 00:06 mwildehahn

I think this is a little different, because these things depend on their runtime environment. For example, you can't feasibly run migrations without knowing what database to connect to.

Definitely don't want this to replace the build phase.

ejholmes avatar Jun 24 '16 00:06 ejholmes

And to play devils advocate against myself...this is mostly only a problem because there's no concept of a grace period in ECS, which makes it hard to do these things as part of the container boot.

ejholmes avatar Jun 24 '16 00:06 ejholmes

Yea, the database migrations make sense, i was speaking specifically to uploading assets to s3.

not being able to configure a grace period within ECS does suck.

mwildehahn avatar Jun 24 '16 23:06 mwildehahn