[chef] Re: WinRM Chicken / Egg


Chronological Thread 
  • From: Chirag Jog < >
  • To: " " < >
  • Subject: [chef] Re: WinRM Chicken / Egg
  • Date: Sun, 3 Mar 2013 15:09:58 +0530

Hello Angus,

On EC2 (and other clouds that support userdata), we can pass a Powershell/Batch script that sets things up for us on a Standard Win 2k8 Image.

Here is the script:

<powershell>
    winrm quickconfig -q
    winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
    winrm set winrm/config '@{MaxTimeoutms="1800000"}'
    winrm set winrm/config/service '@{AllowUnencrypted="true"}'
    winrm set winrm/config/service/auth '@{Basic="true"}'
</powershell>

This should setup winrm for you pre-bootstrapping.

And here is the ec2 command:
knife ec2 server create  ..... --user-data enableWinRM.ps1...



Let me know if this helps!

Regards,
Chirag Jog
Chief Technology Officer, 
Clogeny Technologies | http://clogeny.com 
(M) 0091-9766619440 | Skype: chirag.jog



On Sun, Mar 3, 2013 at 2:08 PM, Angus Buchanan < " target="_blank"> > wrote:
I'm familiar with the process of setting up WinRM to allow bootstrapping of machines with knife.

However, I'd like to be able to bootstrap machines without having to first log onto the machine and configure WinRM.  That seems kinda pointless - if I'm going to have to log onto the machine to set up a WinRM listener, I might as well just install Chef while I'm at it.  It also doesn't scale at all...

I'm operating mostly in a cloudy world - combination of Rackspace and EC2.  I'm considering using user data on EC2 to run the WinRM setup stuff... I assume Rackspace has an equivalent mechanism.

Is this pretty much the way to go?  What I'd love would be the ability to run a script using my RDP credentials, but so far I've not seen a way to do this.

Am I missing a trick?  I'd really love to be able to run a script which basically connects to the newly created cloud machine, and runs the winrm stuff to set up the ability to run knife over it.  Pipe dream?

Thanks!

-aob




Archive powered by MHonArc 2.6.16.

§