Refinery installation via CLI¶
Use case¶
To extend the CLI to be able to perform a Refinery installation.
Goals¶
-
Standardised and reliable installation mechanism for all client implementations.
-
Enforced specific configuration at install time.
-
Provide additional validation of the server environment prior to installation.
Design¶
Install¶
The following manual steps will be required before an installation via the CLI:
-
The required Refinery bundle should be downloaded
- This can be done via the CLI (
refinery install --download *refinery-version*) or manually from Nexus - Specify the root folder containing Refinery versions with
--package-sourceif not the default
- This can be done via the CLI (
-
kdb+ and Delta license files must be downloaded
-
An installation configuration must be generated
Optionally, an instances CSV file should be created if ports should be fixed. This can then be specified with the --instances option.
With these steps completed, an basic installation will be possible:
> refinery install --install 4.4.3 \
--install-config ~/client-install.config \
--license ~/license-files/ \
--install-type control+daemon
Upgrade¶
Refinery version upgrades will be supported via a clean installation only. The CLI will not support the Delta upgrade system. In this case, --overwrite must be specified on the command line. For the installation:
- The existing install will be backed up
/opt/refinery->/opt/refinery-install-backup-YYYYMMDD-HHMMSS
- The Delta installation will then start (after approval)
- If the installation fails, the existing install will be restored
/opt/refinery->/opt/refinery-install-failure-YYYYMMDD-HHMMSS/opt/refinery-install-backup-YYYYMMDD-HHMMSS->/opt/refinery
- If the installation is successful, the old installation will be deleted
- It can be kept by specifying the
--maintain-old-after-installcommand
- It can be kept by specifying the
Enforced configuration¶
The following configuration in the "installation config" would be enforced:
delta-data-dir: Must be set and cannot be the same asdelta-install-dirfail-on-duplicate-port: Must be set and set to1always-upgrade: Must be set and set to1always-overwrite: Must be set and set to1
Extensions¶
To make it easier to install Refinery for the first time, the CLI would also learn a --generate-install-config option that would interactively generate an installation configuration file.
CLI usage example¶
> refinery install - Usage
Description: Refinery package download and installation
--install *refinery-version*
--install-config *file* The installation configuration
--license *path* The source folder containing the kdb+ and Delta license files
--install-type *type* One of 'control', 'daemon' or 'control+daemon'
[--instances *csv-file*] The static host and port assignments for processes if required
[--package-source *path*] The root folder containing the extracted packages
[--overwrite] Allow installation with existing installation present
[--maintain-old-after-install] If an existing installation is present, keep it even after a successful new install