原创docker dcos 的安装

本文涉及的产品
服务治理 MSE Sentinel/OpenSergo,Agent数量 不受限
任务调度 XXL-JOB 版免费试用,400 元额度,开发版规格
全局流量管理 GTM,标准版 1个月
简介: 原创哈,上个星期无意间发现了一个可以好东西 DC/OS https://dcos.io 这个是官网哈 然后就痛苦的折磨了一个多星期; 基本是参照到https://dcos.io/docs/1.7/administration/installing/custom/advanced/ 这个来弄的...

原创哈,上个星期无意间发现了一个可以好东西

DC/OS

https://dcos.io 这个是官网哈

然后就痛苦的折磨了一个多星期;

基本是参照到https://dcos.io/docs/1.7/administration/installing/custom/advanced/ 这个来弄的,中间遇到不少坑

基本的docker 那些自行安装哈,只写一些细节上面的东西

mkdir /tmp/dcos && cd /tmp/dcos
curl -O https://downloads.dcos.io/dcos/EarlyAccess/dcos_generate_config.sh #这个有点久哈 550M

然后创建对应的目录:

├── dcos-genconf.14509fe1e7899f4395-3a2b7e03c45cd615da.tar
├── dcos_generate_config.sh
└── genconf
    ├── config.yaml
    └── ip-detect

genconf 这个文件夹的内容我放在github上面了 https://github.com/jackluo2012/dcos-genconf

先看看config.yaml 中的内容:

---
bootstrap_url: http://192.168.1.58:8080 #这个是配置服务器的地址,等会要从这里面下载内容
cluster_name: 'DC/OS' #名称
exhibitor_storage_backend: static #存储方式
ip_detect_filename: /genconf/ip-detect #路由检测,应该是哈
master_list:
- 192.168.1.100 #主机地址
resolvers:
- 192.168.1.254 #这个是dns
- 119.6.6.6 #这个是
oauth_enabled: 'false' #这个是验证,最好关闭,因为是内网,读者可以开启哈,
telemetry_enabled: 'false'#这个也是验证
ip-detect

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

然后就是

bash dcos_generate_config.sh #放生全局的配置信息
docker run -d -p 8080:80 --name nginx -v $PWD/genconf/serve:/usr/share/nginx/html:ro index.alauda.cn/library/nginx #这个是放到容器里面了
########这个可以测试一下,可以问题了不,我映射的是8080端口,服务器的地址是 192.168.1.58:8080 这个是主服务器的配置地址

下面来配置 master:

$ ssh root@192.168.1.100 #连接到master上面
$ mkdir /tmp/dcos && cd /tmp/dcos #放到临时目录下面哈
$ curl -O http://192.168.1.58:8080/dcos_install.sh #下载刚才的文件

然后就是

[root@localhost dcos]# bash dcos_install.sh master
Starting DC/OS Install Process
Running preflight checks
Checking if DC/OS is already installed: PASS (Not installed)
PASS Is SELinux disabled?
Checking if docker is installed and in PATH: PASS 
Checking docker version requirement (>= 1.6): PASS (1.9.1)
Checking if curl is installed and in PATH: PASS 
Checking if bash is installed and in PATH: PASS 
Checking if ping is installed and in PATH: PASS 
Checking if tar is installed and in PATH: PASS 
Checking if xz is installed and in PATH: PASS 
Checking if unzip is installed and in PATH: PASS 
Checking if ipset is installed and in PATH: PASS 
Checking if systemd-notify is installed and in PATH: PASS 
Checking if systemd is installed and in PATH: PASS 
Checking systemd version requirement (>= 200): PASS (219)
Checking if group 'nogroup' exists: PASS 
Checking if port 80 (required by mesos-ui) is in use: PASS 
Checking if port 53 (required by mesos-dns) is in use: PASS 
Checking if port 15055 (required by dcos-history) is in use: PASS 
Checking if port 5050 (required by mesos-master) is in use: PASS 
Checking if port 2181 (required by zookeeper) is in use: PASS 
Checking if port 8080 (required by marathon) is in use: PASS 
Checking if port 3888 (required by zookeeper) is in use: PASS 
Checking if port 8181 (required by exhibitor) is in use: PASS 
Checking if port 8123 (required by mesos-dns) is in use: PASS 
Checking Docker is configured with a production storage driver: FAIL (devicemapper, /dev/loop0)

Docker is configured to use the devicemapper storage driver with a loopback
device behind it. This is highly recommended against by Docker and the
community at large for production use[0][1]. See the docker documentation on
selecting an alternate storage driver, or use alternate storage than loopback
for the devicemapper driver.

[0] https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/
[1] http://www.projectatomic.io/blog/2015/06/notes-on-fedora-centos-and-docker-storage-drivers/
#上面是做一些环境检查,如果没有自行安装软件,还有端口检查,因为我是在虚拟机面装的,注意上面有一个FAIL,怎么办呢,动态改了一下shell脚本,把
那个==改成 != ,如果不知道怎么改,留言吧,

294 if [[ "${data_file}" != /dev/loop* ]]; then #在 294行哈

 
[root@localhost dcos]# bash dcos_install.sh master
Starting DC/OS Install Process
Running preflight checks
Checking if DC/OS is already installed: PASS (Not installed)
PASS Is SELinux disabled?
Checking if docker is installed and in PATH: PASS 
Checking docker version requirement (>= 1.6): PASS (1.9.1)
Checking if curl is installed and in PATH: PASS 
Checking if bash is installed and in PATH: PASS 
Checking if ping is installed and in PATH: PASS 
Checking if tar is installed and in PATH: PASS 
Checking if xz is installed and in PATH: PASS 
Checking if unzip is installed and in PATH: PASS 
Checking if ipset is installed and in PATH: PASS 
Checking if systemd-notify is installed and in PATH: PASS 
Checking if systemd is installed and in PATH: PASS 
Checking systemd version requirement (>= 200): PASS (219)
Checking if group 'nogroup' exists: PASS 
Checking if port 80 (required by mesos-ui) is in use: PASS 
Checking if port 53 (required by mesos-dns) is in use: PASS 
Checking if port 15055 (required by dcos-history) is in use: PASS 
Checking if port 5050 (required by mesos-master) is in use: PASS 
Checking if port 2181 (required by zookeeper) is in use: PASS 
Checking if port 8080 (required by marathon) is in use: PASS 
Checking if port 3888 (required by zookeeper) is in use: PASS 
Checking if port 8181 (required by exhibitor) is in use: PASS 
Checking if port 8123 (required by mesos-dns) is in use: PASS 
Checking Docker is configured with a production storage driver: PASS (devicemapper /dev/loop0)
Creating directories under /etc/mesosphere
Creating role file for master
Configuring DC/OS
Setting and starting DC/OS

这样应该就安装好了,可以访问 http://192.168.1.100/这个了

slave 的略了,唯一下载的时候,就用

sudo bash dcos_install.sh slave

如果有不明白的欢迎留言哈,

目录
相关文章
|
17天前
|
弹性计算 Ubuntu Linux
阿里云服务器一键安装Docker社区版教程,基于系统运维管理OOS
阿里云服务器一键安装Docker社区版教程,基于系统运维管理OOS自动化部署。支持Ubuntu 22.04/20.04、CentOS 7.7-7.9及Alibaba Cloud Linux 3.2104 LTS。前提条件:ECS实例需运行中且有公网。步骤:选择Docker扩展并安装,验证成功通过命令`docker -v`查看版本号。
191 79
|
1月前
|
NoSQL 关系型数据库 应用服务中间件
docker基础篇:安装tomcat
docker基础篇:安装tomcat
166 64
|
4天前
|
前端开发 应用服务中间件 nginx
docker安装nginx,前端项目运行
通过上述步骤,你可以轻松地在Docker中部署Nginx并运行前端项目。这种方法不仅简化了部署流程,还确保了环境的一致性,提高了开发和运维的效率。确保按步骤操作,并根据项目的具体需求进行相应的配置调整。
45 25
|
4天前
|
安全 数据安全/隐私保护 Docker
docker私有仓库harbor安装
通过以上步骤,您可以成功在企业内部安装和配置Harbor私有仓库,方便地管理和分发Docker镜像。Harbor不仅提供了基础的镜像管理功能,还增强了安全性、身份管理和审计功能,使其成为企业级容器镜像管理的理想选择。
41 22
|
20天前
|
NoSQL 关系型数据库 Redis
《docker高级篇(大厂进阶):1.Docker复杂安装详说》包括:安装mysql主从复制、安装redis集群
《docker高级篇(大厂进阶):1.Docker复杂安装详说》包括:安装mysql主从复制、安装redis集群
82 14
|
17天前
|
关系型数据库 MySQL 应用服务中间件
《docker基础篇:8.Docker常规安装简介》包括:docker常规安装总体步骤、安装tomcat、安装mysql、安装redis
《docker基础篇:8.Docker常规安装简介》包括:docker常规安装总体步骤、安装tomcat、安装mysql、安装redis
68 7
|
1月前
|
关系型数据库 MySQL 数据库
docker高级篇(大厂进阶):安装mysql主从复制
docker高级篇(大厂进阶):安装mysql主从复制
107 24
|
1月前
|
NoSQL 算法 Redis
docker高级篇(大厂进阶):安装redis集群
docker高级篇(大厂进阶):安装redis集群
111 24
|
1月前
|
Ubuntu Linux Docker
Ubuntu22.04上Docker的安装
通过以上详细的安装步骤和命令,您可以在Ubuntu 22.04系统上顺利安装
775 12
|
2月前
|
缓存 Linux Docker
【最新版正确姿势】Docker安装教程(简单几步即可完成)
之前的老版本Docker安装教程已经发生了变化,本文分享了Docker最新版安装教程,其他操作系统版本也可以参考官 方的其他安装版本文档。
2643 3
【最新版正确姿势】Docker安装教程(简单几步即可完成)

热门文章

最新文章