-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
495 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,22 +61,10 @@ Then, restart your platform and run the initialization scripts:: | |
|
||
tutor local launch | ||
|
||
Create a user to access both in the Clickhouse database and the Superset frontend:: | ||
|
||
tutor local do cairn-createuser YOURUSERNAME [email protected] | ||
|
||
You can use the ``--password=<PASSWORD>`` option to provide a password on the command line. | ||
|
||
To make this user an administrator, add the ``--admin`` option:: | ||
Open http(s)://data.<YOUR_LMS_HOST> in your browser. When running locally, this will be http://data.local.overhang.io. (http://data.local.overhang.io:2247 in development). Users authenticate with their LMS user. By default, they have access to the data generated by the courses in which they have the "staff role". To convert an existing user to administrator status, run:: | ||
|
||
tutor local do cairn-createuser --admin YOURUSERNAME [email protected] | ||
|
||
To add the default dashboards to the new user, add the ``--bootstrap-dashboards`` option:: | ||
|
||
tutor local do cairn-createuser --bootstrap-dashboards YOURUSERNAME [email protected] | ||
|
||
You can then access the frontend with the user credentials you just created. Open http(s)://data.<YOUR_LMS_HOST> in your browser. When running locally, this will be http://data.local.overhang.io. The admin user will automatically be granted access to the "openedx" database in Superset and will be able to query all tables. | ||
|
||
Some event data might be missing from your dashboards: just start using your LMS and refresh your dashboard. The new events should appear immediately. | ||
|
||
.. image:: https://raw.githubusercontent.com/overhangio/tutor-cairn/master/screenshots/courseoverview-01.png | ||
|
@@ -86,6 +74,9 @@ Some event data might be missing from your dashboards: just start using your LMS | |
.. image:: https://raw.githubusercontent.com/overhangio/tutor-cairn/master/screenshots/courseoverview-03.png | ||
:alt: Course overview dashboard part 3 | ||
|
||
⚠️ WARNING ⚠️ Previous versions of Cairn required manual user management. If you have an existing installation of Cairn, this behaviour will change when you upgrade to v16. To revert to the previous behaviour, see `"manual user management" <#manual-user-management>`__ below. | ||
|
||
|
||
Available metrics | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
|
@@ -109,19 +100,32 @@ Cairn allows you to collect and view just any metric from your Open edX platform | |
- Total watch time | ||
- Second-per-second statistics: Number of unique viewers, Total number of views | ||
|
||
.. _manual_user_management: | ||
|
||
Data-based access control | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Manual user management | ||
~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Most of your users should probably not have access to all data from all courses. To restrict a given user to one or more courses or organizations, select the course IDs and/or organization IDS to which the user should have access and create a user with limited access to the datalake:: | ||
By default, authentication uses single sign-on (SSO) with the LMS such that users do not have to create separate accounts in Superset. In previous versions of Cairn (v15 and earlier), user accounts had to be created manually. To restore this behaviour, modify the ``CAIRN_ENABLE_SSO`` setting:: | ||
|
||
tutor local run cairn-clickhouse cairn createuser --course-id='course-v1:edX+DemoX+Demo_Course' --org-id='edX' YOURUSERNAME | ||
tutor config save --set CAIRN_ENABLE_SSO=false | ||
tutor local restart | ||
|
||
Then, create the corresponding user on the frontend with the same command as above (but without the ``--admin`` option):: | ||
SSO will then disabled, and only manually created users will be able to login. To create a user, run:: | ||
|
||
tutor local run cairn-superset cairn createuser YOURUSERNAME [email protected] | ||
tutor local do cairn-createuser --password=yourpassword YOURUSERNAME [email protected] | ||
|
||
To make this user an administrator, add the ``--admin`` option:: | ||
|
||
tutor local do cairn-createuser --admin YOURUSERNAME [email protected] | ||
|
||
To add the default dashboards to the new user, add the ``--bootstrap-dashboards`` option:: | ||
|
||
tutor local do cairn-createuser --bootstrap-dashboards YOURUSERNAME [email protected] | ||
|
||
To restrict a given user to one or more courses or organizations, select the course IDs and/or organization IDS to which the user should have access:: | ||
|
||
tutor local do cairn-createuser --course-id='course-v1:edX+DemoX+Demo_Course' YOURUSERNAME [email protected] | ||
|
||
Your frontend user will automatically be associated to the datalake database you created. | ||
|
||
Refreshing course block data | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
@@ -179,6 +183,8 @@ In this example, the following folder should be created in the plugin:: ``tutorc | |
Development | ||
----------- | ||
|
||
In development, the Superset user interface will be available at http://data.local.overhang.io:2247. | ||
|
||
To reload Vector configuration after changes to vector.toml, run:: | ||
|
||
tutor config save && tutor local exec cairn-vector sh -c "kill -s HUP 1" | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
cairn-superset: | ||
command: ["superset", "run", "--host=0.0.0.0", "--port=2247"] | ||
environment: | ||
FLASK_ENV: development | ||
ports: | ||
- "2247:2247" | ||
|
||
cairn-superset-worker: | ||
environment: | ||
FLASK_ENV: development | ||
|
||
cairn-superset-worker-beat: | ||
environment: | ||
FLASK_ENV: development | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
setowner 1000 /data/cairn-clickhouse | ||
{% if CAIRN_RUN_POSTGRESQL %}setowner 70 /data/cairn-postgresql{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- ../../data/cairn/clickhouse:/data/cairn-clickhouse | ||
{% if CAIRN_RUN_POSTGRESQL %}- ../../data/cairn/postgresql:/data/cairn-postgresql{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.