How to Install edX on Fedora CoreOS

In this tutorial, we will discuss the steps to install edX on Fedora CoreOS. Before moving forward, let's understand what edX is.

Introduction to edX

edX is an open-source, online learning platform founded by Harvard University and MIT. It offers free online courses on a diverse range of subjects, including engineering, computer science, humanities, and much more.

Now, let's follow the step-by-step guide to installing edX on Fedora CoreOS.

Step 1: Install Docker

edX requires Docker to be installed in order to function properly. Perform the following steps to download and install Docker on Fedora CoreOS.

  1. Open the terminal on your Fedora CoreOS.

  2. Type the following command to download Docker:

    $ sudo dnf install docker
    
  3. Once downloaded, start and enable the Docker container:

    $ sudo systemctl start docker
    $ sudo systemctl enable docker
    
  4. To ensure Docker is running, you can run:

    $ sudo systemctl status docker
    

Step 2: Obtain the edX Docker Images

edX comes with various Docker images, and we will require a few of these to run the platform successfully. Perform the following steps to obtain the Docker images:

  1. Open the terminal in your Fedora CoreOS.

  2. Run the following command to download the Docker images:

    $ docker pull edxops/fullstack-cicd:latest
    $ docker pull mongo:3.2.20-jessie
    $ docker pull nginx:1.19.0-alpine
    $ docker pull memcached:1.4.35-alpine
    $ docker pull rabbitmq:3.6.9-management-alpine
    $ docker pull edxops/ansible
    

    This command downloads all the required edX Docker images onto your Fedora CoreOS machine.

Step 3: Prepare the Docker Compose File

To start the edX platform, we need to create a Docker Compose file. This file specifies the services that we want to use for our edX platform. Follow the steps below to create the Docker Compose file:

  1. Open the terminal in your Fedora CoreOS.

  2. Create a new directory on your system:

    $ mkdir -p ~/docker/edx
    
  3. Navigate to the directory you just created:

    $ cd ~/docker/edx
    
  4. Create a file named docker-compose.yml with the following content:

    version: '2'
    services:
      lms:
        image: edxops/fullstack-cicd:latest
        container_name: edx_lms
        hostname: edx_lms
        environment:
          EDXAPP_LMS_BASE: "http://localhost:8000"
          EDXAPP_PREVIEW_LMS_BASE: "http://localhost:8010"
          EDXAPP_CMS_BASE: "http://localhost:18010"
        ports:
          - "8000:80"
          - "8010:80"
        links:
          - cms
          - discovery
          - forum
          - xqueue
          - notifier
          - analytics_api
          - credentials
        depends_on:
          - cms
          - discovery
          - forum
          - xqueue
          - notifier
          - analytics_api
          - credentials
    
      cms:
        image: edxops/fullstack-cicd:latest
        container_name: edx_cms
        hostname: edx_cms
        ports:
          - "18010:80"
        links:
          - memcached
        depends_on:
          - memcached
    
      memcached:
        image: memcached:1.4.35-alpine
        container_name: edx_memcached
        hostname: edx_memcached
    
      discovery:
        image: edxops/fullstack-cicd:latest
        container_name: edx_discovery
        hostname: edx_discovery
        ports:
          - "18381:80"
        depends_on:
          - cms
    
      forum:
        image: edxops/fullstack-cicd:latest
        container_name: edx_forum
        hostname: edx_forum
        ports:
          - "18140:80"
        links:
          - mongo
        depends_on:
          - mongo
    
      mongo:
        image: mongo:3.2.20-jessie
        container_name: edx_mongo
        hostname: edx_mongo
    
      xqueue:
        image: edxops/fullstack-cicd:latest
        container_name: edx_xqueue
        hostname: edx_xqueue
        ports:
          - "18081:80"
        depends_on:
          - cms
          - mongo
    
      notifier:
        image: edxops/fullstack-cicd:latest
        container_name: edx_notifier
        hostname: edx_notifier
        ports:
          - "18130:80"
        links:
          - mongo
        depends_on:
          - mongo
    
      analytics_api:
        image: edxops/fullstack-cicd:latest
        container_name: edx_analytics_api
        hostname: edx_analytics_api
        ports:
          - "18290:80"
        links:
          - discovery
          - notifier
          - cms
          - mongodb
        depends_on:
          - discovery
          - notifier
          - cms
          - mongo
    
      credentials:
        image: edxops/fullstack-cicd:latest
        container_name: edx_credentials
        hostname: edx_credentials
        ports:
          - "18180:80"
        links:
          - cms
          - discovery
          - mongodb
        depends_on:
          - cms
          - discovery
          - mongo
    
  5. Save the file in the directory you created.

Step 4: Start the edX Platform

After creating the Docker Compose file, we can start the edX platform. Follow the steps below to do so:

  1. Open the terminal in your Fedora CoreOS.

  2. Navigate to the directory where you created the Docker Compose file with:

    $ cd ~/docker/edx
    
  3. Start the edX platform by running:

    $ docker-compose up
    
  4. This command starts the services specified in the Docker Compose file.

Conclusion

In this tutorial, we discussed how to install edX on Fedora CoreOS. We covered the necessary steps to install Docker, obtain the required Docker images, prepare the Docker Compose file, and start the edX platform. With this guide, you should now be able to run the edX platform seamlessly on your Fedora CoreOS machine.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!