Deploy swarm stacks against a SSH based remote docker daemon context
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
3wc be963d420e Ignore failures running `docker system prune` 2 weeks ago
.drone.yml Switch to publishing on our Gitea 2 weeks ago
Dockerfile Drop pinning, it'll be fine 2 years ago
LICENSE Bootstrapping stack deploy plugin 2 years ago
README.md Fix Drone badge link 2 weeks ago
makefile feat: add new makefile target [ci skip] 1 year ago
plugin.sh Ignore failures running `docker system prune` 2 weeks ago
renovate.json Add renovate.json 2 weeks ago

README.md

stack-ssh-deploy

Build Status

Deploy swarm stacks against a SSH based remote docker daemon context.

This is meant to be used as a Drone plugin.

Settings

Required (no default)

  • deploy_key: SSH private key part for ssh public key authentication
  • stack: Name of the stack to be deployed

Required (If Private Repo)

  • image: Name and Tag of image since private image's are not pulled automatically by docker stack deploy

Optional (with defaults)

  • compose (default: compose.yml): compose file to use for deploying
  • host (default: swarm.autonomic.zone): Host to deploy to (don't include ssh://)
  • port (default: 222): SSH port to connect to
  • user (default: drone): System user to connect via SSH with
  • networks (default:): Try and auto-create these networks first
  • rm: (default: false): Remove the stack before deploying it
  • reg_user: Registry user if publishing from a private repository
  • reg_pass: Registry password if publishing from a private repository

Dangerous options, unwise outside CI

  • generate_secrets (default: false): randomly set all secrets: found in the compose file -- you won't be able to retrieve them afterwards, so you almost certainly don't want this for real deployments.
  • purge (default: false): runs aggresive cleaning up measure to wipe deployment afterwards

Example

---
kind: pipeline
name: deploy to swarm
steps:
  - name: stack deploy
    image: decentral1se/stack-ssh-deploy:latest
    settings:
      stack: mystack
      deploy_key:
        from_secret: drone_deploy_key
      networks:
        - proxy
        - mail
      environment:
        DOMAIN: test.example.com

Publishing

The version can be bumped in the .drone.yml file. We're sticking with latest as we iterate on the code right now.

If you push a commit to master, the Drone config will publish to Docker Hub.