== Overview ==
For this setup I will use 3 Mesos masters and 3 slaves. On each Mesos master I will run a Zookeeper, meaning that we will have 3 Zookeepers as well. The Mesos cluster will be configured with a quorum of 2. For networking Mesos use Mesos-DNS. I tried to run Mesos-DNS as container, but got into some resolving issues, so in my next How-To I will explain how to configure Mesos-DNS and run it through Marathon. Photon hosts will be used for masters and slaves.
''' Masters: '''
{| class="wikitable"
! style="text-align: center; font-weight: bold;" | Hostname
! style="font-weight: bold;" | IP Address
|-
| pt-mesos-master1.example.com
| 192.168.0.1
|-
| pt-mesos-master2.example.com
| 192.168.0.2
|-
| pt-mesos-master3.example.com
| 192.168.0.3
|}
''' Agents: '''
{| class="wikitable"
! style="text-align: center; font-weight: bold; font-size: 0.100em;" | Hostname
! style="font-weight: bold;" | IP Address
|-
| pt-mesos-node1.example.com
| 192.168.0.4
|-
| pt-mesos-node2.example.com
| 192.168.0.5
|-
| pt-mesos-node3.example.com
| 192.168.0.6
|}
== Masters Installation and Configuration ==
First of all we will install Zookeeper. Since currently there is a bug in Photon related to the Zookeeper installation I will use the tarball. Do the following for each master:
Example of Zookeeper systemd configuration file:
Add server id to the configuration file, so zookeeper will understand the id of your master server. This should be done for each master with its own id.
Now lets install the Mesos masters. Do the following for each master:
Make sure you replace '''''–ip''''' setting on each master. So far we have 3 masters with a Zookeeper and Mesos packages installed. Let's start zookeeper and mesos-master services on each master:
== Slaves Installation and Configuration ==
The steps for configuring a Mesos slave are very simple and not very different from master installation. The difference is that we won't install zookeeper on each slave. We will also start the Mesos slaves in slave mode and will tell the daemon to join the Mesos masters. Do the following for each slave:
Please make sure to replace the NIC name under '''''–ip''''' setting. Start the mesos-slave service on each node.
Now you should have ready Mesos cluster with 3 masters, 3 Zookeepers and 3 slaves.
[[https://www.devops-experts.com/wp-content/uploads/2015/12/Screen-Shot-2015-12-24-at-2.22.27-PM.png]]
If you want to use private docker registry, you will need to edit docker systemd file. In my example I am using cse-artifactory.eng.vmware.com registry:
Next - [[Install and Configure Marathon for Mesos Cluster on PhotonOS]]