Skip to content

Commit

Permalink
mesos docker 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yunsang.choi committed Nov 26, 2014
1 parent 4f0e9fe commit d10ac2a
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hbase-cdh5.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ EXPOSE 65010
EXPOSE 65020
# HBase regionserver web UI
EXPOSE 65030
CMD ["/bin/bash", "start.sh"]
ENTRYPOINT ["/bin/bash", "start.sh"]


2 changes: 1 addition & 1 deletion hbase-cdh5.2/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ service hbase-master start
service hbase-regionserver start

# infinite loop
while :; do echo "Running Hbase ..."; sleep 5; done
while :; do sleep 5; done
31 changes: 31 additions & 0 deletions mesos/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

FROM centos:centos6
MAINTAINER Yunsang Choi <[email protected]>

#=======================
# Install utils
#=======================
COPY install-default.sh install-default.sh
RUN ["/bin/bash", "install-default.sh"]


#=======================
# Install JDK7
#=======================
COPY install-jdk7.sh install-jdk7.sh
RUN ["/bin/bash", "install-jdk7.sh"]

#=======================
# Install mesos
#=======================
COPY install-mesos.sh install-mesos.sh
RUN ["/bin/bash", "install-mesos.sh"]


#=======================
# Start services.
#=======================
COPY start.sh start.sh
# mesos
EXPOSE 5050
ENTRYPOINT ["/bin/bash", "start.sh"]
20 changes: 20 additions & 0 deletions mesos/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Mesos
=======

Mesos cluster for dev.
It not contains zookeeper, so you need other docker container which provide zookeeper.


Here is sample ``fig.yml``.

```
mesos:
image: oddpoet/mesos
command:
- "zk://zookeeper:2181/mesos"
ports:
- "5050:5050"
links:
- zookeeper:zookeeper
```

9 changes: 9 additions & 0 deletions mesos/install-default.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

echo "============================="
echo " install default utils"
echo "============================="

yum install clean all
yum install -y curl wget sudo telnet

22 changes: 22 additions & 0 deletions mesos/install-jdk7.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

echo "============================="
echo " install jdk7"
echo "============================="

wget --no-cookies \
--no-check-certificate \
--header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/7u65-b17/jdk-7u65-linux-x64.rpm

rpm -ivh jdk-7u65-linux-x64.rpm
rm jdk-7u65-linux-x64.rpm

echo "# set JAVA_HOME" >> ~/.bashrc
echo "export JAVA_HOME=/usr/java/default" >> ~/.bashrc
echo "export PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc

java -version



4 changes: 4 additions & 0 deletions mesos/install-mesos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

rpm -Uvh http://repos.mesosphere.io/el/6/noarch/RPMS/mesosphere-el-repo-6-2.noarch.rpm
yum install -y mesos
17 changes: 17 additions & 0 deletions mesos/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

declare ZK=$1

if [[ "$1" == "" ]];then
echo "Need zookeeper info. (e.g. zk://localhost:2181/mesos)"
exit 1
fi

echo "config zookeeper info"
echo "$ZK" > /etc/mesos/zk

echo "Starting mesos..."
mesos-init-wrapper slave &
mesos-init-wrapper master


0 comments on commit d10ac2a

Please sign in to comment.