Skip to content
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.

twoporeguys/vms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version Management Service

Requirements

Redis

Configuration

The configuration relies on environment variables:

  • VMS_PORT: The port number to bind the service to. Defaults to 8080.
  • VMS_REDIS: The address of the Redis instance used as a data storage. Defaults to 127.0.0.1:6379.

API

The API reads and returns JSON documents (content-type: application/json).

Read (HTTP GET)

  • /: Returns the whole state of all applications in all environments.
    • Request: GET /
    • Response:
    {
      "vms": {
        "prod": {
          "backend": "0.9.5",
          "frontend": "1.0.6"
        },
        "stg": {
          "backend": "1.0.1",
          "frontend": "1.1.0"
        }
      }
    }
  • /{app}: Returns the state of a single application in all environments.
    • Request: GET /vms
    • Response:
    {
      "prod": {
        "backend": "0.9.5",
        "frontend": "1.0.6"
      },
      "stg": {
        "backend": "1.0.1",
        "frontend": "1.1.0"
      }
    }
  • /{app}/{environment}: Returns the state of a single application in one environment.
    • Request: GET /vms/prod
    • Response:
    {
      "backend": "0.9.5",
      "frontend": "1.0.6"
    }
  • /{app}/{environment}/{component}: Returns the version of a component of a single application in one environment.
    • Request: GET /vms/prod/backend
    • Response:
"0.9.5"

Write (HTTP POST)

  • /: Returns the whole state of all applications in all environments.
    • Request: POST /
    • Body:
    {
      "vms": {
        "prod": {
          "backend": "0.9.5",
          "frontend": "1.0.6"
        },
        "stg": {
          "backend": "1.0.1",
          "frontend": "1.1.0"
        }
      }
    }
  • /{app}: Returns the state of a single application in all environments.
    • Request: POST /vms
    • Body:
    {
      "prod": {
        "backend": "0.9.5",
        "frontend": "1.0.6"
      },
      "stg": {
        "backend": "1.0.1",
        "frontend": "1.1.0"
      }
    }
  • /{app}/{environment}: Returns the state of a single application in one environment.
    • Request: POST /vms/prod
    • Body:
    {
      "backend": "0.9.5",
      "frontend": "1.0.6"
    }
  • /{app}/{environment}/{component}: Returns the version of a component of a single application in one environment.
    • Request: POST /vms/prod/backend
    • Body:
"0.9.5"

About

Version Management Service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published