module
Version:
v1.0.4
Opens a new window with list of versions in this module.
Published: Apr 21, 2018
License: MIT
Opens a new window with license information.
README
¶
Drawbridge
![Github All Releases](https://img.shields.io/github/downloads/analogj/drawbridge/total.svg?style=flat-square)
Goals
-
generate SSH config files for servers spread across multiple enviornments and stacks (configure)
- ensure that config files support multiple users
- ensure that config files support multiple environments
- enusre that config files support multiple stacks per environment
- allow for different SSH keys for each stack/environment.
- allow for different jumphost/bastion domain generation template for each env.
- handle multiple bastion hosts per stack (eg. range 1-X)
-
allow for a method to retrieve config file with stack/env/user defaults (list)
-
delete SSH config files & other data from host (cleanup)
-
the ability to download files from hosts, though the tunnel (scp)
-
the ability to open the ssh tunnel, with http port binding locally (connect)
-
ability to hook into the configure/create step and create additional templates dynamically on the file system.
- used to create knife configs
- used to create proxy files?
How does config file work:
-
list of questions, each question has a key, that key is used to populate the template.
-
each question has a description, used when asking the user for input
-
each question has a type, a golang type, used when generating the struct, and for validaiton
-
question can have validation, ensure that it's proper value
-
question can have range of allowed values
-
question can have an example string (not default), used for hinting to the user.
-
question can have ui_group_by value, 1,2,3 used in ui for listing.
-
question can have ui_hidden value, boolean, used in ui to hide during listing.
-
questions will be used to create a dynamic Struct, with tags added dynamically: https://github.com/fatih/gomodifytags
-
list of answers
-
answers can reference an external file using _file
, which will be loaded inplace.
-
answers must provide atleast one of the questions. (empty objects will throw an error)
-
answers will be validated against the questions. Any invalid answers removed? throw an error?
-
template section
-
custom/overridable templates supported:
- config template
- config filename template
- ssh key filepath template
References
Click to show internal directories.
Click to hide internal directories.