fetch-rancher-metadata
v1.0.34
Published
Command-Line utility to fetch and merge JSON data from Rancher metadata service
Downloads
72
Readme
fetch-rancher-metadata
Command-Line utility to fetch and merge JSON data from Rancher metadata service
Install
$ npm install -g fetch-rancher-metadata
Simple get from rancher API
$ fetch-rancher-metadata --get "container/name"
mycontainer_1
Retrieving from stack Rancher-Compose.yml
myService:
# Scale of service
scale: 1
# User added metadata
metadata:
config:
option1: newValue1
option2: newValue2
Docker container local JSON file (e.g. Application-Config.json)
{
"option1": "oldValue",
"option2": "oldValue"
}
Execution within service docker container
$ fetch-rancher-metadata --key "config" --merge "Application-Config.json"
Result (e.g. Application-Config.json)
{
"option1": "newValue1",
"option2": "newValue2"
}