Testing with containers

Minerva Highway MASA and Fountain JRC in Docker containers

ANIMA in a virtual box

This starts with your Generic Ubuntu machine. This demo uses an Amazon EC2 instance running 18.04 (Bionic). Typically, this will be used with one laptop or desktop development system where embedded system based pledges will be connected.

ubuntu@ip-172-31-19-91:~$ sudo apt-get update
ubuntu@ip-172-31-19-91:~$ sudo apt-get install docker.io
ubuntu@ip-172-31-19-91:~$ sudo service docker start
ubuntu@ip-172-31-19-91:~$ sudo useradd -G ubuntu

The images are stored at: https://minerva.sandelman.ca/qcow/

ubuntu@ip-172-31-19-91:~$ docker image import \
https://minerva.sandelman.ca/qcow/fountain-docker-7df6fccf01a3d3.tar.gz
fountain

ubuntu@ip-172-31-19-91:~$ docker image import \
https://minerva.sandelman.ca/qcow/highway-docker-cacf07b8d06b.tar.gz
highway

At this point you will have two docker images, one called fountain and one called highway. Start with the highway image:

% docker run --init -t -i highway /bin/bash
root@a5d910b5e1c1:/#

The instance is called florean after “florean.sandelman.ca”. You should adjust the hostname and the network settings by editing the files:

# vi /etc/hostname /etc/network/interfaces
# service postgresql start

The capability to bind port 443 does not get archives well, it needs to be restored:

# sudo setcap cap_net_bind_service+ep /usr/share/rvm/rubies/ruby-2.5.1/bin/ruby

# su - highway

For details on configuring the MASA, see Highway Configuration

% vi bin/server

Remove the line “–address ::”, as the docker contains do not support IPv6 by default.

highway% bin/server -D

Use the fountain image:

ubuntu@ip-172-31-19-91:~$ docker run --init -t -i fountain /bin/bash
root@8fd79663a858:/# service postgresql start
# vi /etc/hostname /etc/network/interfaces
# setcap cap_net_bind_service+ep /usr/share/rvm/rubies/ruby-2.5.1/bin/ruby
# su - fountain

For details on configuring the JRC, see Fountain Configuration

% vi bin/startjrc

change the last line to read:

bundle exec ./startjrc --address 0.0.0.0 $@

Remove the line “–address ::”, as the docker contains do not support IPv6 by default.

Start things with either:

bin/startj6rc -D &
bin/startjrc -D  &
.