Giter VIP home page Giter VIP logo

combu's Introduction

combu

About

The combu is named as docker-compose burst.

This is an easy container orchestration tool powered by jsonnet.

combu run; You can create and run many containers with one command.

This target user is amateur machine-learning developer and run experiments on docker container.

Getting started

downlowd binary

You can download combu binary from release branch and use it!

clone

$ git clone https://github.com/funwarioisii/combu
$ cd combu
$ make 
$ ./build/combu -f config/config.jsonnet run

Usage

create and start containers.

combu -f <filename> run

destroy containers.

Attention: It will remove all specified containers.

combu -f <filename> kill

config file

This is a most simple configuration.

[
    {
        name: "sample-container-a",
        image: "busybox",
        networks: ["sample"],
        ports: [
            {
                host:'2222/tcp',
                container: '80/tcp'
            },
        ],
    },
    {
        name: "sample-container-b",
        image: "busybox",
        depends: ["sample-container-a"],
        networks: ["sample"],
        cmd: "echo combu"
    }           
]

When started,

  1. create network sample
  2. create and start sample-container-a
  3. create and start sample-container-b

You have to fill name and image.

key explain
name container name
image docker image
ports supply port by host and expected port by container
networks docker network name
depends depended container
cmd override command
This is a practical sample

In many cases, we need to use an unique id for experiments.

When you declare uuid, such as local uuid ="UUID", combu set UUID with 12 random character.

local uuid = "UUID";

local solver(id) = {
    name: "busybox-b-%d" % [id],
    image: "busybox",
    cmd: "echo %s" % [uuid],
    networks: ["sample"],
    depends: ["busybox-a"]
};

[
    solver(_i)
    for _i in std.range(2, 20)
] + [
    {
        name: "busybox-a",
        image: "busybox",
        ports: [
            {
                host:'3000/tcp',
                container: '3000/tcp'
            },
        ],
        networks: ["sample"],
    },
    {
        name: "busybox-c",
        image: "busybox",
        networks: ["sample"],
        depends: ["busybox-b-10", "busybox-b-20"],
    }
]

read the official tutorial of jsonnet, very helpful.

Development

  • Go (>= 1.11)
  • Docker (api>=1.38)

and some packages...(i don't know how to show like requirements.txt)

Tips and my operation

before run and kill

Before combu -f <filename> run, you have better to check with jsonnet command.

set config your experiment projects

I put jsonnet files under <project directory>/config/.

combu's People

Watchers

 avatar  avatar

combu's Issues

UUID is not ID

UUIDとは、ソフトウェア上でオブジェクトを一意に識別するための識別子である。UUIDは128ビットの数値だが、16進法による550e8400-e29b-41d4-a716-446655440000というような文字列による表現が使われることが多い。 ウィキペディア

vendoring

go mod?

i don't know detail...

but need to specify libraries version.

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.