# A Windows instance via the WinRM protocol -- --ssh-key is still required due to EC2 API operations that need it to grant access to the Windows instance
# `--spot-price` option lets you specify the spot pricing
knife ec2 server create -I ami-173d747e -G windows -f m1.medium --user-data ~/your-user-data-file -x '.\a_local_user' -P 'yourpassword' --ssh-key your-public-key-id --spot-price price-in-USD
So, put in your pub key id/name, that you will use in that reason.
Thank you!
I am almost there. Can someone shed light on the --ssh-key parameter? I'm passing a local copy of a .pem file that is on AWS but knife is saying it cannot be found.
-----Sent from Alex's mobile device. Please excuse typos and brevity.There's a serviceable, if minimal (and possibly insufficient for your use) example of a command at https://github.com/chef/knife-ec2:Hi Alex,Yes, knife ec2 server create is where you want to start.
$ knife ec2 server create -r 'role[webserver]' -I ami-7000f019 -f m1.small -A 'Your AWS Access Key ID' -K "Your AWS Secret Access Key"
The -r flag sets the Chef run list and I think the other ones are self-explanatory.
You should run the following command to get a list of all the flags:
$ knife ec2 server create -h
The one command above will accomplish two things:
1. Create an AWS EC2 instance matching the specified settings
2. Once AWS is done baking the EC2 instance, it will then be bootstrapped with chef-client, registered to your Chef server, and a first chef-client run will occur.
On Thu, Sep 24, 2015 at 2:39 PM, Alex Neihaus < " target="_blank"> > wrote:
Hello,
Total Chef newbie.
I am trying to spin up a Windows Server instance using knife ec2. I'm stuck conceptually on how to accomplish this using knife. Should I try knife ec2 server create? If so, can someone please help with a command I can pattern from? (The knife ec2 doc is, ahem, a little sparse).
Thanks!
Archive powered by MHonArc 2.6.16.