Provision production instances for beta test applicants.
Created by: smarnach
Changes in this PR:
-
Allow blacklisting subdomains to make them unavailable in the beta test application form. Testing: Set
SUBDOMAIN_BLACKLIST
and try that the blacklisted domains are rejected on http://localhost:5000/beta/register. -
Trigger provisioning of a beta tester instance as soon as a beta tester confirms all their email addresses. Testing: File a beta test application on http://localhost:5000/beta/register and confirm all email addresses (see the terminal output for confirmation links). Verify on the console that a new instance is being provisioned.
-
Create a LMS user account on the instance by copying the beta tester user account from the instance manager. Testing: This depends on edx/configuration#3059 and edx/edx-platform#12519, so to test this we currently have to create an instance pointing to the right release versions. In the Django shell, this can be done using
from instance.factories import production_instance_factory instance = production_instance_factory( sub_domain='user-creation-test', edx_platform_repository_url='https://github.com/open-craft/edx-platform.git', edx_platform_commit='4a3cd60e5926dd8c360d8eb82bdd2ebddc0d77fa', configuration_source_repo_url='https://github.com/open-craft/configuration.git', configuration_version='smarnach/create-lms-users', openedx_release='master', )
Then add an existing user and spawn an Appserver:
instance.lms_users.add(User.objects.get(username='some_existing_user')) instance.spawn_appserver()
Once the provisioning succeeds, you should be able to log into the new instance using the credentials of the local user you passed in.