0

I'm implementing continuous delivery with some technologies and services, such as docker, shippable, AWS Elastic beanstalk, etc. However, it takes a few(5~7) minutes to the application to be automatically deployed to the production server, from pushing to the git repository.

It's quite neat, but sometimes I may want to apply a tiny change for hotfix immediately, then this time of 5~7 minutes is too long to wait, because it's mostly about building the docker image and uploading/downloading it, or running npm test and npm install commands. Sometimes I want to skip these steps and apply the change immediately.

I'm thinking about several ideas but they have some problems:

  • Open some secret URI interface through HTTP in the server for patching and restarting themselves
    • There are two problems for this; we'll have to give different github keys for the containers, and it's too complex to ensure every instances to be patched because there are multiple instances behind the load balancer
  • Manual labor. Connect directly to the instances and patch them
    • But we launched continuous delivery system to avoid this

Is there any best practice for this kind of problem?

Kivol
  • 167
  • 1
  • 7
  • General advice: Never skip steps of your pipeline (could cause unknown bugs), never expose secure-by-obscurity interfaces (could lead to exploits) and never patch manually (could lead to missed files). Instead, figure out why it's slow. Do you have a docker registry? Are you pulling a layer or building from scratch each time? – jedifans Sep 02 '16 at 06:58

1 Answers1

0

For staging, we use SCP based deployment, you can also formalize it a bit using capistrano, phing / whatever suites you.

So install a SSHd server on your app code container and deploy this way, if you need to hotfix the way you mentioned above.

So you mix up image based deployments and also hotfix based deployments. You should just always ensure, that you also build the image in the background. Otherwise a container remake will change your state / rollback you hotfixes.

Eugen Mayer
  • 8,942
  • 4
  • 33
  • 57