next up previous contents
Next: Keystone Up: 環境準備 Previous: Memcached   Contents

Etcd

  1. Etcd 是一個分散式鍵值儲存系統,用於分散式密鑰鎖定。OpenStack 可以使用 Etcd 為集群之間提供可靠的共享數據服務。
    [root@ip112 ~]# yum install etcd
    
  2. 編輯 /etc/etcd/etcd.conf 設定檔,設定以下變數,163.17.10.112 為控制節點的IP。
    [root@ip112 ~]# vim /etc/etcd/etcd.conf 
    [root@ip112 ~]# egrep '(#\[[MC]|^ETCD)' /etc/etcd/etcd.conf
    #[Member]
    ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
    ETCD_LISTEN_PEER_URLS="http://163.17.10.112:2380"
    ETCD_LISTEN_CLIENT_URLS="http://163.17.10.112:2379"
    ETCD_NAME="controller"
    #[Clustering]
    ETCD_INITIAL_ADVERTISE_PEER_URLS="http://163.17.10.112:2380"
    ETCD_ADVERTISE_CLIENT_URLS="http://163.17.10.112:2379"
    ETCD_INITIAL_CLUSTER="default=http://163.17.10.112:2380"
    ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01"
    ETCD_INITIAL_CLUSTER_STATE="new"
    
  3. 啟動 etcd 服務,並設定開機啟動。
    [root@ip112 ~]# systemctl enable etcd.service
    [root@ip112 ~]# systemctl start etcd.service
    [root@ip112 ~]# systemctl status etcd.service
    ● etcd.service - Etcd Server
       Loaded: loaded (/usr/lib/systemd/system/etcd.service; enabled; vendor preset: disabled)
       Active: active (running) since Wed 2018-05-23 19:23:23 CST; 19s ago
     Main PID: 15849 (etcd)
       CGroup: /system.slice/etcd.service
               └─15849 /usr/bin/etcd --name=controller --data-dir=/var/lib/etcd/default.etcd --listen-client-url...
    


De-Yu Wang 2018-08-15