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

Scripts for production deployments #4395

Merged
merged 12 commits into from
Jan 25, 2021
Merged

Scripts for production deployments #4395

merged 12 commits into from
Jan 25, 2021

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Jan 9, 2021

Closes #4382
This is a temporary script-based Open Library production deployment that will be refactored into fabfile.py.
It allows us to make sure all steps are clear and complete before migrating them into fabfile.py.
https://github.com/internetarchive/openlibrary/wiki/Deployment-Scratchpad

  • ol-home0: time start_production_deploy.sh
    1. ol-home0, ol-covers0, web{1, 2}: continue_production_deploy.sh
    2. User presses return when ready...
    3. ol-home0, ol-covers0, web1: finish_production_deploy.sh
    4. User presses return when ready...
    5. ol-web2: finish_production_deploy.sh

Technical

Testing

https://github.com/internetarchive/openlibrary/wiki/Deployment-Scratchpad

Screenshot

Stakeholders

@cclauss cclauss added this to the Active Sprint milestone Jan 9, 2021
@cclauss cclauss requested a review from cdrini January 9, 2021 15:31
@mekarpeles mekarpeles self-assigned this Jan 9, 2021
@cclauss
Copy link
Contributor Author

cclauss commented Jan 14, 2021

Roadmap... (This PR or future iterations)

  • timestamp vs. SHA (or better yet, do BOTH)
    • docker image ls already tells us when each image was created so a timestamp is not required
  • rsync the four repos from ol-home0
  • booklending_utils is only needed on ol-web{1, 2}
  • ssh the commands
  • split continue_production_deploy.sh in two so docker-compose down/up happens just-in-time
  • uncomment cronjobs (Create cron jobs docker-compose service #4383) importbot (Create importbot docker service #4324) solr-updater

@mekarpeles mekarpeles mentioned this pull request Jan 14, 2021
24 tasks
@cclauss cclauss added the Priority: 2 Important, as time permits. [managed] label Jan 21, 2021
@cclauss cclauss requested a review from mekarpeles January 21, 2021 15:04
Copy link
Member

@mekarpeles mekarpeles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm;

  • questions about how volume-mount affects ability to rollback
  • questions about having web restarts occur in deployment script itself (currently we deploy and then restart independently with the intent that a human operator is available to rollback after the first failure experienced during blue/green)

@mekarpeles
Copy link
Member

@cclauss and I agreed that given this is the process we're currently using, we can go ahead and land this initial set of changes and open an issues for behavior change which needs to occur as a followup.

@mekarpeles mekarpeles merged commit 6021f8f into internetarchive:master Jan 25, 2021
@cclauss cclauss deleted the create_deployment/start_production_deploy.sh branch February 11, 2021 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 Important, as time permits. [managed]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve docker-based environment/deployment
3 participants