Last active
November 16, 2015 22:52
-
-
Save golonzovsky/56cbcfaafc4f4603f4f6 to your computer and use it in GitHub Desktop.
vagrant-mesos
This file contains hidden or 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
if $programname == 'marathon' then { | |
action(type="omfile" file="/var/log/mesos/marathon.log") | |
} | |
if $programname == 'chronos' then { | |
action(type="omfile" file="/var/log/mesos/chronos.log") | |
} | |
if $programname == 'mesos-master' then { | |
action(type="omfile" file="/var/log/mesos/mesos-master.log") | |
} | |
if $programname == 'mesos-slave' then { | |
action(type="omfile" file="/var/log/mesos/mesos-slave.log") | |
} |
This file contains hidden or 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
echo "===================================== AGENT PROVISION" | |
echo "point this node at the mesos master" | |
sed -i -e 's/localhost/192.168.33.10/g' /etc/mesos/zk | |
echo 'docker,mesos' | sudo tee /etc/mesos-slave/containerizers | |
echo "starting agent" | |
service mesos-slave start | |
chkconfig mesos-slave on | |
chkconfig mesos-master off |
This file contains hidden or 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
echo "===================================== MASTER PROVISION" | |
echo "install/start zookeeper" | |
rpm -Uvh http://archive.cloudera.com/cdh4/one-click-install/redhat/6/x86_64/cloudera-cdh-4-0.x86_64.rpm | |
yum -y install java zookeeper zookeeper-server | |
sudo -u zookeeper zookeeper-server-initialize --myid=1 | |
service zookeeper-server start | |
chkconfig zookeeper-server on | |
echo "start mesos" | |
service mesos-master start | |
chkconfig mesos-master on | |
echo "install/start marathon" | |
yum -y install marathon | |
service marathon start | |
chkconfig marathon on | |
echo "install/start chronos" | |
yum -y install chronos | |
service chronos start | |
chkconfig chronos on |
This file contains hidden or 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
echo "===================================== BASE PROVISION" | |
echo "copy hosts config" | |
cp /vagrant/hosts.j2 /etc/hosts | |
echo "configure logging" | |
cp /vagrant/rsyslog-mesos.conf /etc/rsyslog.d/mesos.conf | |
service rsyslog restart | |
echo "install mesos" | |
rpm -Uvh http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm | |
yum -y install mesos | |
echo "install docker" | |
curl -sSL https://get.docker.com/ | sh | |
echo "starting docker" | |
service docker start | |
chkconfig docker on |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "bento/centos-7.1" | |
config.vm.provision "shell", path: "installNode.sh" | |
config.vm.define "node1" do |node1| | |
node1.vm.network "private_network", ip: "192.168.33.10" | |
node1.vm.hostname = "node1" | |
config.vm.provision "shell", path: "installMaster.sh" | |
#node1.vm.box = "mesos-master" | |
end | |
config.vm.define "node2" do |node2| | |
node2.vm.network "private_network", ip: "192.168.33.11" | |
node2.vm.hostname = "node2" | |
config.vm.provision "shell", path: "installAgent.sh" | |
end | |
config.vm.define "node3" do |node3| | |
node3.vm.network "private_network", ip: "192.168.33.12" | |
node3.vm.hostname = "node3" | |
config.vm.provision "shell", path: "installAgent.sh" | |
end | |
config.vm.define "node4" do |node4| | |
node4.vm.network "private_network", ip: "192.168.33.13" | |
node4.vm.hostname = "node4" | |
config.vm.provision "shell", path: "installAgent.sh" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment