Giter Club home page Giter Club logo

deploy-config-generator-dcos-secrets's Introduction

deploy-config-generator-dcos-secrets

This repo contains a deploy config generator plugin for DC/OS secrets and its supporting scripts.

Usage

The plugin/dcos_secrets.py file should be placed in a directory and pointed at with a line like plugin_dirs: path/to/plugins in your deploy-config-generator site config. This will enable a top level secrets section in your deploy configs.

The scripts/update_dcos_secrets.py script is used to process and apply the DC/OS secrets from the JSON file(s) generated by the plugin. They can be processed individually or all at once (after concatenating them into a single JSON list).

It can be invoked as follows:

$ path/to/scripts/update_dcos_secrets.py --url https://your.dcos.host.name --token <DC/OS auth token> <secrets JSON file>

If you already have your cluster configured in the DC/OS CLI tool, you can run the script like:

$ path/to/scripts/update_dcos_secrets.py --url $(dcos config show core.dcos_url) --token $(dcos config show core.dcos_acs_token) dcos_secrets-001.json

Input format

The update_dcos_secrets.py script expects its input file to be JSON with the following format.

Generate a random password:

{
  "name": "name of secret to manage",
  "type": "password"
}

Create secret from value of environment variable:

{
  "name": "name of secret to manage",
  "type": "password",
  "env_var": "SOME_ENV_VAR"
}

Multiple secrets:

[
  {
    "name": "secret1",
    "type": "password"
  },
  {
    "name": "secret2",
    "type": "password",
    "env_var": "SOME_ENV_VAR"
  }
]

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.