Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

A project to get information about a service running or a deployment status on Docker Swarm

License

Notifications You must be signed in to change notification settings

albertogviana/docker-swarm-service-status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A project to get information about a service running or a deployment status on Docker Swarm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages