dc/os: https://dcos.io/

  • 安装文档-docker:https://docs.mesosphere.com/1.11/installing/oss/custom/system-requirements/install-docker-centos/
  • 安装文档-命令行:https://docs.mesosphere.com/1.11/installing/oss/custom/cli/

坑:

  • 网上介绍的GUI-web方式安装,在最新版里已经弃用了,也就是没有这个参数了。。。只能命令行来装
  • 阿里云centos 7.2以上OS默认安装的docker不是xfs底层存储,需要单独处理(大坑)

其他都很顺利

先说下安装顺序,官网上写的不清楚(这里以阿里云上的ec节点为例):

  1. 确定bootstrap, master, agent这3个角色的机器分别是多少
  2. 去阿里云申请机器时,每个节点都多申请一个本地磁盘(后面要把这个本地磁盘挂载为xfs文件系统,并且让docker使用)
  3. 各个节点全部升级到最新的内核
  4. 格式化以及挂载本地磁盘到/storage下,并且建立软连接:/var/lib/docker,需要链接到/storage
  5. 按照dc/os安装文档中一步步安装

先确定bootstrap, master, agent分别多少节点数

  • bootstrap就1个,不多不少,就1个
  • master:至少1个
  • agent:至少1个

我这阿里云的配置:

  • bootstrap

    • 172.31.91.117
  • masters
    • 172.31.91.125
  • agents
    • 172.31.91.124
    • 172.31.91.123

各个节点全部升级到最新的内核:

  按照这个文档照做,目前只做第一步到第七部,千万不要做第八步!

  https://docs.mesosphere.com/1.11/installing/oss/custom/system-requirements/install-docker-centos/

格式化以及挂载本地磁盘到/storage下,并且建立软连接:/var/lib/docker,需要链接到/storage:

  执行命令fdisk -l查看当前磁盘设备  

Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0008d73a Device Boot Start End Blocks Id System
/dev/vda1 * 2048 83884031 41940992 83 Linux Disk /dev/vdb: 21.5 GB, 21474836480 bytes, 41943040 sectors

  /dev/vda是系统盘,/dev/vdb 才是我们多申请的那个本地磁盘设备,现在要对它进行分区+xfs格式化

[root@izm5e7dqv477rmbrojabgrz ~]# fdisk /dev/vdb
Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them.
Be careful before using the write command. Command (m for help):

  输入p:查看主分区列表,刚开始时应该是没有的

  输入n:新增分区,都选默认值就好

  完成后,输入w:写入磁盘(前面都是内存操作,不会实际影响,直到w为止)

[root@izm5e7dqv477rmbrojabgrz ~]# fdisk /dev/vdb
Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them.
Be careful before using the write command. Command (m for help): p Disk /dev/vdb: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x90e789fd Device Boot Start End Blocks Id System
/dev/vdb1 2048 41943039 20970496 83 Linux Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

  然后就是用xfs格式化这个分区

mkfs -t xfs -n ftype=1 /dev/vdb1

  然后就是伟大的那步了-挂载/dev/vdb1到/storage:

mkdir /storage
mount /dev/vdb1 /storage

  然后,需要把docker的默认存储文件路径变成/storage,一种实现方式就是给/var/lib/docker建立软链接到/storage

ln -sv  /storage/ /var/lib/docker

  

OK,关键一步完成了,剩下的就是回到官方安装教程,开始安装docker

https://docs.mesosphere.com/1.11/installing/oss/custom/system-requirements/install-docker-centos/

从第八步开始安装,安装完后验证方式:

[root@izm5e7dqv477rmbrojabgrz lib]# docker info
Containers: 20
Running: 0
Paused: 0
Stopped: 20
Images: 2
Server Version: 1.13.1
Storage Driver: overlay
Backing Filesystem: xfs
Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1
runc version: 9df8b306d01f59d3a8029be411de015b7304dd8f
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-862.3.3.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.639 GiB
Name: izm5e7dqv477rmbrojabgrz
ID: LA6Q:RHIV:BZCN:4T5S:QXW7:3OWY:ITSQ:GJ23:UA6C:E6CN:X2J4:7X7Y
Docker Root Dir: /storage
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

出现这些字符就代表docker部分完成了,然后安装(都在bootstrap机器上执行)

https://docs.mesosphere.com/1.11/installing/oss/custom/cli/

我把我这的文件目录和内容贴出来:

[root@izm5e44dzsuwalzsalz2rkz ~]# tree genconf/
genconf/
├── config.yaml
├── ip-detect
├── ssh_key

 

[root@izm5e44dzsuwalzsalz2rkz genconf]# cat config.yaml
agent_list:
- 172.31.91.124
- 172.31.91.123
# Use this bootstrap_url value unless you have moved the DC/OS installer assets.
bootstrap_url: file:///opt/dcos_install_tmp
cluster_name: 'McKayDCOS'
exhibitor_storage_backend: static
master_discovery: static
ip_detect_filename: genconf/ip-detect
master_list:
- 172.31.91.125
resolvers:
- 8.8.4.4
- 8.8.8.8
ssh_port: 22
ssh_user: root
[root@izm5e44dzsuwalzsalz2rkz genconf]# cat ip-detect
#!/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)

这里还要配置下ssh免密登录(因为bootstrp节点安装的时候会ssh连接到master, agent节点)  

ssh-keygen -t rsa   会出现让你输入密码,千万不能写密码,都为空
cp ~/.ssh/id_rsa genconf/ssh_key && chmod 0600 genconf/ssh_key         把ssh私钥key拷贝到安装目录下
ssh-copy-id -i 172.31.91.125    传播公钥到对方节点,期间会要求输入root密码
ssh-copy-id -i 172.31.91.124
ssh-copy-id -i 172.31.91.123

剩下根据安装文档进行安装:

https://docs.mesosphere.com/1.11/installing/oss/custom/cli/  

装完后,有几个url:

http://47.104.244.204:8181/exhibitor/v1/ui/index.html       zookeeper监控

http://47.104.244.204/#/dashboard?_k=37kze5                marathon界面

http://47.104.244.204/mesos/#/                                    mesos集群界面

  

  

DC/OS安装的更多相关文章

  1. DCOS实践分享(4):如何基于DC/OS整合SMACK(Spark, Mesos, Akka, Cassandra, Kafka)

    这篇文章入选CSDN极客头条 http://geek.csdn.net/news/detail/71572 当前,要保证业务的市场竞争力,仅靠设计一个可用并且好看的产品,已经完全不能满足要求.全球消费 ...

  2. 深入解析DC/OS 1.8 – 高可靠的微服务及大数据管理平台

    深入解析DC/OS 1.8 – 高可靠的微服务及大数据管理平台 大家好,欢迎大家参加这次DC/OS的技术分享. 先做个自我介绍,刘超,Linker Networks首席架构师,Open DC/OS社区 ...

  3. 容器平台选型的十大模式:Docker、DC/OS、K8S 谁与当先?

    作者:刘超   来自:网易云 基础服务 无论是在社区,还是在同客户交流的过程中,总会被问到到底什么时候该用 Docker?什么时候用虚拟机?如果使用容器,应该使用哪个容器平台? 显而易见,我不会直接给 ...

  4. 容器平台选型的十大模式:Docker、DC/OS、K8S 谁与当先?【转】

    网易企业服务2017-10-13 无论是在社区,还是在同客户交流的过程中,总会被问到到底什么时候该用 Docker?什么时候用虚拟机?如果使用容器,应该使用哪个容器平台? 显而易见,我不会直接给大家一 ...

  5. 容器平台选型的十大模式:Docker、DC/OS、K8S谁与当先?

    首先我们来谈什么情况下应该使用Docker的问题   如图,左面是经常挂在嘴边的所谓容器的优势,但是虚拟机都能一一怼回去. 如果部署的是一个传统的应用,这个应用启动速度慢,进程数量少,基本不更新,那么 ...

  6. parrot os 安装后更改更新源

    parrot os 安装后 parrot os 自带的更新源更新速度太慢(需要几个小时) 提供如下更新源 中国 USTC(中国科学技术大学和USTCLUG) - 合肥大学 CMCC 1 Gbps Ce ...

  7. Cent OS安装使用ffmpeg(完整版)

    Cent OS安装使用ffmpeg centos作为主流后台linux 系统,ffmpeg作为视频流解析的主力,尤其是ffmpeg配合opencv使用,则是视觉操作的基础 版本: ffmpeg3.1 ...

  8. Mac os安装DVWA环境教程

    Mac os安装DVWA环境教程 1.尽管Mac自带Apache和php 事实上Mac和WIN都用XAMPP一键化安装比较方便 2.解压DVWA-master 改名为dvwa移动到XAMPP的目录 3 ...

  9. mac OS 安装配置Nginx服务器

    系统环境 安装工具 Homebrew软件包管理器 :<mac OS 安装 Homebrew软件包管理器>https://blog.csdn.net/weixin_41791279/arti ...

随机推荐

  1. 关于单元测试的思考--Asp.Net Core单元测试最佳实践

    在我们码字过程中,单元测试是必不可少的.但在从业过程中,很多开发者却对单元测试望而却步.有些时候并不是不想写,而是常常会碰到下面这些问题,让开发者放下了码字的脚步: 这个类初始数据太麻烦,你看:new ...

  2. 2019腾讯WXG移动客户端暑期实习面经

    微信这个比较迷,二面完官网流程灰了,但是过了一周多突然来三面,下午面完三面晚上HR面,第三天offer call, 莫名其妙过了 之前以为已经挂了,所以没有写面经,现在距一面已经快一个月了,只能还记得 ...

  3. [Swift]浙大美女学霸征婚问题

    问题1:求乘积为(7140229933)的两个质数? Solution: import Foundation class Solution { func findBeauty(_ number:Int ...

  4. JVM 学习(一)反射、垃圾回收、异常处理--- 2019年4月

    1.JVM 基础知识点 JVM 虚拟机包含了:自动内存管理器.垃圾回收(垃圾回收调优). 执行顺序:Java 代码 --- .class 字节码文件(加载到虚拟机中) --- Java 类放在方法区中 ...

  5. Java数据结构和算法 - 简单排序

    Q: 冒泡排序? A: 1) 比较相邻的元素.如果第一个比第二个大,就交换它们两个; 2) 对每一对相邻元素作同样的工作,从开始第一对到结尾的最后一对.在这一点,最后的元素应该会是最大的数; 3) 针 ...

  6. pandas列合并为一行

    将dataframe利用pandas列合并为一行,类似于sql的GROUP_CONCAT函数.例如如下dataframe id_part pred pred_class v_id 0 d 0 0.12 ...

  7. string类的几种方法

    string str="123abc456";int i=3;1 取字符串的前i个字符   str=str.Substring(0,i); // or  str=str.Remov ...

  8. springboot~lombok使用总结

    @Getter & @Setter 生成getter和setter块 @Data注解 @Data相当于@Getter @Setter @RequiredArgsConstructor @ToS ...

  9. RDIFramework.NET ━ .NET快速信息化系统开发框架 V3.2版本正式发布

     RDIFramework.NET .NET快速信息化系统开发框架 V3.2版本 正式发布 精益求精求完美! 1.RDIFramework.NET框架介绍 RDIFramework.NET,基于.NE ...

  10. #6 判断一个数是否为2的n次方

    「ALBB面试题」 [题目] 如何判断一个数是否为2的n次方 [题目分析] 看到这种题,相信大家第一反应就是循环除2,这样做肯定是可以得出结果的:但是这种做法无疑大大增加了计算机的运行时间,一个非常大 ...