Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 2 KB

clients.adoc

File metadata and controls

61 lines (43 loc) · 2 KB

Management of the clients

List the current clients

List the current clients

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.

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).