Code Monkey home page Code Monkey logo

rigger's Introduction

rigger

Since Deis recommends the use of Deis Workflow over Deis v1, rigger (a tool designed to ease installation of Deis v1) is no longer developed or maintained.

Build Status

rigger is your interface to deploying Deis on a variety of cloud providers and is currently only for development and Deis cluster trial purposes.

Quickstart

  • Get rigger:

    git clone https://github.com/deis/rigger.git
    
    cd rigger
    
  • Configure Deis deployment. The following command will ask you critical questions required to provision a Deis cluster on a certain cloud provider you choose:

    ./rigger configure
    
  • Create infrastructure + deploy Deis

    ./rigger provision
    

Demo

asciicast

Design

Why the name?

A rigger (in construction) is a person who specializes in the lifting and moving of extremely large or heavy objects. They understand the ins and outs of static and dynamic loads and their expertise is of paramount importance to ensure that the components of a project are delivered safely and expediently into the exact positions. Consider the complexities involved for a rigger when replacing a 38 ton thruster on the DCV Balder. Therefore, naming this tool "rigger" makes sense: it's your highly experienced aide in lifting your Deis platform into position.

rigger's People

Contributors

adamreese avatar carmstrong avatar gmaclennan avatar jgmize avatar mclark4386 avatar sgoings avatar slack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rigger's Issues

Proposal: Add support for named contexts

Currently, when new configurations is generated using rigger configure, it is squirelled away in ~/.rigger/<generated hex string>/vars

It would likely be easier and more convenient for users to context switch between multiples Deis clusters if they could choose their own names for the context / configuration.

Proposal:

Create new config:

$ rigger configure my-cluster

^ Creates new configuration in ~/.rigger/my-cluster/vars

Create new config for a second cluster:

$ rigger configure your-cluster

^ Creates new configuration in ~/.rigger/your-cluster/vars

Switch back to the first cluster's config:

$ rigger use my-cluster

Validate user input during configuration phase

In the configure phase, we want to make sure that the user is providing the right type of input and failing fast if possible to provide the user a chance to retry answering a prompt.

@bacongobbler explains:

The "please choose a release" from rigger configure was confusing. I thought it would equate to a deisctl config platform set version=v1.10.0, but instead it attempts to check out that branch (which it won’t error out if the branch isn’t found on rigger provision which makes sense, but it should fail if rigger can’t check out that branch IMO

AttributeError: 'NoneType' object has no attribute 'add_cname'

Full error while running ./rigger/provision:

Using ELB deis-test-DeisWebE-BB05EZPSTDNE at deis-test-DeisWebE-BB05EZPSTDNE-978018764.us-west-2.elb.amazonaws.com
Enabling proxy protocol
1
Your Deis cluster was deployed to AWS CloudFormation as stack deis-test-105216290f.

Now run this command in your shell:
export DEISCTL_TUNNEL=52.11.239.14
and continue to follow the documentation for "Installing the Deis Platform."
Setting up Route53 zone...
Traceback (most recent call last):
  File "/Users/ndbroadbent/.rigger/105216290f/go/src/github.com/deis/deis/contrib/aws/route53-wildcard.py", line 78, in <module>
    create_cname(args)
  File "/Users/ndbroadbent/.rigger/105216290f/go/src/github.com/deis/deis/contrib/aws/route53-wildcard.py", line 37, in create_cname
    status = zone.add_cname(name, args['<value>'], ttl=args['--ttl'])
AttributeError: 'NoneType' object has no attribute 'add_cname'

I'm also getting the same error in ./rigger destroy

Key Pair validation for AWS

Right now rigger hardcodes a keypair name deis for AWS - So does the deis.io documentation for AWS setup. I ran into issues where my fleet units under rigger wouldn't do the right thing due to the fact I had an old deis keypair floating on my AWS account since I did a setup without rigger.

Error: failed initializing SSH client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

This appears in a few places without much context

Comparing the local key fingerprint to the one in AWS would be good to get past obscure errors around SSH issues and inform the user to change the names (via rigger in future) or clean up their AWS account.

Add options for isolating etcd, planes and etc

@krancour would be nice to have options of isolating:

  1. etcd (ask how many members are needed 3 or 5, maybe for testing purposes an option of 1 etcd would be good to have too)
  2. Control Planes
  3. Data Planes
  4. Router Mesh
    which should provide a separate cloud-config file for each then to be used to provision the cluster

Add option to setup different schedulers on Deis provision

During the public release planning meeting, @smothiki brought up the idea that being able to choose what scheduler to use with Deis would be a desirable feature for rigger.

The way I would consider implementing that would be:

  • add a question that asks this question: "What scheduler would you like to use?" with options:
    • fleet (default)
    • swarm
    • kubernetes
    • mesos
  • pick up on this variable (DEIS_SCHEDULER) during the provisioning process (where it makes sense).

Following blog post example doesn't work - xip.io doesn't know of deis.XXX.XXX.XXX.XXX.xip.io

I'm following the blog post here:
https://deis.com/blog/2016/ramping-up-rigger-deploying-deis-digitalocean

🌀 deis auth:register http://deis.${DEIS_TEST_DOMAIN}
http://deis.MY.IPV4.ADD.RESS.xip.io does not appear to be a valid Deis controller.
Make sure that the Controller URI is correct and the server is running.
Error: Get http://deis.MY.IPV4.ADD.RESS.xip.io/v1/: dial tcp: lookup deis.MY.IPV4.ADD.RESS.xip.io on MY.DNS.PROVIDER.IP:53: no such host

The reason for this is pretty obvious- xip.io provides resolution for IPaddres.xip.io not deis.ipaddress.xip.io

Only deviation from the instructions is I used the latest version of DEIS: v1.12.2

Is there a easy way to use rigger to make a DO cluster like this, but specify DNS (say using DO's built in DNS Service?)

I post this in case you want to change the blog post or there's an actual bug. Close if it's not helpful for you. :-)

Is rigger ready for use?

Hi,

not really an issue, although it could be as master bug to keep track of outstanding issues.

I've tried to use rigger a few weeks ago (just after DigitalOcean support was merged). In the end it failed to bring up a working cluster. Although I suspect this might have been more an issue with the state of deis at that time.
Anyhow for the upcoming deis release I want to use rigger to setup a new cluster (to replace my rather old existing cluster), and I am wondering if its worth setting it up with rigger or if that is currently going to be more hassle than just setting one up from scratch... (which I already have done quite few times now...)

I've looked at the outstanding issues, and they look more as nices to have, and not anything that would prevent me from using it, but maybe there are some under the radar known problems?

how to configure instance types?

Rigger didn't ask me what type of instances I wanted to create (on DigitalOcean)

It's created three expensive 8gb instances, in San Francisco, which is not what I want, especially for a 'development' cluster

Consider a more flexible "current environment" decision logic

Right now we hold a link in ~/.rigger/vars to the vars file of the most recent rigger configure'd vars file.

This makes it a pain to deal with multiple cluster provision test etc. operations in parallel (such as in release testing).

Some options that have been discussed:

  • keep this logic but also allow people to pass in a name for their cluster at configuration time as well as for all the commands
./rigger provision aws-1
./rigger test aws-2
  • make the link smarter to just look in a directory structure within ~/.rigger/... that corresponds to the user's current working directory

rigger should support multiple "environments"

It would be cool if rigger allowed you to "source" multiple environments and name them.

so something like the following:

rigger environment create production
rigger environment create staging

Then you could do

rigger environment set production
rigger environment set staging

This would source all the necessary environment variables in your shell so you could interact with taht environment

DEIS_ROOT not respected by rigger; autogenerates root

using master, I can't seem to override rigger from automatically setting DEIS_ROOT.

$ env | grep DEIS_ROOT
DEIS_ROOT=/Users/bacongobbler/go/src/github.com/deis/deis
$ ./rigger configure --provider "digitalocean" --version "master"
DEIS_SOURCE already set to 1. Skipping prompt.
VERSION already set to master. Skipping prompt.
DEIS_GIT_REPO already set to https://github.com/deis/deis.git. Skipping prompt.
DEIS_GIT_VERSION already set to master. Skipping prompt.
GOPATH already set to /Users/bacongobbler/.rigger/d99570a9e4/go. Skipping prompt.
DEIS_ROOT already set to /Users/bacongobbler/.rigger/d99570a9e4/go/src/github.com/deis/deis. Skipping prompt.
Cloning Deis at /Users/bacongobbler/.rigger/d99570a9e4/go/src/github.com/deis/deis to master
Cloning into '/Users/bacongobbler/.rigger/d99570a9e4/go/src/github.com/deis/deis'...
^C

Proposal: use containerized backend

Depending on which underlying provisioner is used, rigger has a number of underlying dependencies that can include python, pip, ruby, rubygems, the aws cli, terraform, etc. This long and variable list of dependencies could be pared down to just a dependency on Docker (a very reasonable and low barrier to entry) by evolving rigger into an ultra-lightweight binary client that actually gets work done by handing it off to a containerized "back end" that is a more sophisticated binary in a standardized provisioning environment that's pre-loaded with all the necessary dependencies.

ImportError: No module named yaml

I got the following error when running ./rigger provision:

Traceback (most recent call last):
  File "/Users/ndbroadbent/.rigger/105216290f/go/src/github.com/deis/deis/contrib/aws/gen-json.py", line 6, in <module>
    import yaml
ImportError: No module named yaml

It was fixed by running pip install pyyaml. Could this be added as a dependency?

AWS: Customize Route 53 assignment

Currently the Route 53 configuration in the AWS rigger script is meant for test (ref DEIS_TEST_DOMAIN).

Some users (e.g. myself) use Route 53 and would like to be able to enable/customize this (e.g. as a step during the cofiguration).

For users which don't use Route 53, the script should not attempt to assign a Route 53 DNS address.

Refine rigger -> deis provider interface

In deis/deis#4315 there was a discussion that instead of having [config, install, create, check, destroy].sh files, we should just have [config, install, create, check, destroy] files (no .sh suffix).

This would enable us to write those scripts in any language.

To support this, we'd need to have certain rigger library functions on the path:

  • save-var (updates/saves variables into the rigger vars file)
  • logging functions (for common logging output/ui)
  • functions related to prompting/reading suggested answers, etc.

Support multiple domain name providers

Some people don't have Route53 set up or an official domain name to use with deis, so they'll probably want to use xip.io to at least demo/test their Deis cluster.

I'd like to see pluggable domain name providers similarly to how we have cloud providers (AWS< DO, Vagrant) pluggable.

We should support the following for any cloud provider:

  • xip.io
  • Route53

Add optional post-provision, pre-deis-install hook

A lot happens in the provision phase. However, some users (e.g. myself) have a need for executing something between the situation where the cluster is provisioned, and when Deis is installed.

Examples:

  • Setting extra configuration parameters in Deis
  • Deploying extra units to fleet (for logs, monitoring etc).

I think this could be solved by adding a extra, optional hook, which was executed by rigger during the provision phase.

Either that, or split provision into two commands:

  • provision = get cluster up and running
  • install install deis based on configuration

Problem - deployment step

Hello,

I try to deploy a Deis cluster on Vagrant using Rigger but I'm stuck just after the provisioning:

Ensuring ssh keys are being served by ssh-agent... Using released version 1.12.1. Waiting for etcd/fleet at 127.0.0.1:2222 Timeout waiting for etcd/fleet Error: failed initializing SSH client: ssh: handshake failed: ssh: unable to authenticate, attempted methods [publickey none], no supported methods remain

My ssh key is correctly added in the ssh-agent but if I try to connect the host 127.0.0.1:2222 it asks me for a password. If I go to $HOME/.rigger//go/src/deis/deis and I type vagrant ssh deis-01 it works...

My vars file :
export DEISCTL_TUNNEL="127.0.0.1:2222" export DEISCTL_UNITS="/Users/maxenceadnot/.rigger/units" export DEIS_GIT_REPO="https://github.com/deis/deis.git" export DEIS_GIT_VERSION="1.12.1" export DEIS_ID="2ba755609c" export DEIS_ID_DIR="/Users/maxenceadnot/.rigger/2ba755609c" export DEIS_PROFILE="test-2ba755609c" export DEIS_ROOT="/Users/maxenceadnot/.rigger/2ba755609c/go/src/github.com/deis/deis" export DEIS_SOURCE="1" export DEIS_TEST_AUTH_KEY="mgmt_key.pem" export DEIS_TEST_AUTH_KEY_FULL="/Users/maxenceadnot/.ssh/mgmt_key.pem" export DEIS_TEST_DOMAIN="local3.deisapp.com" export DEIS_TEST_SSH_KEY="/Users/maxenceadnot/.ssh/mgmt_key.pem" export GOPATH="/Users/maxenceadnot/.rigger/2ba755609c/go" export ORIGINAL_PATH="/Users/maxenceadnot/.rigger/bins:/Users/maxenceadnot/Development/rigger/bin:/Users/maxenceadnot/.rigger/bins:/usr/local/sbin://Users/maxenceadnot/coreos-k8s-cluster/bin/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/maxenceadnot/Go/bin:/usr/local/opt/go/libexec/bin" export PATH="/Users/maxenceadnot/.rigger/bins:/Users/maxenceadnot/Development/rigger/bin:/Users/maxenceadnot/.rigger/bins:/Users/maxenceadnot/.rigger/bin:/Users/maxenceadnot/.rigger/2ba755609c/go/bin:/Users/maxenceadnot/.rigger/bins:/Users/maxenceadnot/Development/rigger/bin:/Users/maxenceadnot/.rigger/bins:/usr/local/sbin://Users/maxenceadnot/coreos-k8s-cluster/bin/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/maxenceadnot/Go/bin:/usr/local/opt/go/libexec/bin" export PROVIDER="vagrant" export RIGGER_VARS_FILE="/Users/maxenceadnot/.rigger/2ba755609c/vars" export SSH_AGENT_PID="9726" export SSH_AUTH_SOCK="/var/folders/48/sfj2z7212q5bkl9_xkzqg0jm0000gn/T//ssh-FjJIlwy5M3pN/agent.9725" export SUGGEST_DEIS_SSH_KEY="/Users/maxenceadnot/.vagrant.d/insecure_private_key" export SUGGEST_DEIS_TEST_DOMAIN="local3.deisapp.com" export VERSION="1.12.1"

Any idea ?

Show all environment variables being set during configure phase

We've seen a few issues where people had environment variables set (like DEV_REGISTRY) so that during rigger configure the DEV_REGISTRY prompt is skipped. We should at least have a log message explaining that this is happening and possibly watch for when that may cause problems (local registry vs. publicly available registry using a cloud provider).

Running a fresh ./rigger checkout errors out

[nathan@zeta rigger]$ ./rigger checkout
/home/nathan/Documenten/rigger/../rigger/lib/functions.sh: line 93: /home/nathan/.rigger/vars: No such file or directory
ERROR: *** command failed: deis:checkout. ***
[nathan@zeta rigger]$ 

Using latest master f5a69ec

Proposal: add rigger commands for listing or viewing config / context

I'm proposing this as an alternative to user spelunking in ~/.rigger to find various configs / contexts for different clusters.

Related #52

Maybe if configs / contexts were put in ~/.rigger/contexts/my-cluster/vars (instead of ~/.rigger/my-cluster-vars we could provide something like rigger list-contexts (or list-clusters?) that just lists out the dirs in ~/.rigger/contexts.

We could even add something like rigger view-context my-context that just cats ~/.rigger/contexts/my-context/vars

~/.rigger/vars doesn't exist. Have you run rigger configure yet?

New to rigger, tried the quickstart and failed.

18:14:32 [aaron@ender:~/code/rigger] master ± ./rigger configure
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   582    0   582    0     0   1637      0 --:--:-- --:--:-- --:--:--  1639
100 2956k  100 2956k    0     0   848k      0  0:00:03  0:00:03 --:--:-- 1109k
DEIS_SOURCE already set to 1. Skipping prompt.
VERSION already set to 1.12.3. Skipping prompt.
DEIS_GIT_REPO already set to https://github.com/deis/deis.git. Skipping prompt.
DEIS_GIT_VERSION already set to 1.12.3. Skipping prompt.
GOPATH already set to /home/aaron/.rigger/968815c052/go. Skipping prompt.
DEIS_ROOT already set to /home/aaron/.rigger/968815c052/go/src/github.com/deis/deis. Skipping prompt.
Cloning Deis at /home/aaron/.rigger/968815c052/go/src/github.com/deis/deis to v1.12.3
Cloning into '/home/aaron/.rigger/968815c052/go/src/github.com/deis/deis'...
remote: Counting objects: 2163, done.
remote: Compressing objects: 100% (1919/1919), done.
remote: Total 2163 (delta 145), reused 1442 (delta 70), pack-reused 0
Receiving objects: 100% (2163/2163), 3.12 MiB | 1.27 MiB/s, done.
Resolving deltas: 100% (145/145), done.
Checking connectivity... done.
Note: checking out 'a4e1f176bf567380b8ae067c329920d7b39e7dd0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

-> What cloud provider would you like to use? answer [ vagrant ]
1) vagrant
2) digitalocean
3) aws
#? 2
You chose: 2) digitalocean
Configuring digitalocean provider...
-> What DigitalOcean token should I use? DO_TOKEN (no default)
You chose: ******
Successfully logged into DigitalOcean!
-> What private SSH key should I use when creating DigitalOcean droplets? SSH_PRIVATE_KEY_FILE [ /home/aaron/.ssh/id_rsa ]
1) /home/aaron/.ssh/id_rsa
2) /home/aaron/.ssh/deiskey
#? 1
You chose: 1) /home/aaron/.ssh/id_rsa
This SSH key is correctly configured for use with DigitalOcean!
DO_SSH_FINGERPRINT set to f4--snip--50
DEIS_TEST_SSH_KEY already set to /home/aaron/.ssh/id_rsa. Skipping prompt.
DEIS_TEST_AUTH_KEY_FULL already set to /home/aaron/.ssh/id_rsa. Skipping prompt.
Ensuring ssh keys are being served by ssh-agent...
Enter passphrase for /home/aaron/.ssh/id_rsa: 
18:14:50 [aaron@ender:~/code/rigger] master 1 ± ./rigger provision
/home/aaron/.rigger/vars doesn't exist. Have you run rigger configure yet?
18:14:54 [aaron@ender:~/code/rigger] master 1 ± 

Can install to /usr/local/bin ?

I'd like to symlink rigger into my /usr/local/bin rather than having to cd into the cloned source dir each time I want to use it.

I tried just doing that but I get SYNTAX: module not found: "rigger" error if I try to run it.

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.