DC/OS集群内添加机器(有问题。。😓)
由于我们使用ansible进行快速安装,所以我们要修改下面两个配置文件即可
新添加的机器和ansible的机器需要跟之前的一样,配置好免密钥登陆
修改ansible的配置文件
添加新的机器IP
[root@jumpserver ~]# cat /etc/ansible/hosts
[bootstrap]
3.115.184.172
[master]
18.177.76.161
54.178.234.17
[private]
52.198.146.9
[public]
13.115.17.255
18.177.164.22
18.177.242.51
测试下连通性
[root@jumpserver ~]# ansible all -m ping
18.177.164.22 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
54.178.234.17 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
3.115.184.172 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
13.115.17.255 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
18.177.76.161 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
18.177.242.51 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
52.198.146.9 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"ping": "pong"
}
修改文件inventory
添加新机器IP
[root@jumpserver ~]# cd .ansible/collections/ansible_collections/dcos/dcos_ansible/dcos-ansible-0.52.0/
[root@jumpserver dcos-ansible-0.52.0]# ls
ansible.cfg dcos.yml Dockerfile group_vars inventory inventory.example Jenkinsfile molecule README.md roles TESTING.MD test_requirements.txt
[root@jumpserver dcos-ansible-0.52.0]# cat inventory
[bootstraps]
3.115.184.172
[masters]
18.177.76.161
18.177.76.161
[agents_private]
52.198.146.9
[agents_public]
13.115.17.255
18.177.164.22
18.177.242.51
[bootstraps:vars]
---
修改dcos.yml文件
⚠️注意都是私网IP
[root@jumpserver all]# /root/.ansible/collections/ansible_collections/dcos/dcos_ansible/dcos-ansible-0.52.0/group_vars/all
[root@jumpserver all]# cat dcos.yml
---
dcos:
download: "https://downloads.mesosphere.com/dcos-enterprise/stable/2.0.0/dcos_generate_config.ee.sh"
version: "2.0.0"
# image_commit: "acc9fe548aea5b1b5b5858a4b9d2c96e07eeb9de"
enterprise_dcos: true
selinux_mode: permissive
config:
# This is a direct yaml representation of the DC/OS config.yaml
# Please see https://docs.mesosphere.com/1.12/installing/production/advanced-configuration/configuration-reference/
# for parameter reference.
cluster_name: "futongtestenv"
security: permissive
bootstrap_url: http://172.31.47.3:8080
exhibitor_storage_backend: static
master_discovery: static
master_list:
- 172.31.44.60
- 172.31.47.25
agent_list:
- 172.31.42.187
public_agent_list:
- 172.31.36.233
- 172.31.44.179
- 172.31.46.19
---
查看节点信息
添加节点之前
[root@ip-172-31-47-3 ~]# dcos node list
HOSTNAME IP PUBLIC IP(S) ID TYPE STATUS REGION ZONE
172.31.36.233 172.31.36.233 172.31.36.233 cc0a08c2-5e8d-4a23-85a1-ea8bd3ab7d7d-S1 agent (public) ACTIVE ap-northeast-1 ap-northeast-1a
172.31.42.187 172.31.42.187 172.31.42.187 cc0a08c2-5e8d-4a23-85a1-ea8bd3ab7d7d-S0 agent ACTIVE ap-northeast-1 ap-northeast-1a
master.mesos. 172.31.44.60 172.31.44.60 cc0a08c2-5e8d-4a23-85a1-ea8bd3ab7d7d master (leader) ap-northeast-1 ap-northeast-1a

添加节点之后

浙公网安备 33010602011771号