Version information
This version is compatible with:
- Puppet Enterprise 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
Add this module to your Puppetfile:
mod 'tailoredautomation-etcd', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-module-etcd
Table of Contents
- Module Description
- Setup - The basics of getting started with Etcd
- Usage - Configuration options and additional functionality
- Reference
- Limitations - OS compatibility, etc.
Module Description
Installs and manages Etcd
Documented with Puppet Strings
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.
Reference
Limitations
This module is only supported on Linux based systems.
Reference
Table of Contents
Classes
etcd
: Manage etcd
Classes
etcd
Manage etcd
Examples
include etcd
Parameters
The following parameters are available in the etcd
class:
version
base_url
os
arch
download_url
download_dir
extract_dir
bin_dir
manage_user
manage_group
user
user_uid
group
group_gid
config_path
config
max_open_files
version
Data type: String
Version of etcd to install Not used if download_url is defined.
Default value: '3.4.7'
base_url
Data type: Stdlib::HTTPUrl
Base URL of where to download etcd binaries. Not used if download_url is defined.
Default value: 'https://github.com/etcd-io/etcd/releases/download'
os
Data type: String[1]
The GOOS to install Not used if download_url is defined.
Default value: downcase($facts['kernel'])
arch
Data type: String[1]
The GOARCH to install Not used if download_url is defined.
Default value: $facts['os']['architecture']
download_url
Data type: Optional[Stdlib::HTTPUrl]
Alternative location to download etcd binaries
Default value: undef
download_dir
Data type: Stdlib::Absolutepath
The directory of where to download etcd
Default value: '/tmp'
extract_dir
Data type: Stdlib::Absolutepath
The directory where to extract etcd
Default value: '/opt'
bin_dir
Data type: Stdlib::Absolutepath
The path to bin directory for etcd and etcdctl symlinks
Default value: '/usr/bin'
manage_user
Data type: Boolean
Boolean that determines if etcd user is managed
Default value: true
manage_group
Data type: Boolean
Boolean that determines if etcd group is managed
Default value: true
user
Data type: String[1]
The etcd user
Default value: 'etcd'
user_uid
Data type: Optional[Integer]
The etcd user UID
Default value: undef
group
Data type: String[1]
The etcd group
Default value: 'etcd'
group_gid
Data type: Optional[Integer]
The etcd group GID
Default value: undef
config_path
Data type: Stdlib::Absolutepath
The path to etcd YAML configuration
Default value: '/etc/etcd.yaml'
config
Data type: Hash
The config values to pass to etcd
Default value: { 'data-dir' => '/var/lib/etcd' }
max_open_files
Data type: Integer
The value for systemd LimitNOFILE unit option
Default value: 40000
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v1.0.0 (2023-11-15)
Changed
v0.4.0 (2021-06-19)
Added
v0.3.0 (2020-07-20)
Merged pull requests:
- Use https consistently for installing module dependencies #8 (ghoneycutt)
- wal-dir needs to be a directory in which the etcd user can write #7 (ghoneycutt)
v0.2.0 (2020-05-13)
Added
Merged pull requests:
- Fix release process and add missing data to metadata.json #4 (treydock)
- Setup deployment to forge on tag #3 (treydock)
- Add basic travis config #2 (treydock)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 6.0.0 <10.0.0)
- puppet/archive (>= 7.0.0 <8.0.0)
- puppet/systemd (>= 5.0.0 <7.0.0)
Copyright (C) 2020-2023 Garrett Honeycutt <code@garretthoneycutt.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.