lattice

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2015 License: Apache-2.0

README

Lattice: Run Containerized Workloads

Website: http://lattice.cf
Mailing List: Google Groups

Lattice is an open source project for running containerized workloads on a cluster. Lattice bundles up http load-balancing, a cluster scheduler, log aggregation/streaming and health management into an easy-to-deploy and easy-to-use package.

Lattice is based on a number of open source Cloud Foundry components:

  • Diego schedules and monitors containerized workloads
  • Doppler aggregates and streams application logs
  • Gorouter provides http load-balancing

Deploy Lattice

A local deployment of Lattice can be launched with Vagrant.

A scalable cluster deployment of Lattice can be launched with Terraform. We currently support AWS, DigitalOcean, and Google Cloud

Use Lattice

The Lattice CLI ltc provides a command line interface for launching docker-based applications.

More complex workloads can be constructed and submitted directly to Lattice's Receptor API which is fully documented here.

Local Deployment

Launching with Vagrant

Make sure you have Vagrant installed, then:

git clone git@github.com:cloudfoundry-incubator/lattice.git
cd lattice
git checkout <VERSION>
vagrant up

This spins up a virtual environment that is accessible at 192.168.11.11. Here, VERSION refers to the tagged version you wish to deploy. These tagged versions are known to be stable.

Use the Lattice CLI to target Lattice:

ltc target 192.168.11.11.xip.io

Using Different Providers

You can do this with either VMware Fusion or VirtualBox:

Virtualbox:

vagrant up --provider virtualbox

VMware Fusion:

vagrant up --provider vmware_fusion
Networking Conflicts

If you are trying to run both the VirtualBox and VMWare providers on the same machine, you'll need to run them on different private networks (subnets) that do not conflict.

Set the System IP to an address that does not conflict with the host networking configuration by passing the LATTICE_SYSTEM_IP environment variable to the vagrant up command:

LATTICE_SYSTEM_IP=192.168.80.100 vagrant up
ltc target 192.168.80.100.xip.io

Updating

Currently, Lattice does not support updating via provision. So to update, you have to destroy the box and bring it back up:

 vagrant destroy --force
 git pull
 vagrant up

Troubleshooting

  • xip.io is sometimes flaky, resulting in no such host errors.
  • The alternative that we have found is to use dnsmasq configured to resolve all xip.io addresses to 192.168.11.11.
  • This also requires creating a /etc/resolvers/io file that points to 127.0.0.1. See further instructions [here] (http://passingcuriosity.com/2013/dnsmasq-dev-osx/).

Running Vagrant with a custom Lattice tar

By default, vagrant up will fetch the latest Lattice binary tarball. To use a particular tarball:

VAGRANT_LATTICE_TAR_PATH=/path/to/lattice.tgz vagrant up

Clustered Deployment

This repository contains several Terraform templates to help you deploy on your choice of IaaS. To deploy Lattice in this way you will need:

  • Terraform >= 0.3.6 installed on your machine
  • Credentials for your choice of IaaS

Deploying

First, pick a Lattice version to deploy then download the appropriate lattice.tf.example file for that version from GitHub. These can be obtained from the releases page or the individual pages for each supported platform outlined below.

Second, update the downloaded lattice.tf.example file by filling in the variables. Instructions for each supported platform are here:

Finally, rename lattice.tf.example to lattice.tf and:

terraform get -update
terraform apply

This will deploy the cluster.

Upon success, terraform will print the Lattice target:

Outputs:

  lattice_target = x.x.x.x.xip.io
  lattice_username = xxxxxxxx
  lattice_password = xxxxxxxx

which you can use with the Lattice CLI to ltc target x.x.x.x.xip.io.

Terraform will generate a lattice.tfstate file. This file describes the cluster that was built - keep it around in order to modify/tear down the cluster.

Destroying

To destroy the cluster:

terraform destroy

Contributing

In the spirit of free software, everyone is encouraged to help improve this project.

Here are some ways you can contribute:

  • by using alpha, beta, and prerelease versions
  • by reporting bugs
  • by suggesting new features
  • by writing or editing documentation
  • by writing specifications
  • by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
  • by refactoring code
  • by closing issues
  • by reviewing patches

Also see the Development Readme

Development Workflow

Development work should be done on the develop branch. As a general rule, only CI should commit to master.

Submitting an Issue

We use the GitHub issue tracker to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn't already been submitted. You can indicate support for an existing issue by voting it up. When submitting a bug report, please include a Gist that includes a stack trace and any details that may be necessary to reproduce the bug including the Lattice version.

Submitting a Pull Request

  1. Propose a change by opening an issue.
  2. Fork the project.
  3. Create a topic branch.
  4. Implement your feature or bug fix.
  5. Commit and push your changes.
  6. Submit a pull request.

See LICENSE for details. Copyright (c) 2015 Pivotal Software, Inc.

Directories

Path Synopsis
ltc
Godeps/_workspace/src/github.com/bmizerany/pat
Package pat implements a simple URL pattern muxer
Package pat implements a simple URL pattern muxer
This file was generated by counterfeiter
Godeps/_workspace/src/github.com/cloudfoundry-incubator/receptor/fake_receptor
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter
Godeps/_workspace/src/github.com/cloudfoundry/noaa/events
Package events is a generated protocol buffer package.
Package events is a generated protocol buffer package.
Godeps/_workspace/src/github.com/codegangsta/cli
Package cli provides a minimal framework for creating and organizing command line Go applications.
Package cli provides a minimal framework for creating and organizing command line Go applications.
Godeps/_workspace/src/github.com/docker/docker/api/stats
This package is used for API stability in the types and response to the consumers of the API stats endpoint.
This package is used for API stability in the types and response to the consumers of the API stats endpoint.
Godeps/_workspace/src/github.com/docker/docker/pkg/mflag
Package flag implements command-line flag parsing.
Package flag implements command-line flag parsing.
Godeps/_workspace/src/github.com/docker/docker/pkg/pools
Package pools provides a collection of pools which provide various data types with buffers.
Package pools provides a collection of pools which provide various data types with buffers.
Godeps/_workspace/src/github.com/docker/docker/registry/v2
Package v2 describes routes, urls and the error codes used in the Docker Registry JSON HTTP API V2.
Package v2 describes routes, urls and the error codes used in the Docker Registry JSON HTTP API V2.
Godeps/_workspace/src/github.com/docker/libtrust
Package libtrust provides an interface for managing authentication and authorization using public key cryptography.
Package libtrust provides an interface for managing authentication and authorization using public key cryptography.
Godeps/_workspace/src/github.com/gogo/protobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
Godeps/_workspace/src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
Godeps/_workspace/src/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
Godeps/_workspace/src/github.com/gorilla/websocket
Package websocket implements the WebSocket protocol defined in RFC 6455.
Package websocket implements the WebSocket protocol defined in RFC 6455.
Godeps/_workspace/src/github.com/gorilla/websocket/examples/autobahn
Command server is a test server for the Autobahn WebSockets Test Suite.
Command server is a test server for the Autobahn WebSockets Test Suite.
Godeps/_workspace/src/github.com/nu7hatch/gouuid
This package provides immutable UUID structs and the functions NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 and 5 UUIDs as specified in RFC 4122.
This package provides immutable UUID structs and the functions NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 and 5 UUIDs as specified in RFC 4122.
Godeps/_workspace/src/github.com/onsi/ginkgo
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
Godeps/_workspace/src/github.com/onsi/ginkgo/config
Ginkgo accepts a number of configuration options.
Ginkgo accepts a number of configuration options.
Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Godeps/_workspace/src/github.com/onsi/ginkgo/reporters
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
Godeps/_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Godeps/_workspace/src/github.com/onsi/gomega/format
Gomega's format package pretty-prints objects.
Gomega's format package pretty-prints objects.
Godeps/_workspace/src/github.com/onsi/gomega/gbytes
Package gbytes provides a buffer that supports incrementally detecting input.
Package gbytes provides a buffer that supports incrementally detecting input.
Godeps/_workspace/src/github.com/onsi/gomega/gexec
Package gexec provides support for testing external processes.
Package gexec provides support for testing external processes.
Godeps/_workspace/src/github.com/onsi/gomega/ghttp
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Godeps/_workspace/src/github.com/onsi/gomega/matchers
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
Godeps/_workspace/src/github.com/tedsuo/rata
Package rata provides three things: Routes, a Router, and a RequestGenerator.
Package rata provides three things: Routes, a Router, and a RequestGenerator.
app_examiner/fake_app_examiner
This file was generated by counterfeiter
This file was generated by counterfeiter
app_runner/docker_app_runner/fake_app_runner
This file was generated by counterfeiter
This file was generated by counterfeiter
app_runner/docker_metadata_fetcher/fake_docker_metadata_fetcher
This file was generated by counterfeiter
This file was generated by counterfeiter
app_runner/docker_metadata_fetcher/fake_docker_session
This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter
config/target_verifier/fake_target_verifier
This file was generated by counterfeiter
This file was generated by counterfeiter
logs/console_tailed_logs_outputter/fake_tailed_logs_outputter
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL