infra node #2

Supports: trusty xenial bionic

Add to new model

Description

In order to add subordinate charms such as nrpe, we need to have a primary
unit to relate them to. This charm provides that primary.


Overview

This charm provides a principal Juju unit so that we relate things like nrpe,
landscape-client, etc., to service the hosts used to provide Maas and other
infrastructure for a cloud installation.

It additionally provides some basic scripts and nrpe monitors.

Usage

First, ensure you have ssh keys exchanged or passwords for a user with sudo on
the Maas host you wish to add. You will need to confirm you can ssh from the
CLI you're working on and from the Juju controller machines. Let's assume that
our ssh url is ubuntu@10.245.88.140. Add the machine:
juju add-machine ssh:ubuntu@10.245.88.140

In this case, that came back as machine number 14.

Now deploy the charm:
juju deploy cs:~canonical-bootstack/infra-node --to 14

Now you can add relations etc to have nrpe.

TODO

There's opportunities here to deliver some of the currently manual steps for
general day to day maintenance for a cloud. The base stuff we're including
with this charm is just a few snaps, but we can be much more ambitious in the
future.

Some planned ideas:
- Add monitoring for backups - automate which components get backups - automate sync of /home/jujumanage between machines

Bugs

https://bugs.launchpad.net/layer-infra-node


Configuration

backup_maas
(boolean) Whether to create a cron entry to make backups of the maas db. This cron runs on all infra node units, but only actually runs the backup on the node with a VIP. If there is no crm_resource command, or it errors, the script will make a backup regardless.
True
backup_store_offsite
(boolean) Whether to send backups for maas offsite. This affects the cron job created by backup_maas, and does nothing if that option is False.
True
nagios_alert_if_juju_enabled
(boolean) This enables a Nagios alert that will warn if Juju commands are enabled when we expect them to be disabled.
nagios_check_dhcpd
(boolean) If true, check the maas-dhcpd service is running. Defaults to False, note on HA deployments this service only runs on two of the 3 Maas hosts.
nagios_check_pacemaker
(boolean) Run Nagios checks to determine the state of Corosync/Pacemaker.
nagios_context
(string) Used by the nrpe subordinate charms. A string that will be prepended to instance name to set the host name in nagios. So for instance the hostname would be something like: juju-myservice-0 If you're running multiple environments with the same services in them this allows you to differentiate between them.
juju
nagios_servicegroups
(string) A comma-separated list of nagios servicegroups. If left empty, the nagios_context will be used as the servicegroup
snap_proxy
(string) DEPRECATED. Use snap-http-proxy and snap-https-proxy model configuration settings. HTTP/HTTPS web proxy for Snappy to use when accessing the snap store.
snap_proxy_url
(string) DEPRECATED. Use snap-store-proxy model configuration setting. The address of a Snap Store Proxy to use for snaps e.g. http://snap-proxy.example.com
snapd_refresh
(string) How often snapd handles updates for installed snaps. The default (an empty string) is 4x per day. Set to "max" to check once per month based on the charm deployment date. You may also set a custom string as described in the 'refresh.timer' section here: https://forum.snapcraft.io/t/system-options/87