-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathuser-data.yml
36 lines (36 loc) · 1.41 KB
/
user-data.yml
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
#cloud-config
coreos:
etcd:
#generate a new token for each unique cluster from https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/bfdecc21c054aff2da4f0bc3c68ac2d1
addr: $public_ipv4:4001
peer-addr: $public_ipv4:7001
update:
reboot-strategy: etcd-lock
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
runtime: false
content: |
[Unit]
Description=fleet
[Service]
Environment=FLEET_PUBLIC_IP=$public_ipv4
ExecStart=/usr/bin/fleet
- name: mesos_bootstrap.service
command: start
runtime: true
content: |
[Unit]
Description=Mesos Bootstrapper
After=docker.service
After=etcd.service
After=fleet.service
[Service]
TimeoutStartSec=900
EnvironmentFile=/etc/environment
ExecStartPre=/bin/sh -c "/usr/bin/docker history tnolet/mesos-on-coreos:1.0 >/dev/null || /usr/bin/docker pull tnolet/mesos-on-coreos:1.0"
ExecStart=/bin/sh -c "/usr/bin/docker run --rm --name mesos --net=host -p 5050:5050 -p 5051:5051 -p 2181:2181 -e MAIN_IP=$private_ipv4 -e DOCKER0_IP=`ifconfig docker0 | grep 'inet ' | awk '{print $2}'` -v /var/lib/docker/btrfs/subvolumes:/var/lib/docker/btrfs/subvolumes -v /var/run/docker.sock:/var/run/docker.sock tnolet/mesos-on-coreos:1.0
ExecStop=/usr/bin/docker rm -f mesos