1.0.0 • Published 9 years ago
hubot-service-info v1.0.0
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'
1.0.0
9 years ago