fetch-rancher-metadata

1.0.34 • Public • Published

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"
}

Readme

Keywords

Package Sidebar

Install

npm i fetch-rancher-metadata

Weekly Downloads

63

Version

1.0.34

License

MIT

Unpacked Size

11.6 kB

Total Files

4

Last publish

Collaborators

  • jasonhillier