Giter Club home page Giter Club logo

ploy's People

Contributors

fschulze avatar igalic avatar kabbeck avatar natea avatar tomster avatar witsch 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  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

ploy's Issues

change user for fabric..

How to change the user root to something like ubuntu when executing fabric.
I've been trying this command:

$ aws do demo-server --user=ubuntu get_syslog

INFO: Instance 'demo-server' available
run: tail /var/log/syslog
out: Please login as the ubuntu user rather than root user.

Cheers,
rodney

SSH login

if we see inside aws.conf ,
server_user = ubuntu

but when i run the : aws ssh demo-webserver
its say please use users rather than root ... im not sure is it a problem/bugs that u guys should look into it ..

btw ... mr.awsome is REALLY AWESOME !! :)

paramiko ssh doesn't support proxying encrypted ssh keys

when trying to connect to a jail

ERROR: Failed to connect to ez-instance:i_eena_me (10.0.0.2)
ERROR: username: 'root'
ERROR: port: 22
ERROR: sock: <paramiko.proxy.ProxyCommand object at 0x7f2a80a6bed0>
ERROR: Couldn't validate fingerprint for ssh connection.
ERROR: Private key file is encrypted
ERROR: Is the instance finished starting up?

or configure it:

PLAY [jailhost-i_eena_me] ***************************************************** 

GATHERING FACTS *************************************************************** 
ERROR: Failed to connect to ez-instance:i_eena_me (10.0.0.2)
ERROR: username: 'root'
ERROR: port: 22
ERROR: sock: <paramiko.proxy.ProxyCommand object at 0x7f46fb3ef6d0>
fatal: [jailhost-i_eena_me] => Couldn't validate fingerprint for 'ez-instance:i_eena_me': Private key file is encrypted

TASK: [infopro-digital.apache | APACHE | Include OS-specific variables] ******* 
FATAL: no hosts matched or all hosts have already failed -- aborting

paramiko fails with encrypted keys, because it doesn't forward the ssh agent settings.

This is something btw is something ansible considered: ansible/ansible#4100 but then declined, because their paramiko support is deprecated.

TypeError: cmd_status() takes exactly 3 arguments

Since updating to the latest mr.awsome 0.6, now when I run the ./bin/aws start command, the following error occurs. Do I need to pass in another argument besides the server config that I want to use?

{{{
$ ./bin/aws start test
INFO: Instance 'test' unavailable
INFO: Creating instance 'test'
INFO: Instance created, waiting until it's available
...
Traceback (most recent call last):
File "./bin/aws", line 16, in
mr.awsome.aws(configpath="/Users/nateaune/code/mrawsome.buildout/etc/deployment")
File "/Users/nateaune/.buildout/eggs/mr.awsome-0.6-py2.6.egg/mr/awsome/init.py", line 652, in aws
return aws(argv)
File "/Users/nateaune/.buildout/eggs/mr.awsome-0.6-py2.6.egg/mr/awsome/init.py", line 646, in call
args.func(sub_argv, args.func.doc)
File "/Users/nateaune/.buildout/eggs/mr.awsome-0.6-py2.6.egg/mr/awsome/init.py", line 444, in cmd_start
self.cmd_status()
TypeError: cmd_status() takes exactly 3 arguments (1 given)
}}}

bin/assh ignores any additional options to ssh (except -l)

I can provide a user via the -l flag to ssh, but passing a keyfile using -i is ignored. If I name my keyfile id_rsa, then it works quite nicely due to how the ssh package looks for keys, but working with AWS keypairs this is not so helpful.

It would be nice if it were possible to have command-line arguments to assh passed inward.

x86_64 Images

im getting error while choosing 64bit images in aws.conf, inside aws.conf didnt specify architecture right? just the AMI ID ...

im not sure either me or others got this issue/problem ...

Documentation is missing indentation

In the documentation the two lines after entry-points do not appear as indented:

entry-points =
aws=mr.awsome:aws
assh=mr.awsome:aws_ssh

And if you don't indent these lines, then the recipe doesn't work, and no aws or assh scripts are created in the /bin directory.

Also, the two tcp lines are not indented:

connections =
tcp 22 22 0.0.0.0/0
tcp 80 80 0.0.0.0/0

boto-2.0rc1 partly works with mr.awsome

In case anyone is struggling to get mr.awsome running with boto-2.0rc1; that doesn't work. It's possible to start instances but not to terminate or otherwise get info on a running instance.

I don't who's to blame (boto or mr.awsome) :)

[FreeBSD] the ploy command is looking for ploy.conf in the wrong place

To be more precise, after some investigating and source code reading, it seems it is looking into $PWD/etc/ploy.conf as shown below:

1016 [10:36] root@centre:sysutils/py-ploy_ansible# ploy  status www
                                          ^^^^^^^^^^^^^^^^^^^^^^
ERROR: Config '/usr/ports/sysutils/py-ploy_ansible/etc/ploy.conf' doesn't exist.
                                           ^^^^^^^^^^^^^^^^^^^^^^^

I'm not sure that's what we really want or it should be written somewhere (did I miss anything?).

Error: Couldn't find any fabfiles

I'm using the latest 0.8 release, and when I try to run the "do" command to execute a fabric script, the following error occurs:

$ ./bin/aws do plone3-small-production get_syslog
/Users/nateaune/.buildout/eggs/pycrypto-2.0.1-py2.6-macosx-10.6-universal.egg/Crypto
/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module     instead
  import warnings
/Users/nateaune/.buildout/eggs/pycrypto-2.0.1-py2.6-macosx-10.6-universal.egg/Crypto    /Hash/MD5.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import warnings

Fatal error: Couldn't find any fabfiles!

Aborting.

Here is what my aws.conf file looks like:

[macro:base-instance]
keypair = gsg-keypair
region = us-east-1
placement = us-east-1a
fabfile = `fabfile.py`_

[instance:plone3-small-production]
<= macro:base-instance
securitygroups = plone3-small-production
instance_type = m1.small 
image = ami-df947ab6

And there is a fabfile.py in the etc/deployment directory. What am I missing? Do I need to specify an explicit path for the fabfile, or will mr.awsome be able to find it if it's in the etc/deployment dir?

problem starting a stopped instance

Hi,
Thanks for updating mr.awsome, I was secretly hoping for that a long time.

I still have an issue when starting a stopped instance. I'm working on Mac OS X (Lion).

Below is my error. Anybody any idea?

kind regards!

INFO: Instance 'productie-2' available.
INFO: Instance state: stopped
INFO: Instance already started, waiting until it's available
Traceback (most recent call last):
File "./bin/aws", line 18, in
mr.awsome.aws(configpath = "/Users/bowlby/Edubroker/newawsome/etc")
File "/Users/bowlby/Edubroker/newawsome/eggs/mr.awsome-0.10-py2.7.egg/mr/awsome/init.py", line 451, in aws
return aws(argv)
File "/Users/bowlby/Edubroker/newawsome/eggs/mr.awsome-0.10-py2.7.egg/mr/awsome/init.py", line 445, in call
args.func(sub_argv, args.func.doc)
File "/Users/bowlby/Edubroker/newawsome/eggs/mr.awsome-0.10-py2.7.egg/mr/awsome/init.py", line 158, in cmd_start
instance = server.start(overrides)
File "/Users/bowlby/Edubroker/newawsome/eggs/mr.awsome-0.10-py2.7.egg/mr/awsome/ec2.py", line 212, in start
log.error("Something went wrong, instance status: %s", instance.status)
AttributeError: 'Instance' object has no attribute 'status'

Add support for creating new Elastic IPs

If the Amazon account has more than the default 5 Elastic IP addresses, it could be useful to have mr.awsome automatically create a new Elastic IP and associate it with the new EC2 instance, rather than needing to hardcode these IPs beforehand in the .conf file.

mr.awsome should do some sanity check before starting an instance

When starting an instance,

mr.awsome should first check if it will match the requirements like volume availability / ip prewsent in the pool (and by extension to my previous pull requests) if the load balancer exists in the same zone.

If not, then mr.awsome should prevent the instance to start unless a config option "force_start" (or something like that) is specified in the conf.

Need documentation on volumes, IP, instance_type, snapshots

The current documentation is missing instructions for how to attach EBS volumes, assign elastic IP, choose an instance type other than m1.small and make a snapshot from an attached volume.

in the aws.conf:
instance_type = m1.large
ip = x.x.x.x
volumes = vol-xxxxx /dev/sdf

to make a snapshot:
./bin/aws snapshot demo-server

The code also suggests that there is a --revision option that would let you install a particular revision of your buildout, or is this just carried over from mr.developer?

Reminder: http://plope.com/Members/chrism/documentation_is_the_differentiator

[enhancement] Add support for plain jails

Some people find ezjail more of an hindrance to manage upgrades compared to "plain jails". There is also the fact that ezjail supports only one base jail which makes mixing versions and/or archs more difficult. It would be nice if ploy could work with plain jails too.

Create an EBS volume from an EBS snapshot

It would be really useful to be able to create new EBS volumes from an existing EBS snapshot.

The aws.conf file could have something like this:

[instance:demo-server]
keypair = default
securitygroups = demo-server
region = eu-west-1
placement = eu-west-1a
image = ami-a62a01d2
snapshot = snap-2d8cd144 /dev/sdf
startup_script = startup-demo-server
fabfile = `fabfile.py`_

When you launch the instance demo-server, it would then create a new EBS volume from the snapshot "snap-2d8cd144" and attach it to the device /dev/sdf.

The info returned from the aws script would look something like this:
INFO: Instance running.
INFO: Instances DNS name ec2-184-73-240-104.compute-1.amazonaws.com
INFO: Instances public DNS name ec2-184-73-240-104.compute-1.amazonaws.com
INFO: Instances volume ID vol-58fc3031 created from snap-2d8cd144

Problem with fabfile

The fabfile integration seems to be broken for EC2 instances, the fabfile is run with the name of the instance from aws.conf rather than the public_dns_name of the running server. I think this was broken in d671f7f.

assh command is not working

When I try to ssh into a newly created instance with the "assh" command, the following error occurs:

$ ./bin/assh plone3-small-production
/Users/nateaune/.buildout/eggs/pycrypto-2.0.1-py2.6-macosx-10.6-universal.egg/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import warnings
/Users/nateaune/.buildout/eggs/pycrypto-2.0.1-py2.6-macosx-10.6-universal.egg/Crypto/Hash/MD5.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import warnings
INFO: Instance 'plone3-small-production' available
ERROR: Couldn't validate fingerprint for ssh connection.
ERROR: Authentication failed.
ERROR: Is the server finished starting up?

Do I need to specify a user or key somewhere in order for the ssh command to work?

Normally to ssh to the into the machine with this command, which works fine:

ssh -i ~/id_rsa-gsg-keypair [email protected]

More ssh login issues

Here's an excerpt of my aws.conf:

[aws]

These files must exist and contain your EC2 API keys

access-key-id=/.aws/access-key-id
secret-access-key=
/.aws/secret-access-key
region = us-east-1

[securitygroup:openblock-testing]
description = OpenBlock Test Servers
connections =
tcp 22 22 0.0.0.0/0
tcp 80 80 0.0.0.0/0
tcp 8000 8000 0.0.0.0/0

[ macro:openblock-base]
keypair = openblock
securitygroups = openblock-testing
region = us-east-1
placement = us-east-1d
instance_type = t1.micro
server_user = ubuntu

[instance:lucid-64]
<= macro:openblock-base

lucid = ubuntu 10.04

image = ami-63be790a

This works at least enough that I can create an instance from scratch:

$ aws -c aws.conf start lucid-64
INFO: Instance 'lucid-64' unavailable
INFO: Creating instance 'lucid-64'
INFO: Instance created, waiting until it's available
....

But if I try to use assh to connect, no luck:
$ assh lucid-64
INFO: Instance 'lucid-64' unavailable
ERROR: Can't establish ssh connection.
Traceback (most recent call last):
File "/home/pw/builds/openblock/builds/20110519/bin/assh", line 9, in
load_entry_point('mr.awsome==0.9', 'console_scripts', 'assh')()
File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 814, in aws_ssh
return aws(argv)
File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 802, in call
args.func(sub_argv, args.func.doc)
File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 715, in cmd_ssh
user, host, port, client, known_hosts = server.init_ssh_key()
TypeError: 'NoneType' object is not iterable

If I use ssh and explicitly specify my pem file, I can get in, so the server is definitely running:
$ assh lucid-64
INFO: Instance 'lucid-64' unavailable
ERROR: Can't establish ssh connection.
Traceback (most recent call last):
File "/home/pw/builds/openblock/builds/20110519/bin/assh", line 9, in
load_entry_point('mr.awsome==0.9', 'console_scripts', 'assh')()
File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 814, in aws_ssh
return aws(argv)
File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 802, in call
args.func(sub_argv, args.func.doc)
File "/home/pw/builds/openblock/builds/20110519/lib/python2.6/site-packages/mr/awsome/init.py", line 715, in cmd_ssh
user, host, port, client, known_hosts = server.init_ssh_key()
TypeError: 'NoneType' object is not iterable

Rename repository description

ploy is now no longer AWS only (split into ploy_ec2)

Rename description accordingly.

Ideally less than 80 chars for fitting into short packaging descriptions

Fingerprint type from public key

Thanks for a great project!
According to the docs:

fingerprint
(required) The ssh fingerprint of the server. If set to ask then manual interactive verification is enabled. If set to ignore then no verification is performed at all! You can also point this to a public ssh host key file to let the fingerprint be extracted automatically.

After setting the following in ploy.conf:

fingerprint = /path/to/my/key.pub

Then running ploy ssh jailhost results in the following error:

…
ERROR: Couldn't validate fingerprint for ssh connection.
ERROR: Fingerprint doesn't match for [x.x.x.x] (got xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx, expected SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
ERROR: Is the instance finished starting up?

How can one change the type of fingerprinting of the public key from SHA256?

Also according to the docs:

ssh-key-filename
Location of private ssh key to use.

However, according to this comment, ssh-key-filename should be used with a public key?
ployground/bsdploy#24 (comment)
Following this advice results in another error:

ERROR: not a valid EC private key file

I understand that this error might be due to another bug in Paramiko:
paramiko/paramiko#521

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.