DCAS Open EdX Documentation

DCAS Open EdX Documentation

  • Docs

›Azure Storage Configuration

Creating a Course

  • Create a New Online Course
  • Set Course Schedule & Details
  • Add Sections, Subsections & Units
  • Managing Unit and Component
  • Adding Videos
  • Adding HTML
  • Adding Discussions
  • Adding Problems

    • Adding Problems
    • Problem Types
    • Drag and Drop
    • Pointing on a picture
  • Adding Images and Figures
  • Uploading Static Content
  • Course Visibility
  • Creating pages
  • Grading
  • Commonly Used Advanced Settings

Running a Course

  • Managing Certificates
  • Common Instructor Dashboard Tasks
  • Managing Course Discussions

Advanced Management

  • Importing / Exporting Courses
  • Change a user’s password
  • Inactivate / Activate a User
  • Understanding User Roles
  • Set a user to staff or superuser
  • Server Tasks

    • SSH into Server
    • Set or Change a Password

Migration

  • Migrate EdX (Single-Server)
  • Migrate the Theme

Migrate MySQL

  • Migrating MySQL Database off of Single-Server

Migrate Mongo

  • Migrating Mongo Database off of Single-Server

Configuration

  • Enable and Update Additional Languages
  • Enable Downloads from Instructor tab in LMS
  • Configure and Enable Certificate
  • Configure Open Response Assessment

Configure Ecommerce

  • Basic Ecommerce Setup
  • Setup JWT Keys
  • Getting Course Details on Checkout Page
  • Troubleshoot Ecommerce

Discovery Setup

  • Configure Discovery

Comprehensive theming

  • Setup Comprehensive Theming

Microsites

  • Setup Microsites
  • Common Microsite Configurations

API

  • Setup API
  • Common APIs Demonstration
  • Customizing an API
  • DCAS API Handoff for LMS

Xblock

  • Xblock introduction
  • Xblock installation and uninstallation
  • Xblock Development

Scaling the architecture

  • Scaling Mongo
  • Scaling MySQL
  • Dedicated Storage Configuration Outline
  • Azure Storage Configuration

    • Azure Storage Configuration
    • Basic Configuration
    • Private Blob Configuration

SCORM

  • SCORM Azure Storage

Trouble-Shooting

  • Forgot admin username or password
  • Server error
  • Can't reach your site
  • Problems with RabbitMQ
  • Can't login to LMS or CMS
  • Locate the error
  • Jobs are stucking
  • Mongodb not working
  • Forums Breaking Issue
  • Check open edx services status
  • Problem with mysql
  • Can't receive email
  • CSRF token error

Azure Storage Configuration

Before starting, you should have an Azure account to proceed with. For this tutorial we will be using Azure blob service which is an Object storage service. Other services are also available namely AWS S3 and Openstack Swift storage.

Creating Storage account and container

First thing first, create an storage account on Azure portal. Then you need to create a container on Azure portal. A container is equivalent to AWS S3 bucket. After configuring, you need to note three Azure keys (i.e AZURE_ACCOUNT_NAME, AZURE_ACCOUNT_KEY and AZURE_CONTAINER):

Account storage name

Container name

Once the storage account and container has been configured, it's time to modify some code in the edx-platform.

Code modification on edx-platform

For storing media and static files, Open Edx heavily relies on the django-storage package. This package consists of AzureStorage base backend class which needs to be inherited and will be called a derived backend class. Here we will be configuring Azure blob storage for profile pictures. The code modifications are as follows:

  1. Add Azure keys to lms.env.json and lms.auth.json.

    "AZURE_ACCOUNT_NAME": "openedx",
    "AZURE_ACCOUNT_KEY": "some_key",
    "AZURE_CONTAINER": "edxuploads",
    
    "DEFAULT_FILE_STORAGE": "openedx.core.storage.AzureStorageExtended",
    
  2. Replace PROFILE_IMAGE_BACKEND, MEDIA_ROOT and MEDIA_URL on lms.env.json only.

    "PROFILE_IMAGE_BACKEND": {
        "class": "openedx.core.storage.AzureStorageExtended", 
        "options": {
            "container": "edxuploads",
            "url_expiry_secs": 500
        }
    }, 
    
    "MEDIA_ROOT": "https://openedx.blob.core.windows.net/edxuploads/",
    "MEDIA_URL": "https://openedx.blob.core.windows.net/edxuploads/",
    
  1. Now, modify the files accordingly.

    • lms/djangoapps/instructor_task/models.py Code Screenshot1

    • lms/envs/aws.py Code Screenshot2

    • requirements/edx/base.txt (run pip install -r requirements/edx/base.txt) Code Screenshot3

    • openedx/core/djangoapps/user_api/accounts/image_helpers.py Code Screenshot4

    • openedx/core/storage.py b/openedx/core/storage.py Code Screenshot5

After modification, restart the Open Edx (LMS & CMS) and now you will be able to upload profile pictures in the profile section of LMS.

← Dedicated Storage Configuration OutlineBasic Configuration →
  • Creating Storage account and container
  • Code modification on edx-platform
DCAS Open EdX Documentation
Docs
Create an Online Course
More
Curricu.me Website
Copyright © 2022 DCAS