Server Farmer has 2 kinds of configuration settings: current server configuration and global configuration. Current server configuration options are either discovered or asked during the first setup run. Global configuration options are stored in /opt/farm/config
directory, as scripts that you can modify in your fork (and use conditional code, if you need).
Current server configuration
During the first run, /opt/farm/setup.sh
script will ask for several server-specific options. All answers will be stored in /etc/farmconfig
file and used later. List of such settings:
name | description |
---|---|
HOST | full local hostname (including local domain, if any) |
OSVER | operating system version, eg. debian-jessie or ubuntu-bionic |
OSTYPE | operating system family (debian/redhat/suse/freebsd/netbsd/openbsd/qnap/generic) |
HWTYPE | platform type (physical/guest/container/lxc/oem) |
SMTP | SMTP server hostname (or 'true' if the current server has smtp role) |
SYSLOG | syslog server hostname (or 'true' if the current server has syslog role) |
Note that some extensions also ask for configuration settings. Most of such settings are described below, in "Configuration for unattended mode setup".
Global configuration
Global configuration settings are stored in /opt/farm/config
directory, each in separate script. The only way to change them is to fork https://github.com/serverfarmer/serverfarmer repository and edit them in your forked version (which anyway is the preferred way of installing Server Farmer). List of global settings:
name | description |
---|---|
get-external-domain.sh | domain with enabled catch-all, to which you have email access |
get-internal-domain.sh | internally used domain (behind NATs), across all your local networks |
get-local-backup-directory.sh | directory in the local filesystem, to which backups are generated |
get-management-public-ip-range.sh | public IP address range, from which connections from your management server can be originated |
get-primary-admin-account.sh | your non-root login |
get-url-heartbeat.sh | url of the heartbeat system to use by sf-monitoring-heartbeat extension |
get-url-connectivity-check.sh | url that can be used by many scripts to check if current server has working Internet connection |
get-url-extension-repositories.sh | Github.com base path, from which to install extensions |
get-url-keys-repository.sh | complete path to your fork of sf-keys repository |
Global keys configuration
Apart of /opt/farm/config
directory, more global configuration settings are stored in a separate repository, that is attached via get-url-keys-repository.sh
script. The only way to change them is to fork https://github.com/serverfarmer/sf-keys repository and edit them in your forked version. List of these additional settings:
name | description |
---|---|
get-gpg-backup-key.sh | name of your GPG key (if you have one) used to encrypt backups |
get-ssh-management-key-content.sh | should print your public ssh key that you use to manage servers |
get-ssh-management-key.sh | should print the full filename of your private ssh key, matching the above public key |
get-ssh-device-key.sh | should print the full filename of private ssh key used to manage network devices |
get-ssh-dedicated-key.sh | should print the full filename of dedicated ssh key for given host (don't change it for now) |
Configuration for unattended mode setup
A few extensions also have their configuration settings. Some of these settings, that are considered global, were put into global configuration, eg. get-external-domain.sh
or get-local-backup-directory.sh
. All others, which can be specific to customer or server type (eg. different SNMP community strings in local and remote servers, or for less trusted customer), are either asked during the first extension setup, or taken from environment variables, if defined. List of such settings:
name | description |
---|---|
NEWRELIC_LICENSE | license key associated with NewRelic account you want to use for this server |
SNMP_COMMUNITY | SNMP community for monitoring this server |
SMTP_RELAY | SMTP server to be used as external mail relay (must support TLS encryption on port 587), eg. smtp.gmail.com |
SMTP_USERNAME | SMTP username |
SMTP_PASSWORD | SMTP password |
SMSAPI_USERNAME | smsapi.pl username (used to send urgent notifications to notify_phone number in SMS messages) |
SMSAPI_PASSWORD | smsapi.pl password |
SMSAPI_FROM | string to be presented as SMS sender (have to be registered first at smsapi.pl) |
FW_REPOSITORY | url for Git firewall repository |
FW_SSH_KEY | ssh access key to access firewall repository |