Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Latest commit

 

History

History
99 lines (81 loc) · 3.32 KB

deployment_tracker.md

File metadata and controls

99 lines (81 loc) · 3.32 KB

Deployment Tracker Integration

Deployment tracker is a lightweight node REST service that can aggregate deployment metadata across your organization. You can record deployment execution times and outcomes using Vagrant Orchestrate whether you're deploying from your laptop to a cloud instance or from a build slave to a hardware box.

What is actually tracked?

  1. Deployments starting
  2. Deployment starting on a server
  3. Deployment completing on a server
  4. Vagrant console output
  5. Deployment completion

The summary record for a successful deployment to 4 servers using the half_half strategy is recorded as follows:

curl http://deploymenttracker.mydomain.com/v1/deployments/120c7b1c-73bc-4626-bef8-be1983785562
{
  "deployment_id": "120c7b1c-73bc-4626-bef8-be1983785562",
  "engine": "vagrant_orchestrate",
  "engine_version": "0.7.0",
  "host": "mypc.local",
  "user": "cbaldauf",
  "environment": "deployment_tracker",
  "package": "vagrant-orchestrate",
  "package_url": "https://github.com/Cimpress-MCP/vagrant-orchestrate.git",
  "version": "c3ede86e0a0b1a0c3cf6952906a914fdb3832f87",
  "arguments": "--strategy half_half",
  "createdAt": "2015-07-07T17:34:12.008Z",
  "updatedAt": "2015-07-07T17:34:12.008Z",
  "servers": [
    {
      "hostname": "192.168.10.81",
      "deployment_id": "120c7b1c-73bc-4626-bef8-be1983785562",
      "result": "success",
      "elapsed_seconds": 3,
      "createdAt": "2015-07-07 17:34:12.075 +00:00",
      "updatedAt": "2015-07-07 17:34:15.730 +00:00"
    },
    {
      "hostname": "192.168.10.80",
      "deployment_id": "120c7b1c-73bc-4626-bef8-be1983785562",
      "result": "success",
      "elapsed_seconds": 3,
      "createdAt": "2015-07-07 17:34:12.281 +00:00",
      "updatedAt": "2015-07-07 17:34:16.044 +00:00"
    },
    {
      "hostname": "192.168.10.83",
      "deployment_id": "120c7b1c-73bc-4626-bef8-be1983785562",
      "result": "success",
      "elapsed_seconds": 3,
      "createdAt": "2015-07-07 17:34:26.113 +00:00",
      "updatedAt": "2015-07-07 17:34:29.477 +00:00"
    },
    {
      "hostname": "192.168.10.82",
      "deployment_id": "120c7b1c-73bc-4626-bef8-be1983785562",
      "result": "success",
      "elapsed_seconds": 20,
      "createdAt": "2015-07-07 17:34:26.316 +00:00",
      "updatedAt": "2015-07-07 17:34:46.475 +00:00"
    }
  ]
}

Field Values

If you are using the Vagrant Orchestrate git integration, which is highly recommended, the following field values will be assigned automatically:

  1. deployment_id - UUID generated by Vagrant Orchestrate
  2. environment - git branch name
  3. package - git repo name
  4. package_url - git remote origin url
  5. version - git SHA

Configuration

Add the following configuration option to your Vagrantfile

config.orchestrate.tracker_host = "http://deploymenttracker.mydomain.com"

Logging

Each line sent to Vagrant's UI (your console) will be sent to deployment tracker and forwarded on to an appropriate log collector. The current implementation is naive and creates an HTTP POST request for each line printed to the console. If this is causing performance issues with your deployment, you can disable it with:

config.orchestrate.tracker_logging_enabled = false

Initialization

vagrant orchestrate init --deployment-tracker-host http://deploymenttracker.mydomain.com