easy yet advanced production docker management


License
MIT
Install
npm install servezone@1.0.23

Documentation

@servezone/servezone

easy yet advanced production docker management

Availabililty and Links

Status for master

build status coverage report npm downloads per month Known Vulnerabilities TypeScript node JavaScript Style Guide

Usage

Use TypeScript for best in class instellisense.

This module is not meant for standalone use but rather as base for various parts of the servezone ecosystem. It houses all important classes so every high level component across the servezone stack has a mutual understanding of how things work.

For more information visit https://serve.zone

General ideas

Websockets

servezone uses websockets for easy communication between nodes and realtime notifications of events in your docker cluster.

Reverse Proxy

Every node uses a reverse proxy to manage traffic distribution to services.

High Level components

There are various high level npm modules that each run in their own docker container:

  • servezone - npm module - this package is the central core of servezone and contains major parts of the scheduling logic
  • cloudly - npm tool - this package contains the scheduling API for the outside world and should run outside of any cluster. It can even create new clusters from scratch by using the Digital Ocean API
  • coreflow - docker container - runs in docker swarm and enables secure connection to the docker remote api
  • coretraffic - docker container the traffic handler that runs once on every node in the cluster
  • corebackup - docker container the backup handler that runs once on every node in the cluster
  • corecdn - docker container the cdn handler that runs once onevery node. Enables distribution of public high availablilty content trhough every node in the cluster.
  • coredoc docker container the errordoc handler that serves traffic that can't be attributed to any specific container on the node

Classes

  • SzCluster - A servezone cluster is the highest object in the servezone world and directly maps to one docker swarm cluster.
  • SzManager - A servezone manager manages a ServeZone cluster.
  • SzApp - A servezone app is an application that is supposed to run in the ServeZone cluster and is managed by an ServeZone Manager
  • SzService A ServeZone Service always maps to a docker container that is scheduled by the ServeZone Manager
    • Services can be categorized in Masterservices and Subservices. Subservices can provide certain functionailty to Masterservices
    • A Servezone App always has one Masterservice
    • A Servezone App can have multiple Subservices
    • All Servezone Services that belong to a Servezone App are connected through a docker overlay network.
  • SzDeployment - A servezone deployment keeps track of when an app was last deployed and exposes methods to repeat specific or all deployment steps.
  • SzNode - a single node withing a SzCluster

Docker Swarm

Under the hood we use Docker Swarm. Serve.Zone is merely a configuration candy layer that makes it easy to deploy and manage applications from within CI Jobs. In general we recommend GitLab for the CI side of things.

shipzone and servezone - made for each other

If you wonder how to push an app from ci to a servezone cluster take a look at shipzone on npm.

shipzone is built with one target in mind: Pushing apps to servezone in a reliable manner.

For further information read the linked docs at the top of this readme.

MIT licensed | © Lossless GmbH | By using this npm module you agree to our privacy policy

repo-footer