在Master服務器上配置Mesos
下面,我們將開始在三臺master服務器上配置Mesos。在每臺master服務器上完成下列步驟。
編輯Quorum以體現你的集群容量
首先,我們有調整quorum必要性去做決策。這將決定集群中工作態下必要主機的數量。
The quorum should be set so that over 50 percent of the master members must be present to make decisions. However, we also want to build in some fault tolerance so that if all of our masters are not present, the cluster can still function.
We have three masters, so the only setting that satisfies both of these requirements is a quorum of two. Since the initial configuration assumes a single server setup, the quorum is currently set to one.
Open the quorum configuration file:
sudo nano /etc/mesos-master/quorum
Change the value to "2":
2
Save and close the file. Repeat this on each of your master servers.
Configure the Hostname and IP Address
Next, we'll specify the hostname and IP address for each of our master servers. We will be using the IP address for the hostname so that our instances will not have trouble resolving correctly.
For our master servers, the IP address needs to be placed in these files:
/etc/mesos-master/ip
/etc/mesos-master/hostname
First, add each master node's individual IP address in the/etc/mesos-master/ipfile. Remember to change this for each server to match the appropriate value:
echo 192.168.2.1| sudo tee /etc/mesos-master/ip
Now, we can copy this value to the hostname file:
sudo cp /etc/mesos-master/ip /etc/mesos-master/hostname
Do this on each of your master servers.