Created
March 31, 2015 15:36
-
-
Save samklr/97d3885a9cf43f2fb8d4 to your computer and use it in GitHub Desktop.
Mesos Docker launcher scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
HOST_IP=10.11.31.7 ##Put your IP here | |
# or HOST_IP = ${/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' } | |
#Start Zookeeper | |
docker run -d -p 2181:2181 -p 2888:2888 -p 3888:3888 garland/zookeeper | |
#Mesos Master | |
docker run --net="host" \ | |
-p 5050:5050 \ | |
-e "MESOS_HOSTNAME=${HOST_IP}" \ | |
-e "MESOS_IP=${HOST_IP}" \ | |
-e "MESOS_ZK=zk://${HOST_IP}:2181/mesos" \ | |
-e "MESOS_PORT=5050" \ | |
-e "MESOS_LOG_DIR=/var/log/mesos" \ | |
-e "MESOS_QUORUM=1" \ | |
-e "MESOS_REGISTRY=in_memory" \ | |
-e "MESOS_WORK_DIR=/var/lib/mesos" \ | |
-d \ | |
garland/mesosphere-docker-mesos-master | |
#Marathon | |
docker run \ | |
-d \ | |
-p 8080:8080 \ | |
garland/mesosphere-docker-marathon --master zk://${HOST_IP}:2181/mesos --zk zk://${HOST_IP}:2181/marathon | |
#Mesos slave | |
docker run -d \ | |
--name mesos_slave_1 \ | |
--entrypoint="mesos-slave" \ | |
-e "MESOS_MASTER=zk://${HOST_IP}:2181/mesos" \ | |
-e "MESOS_LOG_DIR=/var/log/mesos" \ | |
-e "MESOS_LOGGING_LEVEL=INFO" \ | |
garland/mesosphere-docker-mesos-master:latest | |
# Go into the mesos and marathon console HOST_IP:5050 and HOST_IP:8080 | |
# GET iniside the docker container for the mesos slave | |
docker exec -it mesos_slave_1 /bin/bash | |
#and tail the output to see how it's runnin : tail -f /tmp/output.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment