Galera Manager Installer
Contents
Overview
Galera Manager Installer (gm-installer
) is a tool that can do the following operations with Galera Manager (gmd
):
- Install
- Uninstall
- Upgrade
- Reconfigure
- Reset installation data
Note, if for some reason you don’t want to use gm-installer
, you can follow our manual installation guide.
Supported Systems
Galera Manager installer currently supports only the following Linux systems:
- Ubuntu 20.04
- Ubuntu 22.04
- Debian 10
- Debian 11
- Debian 12
- CentOS 7
- RHEL 8
Downloading the Installer
To download the most recent version of gm-installer
do the following:
curl https://galeracluster.com/galera-manager/gm-installer --output gm-installer
chmod +x gm-installer
Supported Commands
# gm-installer install
With this command you can install and reconfigure Galera Manager in your system.
It supports the following options:
--log-level=[error|warn|info|debug|trace] application error level (default: info) [$LOG_LEVEL]
--only-survey will show only survey (no OS restrictions apply)
--answers-file= answers file
--show-command-output turns on command execution output
--command-output-file= direct command output to a file (default: /tmp/gm-installer.log)
-r, --reset-data allows resetting gmd data and reinstalling its components
--log-level
(orLOG_LEVEL
env var) redefines application log level--only-survey
prints out user answers that can be later used with the--answers-file
option--answers-file
using answers file makes it possible to install Galera Manager in an unattended way (see also--only-survey
option)--show-command-output
prints out STDOUT and STDERR of all the executed commands--command-output-file
prints all the commands output to the selected file--reset-data
(-r
) pass this switch if you want to reset and reinstall Galera Manager
# gm-installer uninstall
With this command you can uninstall Galera Manager from your system.
It supports the following options:
--log-level=[error|warn|info|debug|trace] application error level (default: info) [$LOG_LEVEL]
--show-command-output turns on command execution output
--command-output-file= direct command output to a file (default: /tmp/gm-installer-uninstall.log)
--answers-file= answers file
--log-level
(orLOG_LEVEL
env var) redefines application log level--answers-file
using answers file makes it possible to install Galera Manager in an unattended way--show-command-output
prints out STDOUT and STDERR of all the executed commands--command-output-file
prints all the commands output to the selected file
Use the following template as an answers file, if you want to run the unattended deinstallation:
previously_installed: true # must be always true
force_uninstall: true # force uninstall even if some issues detected
remove_data: true # remove data as well (if you preserve the data,
# it will be possible to install gmd again for the same dataset)
# gm-installer upgrade
With this command you can upgrade Galera Manager installation.
Note, running apt upgrade
or yum upgrade
may not be enough in some cases, so running gm-installer upgrade
is the recommended way.
It supports the following options:
--log-level=[error|warn|info|debug|trace] application error level (default: info) [$LOG_LEVEL]
--only-survey will show only survey (no OS restrictions apply)
--answers-file= answers file
--show-command-output turns on command execution output
--command-output-file= direct command output to a file (default: /tmp/gm-installer.log)
--log-level
(orLOG_LEVEL
env var) redefines application log level--only-survey
prints out user answers that can be later used with the--answers-file
option--answers-file
using answers file makes it possible to install Galera Manager in an unattended way (see also--only-survey
option)--show-command-output
prints out STDOUT and STDERR of all the executed commands--command-output-file
prints all the commands output to the selected file
# gm-installer certificates
This command can be used to generate self-signed SSL certificates that can be used for Galera Manager installation later.
It supports the following option:
--hosts= comma-separated host list (default: gminst.test)
-
--hosts
defines a list of hosts that will be put in the CN (common name) field of the certificate. For http/web purposes it is a domain of a host where you will run Galera Manager.Generated files:
ssl.crt
- self-signed SSL certificatessl.csr
- certificate signing request (CSR) used to create and signssl.crt
ssl.key
- private key forssl.crt
ca.crt
- SSL certificate for the certificate authority used to signssl.crt
ca.key
- private key forca.crt
IMPORTANT: make sure you keep ca.crt
and ca.key
in a safe place. They may be later required to
create new certificates.
# gm-installer version
With this command you can check Galera Manager version.
This command has no options.
Use Cases
Installation
To perform regular installation just issue gm-installer install
and answer questions.
Ports 22, 80, 443 and 8081 (plain) or 9091 (SSL) should be opened before installation. Also, it’s strongly advised to carefully set up firewall to restrict access to Galera Manager only to particular nodes.
SSL encryption
Galera Manager can work without domain name using only IP, but it’s not a recommended configuration. Ideally, you have to setup a domain name for Galera Manager and use SSL encryption for WEB traffic. To achieve that, you can use your own certificate (i.e. issued for your domain/host) or you can use Let’s Encrypt free certificate for new installations.
Let’s Encrypt free certificate will be obtained automatically by installer if you specified valid hostname during installation and have ports 80 and 443 open.
Custom certificate may be installed either in manual or an unattended mode (see below).
Custom or Self-Signed SSL certificates
Self-Signed SSL certificates may be used for test purposes or as a temporary solution. Custom sertificates issued for your domain name are suitable for production use.
You need to specify the following in the answers file (see Unattended Installation below):
nginx_gmd_domain:
<PUBLIC_HOSTNAME>nginx_ssl_certificate:
<NGINX_CERT>nginx_ssl_certificate_key:
<NGINX_CERT_KEY>
Your nginx_gmd_domain
must match the CN field in specified SSL certificate.
Unattended Installation
To run the installation in an unattended mode one should generate an answers file first.
To create the answers file, execute gm-installer install --only-survey --answers-file=<path to file>
and the file with your installation parameters will be saved under the specified name. It’s recommended to read the answers file carefully and adjust it if needed.
Next, you can copy the answers file to the target server and run the installer as gm-installer install --answers-file=<path to copied file>
. As a result, the installation will be performed in an unattended mode.
Upgrade
In general, all the installation steps are applicable to upgrade. No special steps are required.
Just run the installer as gm-installer upgrade
.
Reconfiguration
The most common reason for reconfiguration is a changed domain name and/or SSL certificates.
For example, one has deployed the Galera Manager AMI on Amazon and wants to setup a domain name and the corresponding SSL encryption.
To achieve that one needs to run the installer once again (manual or unattended mode).
gm-installer install
command will detect the Galera Manager installation and will reconfigure it to use the new domain name and SSL certificates. No user data will be deleted or modified.