您的位置:首页 > 产品设计 > UI/UE

DC/OS GUI 安装指南

2016-06-29 11:26 645 查看
自今年4月份DC/OS开源以来,mesosphere公司的这款云数据中心内核的软件越来越受到大家的欢迎。这篇文章介绍一下GUI的方式在两台CentOS7上安装。目前DC/OS只能安装在RedHat 7以上的系统,还不支持Debian系统。我们使用的是IBM Bluemix提供的2台CentOS7系统,他是基于Softlayer之上的用Openstack搭建的IBM的PaaS平台。

根据官方文档介绍,至少需要三个节点来运行一整套DC/OS系统,因为我只能申请到2台高性能的虚拟机,所以就用了以下运行环境,使用的Bluemix 英国的zone:
NmaeIPOSRoleMemCPU
ukcent1192.168.0.22CentOS7.2DC/OS Master4GBIntel Xeon E312xx
ukcent2192.168.0.23CentOS7.2DC/OS Slave4GBIntel Xeon E312xx
软件环境要求:

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.

系统要求:
更新系统到最新:
yum -y upgrade

关闭firewalld
在Github上已经有一个open的issue https://github.com/docker/docker/issues/16137, Docker与firewalld 一起工作的效果会很差:https://docs.docker.com/v1.6/installation/centos/#firewalld
sudo systemctl stop firewalld && sudo systemctl disable firewalld

SSH enabled

ICMP enabled

NTP enabled

软件要求:
Docker 1.9 or greater is recommended.

不要使用Docker的DeviceMapper 存储方式

使用OverlayFS或者DeviceMapper 附加直接lvm的方式,而不是loop-lvm。请看这篇文章:http://shanker.blog.51cto.com/1189689/1783910

用root用户开启Docker。

sudo 用户免密码提权
%wheel ALL=(ALL) NOPASSWD: ALL

安装xz unzip curl ipset在所有节点。

禁用selinux,并添加nogroup到所有节点。

pull nginx image到Master节点。

下面开启正式的安装之旅:
官方文档介绍的是有一个bootstrap node,专门用来做bootstrap的,由于我只有2台机器,就直接用Master做bootstrap了,在Master节点上下载安装脚本:

$ curl -O https://downloads.dcos.io/dcos/EarlyAccess/dcos_generate_config.sh[/code] 
以web GUI的方式安装DC/OS:

$ sudo bash dcos_generate_config.sh --web


会开启本机的9000端口,信息如下:

Running mesosphere/dcos-genconf docker with BUILD_DIR set to /home/centos/genconf
16:36:09 dcos_installer.action_lib.prettyprint:: ====> Starting DC/OS installer in web mode
16:36:09 root:: Starting server ('0.0.0.0', 9000)


打开我的Master公网ip:9000就会看到安装界面了:









需要填写的信息:
Master Private IP List

Agent Private IP List

Master Public IP

SSH Username, Port and Private Key

Upstream DNS Servers

IP Dect Script

需要注意的就是最后的IP Dect Script,里面预留的是有AWS、GCE、Azure环境的脚本,但是如果是Custom Install的话,就是咱们今天的安装方式,就需要自己写脚本来取出系统的ip:

#!/usr/bin/env bash
set -o nounset -o errexit
export PATH=/usr/sbin:/usr/bin:$PATH
echo $(ip addr show eth0 | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)


然后点击“Run Pre-Flight”,如果没有什么问题,会看到:




因为我只使用的2台机器,第一次安装的时候Master节点内存不够用了,重新安装了一次在成功,如果需要重新安装,就需要完全删除/opt/mesosphere 和 /var/lib/zookeeper目录。

然后点击“Deploy”:



最后是“Run Post-Flight”。完成后会看到登录界面:




使用自己的Github账号登录进去,就可以领略云数据中心内核的风采啦:





















参考连接:
https://dcos.io/docs/1.7/administration/installing/custom/gui/
https://github.com/dcos/dcos
https://dcos.io/docs/1.7/usage/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Centos Bluemix DCOS