-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path01_cluster_of_mesos_master
More file actions
51 lines (42 loc) · 1.77 KB
/
01_cluster_of_mesos_master
File metadata and controls
51 lines (42 loc) · 1.77 KB
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
#
# Dockerfile - Cluster of Apache Mesos master
#
# - Build
# docker build --rm -t k8sm:mesos-master -f 01_cluster_of_mesos_master .
#
# - Run
# docker run -d --name="mesos-master-0" -h "mesos-master-0" k8sm:mesos-master
# docker run -d --name="mesos-master-1" -h "mesos-master-1" k8sm:mesos-master
# docker run -d --name="mesos-master-2" -h "mesos-master-2" k8sm:mesos-master
#
# - SSH
# ssh `docker inspect -f '{{ .NetworkSettings.IPAddress }}' mesos-master-0`
# ssh `docker inspect -f '{{ .NetworkSettings.IPAddress }}' mesos-master-1`
# ssh `docker inspect -f '{{ .NetworkSettings.IPAddress }}' mesos-master-2`
# Use the base images
FROM ubuntu:15.04
# Maintainer
MAINTAINER Yongbok Kim <ruo91@yongbok.net>
# The last update and install package for mesos
RUN apt-get update && apt-get install -y add-apt-key \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF \
&& echo "deb http://repos.mesosphere.io/ubuntu vivid main" > /etc/apt/sources.list.d/mesosphere.list \
&& apt-get update && apt-get install -y mesos openssh-server supervisor nano net-tools iputils-ping
# Add mesos scripts
ADD conf/cluster/mesos/mesos.sh /bin/mesos.sh
RUN chmod a+x /bin/mesos.sh
# Setting for supervisor
RUN mkdir -p /var/log/supervisor
ADD conf/supervisord/00_default.conf /etc/supervisor/conf.d/supervisord.conf
# SSH
RUN mkdir /var/run/sshd
RUN sed -i 's/without-password/yes/g' /etc/ssh/sshd_config
RUN sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
RUN sed -i 's/\#AuthorizedKeysFile/AuthorizedKeysFile/g' /etc/ssh/sshd_config
# Set the root password for ssh
RUN echo 'root:k8sm' |chpasswd
# Ports
# SSH: 22, ZooKeeper Port: 2181, ZooKeeper Follow Port: 2888, ZooKeeper Leader Port: 3888, Mesos Master Web UI: 5050
EXPOSE 22 2181 2888 3888 5050
# Supervisor
CMD ["/usr/bin/supervisord"]