configuration icon indicating copy to clipboard operation
configuration copied to clipboard

feat: add playbooks for enterprise-access and enterprise-subsidy

Open tecoholic opened this issue 4 months ago • 1 comments

Configuration Pull Request

Make sure that the following steps are done before merging:

  • [ ] Have a Site Reliability Engineer review the PR if you don't own all of the services impacted.
  • [ ] If you are adding any new default values that need to be overridden when this change goes live, update internal repos and add an entry to the top of the CHANGELOG.
  • [ ] Performed the appropriate testing.
  • [ ] Think about how this change will affect Open edX operators and update the wiki page for the next Open edX release if needed

Description

This PR adds new playbooks and roles for deploying enterprise-access and enterprise-subsidy natively. The roles were created using the enterprise-catalog role as a reference.

Testing

The roles were tested following the Vagrant based testing instructions using VirtualBox as the backend on a Linux machine.

  1. Set the role - export VAGRANT_ANSIBLE_ROLE=enterprise_access or export VAGRANT_ANSIBLE_ROLE=enterprise_subsidy
  2. Put the following in a yml file
    COMMON_CONFIG_NO_LOGGING: false
    GIT_CLONE_NO_LOGGING: false
    COMMON_GIT_PATH: open-craft
    ENTERPRISE_ACCESS_VERSION: 'tecoholic/BB-8440-deployment-fixes'
    ENTERPRISE_SUBSIDY_VERSION: 'tecoholic/BB-8440-deployment-fixes'
    ENTERPRISE_SUBSIDY_MEMCACHE_BACKEND: 'django.core.cache.backends.locmem.LocMemCache'
    ENTERPRISE_SUBSIDY_MEMCACHE: 'enterprise_subsidy'
    
  3. Set the vars envvar export VAGRANT_ANSIBLE_VARS_FILE=/path/to/file-with-above-content
  4. Run vagrant up and verify that the role completes successfully.

Verifying services are running correctly

  • For Enterprise Access, running vagrant ssh -- -NL 8270:localhost:8270 allows us to verify that the service is up. Visit http://localhost:8270/admin/ to get the login form. The static files won't load as they depend on the Nginx from the playbook.
  • For Enterprise Subsidy, with running vagrant ssh -- -NL 8280:localhost:8280 the admin page refuses to render because it tries to load a Waffle Flag from the database which isn't deployed by this role.

tecoholic avatar Feb 15 '24 12:02 tecoholic