The purpose of maintaining software is to guarantee continuous operation for all users. In this chapter we use the RAP3 server at OUNL as an example, trusting that you will figure out what to do for servers of your own.
Here is an overview of all tasks described on this page. Refer to the related section below for details on each specific task
Before doing any maintenance, you need credentials to gain access to your server. Then you can connect to the server. We assume you gain access to a command-line interface (CLI) of your server. In this text that CLI is
/bin/bash on a linux machine.
Check the configuration When you start a maintenance session, you may want to check on the system. RAP3 runs in containers on a docker-platform, so you can check whether the containers are running and you can check the configuration in which they should be running.
Upgrade to a new version
Refresh the configuration Refreshing the RAP3 configuration is something you need to do only when developers tell you to do that.
The RAP-server has been configured to communicate via
ssh. The Open Universiteit allows ssh-connections only through VPN. So I made sure my VPN-connection is active.
I entered the server using command
ssh rap.cs.ou.nl and the right user/password combination, upon which I gained access to the CLI.
The RAP3-instance is installed from directory
~\RAP3, which is the working directory from which maintenance is done.
This is what you can expect to see:
stefjoosten$ ssh firstname.lastname@example.org@rap.cs.ou.nl's password:Permission denied, please try email@example.com's password:Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-124-generic x86_64)* Documentation: https://help.ubuntu.com* Management: https://landscape.canonical.com* Support: https://ubuntu.com/advantage170 packages can be updated.12 updates are security updates.New release '18.04.2 LTS' available.Run 'do-release-upgrade' to upgrade to it.Last login: Wed May 29 12:03:17 2019 from 220.127.116.11sjo@lnx-hrl-202v:~$cd RAP3sjo@lnx-hrl-202v:~/RAP3$
The server should show at least two containers, a database container called
rap3_db_1 and a RAP-container called
dockerampersand_rap3_1. There may be a third container called
rap3_phptools_1, which is there to gain access to the database (for maintainers only). To verify, give the command
docker ps. This is what you may expect to see:
sjo@lnx-hrl-202v:~/RAP3$ docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES40e5e97c1b26 phpmyadmin/phpmyadmin "/run.sh superviso..." 4 months ago Up 36 seconds 9000/tcp, 0.0.0.0:8080->80/tcp rap3_phptools_1bff782b2da89 ampersandtarski/rap3-db "docker-entrypoint..." 4 months ago Up 2 weeks 3306/tcp rap3_db_1773f7ad86527 dockerampersand_rap3 "docker-php-entryp..." 18 months ago Up 2 weeks 0.0.0.0:80->80/tcp dockerampersand_rap3_17525eb7ea95f dockerampersand_db "docker-entrypoint..." 18 months ago Up 2 weeks 3306/tcp dockerampersand_db_1sjo@lnx-hrl-202v:~/RAP3$
In this case it appears that a fourth container is running. This poses no problem, because other processes may run concurrently without interfering with RAP3.
The configuration file that specifies this configuration is the only file in the working directory:
sjo@lnx-hrl-202v:~/RAP3$ ls -altotal 20drwxrwxr-x 3 sjo sjo 4096 Oct 25 2018 .drwxr-xr-x 18 sjo sjo 4096 Jan 9 2018 ..-rw-rw-r-- 1 sjo sjo 472 Oct 25 2018 docker-compose.ymldrwxr-xr-x 5 root root 4096 Dec 15 2017 volumessjo@lnx-hrl-202v:~/RAP3$
By inspecting the contents you can see whether the configuration matches what you see in
docker. This is what you can expect in
sjo@lnx-hrl-202v:~/RAP3$ cat docker-compose.ymlversion: '3'services:rap3:restart: alwaysimage: ampersandtarski/ampersand-rap:latestports:- "80:80"links:- dbvolumes:- ./volumes/log:/var/www/html/RAP3/log- ./volumes/scripts:/var/www/html/RAP3/scriptsdb:restart: alwaysimage: ampersandtarski/rap3-dbvolumes:- ./volumes/mysql:/var/lib/mysqlphptools:image: phpmyadmin/phpmyadminports:- "8080:80"links:- dbsjo@lnx-hrl-202v:~/RAP3$
volumes contains the Ampersand data, which is kept outside the containers so the data persists if containers get killed or if you restart the software.
sjo@lnx-hrl-202v:~/RAP3$ ls -al volumes/total 40drwxr-xr-x 5 root root 4096 Dec 15 2017 .drwxrwxr-x 3 sjo sjo 4096 Oct 25 2018 ..drwxr-xr-x 2 www-data www-data 4096 Dec 28 11:16 logdrwxr-xr-x 229 999 999 20480 May 13 07:48 mysqldrwxr-xr-x 75 www-data www-data 4096 Oct 25 2018 scriptssjo@lnx-hrl-202v:~/RAP3$
There are three data sets. The directory
log contains logging information of the RAP3-server. The directory
mysql contains the data from MariaDB. The directory
scripts contains the student scripts and the files they generated when working in RAP3.
If you need to upgrade RAP3 to the latest release run this command:
sjo@lnx-hrl-202v:~/RAP3$ docker-compose up -d
As you can see in the configuration (
In the rare event that the configuration of RAP3 has changed (to be announced by the developers), you must update the file
docker-compose.ymlby hand, using the command: