Knife command for create new security group or key pair in AWS ec2


#1

Hi,
EC2 bootstrap guide for create server and exec cookbooks only…i need to know
we can create a key pair, security group, etc using knife commands
like create server ,knife ec2 server create -I ami-b89842d1 -x ubuntu
not in console part using knife command only i need. it possible means where
i can get the source code… please send any solution as soon as possible.

Thanks and Regards,
Ganesan.A


#2

Knife-EC2 is for creating/destroying instances. Managing security groups, key pairs and such would be handled within recipes or with the CLI tools/AWS console.

http://lists.opscode.com/sympa/arc/chef/2011-09/msg00153.html

On Wednesday, December 19, 2012 at 7:57 AM, ganesan15785@gmail.com wrote:

Hi,
EC2 bootstrap guide for create server and exec cookbooks only…i need to know
we can create a key pair, security group, etc using knife commands
like create server ,knife ec2 server create -I ami-b89842d1 -x ubuntu
not in console part using knife command only i need. it possible means where
i can get the source code… please send any solution as soon as possible.

Thanks and Regards,
Ganesan.A


#3

Also, you may want to look at AWS CloudFormation to take care of the
pre-bootstrapping stuff (sec groups, etc.) and then had off the EC2
bootstrapping to Chef.

From ChefConf 2012:

On Wed, Dec 19, 2012 at 10:09 AM, Daniel Condomitti
daniel@condomitti.com wrote:

Knife-EC2 is for creating/destroying instances. Managing security groups,
key pairs and such would be handled within recipes or with the CLI tools/AWS
console.

http://lists.opscode.com/sympa/arc/chef/2011-09/msg00153.html
https://github.com/fog/fog

On Wednesday, December 19, 2012 at 7:57 AM, ganesan15785@gmail.com wrote:

Hi,
EC2 bootstrap guide for create server and exec cookbooks only…i need to
know
we can create a key pair, security group, etc using knife commands
like create server ,knife ec2 server create -I ami-b89842d1 -x ubuntu
not in console part using knife command only i need. it possible means where
i can get the source code… please send any solution as soon as possible.

Thanks and Regards,
Ganesan.A


Kevin Karwaski
Operations Engineer @ {Fiksu}


#4

Perhaps take a look at the aws cookbook and potentially provide patches for the behavior you need.

Thanks,
Matt Ray
Senior Technical Evangelist | Opscode Inc.
matt@opscode.com | (512) 731-2218
Twitter, IRC, GitHub: mattray


From: Kevin Karwaski [kkarwaski@fiksu.com]
Sent: Wednesday, December 19, 2012 9:55 AM
To: chef@lists.opscode.com
Subject: [chef] Re: Re: knife command for create new security group or key pair in AWS ec2

Also, you may want to look at AWS CloudFormation to take care of the
pre-bootstrapping stuff (sec groups, etc.) and then had off the EC2
bootstrapping to Chef.

From ChefConf 2012:

On Wed, Dec 19, 2012 at 10:09 AM, Daniel Condomitti
daniel@condomitti.com wrote:

Knife-EC2 is for creating/destroying instances. Managing security groups,
key pairs and such would be handled within recipes or with the CLI tools/AWS
console.

http://lists.opscode.com/sympa/arc/chef/2011-09/msg00153.html
https://github.com/fog/fog

On Wednesday, December 19, 2012 at 7:57 AM, ganesan15785@gmail.com wrote:

Hi,
EC2 bootstrap guide for create server and exec cookbooks only…i need to
know
we can create a key pair, security group, etc using knife commands
like create server ,knife ec2 server create -I ami-b89842d1 -x ubuntu
not in console part using knife command only i need. it possible means where
i can get the source code… please send any solution as soon as possible.

Thanks and Regards,
Ganesan.A


Kevin Karwaski
Operations Engineer @ {Fiksu}


#5

Ganesan,

There’s nothing there in the default knife-ec2 plugin IIRC. However, I’ve
seen infochimps do this in their ironfan work so i don’t see why there’d be
a problem if you wanted to add these actions to knife-ec2, or to an
additional plug-in for yourself.

I’m not sure that the aws cookbook is the place this would go otherwise.
Wouldn’t that imply that this needs to be done on the launched instance
which may not have permissions to modify groups (the security group API is
very coarse - pretty much all or nothing) and the key generation needs to
be done pre-boot as well if you want dynamically created keys.

-Peter

On Wed, Dec 19, 2012 at 10:57 AM, Matt Ray matt@opscode.com wrote:

https://github.com/opscode-cookbooks/aws