How To Configure a Production-Ready Mesosphere Cluster on Ubuntu 14.04(2)

字数 337阅读 23

在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.

推荐阅读更多精彩内容