rbs-sandbox

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

README

Rancher BootStrap (rbs) - sandbox

purpose

This project is to allow automating the configuration of a Rancher Server through a configuration yaml file. It is designed so that a configuration file could be generated by a configuration management system, and then have rbs wire up the servers configuration.

Capabilities

In this first version it can support configuring Rancher:

  • Authenticate to Active Directory
  • Add Accounts. (should only be used for Admin type accounts)
  • Add/Remove environments
  • Add/Remove Registries (with credentials)
  • Create registration command for an environment.

Usage

See the config.yml.example file to see how the majority of types are created. The supported types are shown in the example.

Configure the Rancher server URL in your config.yml

---
server:
  url: "http://rancherserver/v1"
...

To configure the command is then called as follows

NAME:
   Rancher Bootstrap - File driven Rancher configuration

USAGE:
   main [global options] command [command options] [arguments...]

VERSION:
   0.0.0

COMMANDS:
   registration-command, rc	Get the registration command for nodes
   help, h			Shows a list of commands or help for one command

GLOBAL OPTIONS:
   -c, --config-file "./config.yml"	Path to config file
   -k, --key-file "./keys"		Path where Admin Keys will be stored
   --help, -h				show help
   --version, -v			print the version

To get registration commands for Rancher environemnts the command can be run:

rbs-sandbox [-c <config.yml> -k <keys> ] rc <env>

this will output something like

sudo docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v0.9.2 http://192.168.99.100/v1/scripts/DD2436B1788BB352D77B:1457067600000:ICYwLgay8H3xjbwVgPExtu62uVk

After the first run a pair of Admin API keys will be stored in the key-file. You will want to keep these credentials in a safe spot. If you delete these keys, you will need to log in with an Admin account to create new keys and place into the file.

Project level API keys are created and deleted as needed.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL