juju lint #0

Supports: bionic xenial trusty
Add to new model

Description

"Juju model linter with configurable policy. The following config options must be set: controller-endpoint controller-username controller-password controller-cacert * model-uuid"


Overview

Juju Lint - a Juju model linter with configurable policy.

This charm deploys Juju Lint, along with a script to automate its execution, auto_lint.py. In addition, a crontab is deployed to run auto_lint.py, as well as a Nagios check which analyses Juju Lint output and alerts on errors.

Usage

Deploy this charm with:

juju deploy charm-juju-lint juju-lint

The following model connection config values must be set to allow libjuju to retrieve Juju status output. It is HIGHLY recommended that a new user be created and "read" granted to that user on the model defined:

  • controller-endpoint - A controller API endpoint (syntax: "\<hostname>:\<port>")
  • controller-username - A controller user's username
  • controller-password - The respective controller user's password
  • controller-cacert - The controller CA certificate
  • model-uuid - The model UUID

When setting controller-cacert, the following command sytax is recommended:

juju config juju-lint controller-cacert='
-----BEGIN CERTIFICATE-----
<certificate body>
-----END CERTIFICATE-----
'

The following Juju Lint options are available:

  • lint-config - Juju Lint rules file path
  • lint-override - Hash separated subordinate rule overrides (syntax: "\<name>:\<location>#\<name>:\<location>")
  • lint-loglevel - Logging level, either "CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG", or "NOTSET"
  • lint-logfile - Log file path
  • lint-frequency - Specifies how often Juju Lint is run, in minutes

Juju Lint (upstream)


Configuration

controller-cacert
(string) The controller CA certificate. Value should be base64 encoded.
controller-endpoint
(string) 'A controller API endpoint. (Syntax: "<hostname>:<port>")'
controller-password
(string) The respective controller user's password.
controller-username
(string) A controller user's username.
extra_packages
(string) Space separated list of extra deb packages to install.
install_keys
(string) List of signing keys for install_sources package sources, per charmhelpers standard format (a yaml list of strings encoded as a string). The keys should be the full ASCII armoured GPG public keys. While GPG key ids are also supported and looked up on a keyserver, operators should be aware that this mechanism is insecure. null can be used if a standard package signing key is used that will already be installed on the machine, and for PPA sources where the package signing key is securely retrieved from Launchpad.
null
install_sources
(string) List of extra apt sources, per charm-helpers standard format (a yaml list of strings encoded as a string). Each source may be either a line that can be added directly to sources.list(5), or in the form ppa:<user>/<ppa-name> for adding Personal Package Archives, or a distribution component to enable.
ppa:juju-linters/ppa
lint-config
(string) Juju Lint rules file path.
/usr/share/juju-lint/contrib/canonical-openstack-rules.yaml
lint-frequency
(int) Specifies how often Juju Lint is run, in minutes.
30
lint-logfile
(string) Log file path.
lint-loglevel
(string) 'Logging level, either "CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG", or "NOTSET".'
INFO
lint-override
(string) 'Hash separated subordinate rule overrides. (Syntax: "<name>:<location>#<name>:<location>")'
model-uuid
(string) The model UUID.
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
package_status
(string) The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".
install