Skip to main content
Version: 6.11.0

Basic Automated Configuration

Introduction

The Portal Dedicated is bundled with an automation configuration script.

This configuration script performs a number of tasks, including:

  • Add portal user with full read access to the Portal Dedicated directory
  • Create logging directory under /var/log/portal
  • Create portal 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:

  1. Log on the the server where you want to install the Portal Dedicated
  2. Download and extract the Portal Dedicated artefact
  3. Open a console window and navigate to the base folder of the extracted artefact
  4. Run the configuration script using following command: sudo ./scripts/configurePortal.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/configurePortal.sh --help --quiet … this command runs the configuration script with 2 options: ‘help’, and 'quiet'.

CLI Tool Options

Basic Options

OptionFlag(s)OptionsDefaultDescription
Help-?,
--help
None-Lists all script options.
Quiet Mode-q,
--quiet
None-Disables confirmations from the script user.

Basic Database Options

OptionFlag(s)OptionsDefaultDescription
Configure Database-c,
--configure-database
true / falsetrueEnables or disables database configuration.
Database Type-t,
--database-type
postgresql / oraclepostgresqlSpecifies the database type.
Database Host-h,
--database-host
-localhostSpecifies the database host.
Database Port-P,
--database-port
-5432 (PostgreSQL default)Specifies the database port.
Database Name-d,
--database-name
-portalSpecifies the database name (must be pre-created).
Database User-u,
--database-user
-portal_db_userSpecifies the database user (must be pre-created).
Database Password-p,
--database-password
-portal_db_passwordSpecifies 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.

OptionFlag(s)OptionsDescription
Clean Database-x,
--database-clean
NoneDrops 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.

OptionFlag(s)OptionsDefault
Repair database migrations-r, --database-repairNonefalse

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.

OptionFlag(s)OptionsDefaultDescription
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.

OptionFlag(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.

OptionFlag(s)OptionsDefault
System User-s, --system-user-portal

Logging Options

These options configure the logging directory and file locations.

OptionFlag(s)OptionsDefault
Logging Directory-l, --logging-dir-/var/log/portal
Logging File-f, --logging-file-portal.log