appsembler / configuration

a simple, but flexible, way for anyone to stand up an instance of the edX platform that is fully configured and ready-to-go
GNU Affero General Public License v3.0
14 stars 13 forks source link

Tahoe rolling deploy #308

Closed thraxil closed 4 years ago

thraxil commented 4 years ago

Avoid having all of the edxapp servers broken at the same time during a deploy.

Previous approach:

This approach:

Since we have two edxapp servers in Tahoe, this means that there should always be one server handling traffic at all times during the deploy.

The big downside to this approach is that doing them one at a time instead of in parallel adds time to the deploy. Currently, that's about 10-15 minutes. The more servers we have, the more time it will add.

To minimize that, I pulled out some of the roles that didn't need to be run serially and run those in parallel separately. That helps, but there are still a lot more things happening serially than I'd like. The issue I ran into was that some of the roles depend on variables defined in other roles. Eg, mysql_init shouldn't have to be run in series, edxapp depends on the mysql_client_cert_path variable which is defined by mysql_init. If they are not in the same play, they can't access each others' variables. Refactoring and improving those roles to eliminate the interdependencies will help us reduce the amount of work that has to be done serially.

thraxil commented 4 years ago

Tested on a staging deploy: https://console.cloud.google.com/cloud-build/builds/1814fcc5-c785-4d89-b086-ac33d9066121?organizationId=508326437899&project=appsembler-tahoe-0