chef-partners/gcewinpass

Name: gcewinpass

Owner: Chef Partners

Description: Reset password of Google Compute Engine instances running Windows

Created: 2016-02-24 22:50:04.0

Updated: 2016-02-25 19:43:55.0

Pushed: 2017-12-11 15:12:57.0

Homepage: null

Size: 24

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

gcewinpass - Reset GCE Windows Instance Passwords

The process for resetting a Windows instance password on Google Compute Engine is a bit involved. This gem provides a tool for automating the resetting of those passwords.

It was originally developed for use by Chef in the knife-google and kitchen-google plugins.

Installation

Add this line to your application's Gemfile:

'gcewinpass'

And then execute:

$ bundle

Or install it yourself as:

$ gem install gcewinpass
Usage

First, create a Google Cloud credentials file. The easiest way to do this is to install the Google Cloud SDK and run gcloud auth login. Alternatively, set a GOOGLE_APPLICATION_CREDENTIALS environment variable pointing to your credentials JSON file.

Then, in your application, create a GoogleComputeWindowsPassword object and retrieve a new password:

word_reset = GoogleComputeWindowsPassword.new(
oject:       "my-gce-project",
ne:          "us-east1-c",
stance_name: "windows-instance-1",
ail:         "myemail@company.com"

word_reset.new_password

The return from new_password will be the new password set on the Windows instance.

The following parameters are required:

The following parameters are optional:

License and Authors

Author:: Chef Partner Engineering (partnereng@chef.io)

Copyright:: Copyright (c) 2016 Chef Software, Inc.

License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributing

We'd love to hear from you if you find this isn't working for you. Please submit a GitHub issue with any problems you encounter.

Additionally, contributions are welcome! If you'd like to send up any fixes or changes:

  1. Fork it ( https://github.com/chef-partners/gcewinpass/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.