Git Product home page Git Product logo

galaxy's Introduction

galaxy

Docker Micro-PaaS

galaxy

===

galaxy is a micro-paas designed for running 12-factor style, stateless, microservices within Docker containers while being lightweight and simple to operate. It handles the deployment, configuration and orchestration of Docker containers across multiple hosts.

It is ideally suited for running Docker containers:

  • Alongside existing applications while transitioning to containers
  • On clusters of 10's-100's of hosts
  • On existing or new infrastructure you are already using
  • For HTTP based micro-services

Features:

  • Minimal dependencies (two binaries and redis)
  • Automatic service registration, discovery and proxying of registered services.
  • Virtual Host HTTP(S) proxying
  • Container scheduling and scaling across hosts
  • Heroku style config variable interface
  • Container contraints (CPU/Mem)

There are two sub-projects: commander and shuttle.

  • Commander - Container deployment and service discovery.
  • Shuttle - An HTTP/TCP proxy that can be configured through a HTTP based API.

Getting Started

To setup a single host environment, run the following:

$ docker run -d --name redis -p 6379:6379 redis
$ export GALAXY_REGISTRY_URL=redis://127.0.0.1:6379
$ export GALAXY_ENV=local
$ export GALAXY_POOL=web
$ commander agent

To create a new app for nginx:

$ commander app:create nginx

To deploy a latest official nginx image to our nginx app:

$ commander app:deploy nginx nginx

Finally, we need to assign this app to our default web pool:

$ commander app:assign nginx web

You should see nginx started by the commander agent process.

Exposing Services

To expose the nginx app, we need to run shuttle to handle request routing:

Start shuttle:

$ shuttle -http 0.0.0.0:8080

Start commander with a shuttle addr:

$ commander -shuttl-addr 127.0.0.1:9090 agent

Assign a service port to nginx:

$ commander runtime:set -port 8888 nginx

You should now be able to access the nginx app on host port 8888:

$ curl localhost:8888

Add a virtual host:

$ commander runtim:set -vhost my.domain nginx
$ curl -v my.domain:8080

Dev Setup

You need to have a docker 1.4.1+ and golang 1.4.

  1. Install glock
  2. make deps
  3. make

License

MIT

galaxy's People

Contributors

jwilder avatar joeshaw avatar q-a avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.