All binaries can be obtained from the project's CI server (Linux/Solaris).
For the instructions in this manual, the following cluster layout is assumed:
- In a secure place, generate a folder for the internal pki of your cluster.
- Generate a folder for the pki managements scripts and config files, e.g.
mkdir scripts
- Download the contents of the 'scripts' directory into
scripts
- Run
./scripts/generateCA.sh
to generate the CA. - In the wizard, enter any name as common name and enter a secure password for the CA.
- Enter the password again to let the CA self-sign itself.
The CA certificate of your CA will be in ca/mamid.pem
and its private key in ca/private/mamid_private.pem
.
Keep this file secure. In case of a compromisation of the key, the CA and all signed certificates should be imidietly
removed and replaced by new ones signed by a new CA. Otherwise the cluster may be hijacked.
Assume the slave's hostname at PSU1 is slave01
.
To generate its certificate and key, run ./scripts/generateAndSignSlaveCert.sh slave01
.
You will be promted to enter the CA's password and confirm the signing process.
After the successful signature the slave's cert and key are located in ./ca/slaves/slave01/
.
Repeat this procedure with all other slaves in your cluster.
If you don't have slaves (from master's view) identified with a hostname, you can also sign a ip:
./scripts/generateAndSignSlaveCert.sh slave01 <IP>
The master can run in different modes. This manual assumes the most secure operation mode.
-
Install the postgresql and make it acessible for a user.
-
Create a database for the configuration. It will be used as configuration store of mamid and can be backuped with tools like
pg_dump
, -
Deploy the master binary on the master.
-
Download and extract gui.tar.gz next to the master binary.
-
Generate and sign a key/cert pair using the above method for the master. As name
master
can safely choosen since the common name of this certificate doesn't matter in the verification process. -
Deploy a copy of the CA certificate (
mamid.pem
), the master key and the master certificate on the master. -
Deploy a X.509 certificate and key for the web interface (may be signed by your internal CA or an external Authority)
-
Start the master:
/path/to/your/master \ -db.dsn "host=localhost port=5433 sslmode=disable dbname=<database> user=<user> password=<password>" \ -slave.auth.key "/path/to/your/master/key" \ -slave.auth.cert "/path/to/your/master/certificate" \ -slave.verifyCA "/path/to/your/mamid.pem " \ -api.key "/path/to/your/web/key" \ # omit this line to disable https for the web interface -api.cert" /path/to/your/web/certificate" \ # omit this line to disable https for the web interface -api.verifyCA "/path/to/your/mamid.pem" \ # omit this line to disable client cert auth
Using this configuration the master will serve the web interface via https
and requires
user authentication with a client certificate. Such a certificate can also be created with the method described above
and easily imported to the administrator's browser with the PKCS12 file (.p12) also located
in the ./ca/slaves/<certname>
folder. It is possible to use different CAs for slave authentication,
user authentication and the web interface. It's strongly recommended to use the internal CA for slave
authentication.
For more information about the specific master command line options see master --help
.
-
Install MongoDB on the slave.
-
Deploy the slave certificate and key on each slave as well as the
mamid.pem
. -
Deploy the slave binary on the slaves.
-
Run the slaves:
/path/to/your/slave \ -slave.auth.cert "/path/to/the/slave/cert" \ -slave.auth.key "/path/to/the/slave/key" \ -data "/path/to/your/mongod/data/root/directory"
For more information about the specific slave command line options see slave --help
.
-
Deploy the notifier binary on a server that is able to reach master's web interface
-
Configure the notifier with its config file. See the sample file. E-mails are delivered using a smarthost.
-
Configure contacts in the configured contacts file in the following format for e-mail notifications:
[eve] [email protected]
-
Launch the notifier:
/path/to/your/notifier <config.ini>