Skip to main content

A Docker+Swarm-based CI toolset frontend

Project description

Docker-based CI/CD made easy

Build Status

Dmake is the missing link between Docker and your Cloud Provider (AWS / Azure / other).

Dmake makes Docker and cloud-based CI/CD easy:

  • Start your projects with CI/CD built-in
  • Stop spending hours tuning your docker-compose configuration files
  • Collaborate with your fellow developers ensuring your environments are all the same (ie. no more "it worked on my local machine but not on the server")

What can dmake do for me?

Dmake is a frontend to Docker+Swarm, providing sensible defaults for usual CI/CD tasks such as:

  • keeping track of various environments (dev/test/prod/etc)
  • managing releases and deployments
  • performing day-to-day operations on a Swarm cluster (eg "I want to run this piece of code on that environment")
  • ...and do all of this with AWS or Azure clusters!

We are making a few assumptions for now:

  • We use Docker (obviously)
  • We use docker-compose because it's the right tool for this job.
  • We use Swarm. We know this is a controversial choice but we plan to move the whole project to Kubernetes. In the meantime... ...sorry: Swarm.
  • We assume your repository is hosted on Git 🤷‍
  • Your provision configuration is stored in the 'provision/' directory by default (customizable)

See it in action

How to write docker-compose.yml files?

Without dmake:

...hours of fiddling, docker-compose start/stop commands with ever-growing parameters...

With dmake:

$ dmake config

Start a multi-environment docker-compose stack

Without dmake:

$ DEPLOY_ENV=dev docker-compose -f my-project/docker-compose.yml -f my-project/docker-dev.yml start

With dmake:

$ dmake stack start

Creating a multi-environment setup (dev / test / staging / prod)

$ dmake config --env=test
$ dmake config --env=staging
$ dmake config --env=prod

Execute a command inside a specific container of your running stack

$ dmake stack exec /bin/bash

General principles

dmake makes your development, releases and deployment operations WAY simpler and streamlined with Docker+Swarm.

It practically makes your project fool-proof for users who don't know or do not want to learn all about Docker.

But it allows power users to save time and energy by providing convenient frontends to most operations.

The only thing you have to do is describe your project architecture in the 'provision/' directory. And we provided a few tools to get you started right away.

Getting started: a dmake tutorial

Suppose you want to build an architecture with 3 different Ubuntu containers. The first thing is to get them running with Docker, as you'd do with your usual containers anyway.

Then we provide a few shortcuts to convert this machines into your docker-compose files. The rest is copy/paste. Easy.

For example, let's create a project and run 3 containers that just wait forever::

$ mkdir sandbox # Or you can start from an existing git repository
$ cd sandbox
$ docker run --name my_container1 ubuntu sleep infinity &
$ docker run --name my_container1 ubuntu sleep infinity &
$ docker run --name my_container1 ubuntu sleep infinity &

You've got an Ubuntu container running and waiting forever. Let's integrate it into our project.

$ dmake config

We've now created a provision directory with all the necessary files to have your architecture up and ready. You just have to start it right away:

$ dmake stack start

=> Et voilà. Your stack is up and running again.

From there you can make changes to your existing containers and if you want to update your containers according to the current configuration, just execute again:

$ dmake config
$ dmake stack stop
$ dmake stack start # (should implement dmake stack restart, sorry)

Then, from your project's root:

$ dmake

$ dmake -h

$ dmake status -h   # From an in-depth review of how your files should be layed out.

TODO

  • Integrate Kubernetes instead of Swarm

FAQ

Testing dmake

Use a virtualenv, pretty please. The rest is pretty easy:

$ pip install -e . $ pip install pytest $ python -m pytest [--skipslow]

or

$ make test

Release dmake

(useful for internal folks)

$ make $ make release $ make dist

Username is 'ncube' Password is in the vault ;)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dmake_hms-0.1.2.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dmake_hms-0.1.2-py3-none-any.whl (47.4 kB view details)

Uploaded Python 3

File details

Details for the file dmake_hms-0.1.2.tar.gz.

File metadata

  • Download URL: dmake_hms-0.1.2.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for dmake_hms-0.1.2.tar.gz
Algorithm Hash digest
SHA256 47f43087d1ac5d28e3a97e9944a4844faaca556b847abbb548421c1ca04eab3c
MD5 c63ad84ace6f81e6af76b834251cc0a8
BLAKE2b-256 eea32fd8329782eecaa2711b2b5fcb978c19c9db92c4f35398f4442aae8440a8

See more details on using hashes here.

File details

Details for the file dmake_hms-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: dmake_hms-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 47.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for dmake_hms-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ac00f67612431f39e687332680ae34a4c9288bb34476dab70de34de05f67e93
MD5 4298e89d9c7d92e418b859ec17c035bb
BLAKE2b-256 8d429e503f5a5575bb824e75db5b07506b74b3e4bc836eec0ecfedbb3a61935a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page