• etcd单机集群


    etcd在单机部署集群,可以先弄清楚配置文件参数的意思。起3个集成监听不同的端口号

    1. 启动

    在/etc/soft/etcd/node1文件夹中,创建脚本start1.sh

    etcd --name infra1 --initial-advertise-peer-urls http://127.0.0.1:2381 
      --listen-peer-urls http://127.0.0.1:2381 
        --listen-client-urls http://127.0.0.1:2379 
              --advertise-client-urls http://127.0.0.1:2379 
                --initial-cluster-token etcd-cluster-1 
                      --initial-cluster infra1=http://127.0.0.1:2381,infra2=http://127.0.0.1:2382,infra3=http://127.0.0.1:2383 
                        --initial-cluster-state new

    在/etc/soft/etcd/node2文件夹中,创建脚本start2.sh

    etcd --name infra2 --initial-advertise-peer-urls http://127.0.0.1:2382 
      --listen-peer-urls http://127.0.0.1:2382 
        --listen-client-urls http://127.0.0.1:2378 
              --advertise-client-urls http://127.0.0.1:2378 
                --initial-cluster-token etcd-cluster-1 
                      --initial-cluster infra1=http://127.0.0.1:2381,infra2=http://127.0.0.1:2382,infra3=http://127.0.0.1:2383 
                        --initial-cluster-state new

    在/etc/soft/etcd/node3文件夹中,创建脚本start3.sh

    etcd --name infra3 --initial-advertise-peer-urls http://127.0.0.1:2383 
      --listen-peer-urls http://127.0.0.1:2383 
        --listen-client-urls http://127.0.0.1:2377 
              --advertise-client-urls http://127.0.0.1:2377 
                --initial-cluster-token etcd-cluster-1 
                      --initial-cluster infra1=http://127.0.0.1:2381,infra2=http://127.0.0.1:2382,infra3=http://127.0.0.1:2383 
                        --initial-cluster-state new

    分别运行三个脚本

    2. 检查集群是否启动成功

    etcdctl --endpoint "http://127.0.0.1:2379" member list
    19ac17627e3e396f: name=infra2 peerURLs=http://127.0.0.1:2382 clientURLs=http://127.0.0.1:2378 isLeader=false
    8f65a5fdd9ee42ad: name=infra3 peerURLs=http://127.0.0.1:2383 clientURLs=http://127.0.0.1:2377 isLeader=true
    e7b968b9fb1bc003: name=infra1 peerURLs=http://127.0.0.1:2381 clientURLs=http://127.0.0.1:2379 isLeader=false
    etcdctl cluster-health
    member 19ac17627e3e396f is healthy: got healthy result from http://127.0.0.1:2378
    member 8f65a5fdd9ee42ad is healthy: got healthy result from http://127.0.0.1:2377
    member e7b968b9fb1bc003 is healthy: got healthy result from http://127.0.0.1:2379

    3个节点启动完成

  • 相关阅读:
    [转]Convolution Neural Network (CNN) 原理与实现
    [转]深度学习CNN研究反向
    [转]一张图看懂:Google AlphaGo的原理、弱点
    [转]前馈型神经网络与反馈型神经网络的区别
    [转]认知机和神经认知机
    [转]技术向:一文读懂卷积神经网络CNN
    PHP 日期格式化 参数参考
    PHP MAIL DEMO(程序代码直接发送邮件)
    PHP上传文件DEMO
    PDO事务管理DEMO
  • 原文地址:https://www.cnblogs.com/luckygxf/p/8698498.html
Copyright © 2020-2023  润新知