Open edX: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
(5 intermediate revisions by the same user not shown)
Line 29: Line 29:
If your machine already runs web servers, data base servers, etc. it will use other ports. From the README file: {{quotation|The default listening port for Apache is 8080, for Elasticsearch 9300, for Memcached 11211, for MongoDB 27017, for MySQL is 3306, for RabbitMQ 5672, for Open edX XQueue 18040 and 18010 for Open edX CMS. If those ports are already in use by other applications, you will be prompted for alternate ports to use.}} This does of course require that you allow that...
If your machine already runs web servers, data base servers, etc. it will use other ports. From the README file: {{quotation|The default listening port for Apache is 8080, for Elasticsearch 9300, for Memcached 11211, for MongoDB 27017, for MySQL is 3306, for RabbitMQ 5672, for Open edX XQueue 18040 and 18010 for Open edX CMS. If those ports are already in use by other applications, you will be prompted for alternate ports to use.}} This does of course require that you allow that...


==== Installation summary ====
Summary of ports that must be openend or can remain local (user installation for a system with an existing LAMP/Java stack, changed apache default from 8080 to 8000)
 
{| class="wikitable sortable"
|+PORTS used by edX standard and custom installations
|-
! Service
!system default ports|| default user install
ports
|| our user install || our root install
(machine already had a LAMP stack)
|requires open firewall
|-
|mysql_port
|3306|| 3307 || 3307 || 3307 ||
|-
|smtp_port
|587|| 587 || 587 || 587
|
|-
|apache_server_port
|80|| 8080 || 8000 || 81
|x
|-
|apache_server_ssl_port
|443|| 8443 || 8443 || 443
|x
|-
|mongodb_port
||| 27017 || 27017 || 27017
|-
|elasticsearch_port
||| 9200 || 9200 || 9200
|-
|elasticsearch_node_port
||| 9300 || 9300 || 9300
|-
|rabbitmq_server_port
||| 5672 || 5672 || 5672
|-
|rabbitmq_management_port
||| 15672 || 15672 || 15672
|-
|Open edX XQueue
||| 18040 || 18040 || 18040
|x
|-
|Open edX CMS
||| 18010 || 18010 || 18010
|x
|}
 
==== Installation summary for a simple user ====


[[file:bitnami-console.png|thumb|300px|right|Bitnami console (after a succesful install)]]
[[file:bitnami-console.png|thumb|300px|right|Bitnami console (after a succesful install)]]
Line 55: Line 106:
  <nowiki>#</nowiki> add port 8000 (adapt to yours)
  <nowiki>#</nowiki> add port 8000 (adapt to yours)
  sudo ufw allow 8000/tcp
  sudo ufw allow 8000/tcp
  # Open for the Studio (else you cannot create courses)
  <nowiki>#</nowiki> Open for the Studio (else you cannot create courses)
  sudo ufw allow 18010/tcp
  sudo ufw allow 18010/tcp
  <nowiki>#</nowiki> add port 8000 to a restricted area
  <nowiki>#</nowiki> add port 8000 to a restricted area
Line 76: Line 127:
* The start up page will display an empty URL (see above). Somehow, Apache will start despite wrong group names, but then something goes wrong. Fix the group name problem, shut down everything and restart.
* The start up page will display an empty URL (see above). Somehow, Apache will start despite wrong group names, but then something goes wrong. Fix the group name problem, shut down everything and restart.


* Studio will not allow saving an edited block '''Problem not solved so far'''
* Studio will not allow saving an edited block '''Problem not solved so far'''. The problem seems to be quite frequent, but not clear solution was posted in forum messages I found.
 
=== installation under root ===
 
Since saving a studio edit does not work, I tried reinstalling the whole thing under root.
 
sudo su
ufw allow 81/tcp
ufw allow 443/tcp
ufw reload
./bitnami-edx-eucalyptus.3-0-linux-x64-installer.run
 
  // kill temp file from user installation
  rm -r /tmp/mako_lms
Below is a slightly censored transcript of the installation dialog. I basically used default values.
 
<source lang="bash">
./bitnami-edx-eucalyptus.3-0-linux-x64-installer.run
X11 connection rejected because of wrong authentication.
----------------------------------------------------------------------------
Welcome to the Open edX powered by Bitnami Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.
 
Open edX : Y (Cannot be edited)
Demo course for Open edX [Y/n] :Y
Is the selection above correct? [Y/n]: y
----------------------------------------------------------------------------
Installation folder
Please, choose a folder to install Open edX powered by Bitnami
Select a folder [/opt/edx-eucalyptus.3-0]:     
----------------------------------------------------------------------------
Create Admin account
Open edX powered by Bitnami admin user creation
Your real name [User Name]: Daniel K. Schneider
Email Address [user@example.com]:
Login [user]: admin
Password :
Please confirm your password :
----------------------------------------------------------------------------
Web Server Port
Choose a port that is not currently in use, such as port 81.
Apache Web Server Port [81]:   
----------------------------------------------------------------------------
MySQL Information
Please enter your MySQL database information:
Choose a port that is not currently in use, such as port 3307.
MySQL Server port [3307]:
----------------------------------------------------------------------------
The hostname that will be used to create internal URLs. If this value is
incorrect, you may be unable to access your Open edX installation from other
computers.
Hostname [127.0.1.1]: XXXX.unige.ch
Do you want to configure mail support? [y/N]: y
----------------------------------------------------------------------------
Configure SMTP Settings
This is required so your application can send notifications via email.
Default email provider:
[1] GMail
[2] Custom
Please choose an option [1] : 2
----------------------------------------------------------------------------
Configure SMTP Settings
 
This data is stored in the application configuration files and may be visible to
others. For this reason, it is recommended that you do not use your personal
account credentials.
Username []: XXXX-tecfa
Password :
Re-enter :
SMTP Host []: XXXX.unige.ch
SMTP Port [587]:
Secure connection
[1] None
[2] SSL
[3] TLS
Please choose an option [3] : 1
----------------------------------------------------------------------------
Setup is now ready to begin installing Open edX powered by Bitnami on your
computer.
Do you want to continue? [Y/n]: y
----------------------------------------------------------------------------
Please wait while Setup installs Open edX powered by Bitnami on your computer.
Installing
0% ______________ 50% ______________ 100%
########################################
</source>


==== To start/stop the server ====
==== To start/stop the server ====
Line 113: Line 252:
=== Creating a course ===
=== Creating a course ===


For creating courses one is supposed to use studio. Of course, none of the obvious documentation will tell where to find it. I will. If you configured your firewall as suggested above, then it is here
For creating courses one is supposed to use studio. Of course, none of the obvious documentation will tell where to find it. I will. If you configured your firewall as suggested above, then it is here:


* http://yoursite:18010/
* http://yoursite:18010/
: Yes it runs by default on port 18010 !
: Yes it runs by default on port 18010 !
* <code>http://yoursite:edx_port/edx-studio</code> also works and will redirect to the above.


Read http://docs.edx.org/
Read http://docs.edx.org/

Revision as of 11:53, 30 March 2017

Introduction

According to the [], “The Open edX platform is a free--and open source--course management system (CMS) that was originally developed by edX. The Open edX platform is used all over the world to host Massive Open Online Courses (MOOCs) as well as smaller classes and training modules.”

Installation

Installation of a test system under Ubuntu 16

There are many different ways to install and run an edX server.

Overview

If you have free access to a server machine, the easiest method is probably installing the "bitnami" stack (README.txt file. It will install a complete software pack in a separate directory including web servers, database servers, several programming languages, etc. The version we tried included:

 - Open edX eucalyptus.3
 - Apache 2.4.25
 - Elasticsearch 0.90.11
 - Erlang 17.4
 - Java 1.8.0_121
 - Memcached 1.4.35
 - MongoDB 2.6.12
 - Mysql 5.6.35
 - Node.js 6.10.0
 - Python 2.7.13
 - RabbitMQ 3.6.8
 - Rails 4.2.8
 - Ruby 2.1.10
 - RubyGems 1.8.12

If your machine already runs web servers, data base servers, etc. it will use other ports. From the README file: “The default listening port for Apache is 8080, for Elasticsearch 9300, for Memcached 11211, for MongoDB 27017, for MySQL is 3306, for RabbitMQ 5672, for Open edX XQueue 18040 and 18010 for Open edX CMS. If those ports are already in use by other applications, you will be prompted for alternate ports to use.” This does of course require that you allow that...

Summary of ports that must be openend or can remain local (user installation for a system with an existing LAMP/Java stack, changed apache default from 8080 to 8000)

PORTS used by edX standard and custom installations
Service system default ports default user install

ports

our user install our root install

(machine already had a LAMP stack)

requires open firewall
mysql_port 3306 3307 3307 3307
smtp_port 587 587 587 587
apache_server_port 80 8080 8000 81 x
apache_server_ssl_port 443 8443 8443 443 x
mongodb_port 27017 27017 27017
elasticsearch_port 9200 9200 9200
elasticsearch_node_port 9300 9300 9300
rabbitmq_server_port 5672 5672 5672
rabbitmq_management_port 15672 15672 15672
Open edX XQueue 18040 18040 18040 x
Open edX CMS 18010 18010 18010 x

Installation summary for a simple user

Bitnami console (after a succesful install)

Firstly, have a look at this bitnami doc which is not really advertized.

Here are the steps:

chmod a+x bitnami-edx-eucalyptus.3-0-linux-x64-installer.run
  • Create an empty directory somewhere
mkdir /path_yours/edx
  • Run the installer (and wait for a very long time)
./bitnami-edx-eucalyptus.3-0-linux-x64-installer.run
In the beginning it will ask your for an admin login, mail and password. It also requires SMTP information (anonymous is not allowed, so need an account). Alternatively you can use a gmail address.
Important. You won't have to wait for a few minutes, but for a very long time, e.g. about 30 minutes on an older but idle Ubuntu 16 box.
  • Launch it once the installer is done. You will get a little console (see picture to the right). This console is fairly useless if you are connected through an terminal. Instead you could run the following:
cd your_installation_directory
./ctlscript.sh status
This will not mean that you actually can use the server, since you very likely may have a firewall that blocks outside access to your server.
To test in the terminal if the server is actually working your could just type wget localhost:8000 (adapt the port number).
  • Adapt the firewall (of course you also can restrict to a local network)
# show open ports
sudo ufw status
# add port 8000 (adapt to yours)
sudo ufw allow 8000/tcp
# Open for the Studio (else you cannot create courses)
sudo ufw allow 18010/tcp
# add port 8000 to a restricted area
sudo ufw allow 8000/tcp from ip_number_here
# Reload the firewall 
sudo ufw reload

Now if you plan to use this as a little production environment

  • Open the firewall (see above)
  • you should tell your system to launch this script at boot time. E.g. read this.

Bugs (April 27 2017)

  • The installation script will run and install under your login. It can not figure out your group name and some configuration files will be wrong. Fix group names in:
properties.ini
apps/edx/conf/httpd-cms.conf
apps/edx/conf/httpd-lms.conf
apps/xqueue/conf/httpd-xqueue.conf
  • The start up page will display an empty URL (see above). Somehow, Apache will start despite wrong group names, but then something goes wrong. Fix the group name problem, shut down everything and restart.
  • Studio will not allow saving an edited block Problem not solved so far. The problem seems to be quite frequent, but not clear solution was posted in forum messages I found.

installation under root

Since saving a studio edit does not work, I tried reinstalling the whole thing under root.

sudo su
ufw allow 81/tcp
ufw allow 443/tcp
ufw reload
./bitnami-edx-eucalyptus.3-0-linux-x64-installer.run
 // kill temp file from user installation
 rm -r /tmp/mako_lms

Below is a slightly censored transcript of the installation dialog. I basically used default values.

 ./bitnami-edx-eucalyptus.3-0-linux-x64-installer.run 
X11 connection rejected because of wrong authentication.
----------------------------------------------------------------------------
Welcome to the Open edX powered by Bitnami Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want 
to install. Click Next when you are ready to continue.

Open edX : Y (Cannot be edited)
Demo course for Open edX [Y/n] :Y
Is the selection above correct? [Y/n]: y
----------------------------------------------------------------------------
Installation folder
Please, choose a folder to install Open edX powered by Bitnami
Select a folder [/opt/edx-eucalyptus.3-0]:       
----------------------------------------------------------------------------
Create Admin account
Open edX powered by Bitnami admin user creation
Your real name [User Name]: Daniel K. Schneider
Email Address [user@example.com]: 
Login [user]: admin
Password :
Please confirm your password :
----------------------------------------------------------------------------
Web Server Port
Choose a port that is not currently in use, such as port 81.
Apache Web Server Port [81]:     
----------------------------------------------------------------------------
MySQL Information
Please enter your MySQL database information:
Choose a port that is not currently in use, such as port 3307.
MySQL Server port [3307]: 
----------------------------------------------------------------------------
The hostname that will be used to create internal URLs. If this value is 
incorrect, you may be unable to access your Open edX installation from other 
computers.
Hostname [127.0.1.1]: XXXX.unige.ch
Do you want to configure mail support? [y/N]: y
----------------------------------------------------------------------------
Configure SMTP Settings
This is required so your application can send notifications via email.
Default email provider:
[1] GMail
[2] Custom
Please choose an option [1] : 2
----------------------------------------------------------------------------
Configure SMTP Settings

This data is stored in the application configuration files and may be visible to 
others. For this reason, it is recommended that you do not use your personal 
account credentials.
Username []: XXXX-tecfa
Password :
Re-enter :
SMTP Host []: XXXX.unige.ch
SMTP Port [587]: 
Secure connection
[1] None
[2] SSL
[3] TLS
Please choose an option [3] : 1
----------------------------------------------------------------------------
Setup is now ready to begin installing Open edX powered by Bitnami on your 
computer.
Do you want to continue? [Y/n]: y
----------------------------------------------------------------------------
Please wait while Setup installs Open edX powered by Bitnami on your computer.
 Installing
 0% ______________ 50% ______________ 100%
 ########################################

To start/stop the server

You can use the included ctlscript.sh utility:

ctlscript.sh start|stop|restart

EdX will be available on the selected port, e.g.

http://yourserver_ip_or_name:8080

Again, if this does not work from your client machine, adapt the firewall settings (see above)

edX administration panel

Configuration

By default, anyone now can require an account and will get it. This may attract spammers.

After login into the system you cannot do anything, except signing up for the demo class and configuring the profile.

Log into the admin console:

http://yoursite/admin
It only will be available on the localhost, which is really bad news if you cannot run an Xserver on your client machine. If you do happen to have a client linux machine (I do) then you can run firefox on the server machine. Connect to the server with the -XY option !!
ssh your_server -XY
sudo apt-get install firefox

Now your freaky Ubuntu will not run the firefox you just installed, but a copy of the one you already may have running on your local machine. Type:

firefox --new-instance

Open http://localhost:8000/admin and enjoy the difficult editing over a remote X connection.

Alternatives

The same company also provides solutions for Virtual Machines compatible with Oracle VirtualBox and VMware vSphere, Workstation, and Fusion

Creating a course

For creating courses one is supposed to use studio. Of course, none of the obvious documentation will tell where to find it. I will. If you configured your firewall as suggested above, then it is here:

Yes it runs by default on port 18010 !

Read http://docs.edx.org/