hubot-service-info
Service Info Hubot Script
Last updated 5 years ago by dstockton .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hubot-service-info 
SYNC missed versions from official npm registry.

hubot-service-info

Allows Hubot to query service info based on DNS records behind an IP address

See src/services.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-service-info --save

Then add hubot-service-info to your external-scripts.json:

[
  "hubot-service-info"
]

Optionally, add the following environment variable to your execution environment:

HUBOT_SERVICE_INFO_CONFIG_PASSWORD=<password goes here>

Commands

  • service info config set <password> <url or JSON> - initialize service info with some configuration. Either from a URL, or directly with a JSON object (see below for configuration documenation).
  • service info config show <password> - Display the current configuration as a JSON object.
  • service info show <environment> [<organisation>] - Show service information for the given environment (and organisation) combination.

Configuration format

{
  "config": {
    "password": "<your password here>",
    "default_organisation": "org1"
  },
  "services": {
    "common": [
      {"First Service":
        {
          "hostname": "my.${ENV}.host.${ORG}.name",
          "port": 80,
          "endpoint": "/version",
          "jpath": "status/version"
        }
      }
    ],
    "specifics": {
      "org1": [
        {"org1 only Service":
          {
            "hostname": "my.${ENV}.host.${ORG}.name",
            "port": 81,
            "endpoint": "/admin/version",
            "jpath": "status/version_string/_SPLIT_LAST_SPACE_"
          }
        }
      ]
    }
  }
}

Sample Interaction

user> hubot service info config set password http://url/to/config.json
hubot> Service info configuration loaded OK.
user> hubot service info show production
hubot> Results for production are in...
    First Service has 2 servers running '1.0.0'
    First Service has 2 servers running '1.0.1'
    org1 only Service has 3 servers running '2.3.4'

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (9)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |