Created
December 2, 2015 00:00
-
-
Save jbenninghoff/68fcdf74967db712a852 to your computer and use it in GitHub Desktop.
Mesos install steps
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 | |
echo 'Script not ready for execution. Copy and paste line by line into a shell instead' | |
echo 'Assumes clush installed and /etc/hosts propagated to all nodes' | |
exit 1 | |
#Configure edge node as MapR client | |
vi /etc/yum.repos.d/maprtech.repo # We should have rpm to install+enable like EPEL rpm | |
yum clean all | |
#Insure iptables (firewall) is off and disabled everywhere | |
service iptables stop; chkconfig iptables off | |
clush -ab 'service iptables stop; chkconfig iptables off' | |
#/opt/mapr/server/configure.sh -N mesos -Z m2,m3,m4 -C m2,m3,m4 -u mapr -g mapr -c | |
./mapr5x-mfs-install.sh #Install MapR MFS | |
maprcli node cldbmaster && hadoop fs -ls / #Verify MFS | |
#Install edge node with Mesos Master, DNS and Myriad | |
mkdir /root/mesos; cd /root/mesos | |
#scp mapr-mesos-myriad rpms to /root/mesos | |
yum install http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm | |
yum install http://repos.mesosphere.io/el/6/noarch/RPMS/mesosphere-el-repo-6-2.noarch.rpm | |
yum clean all | |
yum localinstall mapr-mesos*.rpm mapr-myriad*.rpm | |
/opt/mapr/server/configure.sh -R | |
#Configure the edge node for Mesos and Myriad | |
maprcli node listzookeepers | sed -n '2{s,^,zk://,;s, *$,/mesos,;p}' > /etc/mesos/zk | |
##sed -i '/^zk:/s/2181/5181/;s/localhost/m2/' /etc/mesos/zk | |
head /etc/mesos/zk | |
vim /mapr/hadoop/hadoop-2.7.0/etc/hadoop/container-executor.cfg | |
#allowed.system.users=mapr,root | |
ls /opt/mapr/myriad/myriad-0.1/lib/*.jar | |
cp /opt/mapr/myriad/myriad-0.1/lib/*.jar /opt/mapr/hadoop/hadoop-2.7.0/share/hadoop/yarn/lib/ | |
vi /opt/mapr/hadoop/hadoop-2.7.0/etc/hadoop/myriad-config-default.yml | |
#mesosMaster: zk://10.0.138.175:5181/mesos | |
#frameworkName: MyriadA | |
#zkServers: 10.0.138.175:5181 | |
#YARN_HOME: /opt/mapr/hadoop/hadoop-2.7.0 | |
#frameworkUser: mapr | |
#haEnabled: true | |
#path: file:///opt/mapr/hadoop/hadoop-2.7.0/share/hadoop/yarn/lib/myriad-executor-runnable-0.1.0.jar | |
cp /opt/mapr/hadoop/hadoop-2.7.0/etc/hadoop/myriad-config-default.yml . | |
sum myriad-config-default.yml | |
vi /opt/mapr/hadoop/hadoop-2.7.0/etc/hadoop/yarn-site.xml | |
# See block comment at end of script for example contents | |
cp /opt/mapr/hadoop/hadoop-2.7.0/etc/hadoop/yarn-site.xml . | |
echo 3 > /etc/mesos-slave/resources/cpus | |
echo 8192 > /etc/mesos-slave/resources/mem #unit appears to be MB | |
echo 1 > /etc/mesos-slave/resources/dfsio_spindles | |
#Install all the cluster nodes as Mesos slaves and Myriad | |
clush -abc /root/mesos | |
clush -ab 'yum -y install http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm' | |
clush -ab 'yum -y install http://repos.mesosphere.io/el/6/noarch/RPMS/mesosphere-el-repo-6-2.noarch.rpm' | |
clush -ab 'cd /root/mesos; yum -y localinstall mapr-mesos-slave*.rpm mapr-mesos-0*.rpm mapr-myriad-executor*.rpm mapr-myriad-scheduler*.rpm mapr-myriad-0*.rpm' | |
clush -ab /opt/mapr/server/configure.sh -R | |
#Configure the cluster nodes | |
clush -abc /etc/mesos/zk | |
clush -ab head /etc/mesos/zk | |
clush -a 'cp /opt/mapr/myriad/myriad-0.1/lib/*.jar /opt/mapr/hadoop/hadoop-2.7.0/share/hadoop/yarn/lib/' | |
clush -abc /opt/mapr/hadoop/hadoop-2.7.0/etc/hadoop/myriad-config-default.yml | |
clush -abc /opt/mapr/hadoop/hadoop-2.7.0/etc/hadoop/yarn-site.xml | |
clush -abc /etc/mesos-slave/resources/cpus | |
clush -abc /etc/mesos-slave/resources/dfsio_spindles | |
clush -abc /etc/mesos-slave/resources/mem | |
#Start the Mesos Master, DNS and Myriad master | |
/opt/mapr/mesos-services/mesos-services-0.1/bin/mesos-master.sh start | |
/opt/mapr/mesos-services/mesos-services-0.1/bin/mesos-master.sh status | |
#/opt/mapr/mesos-services/mesos-services-0.1/bin/mesos-slave.sh start | |
/opt/mapr/mesos-services/mesos-services-0.1/bin/mesos-marathon.sh start | |
tail /var/log/messages | |
#ldd /usr/sbin/mesos-master | |
#Start Mesos DNS (why is this done separately in the doc? | |
#cat /etc/hosts | |
vi /opt/mapr/mesos-services/mesos-services-0.1/conf/config-dns.json | |
#contents for config-dns.json, modify with site specific IPs | |
: << '--BLOCK-COMMENT--' | |
{ | |
"zk": "zk://10.0.138.175:5181,10.0.138.173:5181,10.0.138.174:5181/mesos", | |
"refreshSeconds": 5, | |
"ttl": 60, | |
"domain": "mesos", | |
"port": 53, | |
"listener": "10.0.17.216", | |
"resolvers": ["10.0.0.2"], | |
"timeout": 5 | |
} | |
--BLOCK-COMMENT-- | |
/opt/mapr/mesos-services/mesos-services-0.1/bin/mesos-dns.sh start | |
#10.0.17.216 is Mesos DNS IP (replace as needed) | |
sed -i -e '/^nameserver/s/^/nameserver 10.0.17.216\n/1' /etc/resolv.conf | |
clush -ab "sed -i -e '/^nameserver/s/^/nameserver 10.0.17.216\n/1' /etc/resolv.conf" | |
host marathon.mesos #verify Mesos DNS is working | |
clush -ab host marathon.mesos #verify Mesos DNS is working cluster wide | |
# Lastly start the Mesos slaves | |
clush -ab /opt/mapr/mesos-services/mesos-services-0.1/bin/mesos-slave.sh start | |
clush -ab /opt/mapr/mesos-services/mesos-services-0.1/bin/mesos-slave.sh status | |
# If status of all services started is good and nslookup works everywhere | |
# the webui's should be accessed to continue | |
echo http://m1:5050/ Mesos Master | |
echo http://m1:8080/ Marathon | |
echo http://some-node:8192/ Myriad after started implicitly by starting RM app via Marathon | |
: << '--BLOCK-COMMENT--' | |
<?xml version="1.0"?> | |
<!-- | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | |
limitations under the License. See accompanying LICENSE file. | |
--> | |
<configuration> | |
<!-- Resource Manager MapR HA Configs --> | |
<!-- | |
<property> | |
<name>yarn.resourcemanager.ha.custom-ha-enabled</name> | |
<value>true</value> | |
<description>MapR Zookeeper based RM Reconnect Enabled. If this is true, set the failover proxy to be the class MapRZKBasedRMFailoverProxyProvider</description> | |
</property> | |
<property> | |
<name>yarn.client.failover-proxy-provider</name> | |
<value>org.apache.hadoop.yarn.client.MapRZKBasedRMFailoverProxyProvider</value> | |
<description>Zookeeper based reconnect proxy provider. Should be set if and only if mapr-ha-enabled property is true.</description> | |
</property> | |
<property> | |
<name>yarn.resourcemanager.recovery.enabled</name> | |
<value>true</value> | |
<description>RM Recovery Enabled</description> | |
</property> | |
<property> | |
<name>yarn.resourcemanager.ha.custom-ha-rmaddressfinder</name> | |
<value>org.apache.hadoop.yarn.client.MapRZKBasedRMAddressFinder</value> | |
</property> | |
--> | |
<!-- :::CAUTION::: DO NOT EDIT ANYTHING ON OR ABOVE THIS LINE --> | |
<property> | |
<name>yarn.resourcemanager.hostname</name> | |
<value>rm.marathon.mesos</value> | |
<description>host is the hostname of the resourcemanager</description> | |
</property> | |
<property> | |
<name>yarn.resourcemanager.recovery.enabled</name> | |
<value>true</value> | |
<description>RM Recovery Enabled</description> | |
</property> | |
<property> | |
<name>yarn.resourcemanager.scheduler.class</name> <value>org.apache.myriad.scheduler.yarn.MyriadFairScheduler</value> | |
</property> | |
<property> | |
<name>yarn.nodemanager.resource.cpu-vcores</name> | |
<value>${nodemanager.resource.cpu-vcores}</value> | |
</property> | |
<property> | |
<name>yarn.nodemanager.resource.memory-mb</name> | |
<value>${nodemanager.resource.memory-mb}</value> | |
</property> | |
<property> <name>yarn.nodemanager.address</name> <value>${myriad.yarn.nodemanager.address}</value> | |
</property> <property> | |
<name>yarn.nodemanager.webapp.address</name> | |
<value>${myriad.yarn.nodemanager.webapp.address}</value> | |
</property> | |
<property> | |
<name>yarn.nodemanager.webapp.https.address</name> | |
<value>${myriad.yarn.nodemanager.webapp.address}</value> | |
</property> | |
<property> | |
<name>yarn.nodemanager.localizer.address</name> | |
<value>${myriad.yarn.nodemanager.localizer.address}</value> | |
</property> | |
<property> | |
<name>mapreduce.shuffle.port</name> | |
<value>${myriad.mapreduce.shuffle.port}</value> | |
</property> | |
<property> | |
<name>yarn.nodemanager.aux-services</name> | |
<value>myriad_executor,mapreduce_shuffle,mapr_direct_shuffle</value> | |
</property> | |
<property> | |
<name>yarn.nodemanager.aux-services.myriad_executor.class</name> | |
<value>org.apache.myriad.executor.MyriadExecutorAuxService</value> | |
</property> | |
<property> | |
<name>yarn.resourcemanager.store.class</name> <value>org.apache.hadoop.yarn.server.resourcemanager.recovery.MyriadFileSystemRMStateStore</value> | |
</property> | |
<property> | |
<name>yarn.scheduler.minimum-allocation-mb</name> | |
<value>0</value> | |
</property> | |
<property> | |
<name>yarn.scheduler.minimum-allocation-vcores</name> | |
<value>0</value> | |
</property> | |
<property> | |
<name>yarn.scheduler.minimum-allocation-disks</name> | |
<value>0</value> | |
</property> | |
</configuration> | |
--BLOCK-COMMENT-- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment