etcd

Etcd Puppet Module

75 downloads

75 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.2.0 (latest)
released Feb 26th 2025
This version is compatible with:
  • Puppet Enterprise 2025.1.x, 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppet-etcd', '1.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-etcd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-etcd --version 1.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppet/etcd — version 1.2.0 Feb 26th 2025

puppet-etcd

Build Status Release Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores puppetmodule.info docs AGPL v3 License Donated by Tailored Automation

Table of Contents

  1. Module Description
  2. Setup - The basics of getting started with Etcd
  3. Usage - Configuration options and additional functionality
  4. Reference
  5. Limitations - OS compatibility, etc.
  6. Transfer Notice

Module Description

Installs and manages Etcd

Documented with Puppet Strings

Puppet Strings documentation

Setup - The basics of getting started with Etcd

What etcd affects

This module will download the compiled binaries for etcd and extra the archive and install the necessary binaries, configuration files and services.

Setup requirements

All module dependencies are listed in this module's metadata.json.

Usage - Configuration options and additional functionality

Basic Etcd

To install and run a single instance of etcd it's sufficient to just include the etcd class:

include etcd

All configuration for etcd.yaml is done via the config parameter, example:

class { 'etcd':
  config => {
    'data-dir' => '/var/lib/etcd',
    'wal-dir'  => '/var/lib/etcd/wal',
  },
}

Clustered Etcd

The following is an example of a clustered etcd setup. Adjust name, initial-advertise-peer-urls and advertise-client-urls for each host in the cluster.

class { 'etcd':
  config => {
    'data-dir'                    => '/var/lib/etcd',
    'name'                        => 'infra1',
    'initial-advertise-peer-urls' => 'http://10.0.1.10:2380',
    'listen-peer-urls'            => 'http://0.0.0.0:2380',
    'listen-client-urls'          => 'http://0.0.0.0:2379',
    'advertise-client-urls'       => 'http://10.0.1.10:2379',
    'initial-cluster-token'       => 'etcd-cluster-1',
    'initial-cluster'             => 'infra0=http://10.0.1.10:2380,infra1=http://10.0.1.11:2380,infra2=http://10.0.1.12:2380',
    'initial-cluster-state'       => 'new',
  },
}

Etcd Upgrades

Upgrades using this module are performed by increasing the value provided to version.

If the previous version was 3.4.7 then the following would upgrade etcd to 4.0.0:

class { 'etcd':
  version => '4.0.0',
}

Puppet will download the new etcd, update the symlinks for etcd binary and restart the etcd service.

SSL configuration

Below is an example of setting up SSL authentication as well as SSL peering between hosts in etcd cluster:

class { 'etcd':
  config => {
    'name'                        => $facts['networking']['fqdn'],
    'initial-advertise-peer-urls' => "https://${facts['networking']['fqdn']}:2380",
    'listen-peer-urls'            => "https://${facts['networking']['ip']}:2380",
    'listen-client-urls'          => "https://${facts['networking']['ip']}:2379",
    'advertise-client-urls'       => "https://${facts['networking']['fqdn']}:2379",
    'initial-cluster-token'       => 'etcd-cluster-1',
    'initial-cluster'             => 'https://etcd1.example.com:2380,https://etcd2.example.com:2380,https://etcd3.example.com:2380',
    'initial-cluster-state'       => 'new',
    'client-transport-security'   => {
      'trusted-ca-file'  => '/etc/pki/tls/my-ca.pem',
      'cert-file'        => '/etc/pki/tls/etcd.crt',
      'key-file'         => '/etc/pki/tls/etcd.key',
      'client-cert-auth' => true,
    },
    'peer-transport-security'     => {
      'trusted-ca-file'  => '/etc/pki/tls/my-ca.pem',
      'cert-file'        => '/etc/pki/tls/etcd.crt',
      'key-file'         => '/etc/pki/tls/etcd.key',
      'client-cert-auth' => true,
    },
  },
}

Limitations

This module is only supported on Linux based systems. Check the metadata.json for all tested operating systems.

Transfer Notice

This plugin was originally authored by Tailored Automation. The maintainer preferred that Vox Pupuli take ownership of the module for future improvement and maintenance. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Camptocamp.