• Stars
    star
    196
  • Rank 198,553 (Top 4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A lightweight tool for easy deployment and rollback of dockerized applications.

Zodiac

A lightweight tool, built on top of Docker Compose, for easy deployment and rollback of dockerized applications.

Zodiac allows you to deploy Docker Compose applications while maintaining a history of all deployments. Among other things, this allows you to rollback to a previous, known-good deployment in the event that there are issues with your current build.

Imagine you have the following docker-compose.yml file

web:
  image: centurylink/simple-server
  ports:
    - "8888:8888"

Using Zodiac to deploy this application:

$ zodiac deploy
Deploying your application...
Creating zodiac_web_1
Successfully deployed 1 container(s)

View your deployment using the list command:

$ zodiac list
ACTIVE ID      DEPLOY DATE             SERVICES        MESSAGE
*      1       2015-06-30 00:40:27     zodiac_web_1

You changed your image and deploy again. The first deployment is retained:

$ zodiac list
ACTIVE ID      DEPLOY DATE             SERVICES        MESSAGE
*      2       2015-06-30 00:55:12     zodiac_web_1
       1       2015-06-30 00:40:27     zodiac_web_1

Rollback to the first deployment if needed:

$ zodiac rollback 1
Rolling back your application...
Creating zodiac_web_1
Successfully rolled back to deployment: 1
$ zodiac list
ACTIVE ID      DEPLOY DATE             SERVICES        MESSAGE
*      3       2015-06-30 00:56:09     zodiac_web_1    Rollback to: #1
       2       2015-06-30 00:55:12     zodiac_web_1
       1       2015-06-30 00:40:27     zodiac_web_1

NOTE

This repo is no longer being maintained. Users are welcome to fork it, but we make no warranty of its functionality.

Installation

Readying the remote environment

While Zodiac can be used just locally, we recommend pointing it at a remote environment. In that case Zodiac needs to be able to communicate with the docker daemon on that remote host. We strongly encourage the use of Docker Machine for provisioning and installing Docker on the remote host. Zodiac is designed to work out of the box with a Machine-provisioned endpoint. However, one can also set DOCKER_OPTS manually on the remote host. Instructions for setting DOCKER_OPTS at runtime will vary by OS.

TLS

If you are going to use Zodiac to deploy to remote hosts you will want to ensure that your remote Docker daemon is protected with TLS security. Zodiac ships with TLS support out of the box. Both host verification and client authentication are done via TLS. TLS is enabled by default, though it may be disabled for debugging purposes, when using private networks, etc.

Configuring TLS

NOTE: We assume you're using TLS by default, if not using TLS (strongly discouraged), you'll need to set --tls=false, or set the DOCKER_TLS envirnoment variable to false.

Let Docker Machine do all the heavy lifting

If you used Docker machine to provision Docker on the remote Host, it will have generated TLS certificates and keys for you on both the client and host machine.

You can use the docker-machine env command to automatically set-up the environment variables necessary for Zodiac to communicate with the remote host via TLS:

eval "$(docker-machine env your_remote_name)"

If you do this, you should not need to use the --endpoint flag or any of the --tls* flags when running the Zodiac client.

OR Set up the certificates manually

If you choose to generate the TLS certificates manually, you'll want to genrate a certificate (be it self-signed or CA signed) for the host. You'll also want to generate a client certificate for authentication purposes. Consult the Docker docs for securing the Docker daemon.

Use the zodiac help command to see the options for passing in the necassary certificate files.

Install the local Zodiac client

or if you're a risk taker:

curl -sSL https://raw.githubusercontent.com/CenturyLinkLabs/zodiac/master/install.sh | bash

Usage

The zodiac client supports the following commands:

  • verify - verify that the target Docker endpoint is reachable and running a compatible version of the API.
  • deploy - deploy the Docker Compose-defined application to the target Docker endpoint.
  • rollback - roll to a previous Zodiac deployment.
  • list - list all previous application deployments.
  • teardown - remove running services and deployment history for the application.

NOTE: Zodiac stores all deployment history on the containers, so manually removing containers can destroy all Zodiac history.

Global Options

The following flags apply to all of the Zodiac commands:

  • --endpoint - Host and port for the target Docker endpoint. Should be in the form "tcp://hostname:port". Can optionally be provided by setting the DOCKER_HOST environment variable.
  • --tls - Flag indicating whether or not to use TLS/SSL to communicate with the Docker daemon endpoint (defaults to true).
  • --tlsverify - Flag indicating whether or not to perform TLS certificate authentication on the remote server's certificate (defaults to true).
  • --tlscacert - Path to the CA certificate which should be used to authenticate the remote server's certificate (defaults to ~/.docker/ca.pem).
  • --tlscert - Path to the certificate which should be used for client certificate authentication (defaults to ~/.docker/cert.pem).
  • --tlskey - Path to the private key which should be used for client certificate authentication (defaults to ~/.docker/key.pem).
  • --debug - Run the client in debug mode with verbose output.
  • --version - Display version information for the Zodiac client.
  • --help - Display the Zodiac client help text.

For more information about the various TLS flags, see the TLS section below.

Remote Target Configuration

The remote Docker host must be exposed over a TCP port to enable remote communication from the local Zodiac CLI. This is typically done by setting DOCKER_OPTS to something like: DOCKER_OPTS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock". It's worth noting that Docker Machine will do this for you.

Desired features / fixes

  • Support for compose's build option
  • Support for compose's volumes_from option
  • Support for private repos on the Docker hub
  • Compose scale support

More Repositories

1

panamax-ui

The Web GUI for Panamax
JavaScript
1,439
star
2

dockerfile-from-image

Ruby
574
star
3

golang-builder

Containerized build environment for compiling an executable Golang package and packaging it in a light-weight Docker container.
Shell
398
star
4

dray

An engine for managing the execution of container-based workflows.
Go
383
star
5

building

Build a Docker container for any app using Heroku Buildpacks
Ruby
230
star
6

fig2coreos

Convert fig.yml to CoreOS formatted systemd configuration files
Ruby
174
star
7

docker-image-graph

HTML
114
star
8

panamax-coreos

panamax-coreos installs the Panamax application, which is made up of the panamax-ui and panamax-api codebases.
Shell
84
star
9

panamax-api

The Local Panamax Agent
Ruby
82
star
10

ca-certs-base-image

Minimal Docker base image with standard certificate authority root certificates
Dockerfile
68
star
11

lorry-ui

Docker Compose YAML Editor
JavaScript
64
star
12

panamax-public-templates

Ruby
63
star
13

alpine-rails

A lightweight Rails image based on Alpine Linux
Dockerfile
45
star
14

panamax-contest-templates

Ruby
43
star
15

lorry

The API portion of Lorry UI a Docker Compose YAML Editor
Ruby
34
star
16

fleet-api

Ruby
28
star
17

docker-mysql

Shell
21
star
18

docker-ngrok

Dockerfile
19
star
19

docker-serf

Docker image for serf
Dockerfile
19
star
20

flatcar

Rails development environment manager
Ruby
17
star
21

ctlc-docker-wordpress

PHP
15
star
22

ctlc-docker-dropbox

A Dropbox Docker container
Dockerfile
14
star
23

nginx-ssl-proxy

Shell
14
star
24

docker-reg-client

Go Wrapper for the Docker Registry v1 API
Go
13
star
25

ctlc-docker-ambassador

Dockerfile
13
star
26

panamax-kubernetes-adapter-go

The Kubernetes adapter in combination with the Panamax remote agent enables the deployment of a Panamax template to a Kubernetes cluster.
Go
13
star
27

ctl-base-ui

A library of UI components for CTL labs web projects
CSS
12
star
28

ctlc-docker-haproxy-serf

Serf-aware Haproxy Docker Container
Shell
11
star
29

ctlc-docker-haproxy

Serf enabled haproxy docker container
Shell
11
star
30

openssl

Dockerfile
10
star
31

docker-sphinx

Docker image of Sphinx search
Dockerfile
9
star
32

docker-wordpress

PHP
8
star
33

panamax-remote-agent

The remote agent for managing Panamax deployments
Ruby
8
star
34

haproxy-etcd

Shell
8
star
35

docker-gitlab

Docker image for use with linked containers
Shell
8
star
36

docker-drupal

Dockerfile
8
star
37

panamax-kubernetes-adapter

The Kubernetes adapter in combination with the Panamax remote agent enables the deployment of a Panamax template to a Kubernetes cluster.
Ruby
8
star
38

docker-apache-php

Dockerfile
7
star
39

docker-wetty-cli

Dockerfile
7
star
40

panamax-ruby-base

Base image for Ruby-based container services
Ruby
6
star
41

ctlc-docker-amb-serf

Docker Ambassador with Serf registration built-in
Shell
6
star
42

ruby-base-image

Dockerfile
6
star
43

ctlc-docker-amb-etcd

Docker Ambassador with Etcd registration built-in
Shell
6
star
44

ctlc-docker-wordpress-serf

WordPress Docker Container with Serf built-in
Dockerfile
6
star
45

panamax-template-validator

Ruby
5
star
46

panamax-fleet-adapter

Ruby
5
star
47

panamax-marathon-adapter

The Marathon adapter in combination with the Panamax remote agent enables the deployment of a Panamax template to a Mesos cluster.
Go
5
star
48

buildpack-runner

Shell
5
star
49

prettycli

A generic library of helpers for pretty text output, intended for TUI applications.
Go
5
star
50

kube-install

Shell
5
star
51

docker-coreos-cli

Dockerfile
4
star
52

pmx-runner

Ruby
4
star
53

ctlc-docker-mysql-serf

Serf-aware MySQL Docker Container
Shell
4
star
54

panamaxcli

A Panamax Remote Agent command-line application
Go
4
star
55

docket

Python
4
star
56

alpine-nginx

Base Docker image containing Nginx running in Alpine Linux version 3.1.
Dockerfile
4
star
57

remote-agent-setup

Shell
3
star
58

ubuntu-rails

A lightweight Rails image based on Ubuntu
Dockerfile
3
star
59

lighttpd

Dockerfile
3
star
60

stackedit

Dockerfile for an image to run StackEdit https://stackedit.io
Shell
3
star
61

docker-postgresql

Shell
3
star
62

panamax-contrib

Shell
3
star
63

dot-files

Team mandated dot files
Vim Script
3
star
64

ctlc-docker-serf-members

Connect to a serf agent and print the active members
Dockerfile
3
star
65

docker-openstack-cli

Dockerfile
2
star
66

sample-go-adapter

Go
2
star
67

chinook

Ruby
2
star
68

panamax-remote-agent-go

Go
2
star
69

ctlc-docker-mysql

Shell
2
star
70

docker-data-container

Dockerfile
2
star
71

clcgo

A Go client for the CenturyLinkCloud API
Go
2
star
72

coreos-kubernetes

Shell
2
star
73

panamax-image-packager

Shell
1
star
74

kube-cluster-deploy

Go
1
star
75

docker-deis-cli

Dockerfile
1
star
76

docker-events

Ruby
1
star
77

socialize-etl

Ruby
1
star
78

ctlc-docker-nginx

Serf enabled nginx docker container
1
star
79

badge-monitor

Ruby
1
star
80

debian-rails

An optimized Debian-based Rails image
Dockerfile
1
star
81

dray-demo

Dray demo images
1
star
82

kwalify

Ruby
1
star
83

docker-aws-cli

Dockerfile
1
star
84

pmxadapter

Go
1
star
85

socialize-api

where the magic happens
Ruby
1
star
86

chimera

Shell
1
star
87

redis

Redis Docker image based on busybox
Dockerfile
1
star
88

socialize-ui

game changer
JavaScript
1
star
89

draycluster

Go
1
star
90

panamax-remote-agent-installer

Shell
1
star
91

testmux

Go
1
star
92

agent-server-deploy

Go
1
star
93

panamax-integration-suite

Ruby
1
star