<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] ## 設置 host ``` # cat /etc/hosts 127.0.0.1 localhost 192.168.0.110 swarm01 192.168.0.111 swarm02 192.168.0.229 swarm03 ``` ## 在管理節點配置 ssh ``` # ssh-keygen -t rsa -P '' # ssh-copy-id -i .ssh/id_rsa.pub root@192.168.0.111 # ssh-copy-id -i .ssh/id_rsa.pub root@192.168.0.229 ``` 把管理節點生成的 ssh 發送到其他節點上 ## 安裝 ansible 方便批量修改 ``` # yum -y install ansible # cat /etc/ansible/hosts | grep -v ^# | grep -v ^$ [node] 192.168.0.111 192.168.0.229 # sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config # ansible node -m copy -a 'src=/etc/selinux/config dest=/etc/selinux/" # 把修改好的文件發送到所有節點 # systemctl stop firewalld # 以下操作關閉防火墻, 也可根據實際需要開放端口 # systemctl disable firewalld # ansible node -a 'systemctl stop firewalld' # ansible node -a 'systemctl disable firewalld' ``` ## 創建 swarm 集群 ``` # docker swarm init --listen-addr 0.0.0.0 Swarm initialized: current node (a1tno675d14sm6bqlc512vf10) is now a manager. To add a worker to this swarm, run the following command: docker swarm join --token SWMTKN-1-3sp9uxzokgr252u1jauoowv74930s7f8f5tsmm5mlk5oim359e-dk52k5uul50w49gbq4j1y7zzb 192.168.139.175:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. ``` ### 批量加入其他節點 ``` ansible node -a "docker swarm join --token SWMTKN-1-5h4qmjjt6kcioxzth5n4alf4dxmdz64a4m0f0ldqpl5lzzoct3-7jq900h8mg1recydraj91qgts 192.168.0.110:2377" ``` ### 查看節點 ``` # docker node ls ``` 之后與 docker-machine 的操作一致
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看