上篇文章(http://blog.csdn.net/rapheler/article/details/52528609)介绍了DC/OS软件的基本组件,概念,相信大家对DC/OS已经有了一个大概的理解了,今天实战安装一下DC/OS,来看看大名鼎鼎的DC/OS的容貌。
官方推荐的安装需求是一个节点2核CPU,16GB RAM,60GB HDD。
对于Bootstrap节点要求:
-
Python, pip must be installed for DC/OS CLI.
-
A High-availability (HA) TCP/Layer 3 load balancer, such as HAProxy, to balance the following TCP ports to all master nodes: 80, 443, 8080, 8181, 2181, 5050. (If applicable)
-
An unencrypted SSH key that can be used to authenticate with the cluster nodes over SSH. Encrypted SSH keys are not supported.
以下是对Master节点的硬件要求:
Minimum | Recommended |
---|---|
Nodes: 1 OS: RHEL/CentOS 7.2 Processor: 4 cores Memory: 32 GB RAM Hard disk space: 120 GB |
Nodes: 3 OS: RHEL/CentOS 7.2 Processor: 4 cores Memory: 32 GB RAM Hard disk space: 120 GB |
There are many mixed workloads on the masters, for example Mesos replicated log and ZooKeeper. Some of these require fsync()ing every so often, and this can generate a lot of very expensive random I/O. We recommend the following:
|
Agent nodes
Here are the agent node hardware requirements.
Minimum | Recommended |
---|---|
Nodes: 1 OS: RHEL/CentOS 7.2 Processor: 2 cores Memory: 16 GB RAM Hard disk space: 60 GB |
Nodes: 6 or more OS: RHEL/CentOS 7.2 Processor: 2 cores Memory: 16 GB RAM Hard disk space: 60 GB |
The agent nodes must also have:
|
Nmae | IP | OS | Role | Mem | CPU |
ukcent1 | 192.168.0.22 | CentOS7.2 | DC/OS Master | 4GB | Intel Xeon E312xx |
ukcent2 | 192.168.0.23 | CentOS7.2 | DC/OS Slave | 4GB | Intel Xeon E312xx |
1.升级系统到最新版本
yum -y update
2.关闭防火墙
systemctl stop firewalld && systemctl mask firewalld
在Github上已经有一个open的issue https://github.com/docker/docker/issues/16137,
Docker与firewalld 一起工作的效果会很差:https://docs.docker.com/v1.6/installation/centos/#firewalld
3.开启SSHD,ICMP,NTP服务
软件环境准备:
1.Docker 1.9.* - 1.11.*
!!!Docker 1.12目前暂不支持
2.不要使用DeviceMapper localhost存储方式, 推荐使用DeviceMapper 附加裸设备LVM的方式,或者使用OverlayFS
可以这篇文章来更改DeviceMapper为OverlayFS:http://blog.csdn.net/rapheler/article/details/52094095
3.用户root用户运行Docker服务
4.普通用户开启sudo 免密码认证
visudo %wheel ALL=(ALL) NOPASSWD: ALL
5.在所有节点