DCOS安装手顺
配置清单:
10.100.100.11-bootstrap node :2C 4G 60G
10.100.100.12-master node :4C 8G 120G
10.100.100.13-master node :4C 8G 120G
10.100.100.14-master node :4C 8G 120G
10.100.100.15-slave node :2C 4G 60G
10.100.100.16-slave node :2C 4G 60G
10.100.100.17-slave node :2C 4G 60G
ansible 主机分组:
[dcos-bootstrap]
10.100.100.11
[dcos-master]
10.100.100.1[2-4]
[dcos-slave]
10.100.100.1[5-7]
[dcos-cluster]
10.100.100.1[2-7]
安装步骤
- [dcos-bootstrap] 免秘钥
执行命令
ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub 10.100.100.12
ssh-copy-id -i ~/.ssh/id_rsa.pub 10.100.100.13
ssh-copy-id -i ~/.ssh/id_rsa.pub 10.100.100.14
ssh-copy-id -i ~/.ssh/id_rsa.pub 10.100.100.15
ssh-copy-id -i ~/.ssh/id_rsa.pub 10.100.100.16
ssh-copy-id -i ~/.ssh/id_rsa.pub 10.100.100.17
- all安装docker
执行命令
yum install docker-ce
systemctl enable docker
systemctl start docker
- [dcos-bootstrap] 做ntp服务器w
编辑/etc/ntp.conf
#设置客户端权限
restrict 10.100.100.11 mask 255.255.255.0 nomodify notrap
#与自身系统时间校准
server 127.127.1.0
fudge 127.127.1.0 stratum 10
执行命令
systemctl start ntpd
systemctl enable ntpd
ntptime
timedatectl
- [dcos-cluster]同步时间
编辑/etc/ntp.conf
#设置上级时间服务器地址
server 10.100.100.11
执行命令
systemctl start ntpd
systemctl enable ntpd
ntptime
timedatectl
- all sudo免密码
- [dcos-bootstrap] 下载docker-nginx
- [dcos-bootstrap] 搭建dns服务器
编辑 /etc/dnsmasq.conf
resolv-file=/etc/resolv.conf
strict-order
listen-address=10.100.100.11,127.0.0.1
- all 修改dns服务器
编辑 /etc/resolv.conf
nameserver 10.100.100.11
- [dcos-bootstrap] 启动安装gui
bash dcos_generate_config.sh --web
- [dcos-bootstrap] 备份安装文件
cd genconf/serve
tar cf dcos-install.tar *
附:
1. 获取docker 私服证书
keytool -printcert -sslserver 130.10.8.208:8888 -rfc > /etc/pki/ca-trust/source/anchors/nexus.crt
update-ca-trust
systemctl restart docker
- 登录打包私服认证
docker login 192.168.30.100:8888
docker login 192.168.30.100:8889
tar -czf docker.tar.gz .docker