docker-swarm-service-status

command module
v0.0.0-...-8a61a87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2017 License: MIT Imports: 3 Imported by: 0

README

docker-swarm-service-status

Go Report Card

Motivation

The idea behind of this project was to provide an easy way to get the service deployment information on Docker Swarm Cluster. This service would be used with Jenkins where in a pipeline and I would be able to call my service and guarateer that my service was properly deployed or if for some reason failed or was rollback.

TODO

  • Add Prometheus metrics
  • Improve documentation

Deploy the project on Docker Swarm

First you need to create the network

docker network create -d overlay service-status

To deploy the service we are going to use docker stack command

docker stack deploy -c stack/service-status.yml service-status

The service expose the port 8080.

Endpoint

Deployment Status (/v1/docker-swarm-service-status/deployment-status/{service}/{image})

The Deployment Status endpoint is available on /v1/docker-swarm-deployment-status/{service}/{image} and it requires the parameters:

  • service is related to the service name on Docker
  • image is the image deployed in the cluster.
    • The image parameter must be sent enconded with base64.

You can easily create a base64 using the command line, with the command below:

echo -n "albertogviana/docker-routing-mesh:1.0.0" | base64
Service Status (/v1/docker-swarm-service-status/service-status/{service})

The Deployment Status endpoint is available on /v1/docker-swarm-service-status/{service} and it requires the parameters:

  • service is related to the service name on Docker

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL