forked from CenturyLinkLabs/panamax-contest-templates
-
Notifications
You must be signed in to change notification settings - Fork 2
/
mesos_playground_eqdw.pmx
155 lines (135 loc) · 5.16 KB
/
mesos_playground_eqdw.pmx
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
---
name: Mesos Playground
description: "This template sets up a single-node Apache Mesos cluster.\r\n\r\nMarathon
and Chronos frameworks are included, as is a web frontend for Zookeeper.\r\n\r\nAfter
following the steps in the \"Installation\" section below, you can immediately start
submitting jobs to Mesos via Marathon and/or Chronos, or by connecting your own
Framework via zk://localhost:2181/mesos."
keywords: mesos,marathon,chronos,zk-web,zookeeper
type: Apache
documentation: |-
# Mesos Playground
This [Panamax](http://panamax.io/) template sets up a single-node [Apache Mesos](http://mesos.apache.org) cluster.
[Marathon](https://github.com/mesosphere/marathon) and [Chronos](https://github.com/airbnb/chronos) frameworks are included, as is [a web frontend for Zookeeper](https://github.com/qiuxiafei/zk-web).
After following the steps in the "Installation" section below, you can immediately start submitting jobs to Mesos via Marathon and/or Chronos, or by connecting your own Framework via `zk://localhost:2181/mesos`.
| Service | Port |
|----------------------------------------------------|--------------------------------|
| [Mesos Master](http://mesos.apache.org/) | [:5050](http://localhost:5050) |
| [Mesos Slave](http://mesos.apache.org/) | [:5051](http://localhost:5051) |
| [Apache ZooKeeper](http://zookeeper.apache.org/) | [:2181](http://localhost:2181) |
| [ZK-Web](https://github.com/qiuxiafei/zk-web) | [:2182](http://localhost:2182) |
| [Marathon](https://github.com/mesosphere/marathon) | [:9000](http://localhost:9000) |
| [Chronos](https://github.com/airbnb/chronos) | [:9001](http://localhost:9001) |
## System Requirements
For best results, 4+ cores and 4GB RAM. You can probably fit it in less, but this template is pretty hungry. You can use `panamax reinstall` if using VirtualBox to increase the default limits of 1 core and 1GB.
panamax reinstall --memory=4096 --cpu=8
## Setup
Just start the template and wait a bit for all the containers to fetch. It'll take a while.
## Post-Run Instructions
Nothing really! In CoreOS, you can add more slaves on other nodes if you like:
docker run \
-p5051:5051 -e MESOS_MASTER=zk://[panamax ip]:2181/mesos \
redjack/mesos-slave
## Port-Forwarding
There are several ports that you should forward to your localhost, which are itemized by service in the section above:
VBoxManage controlvm panamax-vm natpf1 zk-web,tcp,,2182,,2182
VBoxManage controlvm panamax-vm natpf1 mesos-master,tcp,,5050,,5050
VBoxManage controlvm panamax-vm natpf1 mesos-slave,tcp,,5051,,5051
VBoxManage controlvm panamax-vm natpf1 marathon,tcp,,9000,,9000
VBoxManage controlvm panamax-vm natpf1 chronos,tcp,,9001,,9001
VBoxManage controlvm panamax-vm natpf1 zookeeper,tcp,,2181,,2181
## DIY Demo
1. Follow the instructions above, and wait for the services to boot up.
2. Visit [Marathon at localhost:9000](http://localhost:9000).
3. Click "New App", and set "Command" to `echo "hello, world"; sleep 20`, and set ID to a helpful name, like `sleeper`.
4. Scroll down and hit "Create".
5. Wait a few seconds and you will see your new app has been created.
6. Go to [Mesos Master's UI at localhost:5050](http://5050).
7. Notice the entry under "Active Tasks". Click the "Sandbox" link.
8. Click "stdout", and notice it's printed the text from step 3.
9. Explore!
images:
- name: redjack_mesos-master_latest
source: redjack/mesos-master:latest
category: Master
type: Default
expose:
- '5050'
ports:
- host_port: '5050'
container_port: '5050'
proto: TCP
links:
- service: jplock_zookeeper
alias: zookeeper
environment:
- variable: MESOS_ZK
value: zk://zookeeper:2181/mesos
- name: jplock_zookeeper
source: jplock/zookeeper:latest
category: Zookeeper
type: Default
expose:
- '2181'
ports:
- host_port: '2181'
container_port: '2181'
proto: TCP
volumes:
- host_path: "/data/zookeeper"
container_path: "/tmp/zookeeper"
- name: redjack_mesos-slave
source: redjack/mesos-slave:latest
category: Slave
type: Default
expose:
- '5051'
ports:
- host_port: '5051'
container_port: '5051'
proto: TCP
links:
- service: jplock_zookeeper
alias: zookeeper
environment:
- variable: MESOS_MASTER
value: zk://zookeeper:2181/mesos
- name: superguenter_marathon
source: superguenter/marathon:latest
category: Frameworks
type: Default
expose:
- '8080'
ports:
- host_port: '9000'
container_port: '8080'
proto: TCP
links:
- service: jplock_zookeeper
alias: zookeeper
- name: tomaskral_chronos
source: tomaskral/chronos:latest
category: Frameworks
type: Default
expose:
- '8080'
ports:
- host_port: '9001'
container_port: '8080'
proto: TCP
links:
- service: jplock_zookeeper
alias: zookeeper
- name: nakosung_zk-web
source: nakosung/zk-web:latest
category: Zookeeper
type: Default
expose:
- '8080'
ports:
- host_port: '2182'
container_port: '8080'
proto: TCP
links:
- service: jplock_zookeeper
alias: zookeeper