Git Product home page Git Product logo

rancher-container-conf's Introduction

Rancher Container Configuration

This is a generic sidekick container that writes data from Rancher's MetaData API into the specified arbitrary file.

This volume can then be mounted into any container using Docker's volume aliasing (as of v1.9).

app:
  restart: always
  image: myorg/app
  labels:
    io.rancher.sidekicks: app-conf
  volumes_from:
    - app-conf
app-conf:
  restart: always
  images: objectpartners/rancher-container-conf:latest

Then configure the configuration data in rancher-compose.yml

app:
  metadata:
    config:
      content: |
        foo: bar
      path: '/config/app.conf'

You can also provide multiple files by namespacing the configuration:

app:
  restart: always
  image: myorg/app
  labels:
    io.rancher.sidekicks: app-conf,app-key
  volumes_from:
    - app-conf
    - app-key
app-conf:
  restart: always
  images: objectpartners/rancher-container-conf:latest
  command: config/app # Configures a namespace for the config
  volumes:
    - /config/app # Export the sub-folder to not collide with other config
app-key:
  restart: always
  images: objectpartners/rancher-container-conf:latest
  command: config/key # Configures a namespace for the config
  volumes:
    - /config/key # Export the sub-folder to not collide with other config

And configure multiple spaces in rancher-compose.yml

app:
  metadata:
    config:
      app:
        content: |
          foo: bar
        path: '/config/app/app.conf'
      key:
        content: |
          some randome key text
        path: '/config/key/key.pem'

rancher-container-conf's People

Contributors

johnrengelman avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.