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

Update README #3

Merged
merged 4 commits into from
May 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
<!-- latest_release -->
<!-- latest_release -->
<!-- latest_release -->

<!-- release_rollup -->
<!-- release_rollup -->

<!-- latest_stable_release -->
<!-- latest_stable_release -->
64 changes: 59 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# train-winrm - Train Plugin for connecting to Windows via Remote Management

* **Project State: Active**
* **Issues Response SLA: 3 business days**
* **Pull Request Response SLA: 3 business days**

This plugin allows applications that rely on Train to communicate with the WinRM API. For example, you could use this to audit Windows Server 2016 machines.

TODO - details about underlying library
This plugin relies on the `winrm` and `winrm-fs` gems for implementation.

Train itself has no CLI, nor a sophisticated test harness. Chef InSpec does have such facilities, so installing Train plugins will require a Chef InSpec installation. You do not need to use or understand Chef InSpec.

Train plugins may be developed without a Chef InSpec installation.

## To Install this as a User

### ChefDK Installation

After June 2019, this plugin will be distributed with ChefDK; you do not need to install it separately.

### Manual Installation using `inspec plugin install`

Train plugins are distributed as gems. You may choose to manage the gem yourself, but if you are an Chef InSpec user, Chef InSpec can handle it for you.

You will need Chef InSpec v2.3 or later.
clintoncwolfe marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -20,15 +30,53 @@ Simply run:
$ inspec plugin install train-winrm
```

You can then run:
You can then run, using Chef InSpec as an example:

```
you@home $ inspec some-profile winrm://someuser@somehost --password somepassword
```

From Ruby code, you may use this plugin as follows:
```
TODO - example
require 'train'
transport = Train.create(
'winrm',
host: '1.2.3.4',
user: 'Administrator',
password: '...',
ssl: true,
self_signed: true
)
conn = transport.connection
```

## Target Options for Train-WinRM

TODO
### host

Required `String`. The hostname or IP address used for connection.

#### port

Optional `Integer`, default 5985 (plain) or 5896 (SSL). The port number to which the connection should be made.

### user

Optional `String`, username used for sign in. Default `Administrator`.

### password

Optional `String`, password used for sign in. None sent if not provided.

### ssl

Optional `Boolean`. Defaults to `false`. Determines whether to use SSL to encrypt communications.

Several other options exist. To see these options, run:

```
puts Train.options('winrm')
```

## Reporting Issues

Expand All @@ -46,6 +94,12 @@ If you wish to contribute to this plugin, please use the usual fork-branch-push-

[Plugin Development](https://github.com/inspec/train/blob/master/docs/dev/plugins.md) is documented on the `train` project on GitHub.

### Unit tests

Run `bundle exec rake test:unit` to run the unit tests.

### Testing changes against a Windows Machine

TODO
Install Vagrant and VirtualBox. Check the Vagrantfile to verify that it references a Windows 2016 evaluation VagrantBox to which you have access.

Then, run `bundle exec rake test:integration`. There are sub-tasks you can use to run only the integration tests; to see a list of all tasks, run `rake -aT`.