issues focused on Virtual machine ecosystem and developing core set of SW
Go to file
2018-11-07 22:35:10 +01:00
.gitlab/issue_templates Add GitLab issue template 2017-09-03 15:28:53 +02:00
activemq Add exit code to install scripts 2018-10-28 19:50:35 +01:00
app-acme-sh Create directory for Acme.sh 2018-11-07 21:53:22 +01:00
app-lxc Preparation for vmmgr submodule 2018-11-01 12:51:06 +01:00
app-vmmgr@e5eaba1bc8 Update app-vmmgr 2018-11-07 22:35:10 +01:00
basic Add fallback nginx host 2018-11-04 19:50:48 +01:00
basic-alpine Reorganize build process 2018-10-25 22:05:48 +02:00
basic-java Reorganize build process 2018-10-25 22:05:48 +02:00
basic-libxml Reorganize build process 2018-10-25 22:05:48 +02:00
basic-nodejs Reorganize build process 2018-10-25 22:05:48 +02:00
basic-php Reorganize build process 2018-10-25 22:05:48 +02:00
basic-python2 Reorganize build process 2018-10-25 22:05:48 +02:00
basic-python3 Reorganize build process 2018-10-25 22:05:48 +02:00
basic-ruby Reorganize build process 2018-10-25 22:05:48 +02:00
basic-tomcat Reorganize build process 2018-10-25 22:05:48 +02:00
ckan Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
ckan-datapusher Add exit code to install scripts 2018-10-28 19:50:35 +01:00
crisiscleanup Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
cts Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
frontlinesms Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
gnuhealth Distribute GNU Health demo database along with image 2018-11-07 10:10:07 +01:00
kanboard Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
mariadb Drop DB object only if they exist 2018-10-31 09:55:46 +01:00
mifosx Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
motech Fix Motech install URL 2018-11-07 14:08:30 +01:00
opendatakit Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
opendatakit-build Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
openmapkit Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
pandora Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
postgres Add exit code to install scripts 2018-10-28 19:50:35 +01:00
rabbitmq Add exit code to install scripts 2018-10-28 19:50:35 +01:00
redis Add exit code to install scripts 2018-10-28 19:50:35 +01:00
sahana Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
sahana-demo Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
sahana-shared Split off sahana-shared from Sahana 2018-10-28 08:56:24 +01:00
sambro Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
seeddms Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
sigmah Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
solr Add exit code to install scripts 2018-10-28 19:50:35 +01:00
ushahidi Update install scripts for upcomming vmmgr changes 2018-11-03 15:53:51 +01:00
zz-build Add build key creation notes 2018-11-06 22:06:33 +01:00
zz-extra Make vm-ping more resilient, closes #289 2018-10-28 08:00:14 +01:00
.gitmodules Add vmmgr submodule 2018-11-01 13:04:42 +01:00
alpine.sh Remove extraneous variable 2018-11-02 17:46:16 +01:00
README.md Update build part in README 2018-11-07 20:14:49 +01:00

This is the main repository containing all build and installation scripts, configuration and customization of operating system and all applications present in SpotterVM virtual machine.

Virtual machine specifications

  • Memory: 4 GB
  • CPU: 1 processor, 2 cores
  • Hard Disk: SCSI, 300 MB
  • CD/DVD: IDE
  • Network Adapter: Bridged

In case you're setting up a VMWare virtual machine, select OS type Other Linux 3.x kernel 64-bit and after the VM is created, manually edit the *.vmx file using a text editor and add mem.hotadd = "FALSE". Failing to do so will result in system unable to boot. Other hypervisors don't need this adjustment.

Virtual Machine creation

Download Alpine Virtual 3.8.0 x86_64 from https://alpinelinux.org/downloads/ and boot from it. At the login prompt, use the root user without password to log in.

# Set up interfaces (leave the default choices)
setup-interfaces
ifup eth0

# Download and launch the setup script  
wget dl.dasm.cz/alpine.sh
sh alpine.sh

The script will perform installation and configuration of Alpine linux, LXC and the whole VMMgr platform. Virtual machine is protected by LUKS-on-LVM disk encryption. The encryption password, which is simultaneously also a password for VMMgr web administration interface, will be asked for at the beginning of the script execution. Root access is disabled.

After the script finishes and shuts down the virtual machine, remove CD/DVD drive from the virtual machine settings and extend the HDD to 80 GB. This is to minimize the overall size of the OVA (Open Virtual Appliance) file to which the VM will be exported.

Application Build environment creation

First time setup

Follow the VM creation steps as above, but comment the line disabling the root login in alpine.sh file before its execution. After the script finishes and HDD size is adjusted, add serial port in the virtual machine settings and set it to use Unix socket or named pipe (eg. \\.\pipe\alpine). Ten start the VM and connect to the serial port using screen, PuTTY or any other terminal client.

# Install git and OpenSSH client
apk --no-cache add git openssh-client

# Create SSH key
ssh-keygen -t ecdsa

Assign the key to your GitLab account

# Clone the repository
git clone --recurse-submodules ssh://git@gitlab.dasm.cz:2222/Spotter-Cluster/Spotter-Cluster.git

# Install the build toolchain
Spotter-Cluster/zz-build/install-toolchain.sh

After the script finishes, it is possible to connect via SSH as the toolchain sets up also openssh-server.

Building the packages

There are 3 distinct packaging systems.

  1. Just a plain tar for basic OS setup used by alpine.sh installation script.
  2. Abuild for the native Alpine linux packages (APK) used for LXC, ACME client and VMMgr packaging.
  3. lxc-build/lxc-pack for LXC images building and packaging.

Full build of all components is automated via build-all.sh script. Before the script can be run, signing keys need to be put in place

# Supply Abuild signing key
vi /srv/build/repokey.rsa

# Or generate a new pair
echo '/srv/build/repokey.rsa' | abuild-keygen

# Supply lxc-pack signing key
vi /srv/build/packages.key

# Or generate a new pair
openssl ecparam -genkey -name secp384r1 -out /srv/build/packages.key
openssl ec -in /srv/build/packages.key -pubout -out /srv/build/packages.pub

# Build all packages
Spotter-Cluster/zz-build/build-all.sh

The full build process takes considerable amount of time, so it is advised to have a persistent build VM.

Host assignment

Application Container UID/GID Internal Port Host
ActiveMQ activemq 61616 61616 (ActiveMQ) -
CKAN ckan 8003 8080 (HTTP) ckan
CKAN Datapusher ckan-datapusher 8004 8080 (HTTP) -
Crisis Cleanup crisiscleanup 8005 8080 (HTTP) cc
CTS cts 8006 8080 (HTTP) cts
FrontlineSMS frontlinesms 8018 8080 (HTTP) sms
GNU Health gnuhealth 8008 8080 (HTTP) gh
KanBoard kanboard 8009 8080 (HTTP) kb
MariaDB mariadb 3306 3306 (MySQL) -
Mifos X mifosx 8012 8080 (HTTP) mifosx
Motech motech 8013 8080 (HTTP) motech
ODK Aggregate opendatakit 8015 8080 (HTTP) odk
ODK Build opendatakit-build 8017 8080 (HTTP) odkbuild
OpenMapKit openmapkit 8007 8080 (HTTP) omk
Pan.do/ra pandora 8002 8080 (HTTP) pandora
Postgres postgres 5432 5432 (Postgres) -
RabbitMQ rabbitmq 5672 5672 (AMQP) -
Redis redis 6379 6379 (Redis) -
Sahana sahana 8001 8080 (HTTP) sahana
SAMBRO sambro 8001 8080 (HTTP) sambro
SeedDMS seeddms 8010 8080 (HTTP) dms
Sigmah sigmah 8011 8080 (HTTP) sigmah
Solr solr 8983 8983 (HTTP) -
Ushahidi ushahidi 8014 8080 (HTTP) ush