Basic Automated Configuration
Introduction
The Portal Dedicated is bundled with an automation configuration script.
This configuration script performs a number of tasks, including:
- Add
management-console
user with full read access to the Portal Dedicated directory - Create logging directory under
/var/log/management-console
- Create
management-console
systemd
service script - Update
application.properties
with the full path to the certificate keystore - Provision the database using Flyway
- Update
application.properties
with the database properties - Configure the Elasticsearch URL, username and password in application.properties
- Configure the user account the service runs on
- Repair existing database migrations before applying new migrations when using Oracle
- Configure logging directory and file locations
The script must be run as root
The script is idempotent, so can be run multiple times with the same effect on the system
Running the configuration script with default options:
- Log on the the server where you want to install the Portal Dedicated
- Download and extract the Portal Dedicated artefact
- Open a console window and navigate to the base folder of the extracted artefact
- Run the configuration script using following command:
sudo ./scripts/configureManagementConsole.sh
Running the configuration script with custom options:
To run the configuration script with custom options, simply add the required option(s) after the command e.g.
sudo ./scripts/configureManagementConsole.sh --help --quiet
… this command runs the configuration script with 2 options: ‘help’, and 'quiet'.
CLI Tool Options
Basic Options
Option | Flag(s) | Options | Default | Description |
---|---|---|---|---|
Help | -? , --help | None | - | Lists all script options. |
Quiet Mode | -q , --quiet | None | - | Disables confirmations from the script user. |
Basic Database Options
Option | Flag(s) | Options | Default | Description |
---|---|---|---|---|
Configure Database | -c , --configure-database | true / false | true | Enables or disables database configuration. |
Database Type | -t , --database-type | postgresql / oracle | postgresql | Specifies the database type. |
Database Host | -h , --database-host | - | localhost | Specifies the database host. |
Database Port | -P , --database-port | - | 5432 (PostgreSQL default) | Specifies the database port. |
Database Name | -d , --database-name | - | management_console | Specifies the database name (must be pre-created). |
Database User | -u , --database-user | - | mconsole | Specifies the database user (must be pre-created). |
Database Password | -p , --database-password | - | mconsole | Specifies the password for the database user. |
Clean Database Option
The following option cleans the database as part of the configuration. ⚠️ Warning: This will drop all objects (tables, indices, etc.) in the database.
Option | Flag(s) | Options | Description |
---|---|---|---|
Clean Database | -x , --database-clean | None | Drops all objects in the database. |
Repair Database Option
This option is used to repair Flyway migrations. It is safe to use even if no repairs are needed but should be applied if indicated in the configuration script output. This is required when upgrading to Portal Dedicated 6.9+ with Oracle.
Option | Flag(s) | Options | Default |
---|---|---|---|
Repair database migrations | -r , --database-repair | None | false |
Database Configuration via application.properties
Instead of passing database options via CLI, they can be configured in application.properties
.
Using this method automatically enables quiet mode.
Option | Flag(s) | Options | Default | Description |
---|---|---|---|---|
Use application.properties | -a , --configure-using-properties | None | - | Uses values from application.properties for database configuration. |
Elasticsearch Options
The following options configure Elasticsearch connection settings in application.properties
.
Option | Flag(s) | Options |
---|---|---|
Elasticsearch URL | -e , --elasticsearch-url | - |
Elasticsearch User | -U , --elasticsearch-user | - |
Elasticsearch Password | -w , --elasticsearch-password | - |
System User Options
This option configures the system user running the service.
Option | Flag(s) | Options | Default |
---|---|---|---|
System User | -s , --system-user | - | management-console |
Logging Options
These options configure the logging directory and file locations.
Option | Flag(s) | Options | Default |
---|---|---|---|
Logging Directory | -l , --logging-dir | - | /var/log/management-console |
Logging File | -f , --logging-file | - | mc.log |