Skip to content

[BB-3853] Prepare Ocim for mass upgrade of instances to Koa

Boros Gábor requested to merge 0x29a/bb3853/prepare_ocim_for_koa into master

Created by: 0x29a

This PR contains various changes related to switching to the new Open edX release:

  1. 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.
  2. Updated default Open edX release. New beta-test instances will use koa.2a by default.
  3. Updates to the markdown files.
  4. Updated API client code to reflect changes in the help_text.
  5. Updated Ubuntu image settings, and migrations to update default DB values based on these settings.

JIRA tickets:

Dependencies:

Testing instructions:

I: CI

Check that PR passed all tests and checks in Circle CI.

II: Prepare stage

  1. Connect to the stage Ocim: ssh ubuntu@stage.manage.opencraft.com.
  2. Attach to the screen session: screen -r 1384.stage.
  3. Change window to bash.
  4. Fetch PR branch: git fetch origin 0x29a/bb3853/prepare_ocim_for_koa.
  5. Checkout to the PR branch: git checkout 0x29a/bb3853/prepare_ocim_for_koa.
  6. Open .env file and change:
    • Value of OPENSTACK_SANDBOX_BASE_IMAGE to '{"name": "focal-20.04-unmodified"}'.
    • Value of OPENEDX_RELEASE_STABLE_REF to open-release/koa.2a.
    • Value of STABLE_CONFIGURATION_VERSION to opencraft-release/koa.2a.
    • Value of STABLE_EDX_PLATFORM_COMMIT to opencraft-release/koa.2a.
    • Value of SIMPLE_THEME_SKELETON_THEME_VERSION to samuel/remove-v2.
  7. Change screen window to ipython, restart shell.
  8. Make sure that:
    • settings.OPENSTACK_SANDBOX_BASE_IMAGE is equal to '{"name": "focal-20.04-unmodified"}'.
    • settings.OPENEDX_RELEASE_STABLE_REF is equal to open-release/koa.2a.
    • settings.STABLE_CONFIGURATION_VERSION is equal to opencraft-release/koa.2a.
    • settings.STABLE_EDX_PLATFORM_COMMIT is equal to opencraft-release/koa.2a.
    • settings.SIMPLE_THEME_SKELETON_THEME_VERSION is equal to samuel/remove-v2. We need to do this because migrations fetch default values from settings.
  9. Change screen window again to bash.
  10. Run make migrate.
  11. Change screen window to web, hit CTRL + C, run make run.

III: Beta-test instance

  1. Open https://stage.console.opencraft.com/ in private browser window and register trial account with name+bb3853@opencraft.com email address.
  2. Go to https://stage.manage.opencraft.com/ and make sure that Ocim created beta-test instance.
  3. Open its settings and make sure that:
    • openedx_release is equal to open-release/koa.2a.
    • openstack_server_base_image is equal to '{"name": "focal-20.04-unmodified"}'.
    • configuration_version is equal to opencraft-release/koa.2a.
    • edx_platform_commit is equal to opencraft-release/koa.2a.
  4. Wait for instance to finish app server provisioning.
  5. [Optionally] Perform manual testing of the created instance.

IV: Cleanup

  1. Change screen window to bash.
  2. honcho run python3 manage.py migrate pr_watch 0013_add_ansible_overrides.
  3. honcho run python3 manage.py migrate instance 0139_auto_20210217_1216.
  4. Open .env file and change:
    • Value of OPENSTACK_SANDBOX_BASE_IMAGE to '{"name": "xenial-16.04-unmodified"}'.
    • Value of OPENEDX_RELEASE_STABLE_REF to open-release/juniper.3.
    • Value of STABLE_CONFIGURATION_VERSION to opencraft-release/juniper.3.
    • Value of STABLE_EDX_PLATFORM_COMMIT to opencraft-release/juniper.3.
    • Value of SIMPLE_THEME_SKELETON_THEME_VERSION to master.
  5. git checkout master.
  6. Change screen window to ipython, restart shell.
  7. Change screen window to web, hit CTRL + C, run make run.

Author notes and concerns:

Reviewers

  • @lgp171188

Merge request reports