Public | Automated Build

Last pushed: 3 months ago
Short Description
Mesos Framework for launching Buoyant's Helium suite.
Full Description

Mesos Helium Framework

TODO: to support multiple instances of Helium
TODO: allow a different kafka category
TODO: allow a different cassandra keyspace

Mesos Framework for Helium

Quick Start

Assumes Dev Environment Setup:

go run main.go \
  -server-address=192.168.65.1 \
  -cpu=0.05 \
  -memory=32 \
  -url=http://192.168.65.90:5050/api/v1/scheduler \
  -role=slave_public \
  -public-role=slave_public \
  -docker-token=$DOCKER_AUTH \
  -version=2017-04-27-55600b9 \
  -log-level=debug

Marathon Deploy

docker build . -t buoyantio/mesos-helium-framework
docker push buoyantio/mesos-helium-framework

# necessary for $DOCKER_AUTH substitution
cat marathon/helium.json | sed "s/DOCKER_AUTH/$DOCKER_AUTH/g" | dcos marathon app add

Dev Environment Setup

The section details setting up a local DC/OS cluster for development.

Install DC/OS

From https://github.com/dcos/dcos-vagrant:

# from dcos-vagrant repo
export DCOS_VERSION=1.9.0
vagrant plugin install vagrant-hostmanager
git clone https://github.com/dcos/dcos-vagrant
cd dcos-vagrant
cp VagrantConfig-1m-1a-1p.yaml VagrantConfig.yaml
vagrant up

# open DC/OS
open http://m1.dcos/

# open ZK Exhibitor
open http://m1.dcos:8181/

# set up dcos cli
dcos config set core.dcos_url http://m1.dcos
dcos auth login

# SSH into DC/OS master
vagrant ssh m1

# tear down cluster (https://dcosjira.atlassian.net/browse/VAGRANT-7)
vagrant destroy -f

Install Kafka

From https://github.com/mesosphere/dcos-kafka-service/blob/master/docs/install-and-customize.md#minimal-installation

dcos package install kafka --options=config/kafka-minimal.json
# Wait for installation to complete...
dcos kafka connection

To uninstall Kafka

dcos package uninstall kafka

# from dcos-vagrant repo
vagrant ssh m1
docker run mesosphere/janitor /janitor.py -r kafka-role -p kafka-principal -z dcos-service-kafka

Install Cassandra

From https://github.com/mesosphere/dcos-cassandra-service/blob/master/docs/install-and-customize.md#minimal-installation

dcos package install cassandra --options=config/cassandra-minimal.json
# Wait for installation to complete...
dcos cassandra connection

Note: (./config/schema.cql) is modified from the helium repo in that the
references to custom indexes and org.apache.cassandra.index.sasi.SASIIndex
have been removed. This is due to helium typically running on Cassandra 3.7,
while the DC/OS Cassandra is 3.0.

Docker Hub Authentication

To enable access to Docker Hub, we capture our Docker auth credentials in an
environment variable, to be passed to the framework on startup.

docker login -u $DOCKER_USER -e $DOCKER_EMAIL -p $DOCKER_PASS
export DOCKER_AUTH=$(cat ~/.docker/config.json|jq --raw-output '.auths."https://index.docker.io/v1/".auth')

Production DC/OS Cluster

Most of the steps in preparing a production DC/OS cluster for Helium are the
same as the development instructions above. Differences are noted in this
section.

Install Kafka/Cassandra

dcos package install kafka
dcos package install cassandra
curl -H "Authorization: token=$(dcos config show core.dcos_acs_token)" $(dcos config show core.dcos_url)/marathon/v2/apps

Production Marathon Deploy

Replace the command line parameters in marathon/helium.json:

  • -url=http://master.mesos:5050/api/v1/scheduler
cat marathon/helium.json | sed "s/DOCKER_AUTH/$DOCKER_AUTH/g" | dcos marathon app add

Godep

To update dependencies:

go get -u github.com/foo
godep save

Setting up a customer with Docker Hub access

  1. Add a customer's Docker Hub username at:
    https://hub.docker.com/u/buoyantio/dashboard/teams/?team=helium
  2. Provide helium.json to the customer. Remember to
    remove the -cpu param, and replace the latest Docker image version with
    current release.

For reference Helium requires access to 3 private repos. Confirm the Helium team
has read access to the following:

Docker Pull Command
Owner
buoyantio

Comments (0)