5
# Install is guaranteed to run once per rootfs
7
juju-log "Installing mesos-master on $JUJU_UNIT_NAME"
8
status-set maintenance "Fetching and installing Mesos"
10
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF
11
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
12
CODENAME=$(lsb_release -cs)
15
echo "deb http://repos.mesosphere.com/${DISTRO} ${CODENAME} main" | sudo tee /etc/apt/sources.list.d/mesosphere.list
16
sudo apt-get -y update
17
sudo apt-get -y install mesos marathon
19
sudo mkdir /etc/zookeeper/conf/
20
sudo mkdir /etc/mesos/
21
sudo mkdir /etc/mesos-master/
24
[[ $JUJU_UNIT_NAME =~ $patt ]] && serverN=10#${BASH_REMATCH[1]}
25
sudo sh -c "echo $serverN > /etc/zookeeper/conf/myid"
27
sudo sh -c "echo $JUJU_UNIT_NAME > /etc/mesos-master/hostname"
28
sudo sh -c "echo `unit-get private-address` > /etc/mesos-master/ip"
b'\\ No newline at end of file'