hybris/bosh-manifest-generator

Name: bosh-manifest-generator

Owner: hybris GmbH

Description: Generator for bosh manifests including vault passwords.

Created: 2015-09-15 13:49:13.0

Updated: 2016-12-19 14:53:22.0

Pushed: 2017-01-10 09:48:58.0

Homepage: null

Size: 25

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Introduction

The manifest generator scripts are used to download manifests and merge them with passwords stored in vault.

Installation

Clone the repo and run:

le install
build bosh_manifest_generator.gemspec
install bosh_manifest_generator-0.0.1.gem

Vault configuration

Make sure that you configure the following environment variables:

rt VAULT_ADDR='https://localhost:8200'
rt VAULT_SSL_VERIFY=false

Usage (bosh-deployments)

Store credentials in vault:

le exec put_credentials <deployment_name> <environment> <passwords_file>

The script will store all values in the password file (yaml) in vault. It will return the keys used.

Generate credentials file:

le exec pull_credentials <deployment_name> <environment> <passwords_template> <out_file>

The command will read a yaml erb template and fill in passwords stored in vault. To get a password out of vault call the ´´´p´´´ function.

Build Template

The `build_template` command is used as a more generic template generator not related to bosh at all.

rt VAULT_PREFIX=secret/foo/bar
d_template <passwords_templates> <out_folder>

Usage (bosh-init, deprecated)

Generate manifest file for existing deployment:

le exec generate_manifest <working_dir> <password_erb_template>
f merge <manifest_template> <working_dir>/metadata.yml <working_dir>/passwords.yml > <working_dir>/manifest.yml

The script is expecting a metadata.yml file including the AWS account id inside the `working_dir`.

Generate and upload passwords to vault:

le exec store_passwords <aws_account_id> <vaultdeployment> <aws_secret_key> <aws_key_id> <password_erb_template>

Upload ssh key to vault:

le exec ruby store-passwords.rb <account_id> <vaultdeployment> <pem_file>

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.