DC/OS部署前准备

2018-09-19  本文已影响0人  003003

1. 硬件环境准备

节点 系统 配置 IP
boot centos7.4 1核1G 192.168.22.190
master-01 centos7.4 1核1G 192.168.22.191
node-01 centos7.4 2核2G 192.168.22.192
node-02 centos7.4 2核2G 192.168.22.193

2. 系统环境准备(所有节点上操作)

关闭SELINUX
# sed -i s/SELINUX=enforcing/SELINUX=permissive/g /etc/selinux/config
# reboot
关闭防火墙
# systemctl stop firewalld && systemctl disable firewalld
更新系统到最新版本
# yum update -y
启用NTP服务
# yum install -y ntp
# systemctl start ntpd && sudo systemctl enable ntpd
安装所需的软件
# yum install -y tar xz unzip curl ipset
创建nogroup组
# groupadd nogroup
SSH密钥配置(boot节点上操作)
# ssh-keygen
# cd /root/.ssh
# echo id_rsa.pub > authorized_keys
# chmod 400 authorized_keys
# scp -r /root/.ssh 192.168.22.191/root/
# scp -r /root/.ssh 192.168.22.192/root/
# scp -r /root/.ssh 192.168.22.193/root/
代理配置

方便后面下载DC/OS安装脚本、软件等。

# vi /etc/profile
# 末尾增加以下两行 
export http_proxy=192.168.22.13:1080
export https_proxy=192.168.22.13:1080
# source /etc/profile
启用OverlayFS
# tee /etc/modules-load.d/overlay.conf <<-'EOF'
overlay
EOF
重启后检查是否开启
# lsmod | grep overlay
overlay                71964  0 
配置docker的yum仓库
# tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
配置systemd服务在OverlayFS上运行Docker Daemon
# mkdir -p /etc/systemd/system/docker.service.d && sudo tee /etc/systemd/system/docker.service.d/override.conf <<- EOF
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon --storage-driver=overlay -H fd://
EOF
安装Docker engine,daemon和service
# yum install -y docker-engine-1.11.2
# systemctl start docker && sudo systemctl enable docker
上一篇下一篇

猜你喜欢

热点阅读