RAP is a Repository for Ampersand Projects. This tool is being used by the Open University of the Netherlands in the course Rule Based Design. It lets students analyse Ampersand models, generate functional specifications and make prototypes of information systems. It is the primary tool for students in relation to Ampersand.
Deployment means to install RAP3 on a web server, to make it work for a group of students. This text explains how. It is something you only want to do if your need an instance of RAP3 on your own server.
We use Docker for automating the deployment and making RAP portable over different platforms. The following two sections report what we have done:
to deploy RAP on an Ordina server in the Azure cloud;
to deploy RAP at the Open University on a server in the OUNL-datacenter.
These two reports will most likely contain enough information to let you reproduce the installation on a server of your own.
The last section of this chapter discusses the making of docker images. You need a docker image in order to deploy RAP3.
Docker is sheer magic. You don't have to understand it to run it. However, if you insist on knowing how it is done...
Here are ten steps to install RAP3 manually, without Docker, on a freshly created server:
You need a server that is connected to the internet, because RAP takes updates from a GitHub repository. A 2-core/8GB server is sufficient. A memory size under 3GB has shown to be insufficient. Ports for HTTP, HTTPS, SSL, and SFTP must be open.
You need a database and a web-server. This explains why a LAMP-server is an obvious choice if you use a preconfigured server.
A quick way to install is to copy the source code of RAP3 on your server and compile it with Ampersand. That gives you the RAP3 webapplication. You will find the complete Ampersand source code of RAP3 on https://github.com/AmpersandTarski/RAP. The main file is
./RAP3/RAP3dev.adl for the development version and
./RAP3/RAP3prod.adl for the production version.
If you don't have an Ampersand compiler, you can build one using the Haskell sources of that compiler. You will find the source code on the development branch of the Ampersand repository (https://github.com/AmpersandTarski/Ampersand/tree/development). You can verify success by asking the Ampersand for its version:
> ampersand --versionAmpersand-v3.17.4 [master:fd90ea3f1], build time: 15-Nov-19 18:02:19 CET
If you don't have an Ampersand compiler, but docker runs on your machine, you can simply use the most recent ampersand compiler by
> docker run -it ampersandtarski/ampersand
Use Git to create a local clone of these repositories. Git is preferred over copying the files, because you can repeatedly use it to ensure you get the right version.
To build an Ampersand compiler, you need Haskell. However, you can also use the latest executable Ampersand-compiler, which is published periodically on http://ampersandtarski.github.io/. This way, you don't need to build Ampersand and you can avoid installing Haskell.
If you want, create your own Ampersand compiler. This way, you can pick a version by which to generate RAP3.
LaTeX and GraphViz are called by RAP3 to generate documentation. Therefore, both must be installed on the server.
You need to generate RAP3 to facilitate regular updates to the system.
Some local settings may apply, which are brought together in one file. Use this to administer things like database account(s) and PHP time limit, logging, etcetera.
Things that are necessary for testing and development, such as logging, can be changed in the production version. These things are usually adapted shortly before going to production.
Don't hesitate to contact Han Joosten. He'll be glad to help out.