sudo mkdir /etc/mesos-dns
sudo vi /etc/mesos-dns/config.json
# replace zk:/10.16.67.152 with IP of master
{
"zk": "zk://10.16.67.153:2181/mesos",
"refreshSeconds": 60,
"ttl": 60,
"domain": "mesos",
"port": 53,
"resolvers": ["169.254.169.254","10.0.0.1"],
"timeout": 5,
"email": "root.mesos-dns.mesos"
}
sudo docker pull mesosphere/mesos-dns
sudo docker run --net=host -d -v "/etc/mesos-dns/config.json:/config.json" mesosphere/mesos-dns /mesos-dns -config=/config.json
OR
docker run -d --name mesos-dns -p 53:53/udp -v /etc/mesos-dns/config.json:/config.json mesosphere/mesos-dns /mesos-dns -v 2 -config=config.json
sudo sed -i "1s/^/nameserver $(hostname -i)\n/" /etc/resolv.conf
sudo sed -i "1s/^/prepend domain-name-servers $(hostname -i);\n/" /etc/dhcp/dhclient.conf
###testing
sudo docker run --net=host tutum/dnsutils dig google.com
sudo docker run --net=host tutum/dnsutils dig master.mesos
clone the project
git clone https://github.com/mesosphere/hdfs
There are a couple of ways of making the configuration changes we need.
copy all of the XML files from hdfs/example-conf/mesosphere-dcos/ to hdfs/conf
modify conf/mesos-site.xml
- set
mesos.hdfs.native-hadoop-binaries
to false - set
mesos.native.library
to/usr/local/lib/libmesos.so
example:
<property>
<name>mesos.hdfs.native-hadoop-binaries</name>
<value>false</value>
<description>True if you have pre installed hadoop binairies</description>
</property>
<property>
<name>mesos.native.library</name>
<value>/usr/local/lib/libmesos.so</value>
</property>
from hdfs directory, build
./bin/build-hdfs
scp the tarball to the master
scp hdfs-mesos-0.1.1.tgz root@$MESOS_MASTER:~
ssh to the master
ssh root@$MESOS_MASTER
untar hdfs
tar zxvf hdfs-mesos-*.tgz
start HDFS
cd hdfs-mesos-0.1.1
./bin/hdfs-mesos
###Purge pre installed hadoop binaries on the slaves and the master if necessary sudo aptitude purge hadoop hadoop-yarn hadoop-hdfs hadoop-hdfs-namenode hadoop-hdfs-datanode hadoop-0.20-mapreduce hadoop-0.20-mapreduce-jobtracker hadoop-0.20-mapreduce-tasktracker hadoop-mapreduce
###Delete the hadoop directories on the slaves sudo rm -rf /etc/hadoop /mnt/hdfs /var/lib/hadoop* var/log/hadoop
###Check at the http://$(actinamenode_ip):50070 to see if it's running
try hadoop fs -ls hdfs://hdfs// hadoop fs -put file.txt hdfs://hdfs
Load in some data. hadoop
Run spark jobs.
https://github.com/ehiggs/spark-terasort/
###Testing for Failover
###Run DFSIO First to test great I/O : (Needs Map reduce installed)
###Run HiBench : https://github.com/intel-hadoop/HiBench
###Push it further
####Constraint with hdfs ...
####Resources Reservation for the hdfs framework
####Constraint with Spark ...
####Launch both (Spark + HDFS) with in the same rack. Use marathon here. Makes more sense.
####Launch TPC-H via SparkSQL + TPCDS Impala https://github.com/cloudera/impala-tpcds-kit