Local Mirror of Containerpilot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mike Gerdts d999b632b0
Merge pull request #576 from zealic/fix/docs-issue
4 months ago
.github contributing helpers (#395) 2 years ago
client docs: add pointers to godoc (#475) 2 years ago
commands Implement new signal based events 1 year ago
config config: Adjust loop function to allow ranges by strings/env vars 1 year ago
control Refactor away EventHandler into separate pub/sub interfaces (#476) 1 year ago
core Clean-up a few things around global/job shutdown 1 year ago
discovery Fix lint errors. 1 year ago
docs Fix docs issue. 7 months ago
events logging: Ignore debug logs of timer ticks for internal telemetry health checks 1 year ago
integration_tests Implement new signal based events 1 year ago
jobs Rename initialStatus -> initial_status. 1 year ago
scripts add go vet to linting, fix lints this finds 2 years ago
subcommands docs: add pointers to godoc (#475) 2 years ago
sup Implement new signal based events 1 year ago
telemetry Refactor away EventHandler into separate pub/sub interfaces (#476) 1 year ago
tests Migrate from deprecated Consul API call PassTTL to UpdateTTL 1 year ago
version docs: add pointers to godoc (#475) 2 years ago
watches Clean-up commented out code found during CR 1 year ago
.gitignore re-remove coverage reports and add to gitignore 2 years ago
.travis.yml Update Compose in TravisCI 2 years ago
CHANGELOG.md Update CHANGELOG.md for release 3.6.1 1 year ago
CONTRIBUTING.md contributing helpers (#395) 2 years ago
Dockerfile Upgrade ContainerPilot to Go 1.9.x and Consul 1.0.0 (#527) 1 year ago
LICENSE Initial commit 3 years ago
README.md docs: add pointers to godoc (#475) 2 years ago
glide.lock Upgrade ContainerPilot to Go 1.9.x and Consul 1.0.0 (#527) 1 year ago
glide.yaml Upgrade ContainerPilot to Go 1.9.x and Consul 1.0.0 (#527) 1 year ago
main.go docs: add pointers to godoc (#475) 2 years ago
makefile Upgrade ContainerPilot to Go 1.9.x and Consul 1.0.0 (#527) 1 year ago

README.md

ContainerPilot

An init system for cloud-native distributed applications that automates the process of service discovery, configuration, and lifecycle management inside the container, so you can focus on your apps.

Build Status MPL licensed GoDoc

What is ContainerPilot?

Orchestration is the automation of the operations of an application. Most application require operational tasks like connecting them to related components (WordPress needs to know where it’s MySQL and Memcached servers are, for example), and some applications require special attention as they start up or shut down to be sure they bootstrap correctly or persist their data. We can do all that by hand, but modern applications automate those tasks in code. That’s called “orchestration.”

To make this work, every application needs to do the following (at a minimum):

  • Register itself in a service catalog (like Consul or Etcd) for use by other apps
  • Look to the service catalog to find the apps it depends on
  • Configure itself when the container starts, and reconfigure itself over time

We can write our new applications to do that, but existing apps will need some help. We can wrap each application in a shell script that registers itself with the discovery service easily enough, but watching for changes to that service and ensuring that health checks are being made is more complicated. We can put a second process in the container, but as soon as we do that we need an init system running inside the container as well.

ContainerPilot to the rescue!

ContainerPilot is an init system designed to live inside the container. It acts as a process supervisor, reaps zombies, run health checks, registers the app in the service catalog, watches the service catalog for changes, and runs your user-specified code at events in the lifecycle of the container to make it all work right. ContainerPilot uses Consul to coordinate global state among the application containers.

Quick Start Guide

Check out our “Hello, World” application on GitHub. Assuming you have Docker and Docker Compose available, it’s as easy as:

git clone git@github.com:autopilotpattern/hello-world.git
cd hello-world
docker-compose up -d
open http://localhost

This application blueprint demonstrates using ContainerPilot to update Nginx upstream configuration at runtime. Try scaling up via docker-compose scale hello=2 world=3 to see the Nginx configuration updated.

You can also download the latest release of ContainerPilot from GitHub.

Documentation

Documentation for ContainerPilot and where it fits with the rest of the Triton ecosystem can be found at www.joyent.com/containerpilot. The index below links to the documentation in this repo for convenience.

Lifecycle

Design: the Why of ContainerPilot

Configuration

Support

You might also read our guide building self-operating applications with ContainerPilot and look at the examples below.

Examples

We’ve published a number of example applications demonstrating how ContainerPilot works.