Bluemix平台一步一步搭建ZooKeeper + Mesos + Marathon平台管理Docker集群之二
来源:互联网 发布:淘宝ps3良心店 编辑:程序博客网 时间:2024/05/21 10:28
接上一篇文章:http://blog.csdn.net/rapheler/article/details/52229208
咱们来看一下Marathon跑一个Docker任务
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
$
cat
nginx-bridge-2048game.json
{
"id"
:
"/nginx"
,
"cpus"
: 1,
"mem"
: 128,
"disk"
: 0,
"instances"
: 1,
"container"
: {
"type"
:
"DOCKER"
,
"volumes"
: [
{
"containerPath"
:
"/usr/share/nginx/html/"
,
"hostPath"
:
"/home/ibmcloud/2048-master/"
,
"mode"
:
"RO"
}
],
"docker"
: {
"image"
:
"nginx"
,
"network"
:
"BRIDGE"
,
"portMappings"
: [
{
"containerPort"
: 80,
"hostPort"
: 0,
"protocol"
:
"tcp"
,
"servicePort"
: 80,
"labels"
: {}
}
],
"privileged"
:
false
,
"parameters"
: [],
"forcePullImage"
:
false
}
},
"healthChecks"
: [
{
"path"
:
"/"
,
"protocol"
:
"HTTP"
,
"portIndex"
: 0,
"gracePeriodSeconds"
: 120,
"intervalSeconds"
: 30,
"timeoutSeconds"
: 5,
"maxConsecutiveFailures"
: 3,
"ignoreHttp1xx"
:
false
}
],
"portDefinitions"
: [
{
"port"
: 10003,
"protocol"
:
"tcp"
,
"labels"
: {}
}
]
}
1
2
3
4
5
6
7
8
9
10
11
12
# curl -u username:password -i -H 'Content-Type: application/json' -d@nginx-bridge-2048game.json 192.168.0.33:8080/v2/apps
HTTP
/1
.1 201 Created
Date: Tue, 07 Jun 2016 07:59:17 GMT
X-Marathon-Leader: http:
//192
.168.0.33:8080
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0
Location: http:
//192
.168.0.33:8080
/v2/apps/nginx
Content-Type: application
/json
; qs=2
Transfer-Encoding: chunked
Server: Jetty(9.3.z-SNAPSHOT)
{
"id"
:
"/nginx"
,
"cmd"
:null,
"args"
:null,
"user"
:null,
"env"
:{},
"instances"
:1,
"cpus"
:1,
"mem"
:128,
"disk"
:0,
"executor"
:
""
,
"constraints"
:[],
"uris"
:[],
"fetch"
:[],
"storeUrls"
:[],
"ports"
:[80],
"portDefinitions"
:[{
"port"
:80,
"protocol"
:
"tcp"
,
"labels"
:{}}],
"requirePorts"
:
false
,
"backoffSeconds"
:1,
"backoffFactor"
:1.15,
"maxLaunchDelaySeconds"
:3600,
"container"
:{
"type"
:
"DOCKER"
,
"volumes"
:[{
"containerPath"
:
"/usr/share/nginx/html/"
,
"hostPath"
:
"/home/ibmcloud/2048-master/"
,
"mode"
:
"RO"
}],
"docker"
:{
"image"
:
"nginx"
,
"network"
:
"BRIDGE"
,
"portMappings"
:[{
"containerPort"
:80,
"hostPort"
:0,
"servicePort"
:80,
"protocol"
:
"tcp"
,
"labels"
:{}}],
"privileged"
:
false
,
"parameters"
:[],
"forcePullImage"
:
false
}},
"healthChecks"
:[{
"path"
:
"/"
,
"protocol"
:
"HTTP"
,
"portIndex"
:0,
"gracePeriodSeconds"
:120,
"intervalSeconds"
:30,
"timeoutSeconds"
:5,
"maxConsecutiveFailures"
:3,
"ignoreHttp1xx"
:
false
}],
"readinessChecks"
:[],
"dependencies"
:[],
"upgradeStrategy"
:{
"minimumHealthCapacity"
:1,
"maximumOverCapacity"
:1},
"labels"
:{},
"acceptedResourceRoles"
:null,
"ipAddress"
:null,
"version"
:
"2016-06-07T07:59:18.003Z"
,
"residency"
:null,
"tasksStaged"
:0,
"tasksRunning"
:0,
"tasksHealthy"
:0,
"tasksUnhealthy"
:0,
"deployments"
:[{
"id"
:
"c30b9f6e-786c-45bd-9e7e-cc6cc001d91d"
}],
"tasks"
:[]}
#
1
2
3
$
cat
runapp.sh
#!/bin/bash
curl -i -H
'Content-Type: application/json'
-d@
"$1"
192.168.0.33:8080
/v2/apps
1
marathon --http_credentials
"username:password"
0 0
- Bluemix平台一步一步搭建ZooKeeper + Mesos + Marathon平台管理Docker集群之二
- Bluemix平台一步一步搭建ZooKeeper + Mesos + Marathon平台管理Docker集群之一
- 基于Mesos+Marathon+Zookeeper的Docker容器管理平台
- 云计算学习总结(1)——PaaS云平台部署之在Centos7搭建Mesos+Zookeeper+Marathon+Docker单机集群
- Docker系列之(二):使用Mesos管理Docker集群(Mesos + Marathon + Chronos + Docker)
- Docker系列之(二):使用Mesos管理Docker集群(Mesos + Marathon + Chronos + Docker)
- mesos+marathon平台搭建
- 基于Mesos+Marathon+Zookeeper的Docker集群管理环境搭建过程分享
- mesos+marathon+zookeeper的docker管理集群亲手搭建实例(详细)
- mesos+marathon+zookeeper的docker管理集群亲手搭建实例(详细)
- Mesos+Zookeeper+Marathon的Docker管理平台部署记录(1)
- Mesos+Zookeeper+Marathon的Docker管理平台部署记录(1)
- Mesos+Zookeeper+Marathon+Docker分布式集群管理最佳实践
- Mesos+ZooKeeper+Marathon+Docker
- 使用Mesos和Marathon管理Docker集群
- Mesos, Marathon, Docker 平台部署记录
- 使用Mesos管理Docker集群(Mesos + Marathon + Chronos + Docker)
- Mesos+Zookeeper+Marathon+Docker分布式部署打造PaaS云平台实践(一)
- POJ1426——Find The Multiple
- spring springmvc jackson在ajax返回时,不输出null值对应的属性
- SQL的左连接 右连接 全连接 内连接 交叉连接
- 单例模式懒汉式静态内部类形式
- 通用servler, struts2入门
- Bluemix平台一步一步搭建ZooKeeper + Mesos + Marathon平台管理Docker集群之二
- error C4996: '_itoa': This function or variable may be unsafe. Consider using _itoa_s instead. To di
- Charles 从入门到精通
- 【leetcode】137. Single Number II
- 【转】R-CNN学习笔记3:Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition(SPP-net)
- Linux目录结构
- Android Activity与Service数据交互:Binder、bindService(系列2)
- CentOS 6.8_x64 Linux下基础环境搭建
- C++高级编程资料汇总(参考手册+电子书+编程思想+算法分析)