auser / salt-cli

A ruby gem to interact with salt on different providers from a local machine
MIT License
4 stars 1 forks source link

excon 400 bad request #6

Open fragamus opened 11 years ago

fragamus commented 11 years ago

unknown1040f38b4e0e% salt aws launch
{:username=>"ubuntu", :private_key_path=>"/Users/michaelgough/.ec2/frankey.pem", :public_key_path=>"/Users/michaelgough/.ec2/frankey.pem.pub", :tags=>{:name=>"development-master", :environment=>"development"}, :groups=>["development-master-frankey.pem"], :flavor_id=>"m1.small", :image_id=>"ami-0cdf4965"} /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.24.0/lib/excon/middlewares/expects.rb:10:in response_call': Expected(200) <=> Actual(400 Bad Request) (Excon::Errors::BadRequest) from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.24.0/lib/excon/connection.rb:353:inresponse' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.24.0/lib/excon/connection.rb:247:in request' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.9.0/lib/fog/core/connection.rb:21:inrequest' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.9.0/lib/fog/aws/compute.rb:384:in _request' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.9.0/lib/fog/aws/compute.rb:379:inrequest' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.9.0/lib/fog/aws/requests/compute/import_key_pair.rb:27:in import_key_pair' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.9.0/lib/fog/aws/models/compute/key_pair.rb:27:insave' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.9.0/lib/fog/core/collection.rb:52:in create' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/gems/fog-1.9.0/lib/fog/aws/models/compute/servers.rb:81:inbootstrap' from /Users/michaelgough/asdf/schmoud/salt-cli/lib/salt/providers/aws_provider.rb:55:in launch' from /Users/michaelgough/asdf/schmoud/salt-cli/lib/salt/commands/launch.rb:45:inlaunch_by_name' from /Users/michaelgough/asdf/schmoud/salt-cli/lib/salt/commands/launch.rb:36:in run' from /Users/michaelgough/asdf/schmoud/salt-cli/lib/salt/base_command.rb:71:inrun_command' from /Users/michaelgough/asdf/schmoud/salt-cli/lib/salt.rb:21:in run_provider_command' from /Users/michaelgough/asdf/schmoud/salt-cli/bin/salt:12:in<top (required)>' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/bin/salt:19:in load' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/bin/salt:19:in

' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/bin/ruby_noexec_wrapper:14:in eval' from /Users/michaelgough/.rvm/gems/ruby-1.9.3-p429/bin/ruby_noexec_wrapper:14:in
' unknown1040f38b4e0e%

auser commented 11 years ago

Interesting. Looks like you're using the .pem key as the group name. I don't think groups can have . in their names. Should I change this in the docs?

fragamus commented 11 years ago

Well can you tell me what I'm doing wrong? All I do is: salt aws launch

I installed using this, which is based on your README:

!/bin/bash

git clone git@github.com:auser/salt-cli.git cp salt-config.yml salt-cli cp frankey.pem salt-cli cp frankey.pem.pub salt-cli cp frankey.pem ~/.ec2/ cp frankey.pem.pub ~/.ec2/ cd salt-cli bundle install gem build salt-cli.gemspec gem install salt-cli salt #should now show a list of salt-cli commands

Here is my salt-config.yml:

user: ubuntu plans: dev:

In order

- master:
    roles:
      - master
- monitor:
    roles:
      - monitor
- hadoop1:
    roles:
      - hadoop_master
      - hbase_master
      - zookeeper
      - elasticsearch
      - hbase_slave
- hadoop2:
    roles:
      - hbase_slave
      - zookeeper

aws: access_key: AKIAHJG235FGHJHFWLZA secret_key: YSDFG465GHJFG34/IEIQcYnc keyname: frankey.pem

Configs

machines: default: flavor: m1.small image_id: ami-0cdf4965 master: ports: tcp:

auser commented 11 years ago

Yep, change the keyname to just frankly:

keyname: frankey

Oh and change your API keys

Ari Lerner 520-360-9215 $ curl -iL http://ari.io

On Jun 18, 2013, at 12:05 PM, fragamus notifications@github.com wrote:

Well can you tell me what I'm doing wrong? All I do is: salt aws launch

I installed using this, which is based on your README:

!/bin/bash

git clone git@github.com:auser/salt-cli.git cp salt-config.yml salt-cli cp frankey.pem salt-cli cp frankey.pem.pub salt-cli cp frankey.pem ~/.ec2/ cp frankey.pem.pub ~/.ec2/ cd salt-cli bundle install gem build salt-cli.gemspec gem install salt-cli salt #should now show a list of salt-cli commands

Here is my salt-config.yml:

user: ubuntu plans: dev:

In order

  • master: roles:
  • master
  • monitor: roles:
  • monitor
  • hadoop1: roles:
  • hadoop_master
  • hbase_master
  • zookeeper
  • elasticsearch
  • hbase_slave
  • hadoop2: roles:
  • hbase_slave
  • zookeeper aws: access_key: AKIAHJG235FGHJHFWLZA secret_key: YSDFG465GHJFG34/IEIQcYnc keyname: frankey.pem

    Configs

    machines: default: flavor: m1.small image_id: ami-0cdf4965 master: ports: tcp:

  • 4505
  • 4506 monitor: flavor: m1.large ports: udp:
  • 514
  • 12201 tcp:
  • 80
  • 2003
  • 2004
  • 8080
  • 9300
  • 9200 hadoop: &hadoop flavor: m1.xlarge ports: tcp:
  • 54310
  • 9200
  • 9300
  • 2181
  • 60000
  • 60010
  • 60020
  • 2888..3888 hadoop1: <<: *hadoop hadoop2: api: &api ports: tcp:
  • 80
  • 8080

— Reply to this email directly or view it on GitHub.