Etcd sur Ubuntu¶
Les services OpenStack peuvent utiliser Etcd, un magasin de clé-valeur distribué fiable pour verrouiller des clés distribuées, stocker des configurations, tracer l’état des services, autres scénarios.
The etcd service runs on the controller node.
Installer et configurer les composants¶
Install the
etcdpackage:# apt install etcd
Note
As of Ubuntu 18.04, the
etcdpackage is no longer available from the default repository. To install successfully, enable theUniverserepository on Ubuntu.As for Ubuntu 24.04 install the package with following name:
# apt install etcd-server
Edit the
/etc/default/etcdfile and set theETCD_INITIAL_CLUSTER,ETCD_INITIAL_ADVERTISE_PEER_URLS,ETCD_ADVERTISE_CLIENT_URLS,ETCD_LISTEN_CLIENT_URLSto the management IP address of the controller node to enable access by other nodes via the management network:ETCD_NAME="controller" ETCD_DATA_DIR="/var/lib/etcd" ETCD_INITIAL_CLUSTER_STATE="new" ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01" ETCD_INITIAL_CLUSTER="controller=http://10.0.0.11:2380" ETCD_INITIAL_ADVERTISE_PEER_URLS="http://10.0.0.11:2380" ETCD_ADVERTISE_CLIENT_URLS="http://10.0.0.11:2379" ETCD_LISTEN_PEER_URLS="http://0.0.0.0:2380" ETCD_LISTEN_CLIENT_URLS="http://10.0.0.11:2379"
Finaliser l’installation¶
Enable and restart the etcd service:
# systemctl enable etcd # systemctl restart etcd