Aurora Schduler(Master)
修改后的文件内容:
yitian@heron01:/etc/aurora$ cat /etc/default/aurora-scheduler
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Defaults for Aurora startup
###
# Environment variables control the behavior of the Mesos scheduler driver (libmesos).
GLOG_v=0
LIBPROCESS_PORT=8083
#LIBPROCESS_IP=127.0.0.1
LIBPROCESS_IP=192.168.201.136 <strong># 这里设置了LIBPROCESS_IP</strong>
###
###
# Flags that control the behavior of the JVM.
#JAVA_OPTS='-Djava.library.path=/usr/local/lib -Dlog4j.configuration="file:///etc/zookeeper/conf/log4j.properties"'
JAVA_OPTS='-Djava.library.path=/usr/local/lib'
###
AURORA_HOME="/var/lib/aurora"
# Name of the cluster. Please change this.
CLUSTER_NAME="example"
# Listening port for the scheduler
HTTP_PORT=8081
# Replicated log quorum size. Set to (floor(number_of_schedulers / 2) + 1)
QUORUM_SIZE=1
# List of zookeeper endpoints
# ZK_ENDPOINTS="127.0.0.1:2181"
ZK_ENDPOINTS="heron01:2181" <strong># 这里重新设置了ZK_ENDPOINTS</strong>
# Zookeeper path or URL to mesos master
MESOS_MASTER="zk://${ZK_ENDPOINTS}/mesos"
# Zookeeper ServerSet path to register at
ZK_SERVERSET_PATH="/aurora/scheduler"
# Log path in zookeeper
ZK_LOGDB_PATH="/aurora/replicated-log"
# Where to store the replicated log on disk
LOGDB_FILE_PATH="${AURORA_HOME}/scheduler/db"
# Where to store backups on disk
BACKUP_DIR="${AURORA_HOME}/scheduler/backups"
# Path (on the slave nodes) or URL to thermos executor or wrapper script
THERMOS_EXECUTOR_PATH="/usr/share/aurora/bin/thermos_executor.pex"
# A comma seperated list of additional resources to copy into the sandbox.
# Note: if thermos_executor_path is not the thermos_executor.pex file itself,
# this must include it.
THERMOS_EXECUTOR_RESOURCES=""
# Extra arguments to be passed to the thermos executor
# THERMOS_EXECUTOR_FLAGS="--announcer-ensemble 127.0.0.1:2181"
THERMOS_EXECUTOR_FLAGS="--announcer-ensemble 192.168.201.136:2181" <strong># 这里将IP换成了Master主机的IP</strong>
# Container types that are allowed to be used by jobs.
ALLOWED_CONTAINER_TYPES="MESOS,DOCKER"
# Any args you want to add to the aurora-scheduler invocation:
EXTRA_SCHEDULER_ARGS=""
Aurora master中clusters.json文件(Master)
yitian@heron01:/etc/aurora$ cat clusters.json
[
{
"auth_mechanism": "UNAUTHENTICATED",
"name": "aurora",
"scheduler_zk_path": "/aurora/scheduler",
"slave_root": "/home/yitian/mesosdata/run",
"slave_run_directory": "latest",
"zk": "192.168.201.136"
}
]
Aurora agents中/etc/default/thermos(Slave)
修改后文件内容:
yitian@heron02:~$ cat /etc/default/thermos
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Defaults for thermos observer
# Listen port for thermos_observer
OBSERVER_PORT=1338
# MESOS_ROOT=/var/lib/mesos
MESOS_ROOT=/home/yitian/mesosdata/run <strong># 修改了MESOS_ROOT,与Mesos集群中的设置保持一致</strong>
EXTRA_THERMOS_OBSERVER_ARGS=""
Aurora agents中/etc/init/thremos文件(Slave)
修改后文件内容:
yitian@heron02:~$ cat /etc/init/thermos.conf
# vi:ft=upstart
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
description "Aurora Thermos observer"
start on stopped rc RUNLEVEL=[2345]
respawn
post-stop exec sleep 5
pre-start exec mkdir -p /var/run/thermos
script
[ -r /etc/default/thermos ] && . /etc/default/thermos
exec start-stop-daemon --start --exec /usr/sbin/thermos_observer -- \
--port=${OBSERVER_PORT:-1338} \
--mesos-root=${MESOS_ROOT<strong>:-/home/yitian/mesosdata/run</strong>} \
--log_to_disk=NONE \
--log_to_stderr=google:INFO
end script