edx git based courses

Upload: securedome

Post on 02-Jun-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 EdX Git Based Courses

    1/30

    Git-based Courses

    Carson Gee and Peter Pinch

    @carsongee & @pdpinch

  • 8/10/2019 EdX Git Based Courses

    2/30

    Peter Pinch

    education at scalepbs.org, pbslearningmedia.org

    Ask me about animatronic aardvarks

    MIT OpenCourseWare

    2,240 courses and counting

    man of many hats at MITx

  • 8/10/2019 EdX Git Based Courses

    3/30

    Carson Gee

    Seriously into process automationOver a year with Open edX

    Over 100 PRs between platform and

    configurationNot serious about much else

  • 8/10/2019 EdX Git Based Courses

    4/30

    Git Course Flow Overview

  • 8/10/2019 EdX Git Based Courses

    5/30

    What We'll Cover

    Course ProductionWorkflow

    How to make it go (techdetails)

  • 8/10/2019 EdX Git Based Courses

    6/30

    Why do we do it this way?

    Course teams want to:use familiar tools

    migrate content

    manage versions

    manage multiple contributors

    preview and release

  • 8/10/2019 EdX Git Based Courses

    7/30

    Why do we do it this way?

    Admins need to:help course teams, safely

    bulk updates

    move courses from staging toproduction

    archive (and restore) courses

  • 8/10/2019 EdX Git Based Courses

    8/30

    XML Course Development

  • 8/10/2019 EdX Git Based Courses

    9/30

    XML Course Development

    1. edit XML2. commit and push to master branch

    3. triggerupdates course on staging

    server4. review on staging, repeat as necessary

    5. merge to live branch

    6. trigger

    updates course on productionserver

  • 8/10/2019 EdX Git Based Courses

    10/30

    example commit graph

  • 8/10/2019 EdX Git Based Courses

    11/30

    example PR with comments

  • 8/10/2019 EdX Git Based Courses

    12/30

    Studio Course Development

  • 8/10/2019 EdX Git Based Courses

    13/30

  • 8/10/2019 EdX Git Based Courses

    14/30

    Technical Implementation

    Course Import and Exportvia Git

    Workflow Automation

  • 8/10/2019 EdX Git Based Courses

    15/30

    Git Course Import via Commandsudosu - edxapp -s /bin/bash

    . edxapp_envmkdir /edx/var/edxapp/course_repospython edx-platform/manage.py lms --settings=aws \ git_add_course http://github.com/edx/edx-demo-course

    OptionsDirectory to check out into

    Branch to use

  • 8/10/2019 EdX Git Based Courses

    16/30

    Sysadmin Dashboard Import

    Enable with:ENABLE_SYSADMIN_DASHBOARD=True

    flag in FEATURESdict

    Head to:https:///sysadminwith

    global staff privs

  • 8/10/2019 EdX Git Based Courses

    17/30

    Sysadmin Dashboard Import

  • 8/10/2019 EdX Git Based Courses

    18/30

    Sysadmin Dashboard Import

  • 8/10/2019 EdX Git Based Courses

    19/30

    Git Course Export via Commandsudosu - edxapp -s /bin/bash

    . edxapp_envmkdir /edx/var/edxapp/export_course_reposcdedx-platformpython manage.py cms --settings=aws \ git_exportedX/DemoX/Demo_Course \ [email protected]:carsongee/edx-demo-course.git

    Options

    username (for commit authorship)

    repo_dir (specify location of local repolocation)

  • 8/10/2019 EdX Git Based Courses

    20/30

    Export to Git in Studio

    Enable with:ENABLE_EXPORT_GIT=True

    flag inFEATURES

    dict

    Set giturlin course's advanced settings

  • 8/10/2019 EdX Git Based Courses

    21/30

    Export to Git in Studio

  • 8/10/2019 EdX Git Based Courses

    22/30

    Workflow Automation

    Enter gitreload:https://github.com/mitodl/gitreload

    Responds to hooks from github/gitlab

    Runs git_add_coursefrom hookshot

    Only operates on courses alreadychecked out

    https://github.com/mitodl/gitreloadhttps://github.com/mitodl/gitreloadhttps://github.com/mitodl/gitreloadhttps://github.com/mitodl/gitreload
  • 8/10/2019 EdX Git Based Courses

    23/30

    Installing gitreload

    Try before you buy:sudosu - edxapp -s /bin/bash. edxapp_envpip install gitreloadgitreload

    Install for realsies with Ansible:

    - hosts: all sudo: True vars:

    COMMON_ENABLE_BASIC_AUTH: True roles: - gitreload - role: nginx nginx_sites: - gitreload

  • 8/10/2019 EdX Git Based Courses

    24/30

    Add the Hook

  • 8/10/2019 EdX Git Based Courses

    25/30

  • 8/10/2019 EdX Git Based Courses

    26/30

    Who needs ContentStore?

    Add to static nginx server rule: location ~ ^/static/(?P.*) { root {{ edxapp_data_dir }}; try_files /staticfiles/$file /course_static/$file =404;

    Changes to:

    location ~ /static/((?P[^/]+)/(?P.*)|(?P[\w\d\-.]+)) { root {{ edxapp_app_dir }}; try_files /staticfiles/$dir/$file

    /course_static/$dir/static/$file /staticfiles/$rfile =404;

  • 8/10/2019 EdX Git Based Courses

    27/30

    Conclusions

    The GoodSimple and safe to publish to students

    Social course development w/ github

    Versioned per course backups gratis

    Support of multiple student LMS targets

    Better courseware debugging

  • 8/10/2019 EdX Git Based Courses

    28/30

    Conclusions

    The BadMore complex setup

    git hooks

    repository creation

    manual first checkout

    Extra step for Studio courses

    Did the hook work?Easier to break courses when editingraw XML

  • 8/10/2019 EdX Git Based Courses

    29/30

    Future Work

    Create RESTful token auth CourseImport/Export API

    Studio and LMS

    "Create a Course" ApplicationAutomatic course/repo creation

    Initial LMS import

    Hook setup

    "giturl" setting

  • 8/10/2019 EdX Git Based Courses

    30/30

    Questions?

    mitodl/git-based-courses-slides