1. Introduction

This document is currently under active development and discussion!

This document is intended to administrators of a MONARC instance. If you find errors or omissions in this document, please don’t hesitate to submit an issue or open a pull request with a fix.

The back office is the component that lets you manage:

  • The front office servers;

  • The clients (instances of MONARC deployed on front office servers);

  • The MONARC common models;

  • The access of users to the back office.

2. Management of the front office servers

2.1. List the current front office servers

List the current front office servers

2.2. Create a new front office server

Create a new front office server

A front office server can host one or more clients.

All clients on a front office server share the same application source code. An Apache Virtual Host is associated to each clients (with dedicated environment variables, configuration file, databases and log files).

3. Management of the clients

3.1. List the current clients

List the current clients

3.2. Create a new client

A client is always associated to a front office server, FO-1 in the picture below.

Create a new client

The creation of a new client will result in the generation of a JSON file on the back office server (in the folder /var/lib/monarc/bo/MonarcAppBO/data/json/create/).

The newly created JSON file contains the required information for the deployment of the new MONARC instance.

The inventory of clients for the ansible playbook is kept up-to-date by a script supposed to be launched periodically with cron. The cron task should be run by a dedicated user (for example ansible) on the configuration server.
As you can see the script update.sh checks for client(s) to create or to delete on the back office through SSH. If needed, the ansible inventory is updated. Then the ansible playbook is executed.

The creation of a new client will result in:

  • the generation of an Apache Virtual Host with dedicated environment variables;

  • the generation of a database for the client;

  • the generation of a configuration file for MONARC (in /var/www/<proxy-alias>/);

  • the update of the reverse proxy (/etc/apache2/client_redirection file);

  • the update of the database backup script on each front office servers.

3.3. Backup of client’s databases

If you want to enable the database backup script:

$ mkdir -p /var/lib/mysql-backup/monarc/
$ sudo crontab -l
# m h  dom mon dow   command
30 2 * * * /usr/local/bin/backup_monarc_db.sh

This script will backup the databases of each clients on the front office server.

As explained previously this script is updated after each addition/deletion of client(s).

4. Management of the models