Skip to content

Installing the Amplet2 Server

Brendon Jones edited this page May 7, 2021 · 4 revisions

The amplet2 server components are packaged for Debian (Jessie, Stretch, Buster) and Ubuntu (16.04 Xenial, 18.04 Bionic, 20.04 focal). Other Linux distributions will need to install from source.

Install Packages

Add the official AMP repositories and install the amplet2 server packages:

sudo apt-get install curl apt-transport-https gnupg
curl -1sLf 'https://dl.cloudsmith.io/public/wand/amp/setup.deb.sh' | sudo -E bash
apt-get install amplet2-server nntsc ampy amp-web amppki

While installing ampy you will be prompted to create an administrator account which will have full access to data, test schedules and user account management. This account will be able to login through the web interface, unless manually removed from the database after creating your other user accounts.

While installing amppki you will be prompted for a fully-qualified domain name to create a certificate for. This should be the name used by amplet2 clients to connect to this machine - if the name in the certificate doesn't match the name the clients are expecting then they will drop the connection.

Configure RabbitMQ

Copy the sample configuration file into position:

sudo cp /usr/share/doc/amplet2-server/examples/server-rabbitmq.config /etc/rabbitmq/rabbitmq.config

Edit the locations of the various SSL files. If you're using amppki then the relevant options should look like:

{cacertfile, "/etc/amppki/cacert.pem"},
{certfile, "/etc/amppki/server/amppki-cert.pem"},
{keyfile, "/etc/amppki/server/amppki-key.pem"},

Restart it so the changes take effect:

sudo /etc/init.d/rabbitmq-server restart

Connecting a Client

Install and configure an existing client to use the server FQDN as the collector, copy the server CA certificate (from /etc/amppki/cacert.pem on the server) to the client (to /etc/amplet2/keys/<FQDN>.pem on the client), and then start the client with sudo /etc/init.d/amplet2-client start. When the client starts it will send a certificate signing request to the server and then try to fetched a signed certificate. Sign the request with the ampca program on the server:

sudo ampca list
sudo ampca sign <ampname>

Alternatively, you can install a client from scratch (including installing all amplet2-client packages and dependencies, copying CA certificates, writing config files) by adding it via the server web interface and running the configuration script provided on its site page.

Clone this wiki locally