CUBITE

Cubite provides an easy-to-use Learning Management System that helps educators create engaging and interactive courses online for their students with one click from within a DigitalOcean account. With this application, you’ll be able to install open edx, a world-class learning management system backed by MIT and Harvard University. You can also bring modern look and feel into your platform so that all of those learners out there will have an amazing experience with the course content!

Powered by Open edX

The Open edX platform provides the massively scalable learning software technology behind edX. It is also the learning platform of choice for global organizations such as Microsoft and IBM. https://open.edx.org/

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating a Droplet from the CUBITE 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB CUBITE Droplet in the SFO2 region, you can use the following curl command. You need to either save your API access token) to an environment variable or substitute it in the command below.

curl -X POST -H 'Content-Type: application/json' \
         -H 'Authorization: Bearer '$TOKEN'' -d \
        '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "cubitetechnologi-cubite-20-04"}' \
        "https://api.digitalocean.com/v2/droplets"

Getting Started After Deploying CUBITE

To follow along make sure you can use ssh root@your_droplet_public_ipv4 to SSH to your server. When you have active SSH session to your server follow these steps in the command line interface.

Set Necessary URLs

lms.yml

open /edx/etc/lms.yml file with your favorite editor. Change following variables to domain names you just assigned to your instance

PREVIEW_LMS_BASE: preview.mysite.com
LMS_BASE: mysite.com
LMS_ROOT_URL: https://mysite.com
CMS_BASE: studio.mysite.com
CROSS_DOMAIN_CSRF_COOKIE_DOMAIN: 
LOGIN_REDIRECT_WHITELIST:
- studio.mysite.com

studio.yml

open /edx/etc/studio.yml file with your favorite editor. Change following variables to domain names you just assigned to your instance

PREVIEW_LMS_BASE: preview.mysite.com
LMS_BASE: mysite.com
LMS_ROOT_URL: https://mysite.com
CMS_BASE: studio.mysite.com
LMS_INTERNAL_ROOT_URL: https://mysite.com
CROSS_DOMAIN_CSRF_COOKIE_DOMAIN: 
LOGIN_REDIRECT_WHITELIST:
- studio.mysite.com

Restart services /edx/bin/supervisorctl restart all

Add Superuser

To add superuser to your instance, SSH to the server and run the following command

sudo -H -u edxapp bash
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform
python manage.py lms --settings=production createsuperuser

The prompt will ask you for username, email and password.

Enable SSL certificate

Installing an SSL certificate on your OpenX server is the best way to ensure security for both yourself and your students. The installation process only takes a few minutes.

We highly recommend installing an SSL certification as soon as possible, so we can make sure everyone stays safe from any potential cyber-attacks.

Create DNS records

Each Open edX instance has at least 3 URLs. One for LMS, one for Studio, and One for Preview. Create A record in your DNS for each URL. For example

mysite.com                #LMS record
studio.mysite.com         #Studio record
preview.mysite.com        #Preview record

Change Nginx files

LMS and Preview

open /edx/app/nginx/sites-available/lms file with our favorite editor and add the following after server { section

server_name mysite.com preview.mysite.com

It should look like following

server {
    server_name mysite.com preview.mysite.com
.
.
.
.
.
.

Studio

open /edx/app/nginx/sites-available/cms file with our favorite editor and add the following after server { section

server_name studio.mysite.com

It should look like following

server {
    server_name studio.mysite.com
.
.
.
.
.
.

Install Letsencrypt

Follow official instructions at https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx to install letsencrypt