Files
openstack-manuals/doc/install-guide/source/environment-etcd-ubuntu.rst
chenxing b6c697cf8c Update the step of 'etcd' installation
There is distro package available for etcd3 now, let's install etcd
by "apt install".

Change-Id: I7b2de5b2f8e3f6f2aa787e4c6d309b4e4e1d6e97
Closes-Bug: #1770984
2018-06-25 06:03:51 -04:00

1.7 KiB

Etcd for Ubuntu

OpenStack services may use Etcd, a distributed reliable key-value store for distributed key locking, storing configuration, keeping track of service live-ness and other scenarios.

Install and configure components

  1. Install the package:

    # apt install etcd
  2. Edit the /etc/etcd/etcd.conf.yml file and set the initial-cluster, initial-advertise-peer-urls, advertise-client-urls, listen-client-urls to the management IP address of the controller node to enable access by other nodes via the management network:

    name: controller
    data-dir: /var/lib/etcd
    initial-cluster-state: 'new'
    initial-cluster-token: 'etcd-cluster-01'
    initial-cluster: controller=http://10.0.0.11:2380
    initial-advertise-peer-urls: http://10.0.0.11:2380
    advertise-client-urls: http://10.0.0.11:2379
    listen-peer-urls: http://0.0.0.0:2380
    listen-client-urls: http://10.0.0.11:2379
  3. Create and edit the /lib/systemd/system/etcd.service file:

    [Unit]
    After=network.target
    Description=etcd - highly-available key value store
    
    [Service]
    LimitNOFILE=65536
    Restart=on-failure
    Type=notify
    ExecStart=/usr/bin/etcd --config-file /etc/etcd/etcd.conf.yml
    User=etcd
    
    [Install]
    WantedBy=multi-user.target

Finalize installation

  1. Enable and start the etcd service:

    # systemctl enable etcd
    # systemctl start etcd