[BB-3853] Prepare Ocim for mass upgrade of instances to Koa
Created by: 0x29a
This PR contains various changes related to switching to the new Open edX release:
-
https://github.com/open-craft/opencraft/pull/682, but updated to use
koa.2a
release. Also, integration-koa branch is rebased on open-release/koa.2a. - Updated default Open edX release. New beta-test instances will use
koa.2a
by default. - Updates to the markdown files.
- Updated API client code to reflect changes in the
help_text
. - Updated Ubuntu image settings, and migrations to update default DB values based on these settings.
JIRA tickets:
Dependencies:
- This PR depends on https://github.com/open-craft/ansible-secrets/pull/249.
Testing instructions:
I: CI
Check that PR passed all tests and checks in Circle CI.
II: Prepare stage
- Connect to the stage Ocim:
ssh ubuntu@stage.manage.opencraft.com
. - Attach to the screen session:
screen -r 1384.stage
. - Change window to
bash
. - Fetch PR branch:
git fetch origin 0x29a/bb3853/prepare_ocim_for_koa
. - Checkout to the PR branch:
git checkout 0x29a/bb3853/prepare_ocim_for_koa
. - Open
.env
file and change:- Value of
OPENSTACK_SANDBOX_BASE_IMAGE
to'{"name": "focal-20.04-unmodified"}'
. - Value of
OPENEDX_RELEASE_STABLE_REF
toopen-release/koa.2a
. - Value of
STABLE_CONFIGURATION_VERSION
toopencraft-release/koa.2a
. - Value of
STABLE_EDX_PLATFORM_COMMIT
toopencraft-release/koa.2a
. - Value of
SIMPLE_THEME_SKELETON_THEME_VERSION
tosamuel/remove-v2
.
- Value of
- Change screen window to
ipython
, restart shell. - Make sure that:
-
settings.OPENSTACK_SANDBOX_BASE_IMAGE
is equal to'{"name": "focal-20.04-unmodified"}'
. -
settings.OPENEDX_RELEASE_STABLE_REF
is equal toopen-release/koa.2a
. -
settings.STABLE_CONFIGURATION_VERSION
is equal toopencraft-release/koa.2a
. -
settings.STABLE_EDX_PLATFORM_COMMIT
is equal toopencraft-release/koa.2a
. -
settings.SIMPLE_THEME_SKELETON_THEME_VERSION
is equal tosamuel/remove-v2
. We need to do this because migrations fetch default values from settings.
-
- Change screen window again to
bash
. - Run
make migrate
. - Change screen window to
web
, hitCTRL + C
, runmake run
.
III: Beta-test instance
- Open https://stage.console.opencraft.com/ in private browser window and register trial account with
name+bb3853@opencraft.com
email address. - Go to https://stage.manage.opencraft.com/ and make sure that Ocim created beta-test instance.
- Open its settings and make sure that:
-
openedx_release
is equal toopen-release/koa.2a
. -
openstack_server_base_image
is equal to'{"name": "focal-20.04-unmodified"}'
. -
configuration_version
is equal toopencraft-release/koa.2a
. -
edx_platform_commit
is equal toopencraft-release/koa.2a
.
-
- Wait for instance to finish app server provisioning.
- [Optionally] Perform manual testing of the created instance.
IV: Cleanup
- Change screen window to
bash
. -
honcho run python3 manage.py migrate pr_watch 0013_add_ansible_overrides
. -
honcho run python3 manage.py migrate instance 0139_auto_20210217_1216
. - Open
.env
file and change:- Value of
OPENSTACK_SANDBOX_BASE_IMAGE
to'{"name": "xenial-16.04-unmodified"}'
. - Value of
OPENEDX_RELEASE_STABLE_REF
toopen-release/juniper.3
. - Value of
STABLE_CONFIGURATION_VERSION
toopencraft-release/juniper.3
. - Value of
STABLE_EDX_PLATFORM_COMMIT
toopencraft-release/juniper.3
. - Value of
SIMPLE_THEME_SKELETON_THEME_VERSION
tomaster
.
- Value of
-
git checkout master
. - Change screen window to
ipython
, restart shell. - Change screen window to
web
, hitCTRL + C
, runmake run
.
Author notes and concerns:
- After merging this and right before deploying this on prod, we have to merge https://github.com/open-craft/edx-simple-theme/pull/16 and remove this line.
Reviewers
-
@lgp171188