forked from openedx-unsupported/configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
masters_sandbox_update.yml
59 lines (53 loc) · 2.17 KB
/
masters_sandbox_update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Updates master's sandbox environment with production data
- name: update master's integration environment
hosts: all
become: True
gather_facts: True
vars:
- edxapp_env_path: /edx/app/edxapp/edxapp_env
- edxapp_venv_dir: /edx/app/edxapp/venvs/edxapp
- edxapp_code_dir: /edx/app/edxapp/edx-platform
- discovery_env_path: /edx/app/discovery/discovery_env
- discovery_venv_dir: /edx/app/discovery/venvs/discovery
- discovery_code_dir: /edx/app/discovery/discovery
- registrar_env_path: /edx/app/registrar/registrar_env
- registrar_venv_dir: /edx/app/registrar/venvs/registrar
- registrar_code_dir: /edx/app/registrar/registrar
- prod_catalog_host: https://discovery.edx.org
- prod_oauth_host: https://courses.edx.org
- instructor_username: [email protected]
tasks:
- name: setup edx partner
shell: >
. {{ discovery_env_path }} && {{ discovery_venv_dir }}/bin/python manage.py
create_or_update_partner --site-domain discovery-{{dns_name}}.sandbox.edx.org --code edx --name edX
args:
chdir: "{{ discovery_code_dir }}"
- name: pull production discovery data
shell: >
. {{ discovery_env_path }} && {{ discovery_venv_dir }}/bin/python manage.py
load_program_fixture {{ program_uuids }}
--catalog-host {{ prod_catalog_host }}
--oauth-host {{ prod_oauth_host }}
--client-id {{ client_id }}
--client-secret {{ client_secret }}
args:
chdir: "{{ discovery_code_dir }}"
- name: update LMS program cache
shell: >
. {{ edxapp_env_path }} && {{ edxapp_venv_dir }}/bin/python manage.py lms
cache_programs
args:
chdir: "{{ edxapp_code_dir }}"
- name: create course shells in LMS
shell: >
. {{ edxapp_env_path }} && {{ edxapp_venv_dir }}/bin/python manage.py cms
sync_courses {{ instructor_username }}
args:
chdir: "{{ edxapp_code_dir }}"
- name: load discovery programs into registrar
shell: >
. {{ registrar_env_path }} && {{ registrar_venv_dir }}/bin/python manage.py
manage_programs {{ program_uuids }}
args:
chdir: "{{ registrar_code_dir }}"