Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: deploy_service #87

Open
patr1ckm opened this issue Feb 28, 2018 · 2 comments
Open

ENH: deploy_service #87

patr1ckm opened this issue Feb 28, 2018 · 2 comments

Comments

@patr1ckm
Copy link
Contributor

Write deploy_service that

  • deploys the a service if it isn't deployed and blocks until completion
  • redeploys the service if it is deployed, and blocks until completion
  • Only redeploys if a service isn't currently deploying

Only question is whether trying to redeploy an app that is currently deploying should

  1. throw an error and fail
  2. generate a warning and skip the redeploy request
  3. block until the current deployment has been completed and then continue with the requested redeploy.

I'm leaning toward option 3 so that a user doesn't have to write error handling / signalling / retrying around this state. The risk having a bunch of requests pile up to redeploy the app. I don't think it's a big risk though, it might just be confusing.

@keithing, @skomanduri thoughts?

@keithing
Copy link
Contributor

3 sounds good to me! Out of curiosity, are we able to redeploy in a way that minimizes downtime?

@skomanduri
Copy link

skomanduri commented Feb 28, 2018

@keithing Yes, the redeploy will start a new instance of the app, route traffic to it, and shut down the old instance when the new one is ready. So it is theoretically zero-downtime. However, there is a bug we need to fix before it actually works that way: https://civisanalytics.atlassian.net/browse/CIVP-15342

Also, this requires the client cluster to have enough capacity to run two copies of the app at the same time.

I also like option 3.

@patr1ckm patr1ckm self-assigned this Mar 1, 2018
@patr1ckm patr1ckm changed the title deploy_service ENH: deploy_service Mar 28, 2018
@patr1ckm patr1ckm removed their assignment May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants