BT

FOSDEM Configuration Management: Consul First Steps and Orchestration of Services with Juju

| by Carlos Sanchez Follow 0 Followers on Feb 03, 2015. Estimated reading time: 3 minutes |

FOSDEM, the Free and Open Source Software Developers' European Meeting, took place this weekend in Brussels, Belgium, with over 4000 participants. This year the conference had over 40 tracks, both official and developer rooms organized by different communities, dedicated to diverse subjects such as Ruby, virtualization or config management.

What follows is an excerpt of the talks about Consul and Juju at the config management developer room.

Consul First Steps: Learning Service Discovery

Marc Cluet, head of operations at Gluru, talked about service discovery with Consul, a service discovery system designed to run distributed, highly available and scalable to thousands of nodes, previously covered at InfoQ.

There are two pieces in the system, servers and clients. The servers communicate using a gossip protocol between them and choose the leader automatically, and, in order to have quorum, at least three servers should be used. The clients sit in each server to be managed. Consul can be installed with modules for Puppet, Chef and Ansible.

This is some of the functionality that Consul provides, with advice from Marc:

  • DNS publication. Consul provides a DNS interface to access the services, which can also be configured with dnsmasq to make Consul respond to all requests ending for a .consul domain, i.e. web01.eu-west-1.consul
  • Key/value storage, with the caveat that the value is limited to 256kb.
  • Service publication, using json for data.
  • Health checking. Checks need to be solid, i.e. if Consul checks every 10 seconds make sure your check takes less than 10 seconds to complete or Consul will take the services offline. Consul can be used with a tool like PagerDuty to monitor the services with no other tools.
  • Provides a HTTP RESTful API. Including API blocking queries that wait until a condition happens.
  • Uses encryption. The gossip protocol used between nodes is encrypted with KPI, and TLS is used to verify the authenticity of servers and clients.

A Consul command highlighted was consul watch, which provides a mechanism to watch for changes to a particular data entry and invoke a process with the latest value, executing a script when the condition happens.

Other related tools in the Consul ecosystem:

  • Envconsul publishes environment variables with data from Consul.
  • Consul-replicate for cross datacenter replication of the keys and values in Consul.
  • Consul Template stores templates of config files, watches for changes in Consul and reloads the service. Useful for Nginx to refresh backends for instance.
  • Registrator is a service registry bridge for Docker that can register the containers in Consul.

Orchestration of Services with Juju

Charles Butler, software engineer at Canonical, introduced Juju, an Ubuntu project to automate cloud infrastructure. Its original goal is the delivery of applications, through development, deployment and operations, encapsulating ops knowledge in any environment (cloud, bare metal,...) and providing a dynamic infrastructure with interchangeable services. Juju is used by Ubuntu to install OpenStack.

Juju uses the concept of charms, declarative service definitions that encapsulate application configurations, defining how services are deployed, how they connect to other services and are scaled. Charms are shared in the Juju store, where they are rated and reviewed, and all the charms go through CI across all supported environments.

Juju charms configuration management is language independent, using Ansible, Puppet, Chef,... and focus on operational intelligence, relationships between services using integration paths, requires and provides. They define a loosely defined contract between what charms require and what they provide, and are created with Ubuntu in mind.

Juju bundles are sets of services with a specific configuration and their corresponding relations that can be deployed together via a single step. Instead of deploying a single service, bundles can be used to deploy an entire workload, with working relations and configuration. Juju also provides a GUI that allows introspection of bundles and charms.

Orchestration is agility. Bundles define the entire infrastructure in a single file for development, staging and production.

Juju can be used in most public clouds, and using a manual provider it can deploy to any cloud. Furthermore, using Ubuntu MAAS it can orchestrate bare metal.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

What is KPI? by Chandan Egbert

The article mentions that the consul gossip traffic is encrypted with "KPI", but I am unable to find a strong association between the acronym KPI and consul, so I am wondering if it is a typo, possibly for "PKI"?

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT