The Tools We Use For Ampersand
  • Introduction
  • Tools used in the Ampersand project
  • Version control with Git
  • How to release an Ampersand upgrade
  • Documenting with GitBook
    • Getting started with GitBook
    • Do's and Dont's in Ampersand documentation
  • Building
    • Building an Ampersand Compiler with Stack
    • Baking a Docker image that contains the Ampersand Compiler
    • Testing with Docker on your own laptop
    • Automated builds
  • Prototype framework
  • Automation of releasing (CI/CD)
    • Github packages
  • Installation of RAP
    • Deploying to your own laptop
    • Deploying RAP4 in the Azure cloud
    • Deploying OUNL RAP4
    • Maintaining RAP4
    • Making Docker images
    • Deployment Configuration
    • Details
  • Functionality of RAP4
    • Student
    • Tutor
    • Account Manager
    • Graduate Student
  • Deploying with Kubernetes
  • Authentication and access management with OAuth
  • Ampersand language support
  • Group 1
    • Development using VS Code
Powered by GitBook
On this page
  • 1. Setting up the virtual machine
  • Getting access to the server
  • Installing Docker
  • Obtaining the files we need
  • Installing RAP4
Export as PDF
  1. Installation of RAP

Deploying OUNL RAP4

If you want to deploy RAP4 on your own server, you might try to copy how I deployed RAP4 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:

  1. 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.

  2. It documents the installation we made for the Open University. We want maintenance of RAP4 to be transferable to other persons, so we need to document the choices made and the reasons for making them.

  3. It contains all information needed to make a deployment script for automated deployment. We have automated the deployment with Docker, so that RAP4 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.

1. Setting up the virtual machine

I got a server from the Open University's IT-department.

The following settings apply:

server name

lnx-hrl-202v

OS

Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-153-generic x86_64

Admin user name

sjo

verification type

password (Stef Joosten knows the password)

Size

2 core, 7GB

Inbound port: RAP4 (HTTP)

TCP/80

Inbound port: HTTPS

TCP/443

Inbound port: SSH

TCP/22

Public IP-adres

145.20.188.96

domain name for calling the application

internet access needed

for generating prototypes because the prototype generator draws from the Ampersand-github repository.

Getting access to the server

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.

Installing Docker

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 https://docs.docker.com/compose/install/ .

Then I checked that everything went successfully by means of the which-command:

sjo@lnx-hrl-202v:~$ which docker
/usr/bin/docker
sjo@lnx-hrl-202v:~$ which docker-compose
/usr/bin/docker-compose

Obtaining the files we need

We need only one file: docker-compose.yml To get it, I used the wget command, which gets stuff from the web:

sjo@lnx-hrl-202v:~$ mkdir RAP4
sjo@lnx-hrl-202v:~$ cd RAP4
sjo@lnx-hrl-202v:~/RAP4$ wget https://raw.githubusercontent.com/AmpersandTarski/RAP/master/docker-compose.yml

Installing RAP4

To install RAP4:

sjo@lnx-hrl-202v:~/RAP4$ docker compose up -d

To check whether this worked, I went to my browser and navigated to http://145.20.188.96/RAP4. 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 RAP4 from an arbitrary computer on the internet:

The database is accessible on port 8080:

PreviousDeploying RAP4 in the Azure cloudNextMaintaining RAP4

Last updated 3 years ago

rap.cs.ou.nl