Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
1d1f297f
Commit
1d1f297f
authored
8 years ago
by
Kevin Falcone
Committed by
GitHub
8 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3352 from edx/jibsheet/idempotent-demo-users
Switch to manage_user from create_user
parents
ff8fd125
d238da63
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
playbooks/roles/demo/defaults/main.yml
+7
-3
playbooks/roles/demo/tasks/deploy.yml
+14
-3
No files found.
playbooks/roles/demo/defaults/main.yml
View file @
1d1f297f
...
@@ -18,16 +18,20 @@ demo_code_dir: "{{ demo_app_dir }}/edx-demo-course"
...
@@ -18,16 +18,20 @@ demo_code_dir: "{{ demo_app_dir }}/edx-demo-course"
demo_repo
:
"
https://{{
COMMON_GIT_MIRROR
}}/edx/edx-demo-course.git"
demo_repo
:
"
https://{{
COMMON_GIT_MIRROR
}}/edx/edx-demo-course.git"
demo_course_id
:
'
course-v1:edX+DemoX+Demo_Course'
demo_course_id
:
'
course-v1:edX+DemoX+Demo_Course'
demo_version
:
"
master"
demo_version
:
"
master"
demo_hashed_password
:
'
pbkdf2_sha256$20000$TjE34FJjc3vv$0B7GUmH8RwrOc/BvMoxjb5j8EgnWTt3sxorDANeF7Qw='
# edx
demo_test_users
:
demo_test_users
:
-
email
:
'
honor@example.com'
-
email
:
'
honor@example.com'
username
:
honor
mode
:
honor
mode
:
honor
password
:
edx
hashed_password
:
"
{{
demo_hashed_password
}}"
-
email
:
'
audit@example.com'
-
email
:
'
audit@example.com'
username
:
audit
mode
:
audit
mode
:
audit
password
:
edx
hashed_password
:
"
{{
demo_hashed_password
}}"
-
email
:
'
verified@example.com'
-
email
:
'
verified@example.com'
username
:
verified
mode
:
verified
mode
:
verified
password
:
edx
hashed_password
:
"
{{
demo_hashed_password
}}"
demo_edxapp_user
:
'
edxapp'
demo_edxapp_user
:
'
edxapp'
demo_edxapp_venv_bin
:
'
{{
COMMON_APP_DIR
}}/{{
demo_edxapp_user
}}/venvs/{{demo_edxapp_user}}/bin'
demo_edxapp_venv_bin
:
'
{{
COMMON_APP_DIR
}}/{{
demo_edxapp_user
}}/venvs/{{demo_edxapp_user}}/bin'
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/demo/tasks/deploy.yml
View file @
1d1f297f
...
@@ -14,9 +14,9 @@
...
@@ -14,9 +14,9 @@
become_user
:
"
{{
common_web_user
}}"
become_user
:
"
{{
common_web_user
}}"
when
:
demo_checkout.changed
when
:
demo_checkout.changed
-
name
:
create some test users
and enroll them in the course
-
name
:
create some test users
shell
:
>
shell
:
>
{{ demo_edxapp_venv_bin }}/python ./manage.py lms --settings=aws --service-variant lms
create_user -e {{ item.email }} -p {{ item.password }} -m {{ item.mode }} -c {{ demo_course_id
}}
{{ demo_edxapp_venv_bin }}/python ./manage.py lms --settings=aws --service-variant lms
manage_user {{ item.username}} {{ item.email }} --initial-password-hash {{ item.hashed_password | quote
}}
chdir={{ demo_edxapp_code_dir }}
chdir={{ demo_edxapp_code_dir }}
become_user
:
"
{{
common_web_user
}}"
become_user
:
"
{{
common_web_user
}}"
with_items
:
demo_test_users
with_items
:
demo_test_users
...
@@ -24,13 +24,24 @@
...
@@ -24,13 +24,24 @@
-
name
:
create staff user
-
name
:
create staff user
shell
:
>
shell
:
>
{{ demo_edxapp_venv_bin }}/python ./manage.py lms --settings=aws --service-variant lms
create_user -e staff@example.com -p edx -s -c {{ demo_course_id }}
{{ demo_edxapp_venv_bin }}/python ./manage.py lms --settings=aws --service-variant lms
manage_user staff staff@example.com --initial-password-hash {{ demo_hashed_password | quote }} --staff
chdir={{ demo_edxapp_code_dir }}
chdir={{ demo_edxapp_code_dir }}
become_user
:
"
{{
common_web_user
}}"
become_user
:
"
{{
common_web_user
}}"
when
:
when
:
-
demo_checkout.changed
-
demo_checkout.changed
-
DEMO_CREATE_STAFF_USER
-
DEMO_CREATE_STAFF_USER
-
name
:
enroll test users in the demo course
shell
:
>
{{ demo_edxapp_venv_bin }}/python ./manage.py lms --settings=aws --service-variant lms enroll_user_in_course -e {{ item.email }} -c {{ demo_course_id }}
chdir={{ demo_edxapp_code_dir }}
become_user
:
"
{{
common_web_user
}}"
with_items
:
-
"
{{
demo_test_users
}}"
-
{
email
:
'
staff@example.com'
}
when
:
demo_checkout.changed
-
name
:
add test users to the certificate whitelist
-
name
:
add test users to the certificate whitelist
shell
:
>
shell
:
>
{{ demo_edxapp_venv_bin }}/python ./manage.py lms --settings=aws --service-variant lms cert_whitelist -a {{ item.email }} -c {{ demo_course_id }}
{{ demo_edxapp_venv_bin }}/python ./manage.py lms --settings=aws --service-variant lms cert_whitelist -a {{ item.email }} -c {{ demo_course_id }}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment