Gardience Documentation gardience.com →
Docs / Reference

Installer options

The installer is install/install.sh in the release. It sets up Gardience in one of two modes:

# all-in-one
sudo ./install/install.sh

# attach to your own Salt master
sudo ./install/install.sh --attach https://salt-master.example.com:8000 --eauth pam

./install/install.sh --help prints the option list.

Before it starts

The installer stops with a message if:

Options

Location and naming

OptionDefaultMeaning
--dir PATH/opt/gardience as root, otherwise ~/gardienceInstall directory.
--name NAMEgardience-serverDocker Compose project name. Volume names start with it. Use the same name on both servers of a primary and standby pair.

Console and certificate

OptionDefaultMeaning
--https-port N443Port for the console.
--http-port N80Port that redirects to HTTPS.
--hostname NAMEThis host's fully qualified nameName in the TLS certificate and in the console address the installer prints.
--tls-cert FnoneYour certificate. Give --tls-key with it.
--tls-key FnoneThe private key for --tls-cert.

Without --tls-cert, the installer creates a self-signed certificate for --hostname, also valid for localhost and 127.0.0.1, lasting 825 days. You can replace it at any time.

Agents (all-in-one)

OptionDefaultMeaning
--salt-bind IP0.0.0.0Address the Salt ports listen on.
--salt-ports A,B4505,4506Salt publish and return ports.
--master-address Athe --hostname valueAddress agents use to reach this server.
--fleet-size N500How many machines you expect to manage. Sizes the Salt master: worker threads, open file limit, connection backlog and key cache.

Attach mode

OptionDefaultMeaning
--attach URLnoneTurns on attach mode. URL of your salt-api.
--eauth TYPEfileSalt sign-in type for Gardience's service accounts on your master: pam, file or ldap.
--insecure-salt-apioffAccept a self-signed salt-api certificate.
--attach-master-ip IPnoneThe only address allowed to reach Gardience's internal endpoint (/gardience/internal/), which the Gardience modules on your master call, for example to fetch vault secrets. Without it, that endpoint is closed.
--admins A,BnoneUsers on your master who administer Gardience. Change later with gardience roles.
--approvers A,BnoneUsers who may approve runs. Admins approve too.

In attach mode the installer also writes ATTACH.md and an attach-kit folder in the install directory. They list the steps to carry out on your Salt master. --admins and --approvers apply only in attach mode; on an all-in-one install roles come from gardience user add.

License and backups

OptionDefaultMeaning
--license FILEnoneLicense file. Without one, the console is read-only. See Licensing.
--backup-passphrase-file FnoneEncrypt the automatic pre-upgrade backups with this passphrase file. Recommended, because they hold every key. Keep the file off the backup's disk if you can.

Warm standby

OptionDefaultMeaning
--standby-address AnoneAgent address of the warm standby server. Agents are set up to fail over to it on their own.
--peer-url URLnoneConsole URL of the other server in a primary and standby pair. A returning old primary checks it and fences itself if the standby was promoted. gardience promote needs it.
--witness-dir PATHnoneA folder on shared storage mounted on both servers of a pair. Promotions are recorded there, so a primary cut off from its partner still stops its Salt master. gardience promote refuses if it cannot write there.
--peer-agent-address AnoneOn the standby: the primary's agent address, so agents enrolled there after a promotion still list both servers.

See High availability.

Used by upgrades

OptionMeaning
--upgradeUsed by gardience upgrade. Regenerates an existing install's compose file, web front end, Salt content and settings for this release, keeping its secrets, users, certificate, license and data. Do not run it by hand.

Help

OptionMeaning
-h, --helpPrint the option list and exit.

Any other option stops the installer with "unknown option".

What the installer does

  1. Runs the checks above.
  2. Creates the install directory and copies in the Salt content (states, modules and a starter pillar).
  3. Generates random secrets: the service account passwords, the internal token, the single sign-on key and the runner token. They are written to .env, readable by its owner only.
  4. Creates or copies the TLS certificate.
  5. Writes the web server configuration and compose.yml.
  6. Builds the images, or loads them from an offline bundle without using the internet.
  7. On all-in-one installs, creates the admin account and the two service accounts.
  8. Starts Gardience and waits until /gardience/health answers.
  9. Prints the console address and, on all-in-one installs, the admin password. It is shown once. Change it with gardience user passwd admin.
Gardience by Bouziden Management LLC.