Last active
August 29, 2015 14:18
-
-
Save hausdorff/8bf5199a64b4c9ddf68b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Add mesosphere repository to hosts, so we can install it. Basically involves: | |
| # 1. Downloading the proj key from Ubuntu servers | |
| # 2. Splicing the correct URL for this specific Ubuntu version | |
| echo | |
| echo "-----ADD MESOSPHERE TO REPOT HOSTS-----" | |
| apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF | |
| DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]') | |
| CODENAME=$(lsb_release -cs) | |
| echo "deb http://repos.mesosphere.io/${DISTRO} ${CODENAME} main" | tee /etc/apt/sources.list.d/mesosphere.list | |
| # Install Mesosphere | |
| echo | |
| echo "-----INSTALLING MESOSPHERE-----" | |
| apt-get -y update | |
| apt-get --assume-yes install mesosphere | |
| # Set up ZK connection info | |
| # TODO: get a random number of arguments, put them into a single config string | |
| # and pipe them to the /etc/mesos/zk file! | |
| echo "zk://${2}:2181,${3}:2181,${4}:2181/mesos" | |
| echo "zk://${2}:2181,${3}:2181,${4}:2181/mesos" > /etc/mesos/zk | |
| # Master ZK configuration | |
| echo $1 > /etc/zookeeper/conf/myid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment