softlayer / softlayer-ruby

http://softlayer.github.io/softlayer-ruby/
MIT License
54 stars 35 forks source link

[Build System] Provisioning ssh keys to Windows based systems at build #52

Closed ju2wheels closed 10 years ago

ju2wheels commented 10 years ago

Hi, im dropping this here in the hopes of bypass a resounding "nope, nope, nope" that I would expect to get from SL support without consideration for the technical merit and benefits to end users. If possible can you please pose this question to the relevant devs on your end.

We are working on enabling vagrant-softlayer post_install scripts to provide cygwin sshd with Windows builds for connectivity post build. One of the drawbacks to doing this is the ssh keys selected at order time are ignored for Windows based systems. If we had these provisioned to say C:\ssh_keys\ for us before post_install it would help us provide a more streamlined configuration than having to tell people you have to script a way to download them onto your box, as opposed to we pre dropped them onto the box for you, do what you want with it if you need it.

I have no idea what OS your build system runs on internally but from watching the process I can see its able mount ISOs so if its Linux based one could develop an additional step based on using genisoimage to create an ISO of the selected SSH keys and copy them to the system.

SLsthompson commented 10 years ago

Would it be unacceptable to pass the ssh keys through the "user_metadata" property (aka userData.value) when creating the server?

ju2wheels commented 10 years ago

How would we get that on the actual machine, wouldnt we need API access credentials to ask the API for those details?

[Edit] Ignore that, checked the doc. That should work aside from the character limit if they choose too many keys.

Thanks

SLsthompson commented 10 years ago

FWIW I asked about your issue and the suggestion I got was to encode some API credentials and logic into the provisioning script to have it reach back to the API to get the ssh keys. (precisely what you said you didn't want). The copying of ssh keys to a Windows servers is considered a "non-standard" configuration.

ju2wheels commented 10 years ago

Hmm, does that mean this https://github.com/bodenr/cci/wiki/SL-user-metadata is no longer accurate, I already opened a SL ticket to ask but waiting on the reply. I wasnt sure if this automatic authentication/retrieval of user_metadata through the API private network endpoint means we get full access to the API without explicit creds from VS or if its only user_metadata we are able to retrieve through this method.

SLsthompson commented 10 years ago

No... I don't know about the accuracy (or inaccuracy) of the information at that page.

I simply asked for suggestions on the best way to handle your desire (getting ssh keys to a Windows server during provisioning) and the first thing that came up was using API credentials in the provisioning script to grab the SSH keys. Nothing more was meant by my comment. It was just the first suggestion that came up.