Add Yarn to production customers.gitlab.com
C3
Production Change - Criticality 3Change Objective | Add Yarn to production customers.gitlab.com via chef |
---|---|
Change Type | C3 |
Services Impacted | customers.gitlab.com |
Change Team Members | @cmcfarland |
Change Severity | ~S2 |
Buddy check or tested in staging | The change was tested on staging environment |
Schedule of the change | 2019-10-16 14:30 UTC |
Duration of the change | Roughly 20 minutes. |
Detailed steps for the change. Each step must include: | - pre-conditions for execution of the step, - execution commands for the step, - post-execution validation for the step , - rollback of the step |
pre-conditions for execution of the step
-
customers.gitlab.com is not using the 0.2.16 cookbook-customers-gitlab-com cookbook which installs Yarn -
Merge the cookbook change to add the Yarn recipe to the production default recipe: https://gitlab.com/gitlab-cookbooks/cookbook-customers-gitlab-com/merge_requests/49/diffs -
Upload the new cookbook version to the chef server with berks upload
. -
Prepare a merge request to update the cookbook versions for staging and production roles in the ops chef project
execution commands for the step
-
Stop chef service on customers.gitlab.com: sudo service chef-client stop
-
Merge the chef-repo merge request that updates the versions in staging and production: https://ops.gitlab.net/gitlab-cookbooks/chef-repo/merge_requests/1993 -
Promote the MR above to production manually. -
Uninstall nodejs on customers.gitlab.com so that the new Yarn recipe can install the proper version. apt-get remove nodejs
. -
Run sudo chef-client
on customers.gitlab.com.
post-execution validation for the step
-
Run yarn
as any user and verify we get a proper response that is not an error code.
rollback of the step
-
Even if the yarn install fails, the new version of nodejs should be ok. There should not be a need to roll back. If there is, we can remove the new nodejs and re-install the version provided from the Ubuntu default repository for 16.04.
Edited by Cameron McFarland