Skip to content

Container Chief is an open source MQTT containers manager

Notifications You must be signed in to change notification settings

paroque28/container-chief

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Overview

A MQTT listener that spins up containers based on configuration messages.

2. Architecture

3. Getting started

Start MQTT broker:

docker run -d --name emqx -p 18083:18083 -p 1883:1883 emqx/emqx:latest

Start Chief Daemon:

go run cmd/chiefd/daemon.go

Send a message to the daemon:

go run cmd/chief/client.go -i examples/wordpress.yaml -d device1

4. Messages

Messages are composed of a list of services and it's corresponding docker-compose content.

For example, the CLI would convert an input file like this:

projects: 
  wordpress:
    compose_file: rabbitmq/docker-compose.yml
    status: "up"

Into this:

projects: 
  rabbitmq:
    status: "up"
    compose: 
      version: "3.2"
      services:
          rabbitmq:
            image: rabbitmq:3-management-alpine
            container_name: 'rabbitmq'
            ports:
              - 5672:5672
              - 15672:15672
            volumes:
              - ~/.docker-conf/rabbitmq/data/:/var/lib/rabbitmq/
              - ~/.docker-conf/rabbitmq/log/:/var/log/rabbitmq
            networks:
              - rabbitmq_go_net

        networks:
          rabbitmq_go_net:
            driver: bridge

And finally the CLI would send this message to the MQTT broker using the following topic:

chief/devices/<device_id>/configurations

An events diagram would look like this:

About

Container Chief is an open source MQTT containers manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published