If you want to deploy RAP3 on your own server, you might try to copy how I deployed RAP3 at the OUNL. This chapter tells you how.
In early 2016 the need arose to replace the RAP2 implementation of Ampersand by a RAP3 implementation, because RAP2 was insufficiently maintainable. This environment is used by students for completing the course Rule Based Design (OBR, code IM0103). This implementation is hosted by ICTS, the IT-department of the university.
This chapter is an account of the installation process. It serves the following purposes:
It is an example for others who want to deploy Ampersand. We get requests now and then by people who want to deploy Ampersand, so we figured it is nice to have a documented example for them.
It documents the installation we made for the Open University. We want maintenance of RAP3 to be transferrable to other persons, so we need to document the choices made and the reasons for making them.
It contains all information needed to make a deployment script for automated deployment. We have automated the deployment with Docker, so that RAP3 will always be up to date with the most recent stable release of Ampersand.
Each step in the installation process gets a separate section in this text.
I got a server from the Open University's IT-department.
The following settings apply:
Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-83-generic x86_64)
Admin user name
password (Stef Joosten knows the password)
2 core, 7GB
Inbound port: RAP3 (HTTP)
Inbound port: phpMyAdmin (HTTP)
Inbound port: HTTPS
Inbound port: SSH
URL for calling the application
internet access needed
for generating prototypes because the prototype generator draws from the Ampersand-github repository.
At the OUNL, we need VPN to gain access with SSH to a server. This requires approval from the IT department. I got a raw Ubuntu machine, meaning that the port settings (specified above) and VPN have to be requested at the IT-servicedesk.
I can now access this machine through SSH (using PUTTY, which I downloaded from the Internet), but only after installing a VPN-tunnel to the server (using Pulse Secure). In the sequel, I will refer to this machine as "the server". This gave me access through a command line interface (CLI). Ubuntu gave me bash as its CLI.
Since this is a fresh machine, docker has to be installed. By just typing
docker, the server advised to install Docker by means of the command
sudo apt install docker.io. This turned out to be a bad advice, because it resulted in a too old version of docker. Instead, I followed the instructions on
https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ for installing docker. The instructions for docker-compose are found on
Then I checked that everything went successfully by means of the
sjo@lnx-hrl-202v:~$ which docker/usr/bin/dockersjo@lnx-hrl-202v:~$ which docker-compose/usr/bin/docker-compose
We need only one file:
To get it, I used the
wget command, which gets stuff from the web:
sjo@lnx-hrl-202v:~$ mkdir RAP3sjo@lnx-hrl-202v:~$ cd RAP3sjo@lnx-hrl-202v:~/RAP3$ wget https://raw.githubusercontent.com/AmpersandTarski/RAP/master/docker-compose.yml
To install RAP3:
sjo@lnx-hrl-202v:~/RAP3$ docker-compose up -d
To check whether this worked, I went to my browser and navigated to
It took a while to get started, because it was building a fresh database.
I checked whether the containers are running by means of the
docker ps command.
Completion of this step allowed access to RAP3 from an arbitrary computer on the internet:
The database is accessible on port 8080: