consul agent #6

  • By jamesbeedy
  • Latest version (#6)
  • xenial
  • Unpublished

Description

Consul is a HashiCorp tool for service discovery, failure detection (health
checks), key/value storage, that works with multiple datacenters.
This charm installs Consul agent.


layer consul-base

This is the base layer to provide Hashicorp's Consul, agent or server.

Usage

To use this layer in your charm or layer, simply include 'consul-base' in your layer.yaml like so:

# layer.yaml
---

include: ['layer:consul-base']

...

You can then react to the 'consul.installed' state in your layer or charm once consul has been installed.

from charms.reactive import set_state


@when('consul.installed')
def start_myapp():
    set_state('consul.available')

States

consul.installed - This state is automatically emitted once Consul has been installed.

More on Consul

Copyright

Copyright © 2016 James Beedy jamesbeedy@gmail.com

License

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

Configuration

domain
(string) By default, Consul responds to DNS queries in the 'consul. domain. This flag can be used to change that domain. All queries in this domain are assumed to be handled by Consul and will not be recursively resolved.
consul
version
(string) The version of Consul software to install.
0.6.4
bootstrap-expect
(int) The number of expected servers in the datacenter. Before a Consul cluster can begin to service requests, a server node must be elected leader. Thus, the first nodes that are started are generally the server nodes. Bootstrapping is the process of joining these initial server nodes into a cluster. We recommend 3 or 5 total servers per datacenter. A single server deployment is highly discouraged as data loss is inevitable in a failure scenario.
3
log-level
(string) The level of logging to show after the Consul agent has started. This defaults to 'info'. The available log levels are 'trace', 'debug', 'info', 'warn', and 'err'. Note that you can always connect to an agent via consul monitor and use any log level.
info