Server Name | Internal Ip | Operation System | Roles |
bastion.shanker | 192.168.0.33 | Centos 6.7 | Mesos Master1,ZooKeeper, slave, Jenkins,Haproxy |
dbmaster.shanker | 192.168.0.28 | Centos 6.7 | Mesos Master2,ZooKeeper |
dbslave2.shanker | 192.168.0.31 | Centos 6.7 | Mesos Master3,ZooKeeper |
dbslave3.shanker | 192.168.0.32 | Centos 6.7 | Mesos Slave |
dbslave.shanker | 192.168.0.29 | Ubuntu 14.04 | Mesos Slave |
dbarbiter.shanker | 192.168.0.30 | Ubuntu 14.04 | Mesos Slave,Mysql Slave |
1
2
3
4
|
# Add the repository
sudo
rpm -Uvh http:
//archive
.cloudera.com
/cdh4/one-click-install/redhat/6/x86_64/cloudera-cdh-4-0
.x86_64.rpm
yum -y
install
mesos marathon zookeeper
|
1
2
|
ansible mesos -m shell -a
"wget http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.tar.gz "
ansible mesos -m shell -a "tar zxf jdk-8u73-linux-x64.tar.gz -C /usr/java/
|
1
2
3
|
export
JAVA_HOME=
/usr/java/jdk1
.8.0_73
export
PATH=$JAVA_HOME
/bin
:$PATH
export
CLASSPATH=.:$JAVA_HOME
/lib/dt
.jar:$JAVA_HOME
/lib/tool
.jar
|
1
|
sudo
zookeeper --server-initialize --myid=<YOUR ID HERE>
|
1
2
3
|
server.1=192.168.0.33:2888:3888
server.2=192.168.0.28:2888:3888
server.3=192.168.0.31:2888:3888
|
1
2
3
4
5
6
7
8
9
10
|
# egrepv /etc/zookeeper/conf/zoo.cfg
maxClientCnxns=50
tickTime=2000
initLimit=10
syncLimit=5
dataDir=
/var/lib/zookeeper
clientPort=2181
server.1=192.168.0.33:2888:3888
server.2=192.168.0.28:2888:3888
server.3=192.168.0.31:2888:3888
|
1
2
|
# cat /etc/mesos/zk
zk:
//192
.168.0.33:2181,192.168.0.28:2181,192.168.0.31:2181
/mesos
|
1
2
|
# cat /etc/mesos-master/quorum
2
|
1
2
3
4
5
6
7
|
$ ansible all -m shell -a
'cat /etc/mesos-master/hostname'
-s
bastion | success | rc=0 >>
192.168.0.33
dbmaster | success | rc=0 >>
192.168.0.28
dbslave2 | success | rc=0 >>
192.168.0.31
|
1
|
cp
/etc/mesos-master/hostname
/etc/marathon/conf/
|
1
2
|
sudo
stop mesos-slave
sudo
sh -c
"echo manual > /etc/init/mesos-slave.override"
|
1
|
ansible master -m shell -a
"start mesos-msater && start marathon"
|
1
2
3
4
5
6
7
8
9
10
|
# Setup
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E56151BF
# DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
# CODENAME=$(lsb_release -cs)
#
# # Add the repository
# echo "deb http://repos.mesosphere.com/${DISTRO} ${CODENAME} main" | \
# sudo tee /etc/apt/sources.list.d/mesosphere.list
# sudo apt-get -y update
# sudo apt-get -y install mesos
|
1
2
3
|
# # Add the repository
# sudo rpm -Uvh
# sudo yum -y install mesos
|
1
2
|
sudo
service zookeeper stop
sudo
sh -c
"echo manual > /etc/init/zookeeper.override"
|
1
2
|
# cat zk
zk:
//192
.168.0.33:2181,192.168.0.28:2181,192.168.0.31:2181
/mesos
|
1
2
3
4
5
6
|
# ibmcloud at dbarbiter.shanker in /etc/mesos-slave [15:43:23]
$
cat
containerizers
docker,mesos
# ibmcloud at dbarbiter.shanker in /etc/mesos-slave [15:43:27]
$
cat
executor_registration_timeout
5mins
|
1
2
|
sudo
service mesos-master stop
sudo
sh -c
"echo manual > /etc/init/mesos-master.override"
|
1
|
sudo
service mesos-slave restart
|
1
|
sudo
start mesos-slave
|