Go to file
Andreas Neue b5946e5549 added CONTRIBUTORS, updated README.md 2023-05-10 10:58:25 +02:00
CONTRIBUTORS added CONTRIBUTORS, updated README.md 2023-05-10 10:58:25 +02:00
LICENSE added CONTRIBUTORS, updated README.md 2023-05-10 10:58:25 +02:00
Makefile chmod secrets.mk 2023-05-10 10:39:04 +02:00
README.md added CONTRIBUTORS, updated README.md 2023-05-10 10:58:25 +02:00
apt.mk feature DEPLOY_START_DELAY, adds a delay when (re)starting targets after deployment 2023-05-08 11:47:06 +02:00
compose-file.mk feature DEPLOY_START_DELAY, adds a delay when (re)starting targets after deployment 2023-05-08 11:47:06 +02:00
compose.mk feature DEPLOY_START_DELAY, adds a delay when (re)starting targets after deployment 2023-05-08 11:47:06 +02:00
copy.mk feature DEPLOY_START_DELAY, adds a delay when (re)starting targets after deployment 2023-05-08 11:47:06 +02:00
cron.mk feature DEPLOY_START_DELAY, adds a delay when (re)starting targets after deployment 2023-05-08 11:47:06 +02:00
helm.mk Add TEST_MODE to helm deployment for debug output 2023-03-07 16:55:15 +01:00
k8s.mk Remove imagePullSecret creation 2022-12-27 11:45:06 +01:00
kustomize.mk make env variables available for kustomize 2023-01-24 14:00:47 +01:00
swarm.mk simplified module loading 2023-01-04 12:26:52 +01:00
systemd.mk added systemd deployment method 2023-02-23 10:21:20 +01:00

README.md

make-deploy

A simple Makefile based deployment system.

make-deploy was initially hosted at https://git.dnix.de/an/make-deploy. Since it has become heavily used at chefkoch.de for system deployments, and lots of code is committed there, we moved the repo to https://git.chefkoch.net/pub/make-deploy. A mirror exists still at https://git.dnix.de/mirror/make-deploy.

make-deploy is licensed under the terms of the MIT-License. See LICENSE for info.

Installation

Clone make-deploy as a submodule into your repository:

$ git submodule add https://git.chefkoch.net/pub/make-deploy

Create a symlink to the Makefile:

$ ln -s make-deploy/Makefile .

Create config.mk (for common config options) and secrets.mk (for sensitive information, should be git-crypted) in your project.

Example config.mk:

DEPLOY_NAME = my-project
DEPLOY_PATH = /srv
DEPLOY_TYPE = compose
DEPLOY_HOSTS = server01.example.com server02.example.com

DOCKER_IMAGE = dr.example.com/my-project:latest
DOCKER_LOGIN = 1
DOCKER_REGISTRY = dr.example.com

SSH_USER = ci

Example secrets.mk:

DOCKER_USER = root
DOCKER_PASS = secret1234

Usage

Start the deployment process

make deploy

Create docker contexts for the target hosts

make create-docker-contexts

Update make-deploy submodule in your project

make self-update

Available options for DEPLOY_TYPE

copy, compose, swarm, k8s (TBD), helm, cron (TBD)

copy

Just copy the repo to the remote location(s). Put additional logic into pre- and post-deploy.sh.

compose

Docker Compose deployment.

swarm

Docker Swarm deployment.

k8s, helm, cron

To be implemented.