Giter Club home page Giter Club logo

swarm-pack

Package management for Docker Swarm services.

Overview

Swarm Pack lets you package Docker Swarm services with common patterns, templating and custom values. Swarm Pack is to Docker Swarm what Helm is to Kubernetes.

The best way to learn is by example, so take a look at the official repo first.

Installation

For now, pre-compiled binaries for Mac, Linux & Windows are published into releases.

You can copy this into your environment and make it executable and run on the CLI.

Alternatively, if you have nodejs 10+, checkout the code run npm i and then npm link should create a link to swarm-pack in your PATH which will be executed with nodejs.

Installation improvements are planned for the future.

Repositories

There is an official Pack repository here: https://github.com/swarm-pack/repository

You can also create your own repos for Swarm Packs and configure Swarm Pack to use them.

CLI Usage

Deploy

swarm-pack deploy <pack> <stack>

pack - either a local path for a local pack dir, e.g. ./my_pack or a repo reference (the repo must be defined in config) e.g. official/incubator/portainer.

stack - this is the Docker Stack namespace on the Swarm which will be used for the deployment.

List deployed Packs

swarm-pack ls

Inspect a Pack in the repository

swarm-pack inspect <pack>

pack - either a local path for a local pack dir, e.g. ./my_pack or a repo reference (the repo must be defined in config) e.g. official/incubator/portainer.

Manage the local repo cache

Update the local repo cache

swarm-pack cache update

Clear the cache

swarm-pack cache clear

Search for Packs in repos

swarm-pack search <keyword>

Manage configured Pack repositories

Pack repos are repo git URLS, e.g. official repo

List repos in use:

swarm-pack repo ls

Add a remote repo:

swarm-pack repo add <name> <url>

Remove a configured repo:

swarm-pack repo rm <name> || <url>

NPM usage

Swarm Pack can also be used as an npm package from another javascript application.

const SwarmPack = require('swarm-pack');
const swarmpack = SwarmPack({ config });

const stack = "nonprod"
const packRef = "official/incubator/portainer"
const values = {
  tag: "latest"
}

swarmpack.compileAndDeploy({ stack, packRef, values });

config parameter is an object which is a de-serialized version of the config file. Config files are ignored when used as an NPM package, so this is where config must be provided.

swarm-pack's Projects

repository icon repository

A repo for common, reusable, public swarm-packs

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.