Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling together existing PRs for windows support #150

Merged
merged 5 commits into from
Jun 18, 2015
Merged

Conversation

tyler-ball
Copy link
Contributor

Checklist of items (copied from #133)

  • WinRM not enabled by default on EC2 instances so have to manually enable it with user-data
  • This issue - have to wait for WinRM to be enabled; WinRM transport currently too impatient
  • Default username for WinRM transport doesn't work (issue Transport defaults windows username to ./administrator test-kitchen#688)
  • Command to create EC2 JSON for Ohai doesn't work because the command is targeted at *NIX-based machines - which breaks the end of the kitchen 'create' phase
  • WinRM enabled automatically by Kitchen-ec2 (could be salvaged from Creating windows-guest-support branch for kitchen-ec2 #96)
  • EC2-generated Administrator password (Add feature to get Windows password generated by AWS #133)
  • Windows AMIs in amis.json
  • Store generated admin password and pass it to RDP command when running kitchen login
  • Add test coverage for new methods and create method
  • Documentation - windows support, specifying username & password, auto generated user_data

Note: The only way I could see to store a password in the .rdp file is to encrypt it using a microsoft-only DLL

Depends on test-kitchen/test-kitchen#736
Replaces #96
Replaces #133
Includes #134

\cc @fnichol @zl4bv

$username="#{instance.transport[:username]}"
$password="#{instance.transport[:password]}"
"Creating static user: $username" >> $logfile
& net.exe user /y /add $username $password >> $logfile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this silently fail if the user already exists? Thinking about baked AMIs, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea - can I get some help from @smurawski or @afiune?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

net user will add or modify existing accounts, so this would re-set the password to whatever test-kitchen thinks it should be for that user account. This could break things if that user account was set up in application pools or something, but that just means you shouldn't run test-kitchen's transport as a user doing some other duty.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'm going to leave this behavior in as the default under the assumption that users won't have an image with the TK user pre-baked. If they do, they can write their own custom user data.

@smurawski
Copy link

LGTM 👍


### New Features

* Added support for managing Windows hosts in AWS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tyler-ball could you put our usernames against these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely! Thanks for the reminder and all the great contributions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for helping to pull this together!

@afiune
Copy link

afiune commented Jun 16, 2015

Just tested. This looks good.. :shipit:

Thanks @tyler-ball for pushing this and make it happen (for real!) .. 😄

tyler-ball added a commit that referenced this pull request Jun 18, 2015
Pulling together existing PRs for windows support
@tyler-ball tyler-ball merged commit d06477d into master Jun 18, 2015
@tyler-ball tyler-ball deleted the tball/windows branch June 18, 2015 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants