Operations 4 min read

Step-by-Step Binary Deployment of etcd Using Ansible

This guide walks through downloading the etcd binary, preparing TLS certificates and configuration files, setting up systemd service management, and using Ansible playbooks to deploy and verify an etcd cluster across multiple nodes.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Step-by-Step Binary Deployment of etcd Using Ansible

The deployment process for etcd starts with downloading the binary package, preparing HTTPS certificates, and creating configuration files that include distinct node names and IP addresses.

Systemd is then used to manage the etcd service, enabling it to start automatically on boot.

First, create a working directory and sub‑folders:

mkdir ansible-etcd-cluster-deploy
cd ansible-etcd-cluster-deploy
mkdir files
mkdir tls

Inspect the newly created directories with ll to confirm they are empty.

Place the TLS material (ca‑config.json.j2, ca‑csr.json.j2, cfssl.tar.gz, generate_etcd_cert.sh, server‑csr.json.j2) into the tls folder, then create a cert sub‑directory and move the Jinja2 templates into it, renaming as needed (e.g., mv ca-config.json.j2 cert/ca-config.json).

Edit the Ansible inventory file ( hosts) to list the target etcd nodes, for example:

[etcd]
192.168.20.41
192.168.20.42
192.168.20.43

Create the Ansible playbook tls.yaml that generates the certificates, then run it with: ansible-playbook -i hosts tls.yaml After the playbook finishes, verify the generated certificates in tls/cert/ (files such as ca.pem, server.pem, server-key.pem, etc.).

Next, configure etcd itself by editing etcd.yaml and execute: ansible-playbook -i hosts etcd.yaml Finally, confirm that the etcd service is running and that the host IPs have been correctly rendered in the configuration.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

etcd
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.