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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
Add this line to your application's Gemfile:
'gcewinpass'
And then execute:
$ bundle
Or install it yourself as:
$ gem install gcewinpass
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:
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.
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:
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)