CentOS 7, Systemd, Mesos, etc.

Quick instructions on how install CentOS 7, Mesos and Marathon from scratch.

Install CentOS 7

/       200GB
/home   200GB
swap    32GB

Configure network bond

if you are concerned that a single switch failure might knock down a dozen of your servers

  1. Login as root, launch network management tool: nmtui

    2. Some commands to see configured network

route -n

Other CentOS7 configurations


wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
rpm -ivh epel-release-7-2.noarch.rpm
yum update

Install package groups

Install Development Tools group

Install other packages

Allow 8192 open file limit for all

Increase system wide hard limit, and the number of open files in inotify watches

Increase soft limit

make effect sysctl -p

new CentOS 7 Firewall commands

SYSTEMD Explained (init services)

Migrate init services to Systemd

For example, your PID is 12234, you want to call it foobar
migrate_to_systemd.py 12234 foobar
manually verify and edit these 2 text files, as you see fit
there are plenty comments in these files
systemctl enable foobar
systemctl start foobar

“systemctl” command

systemctl set-default multi-user.target (default init level 3)
systemctl set-default graphical.target (level 5)
systemctl get-default
LimitNOFILE=4096 MemoryLimit=18446744073709551615 MemoryAccounting=no
systemctl enable ntpd.service
systemctl start ntpd.service

SYSTEMD service example

set up foobar.service to be started after ntpd.service and squid.service

systemctl enable foobar.service
systemctl start foobar.service

Install Mesos

Download Mesos (check for newer version)

wget http://www.apache.org/dist/mesos/0.20.1/mesos-0.20.1.tar.gz
tar zxf mesos-0.20.1.tar.gz -C /usr/local

Build mesos

cd /usr/local/mesos-0.20.1
mkdir build
cd build
make check
This will build and run test programs, [failure in CpuIsolator] - check #ifdef SYSTEMD and invoke cgroups differently. [fixed in 0.21.0]
make install

Deployed mesos on /usr/local/bin/, /usr/local/lib/, /usr/local/include/mesos/, /usr/local/libexec/mesos/, etc.

Install and run zookeeper

wget http://mirror.cogentco.com/pub/apache/zookeeper/stable/zookeeper-3.4.6.tar.gz
tar xzvf zookeeper-3.4.6.tar.gz -C /usr/local/
cd /usr/local/zookeeper-3.4.6/conf

Start Mesos master and slave

Go to

run test framework

Other important directory, files

Install and run Marathon

get the software

tar xvfz marathon-0.7.0.tgz -C /usr/local/

Start Marathon


Send a JSON configuration to Marathon

Check running statuses