Build a virtual Elab server
This is instructions to build a virtual copy of the elab.ece.au.dk server, so you can develop against this mashine rather than on the operative elab-server.
On your VirtualBox install an Oracle UEK 7.9 server using this DVD, which you have downloaded first: Oracle 7.9 DVD. Be sure to give root a password and create an ordinary user while installed - you're prompted as one of the first things to do. Let the ordinary user be administrator.
When installed as root (every command from this point is run as root) perform
yum update reboot now yum install epel
If you want a graphical interface do this:
yum -y groupinstall kde "KDE Plasma Workspaces" yum install kernel-headers kernel-devel make gcc perl dkms bzip2 reboot yum grouplist yum groupinstall "Server with GUI" cd /etc/systemd/system/ ls rm default.target ln -s /usr/lib/systemd/system/graphical.target default.target ll reboot now
Insert the Guest additions CD from the VirtualBox interface and install the extensions.
Now install docker. First edit /etc/yum.repos.d/oracle-linux-ol7.repo change 0 til 1 in the section [ol7_addons], save and execute:
yum install docker-engine docker-cli docker-compose
Let your favourite browser open the team github page from the students that constrructed this server setup.
Create under root a directory called e.g. elab-server
mkdir elab-server git clone https://github.com/AUTeam2/server-setup.git
systemctl enable docker.service systemctl start docker.service
docker volume create data-volume docker volume create mqtt-volume
Change version number in the docker-compose.yml file from 3.7 to 3.3
docker-compose up -d --build
be sure that it ends without errors - if, then try to run it again. It takes quite a while! (on my 6 core virtual machine more than one hour)
Starting the services
In order to start the services, web, mqtt, database et al issue this command, while still located in the directory where the docker-compose.yml file is located:
Connecting to the mqtt server
The built-in mqtt server can be contacted using this command for subscribing to a channel, provided you have installed the mosquitto package:
mosquitto_sub -h localhost -t "test" -p 8000 -u team2 -P team2
and likewise the publisher can used by issuiong this command:
mosquitto_pub -h localhost -t "test" -p 8000 -m "PingPong" -u team2 -P team2