Skip to content

Commit

Permalink
Merge pull request apache#289 from infrastation/master
Browse files Browse the repository at this point in the history
proofreading round 2
  • Loading branch information
duncangrant committed Aug 7, 2019
2 parents f38fb8b + 27fb712 commit edc13bd
Show file tree
Hide file tree
Showing 34 changed files with 109 additions and 109 deletions.
2 changes: 1 addition & 1 deletion guide/blueprints/advanced-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ When composing a YAML blueprint, the VanillaSoftwareProcess is a very useful ent
A VanillaSoftwareProcess will instruct Brooklyn to provision an instance, and run a series of shell
commands to setup, run, monitor and teardown your program. The commands are specified as configuration
on the VanillaSoftwareProcess and there are several available. We will spotlight a few now. To simplify
this blueprint, we have specified ubuntu only installs so that our commands can be tailored to this
this blueprint, we have specified Ubuntu only installs so that our commands can be tailored to this
system (e.g. use apt-get rather than yum).

##### Customize Command
Expand Down
2 changes: 1 addition & 1 deletion guide/blueprints/creating-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ simply [download and launch]({{book.path.docs}}/start/running.md) Brooklyn, open
Click on the tile "Blueprint Composer", then on the double-arrow located on the top right of the screen (to switch to the YAML mode),
paste the copied YAML into the editor and press "Deploy".
There are several other ways to deploy, including `curl` and via the command-line,
and you can configure users, https, persistence, and more,
and you can configure users, HTTPS, persistence, and more,
as described [in the ops guide]({{book.path.docs}}/ops/index.md).

[![Web Console](web-console-yaml-700.png "YAML via Web Console")](web-console-yaml.png)
Expand Down
8 changes: 4 additions & 4 deletions guide/blueprints/custom-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ so that the `$message` we passed above gets logged and reported back:
#### Windows Command Sensor

Like the blueprint above, the following example also uses `brooklyn.initializers` to define sensors on the entity,
this time however it is a windows VM and uses `WinRmCommandSensor`.
this time however it is a Windows VM and uses `WinRmCommandSensor`.

- type: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess
brooklyn.config:
Expand All @@ -264,7 +264,7 @@ health-check.
See documentation on the [Entity's error status]({{book.path.docs}}/ops/troubleshooting/overview.md#entitys-error-status)
for how Brooklyn models an entity's health.

In the snippet below, we'll define a new health-check sensor (via http polling), and will automatically add this
In the snippet below, we'll define a new health-check sensor (via HTTP polling), and will automatically add this
to the `service.notUp.indicators`. If that map is non-empty, then the entity's `service.isUp` will be set
automatically to `false`:

Expand Down Expand Up @@ -303,10 +303,10 @@ automatically to `false`:
- "no value"

The `HttpRequestSensor` configures the entity to poll every 5 seconds on the given URI,
taking the json result as the sensor value.
taking the JSON result as the sensor value.

The `UpdatingMap` enricher uses that sensor to populate an entry in the `service.notUp.indicators`.
It transforms the `http.healthy` sensor value using the given function: if the http poll returned
It transforms the `http.healthy` sensor value using the given function: if the HTTP poll returned
`true`, then it is mapped to `null` (so is removed from the `service.noUp.indicators`); if the
poll returned `false`, then `"false"` is added to the indicators map; otherwise `"no value"` is
added to the indicators map.
Expand Down
4 changes: 2 additions & 2 deletions guide/blueprints/effectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ There are a number of additional configuration keys available for the `HTTPComma
| httpUsername | | user name for the authentication |
| httpPassword | | password for the authentication |
| headers | application/json | It explicitly supports `application/x-www-form-urlencoded` |
| httpPayload | | The body of the http request |
| jsonPath | | A jsonPath expression to extract values from a json object |
| httpPayload | | The body of the HTTP request |
| jsonPath | | A jsonPath expression to extract values from a JSON object |
| jsonPathAndSensors | | A map where keys are jsonPath expressions and values the name of the sensor where to publish extracted values |


Expand Down
4 changes: 2 additions & 2 deletions guide/blueprints/entity-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ services:

_However, the web-console also shows other misleading (incorrect!) config values for the child
entity. It shows the inherited config value of `exampleConfig` as "childValue" (because the
REST api did not evaluate the DSL in the correct context, when retrieving the value!
REST API did not evaluate the DSL in the correct context, when retrieving the value!
See https://issues.apache.org/jira/browse/BROOKLYN-455._


Expand Down Expand Up @@ -293,7 +293,7 @@ Some common config keys that will not re-inherited include:
* `launch.command` (and the ``pre.launch.command` and `post.launch.command`)
* `checkRunning.command`
* `stop.command`
* The similar commands for `VanillaWindowsProcess` powershell.
* The similar commands for `VanillaWindowsProcess` PowerShell.
* The file and template install config keys (e.g. `files.preinstall`, `templates.preinstall`, etc)

An example is shown below. Here, the "logstash-child" is a sub-type of `VanillaSoftwareProcess`,
Expand Down
4 changes: 2 additions & 2 deletions guide/blueprints/java/defining-and-deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To describe each part of this:
and tracked as such. Execution of the effector is intercepted, to track it as a task and show its
execution in the Activity view.
* The `@EffectorParam` annotations give metadata about the effector's parameters. This metadata,
such as the parameter description, is available to those using the client CLI, rest API and
such as the parameter description, is available to those using the client CLI, REST API and
web-console.

Note there is an alternative way of defining effectors - adding them to the entity dynamically,
Expand Down Expand Up @@ -162,4 +162,4 @@ The YAML blueprint below shows an example usage of this blueprint:
Note the type name matches the id defined in the `.bom` file.

You can now call the effector by any of the standard means - [web console]({{book.path.docs}}/ops/gui/index.md),
[REST api]({{book.path.docs}}/ops/rest.md), or [Client CLI]({{book.path.docs}}/ops/cli/index.md).
[REST API]({{book.path.docs}}/ops/rest.md), or [Client CLI]({{book.path.docs}}/ops/cli/index.md).
4 changes: 2 additions & 2 deletions guide/blueprints/java/entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ protected void disconnectSensors() {
}
```

In this example (a simplified version of ``JBoss7Server``), the url returns metrics in JSON.
We report the entity as up if we get back an http response code of 200, or down if any other response code or exception.
In this example (a simplified version of ``JBoss7Server``), the URL returns metrics in JSON.
We report the entity as up if we get back an HTTP response code of 200, or down if any other response code or exception.
We retrieve the request count from the response body, and convert it to an integer.

Note the first line (``super.connectSensors()``); as one descends into specific convenience subclasses (such as for Java web-apps), the work done by the parent class's overridden methods may be relevant, and will want to be invoked or even added to a resulting list.
Expand Down
6 changes: 3 additions & 3 deletions guide/blueprints/java/feeds.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ important that the entity's `rebind()` method recreates the feed.

##### HTTP Feed

An `HttpFeed` polls over http(s). An example is shown below:
An `HttpFeed` polls over HTTP(S). An example is shown below:

```java
private HttpFeed feed;
Expand Down Expand Up @@ -94,7 +94,7 @@ protected void disconnectSensors() {

##### WinRm CMD Feed

A WinRM feed executes a windows command over winrm periodically. An example is shown below:
A WinRM feed executes a Windows command over WinRM periodically. An example is shown below:

```java
private AbstractCommandFeed feed;
Expand Down Expand Up @@ -126,7 +126,7 @@ This type of feed retrieves performance counters from a Windows host, and posts
One must supply a collection of mappings between Windows performance counter names and Brooklyn
attribute sensors.

This feed uses WinRM to invoke the windows utility <tt>typeperf</tt> to query for a specific set
This feed uses WinRM to invoke the Windows utility <tt>typeperf</tt> to query for a specific set
of performance counters, by name. The values are extracted from the response, and published to the
entity's sensors. An example is shown below:

Expand Down
2 changes: 1 addition & 1 deletion guide/blueprints/policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The SshMachineFailureDetector is an HA policy for monitoring an SshMachine, emit

- org.apache.brooklyn.policy.ha.ConnectionFailureDetector

The ConnectionFailureDetector is an HA policy for monitoring an http connection, emitting an event if the connection is lost/restored.
The ConnectionFailureDetector is an HA policy for monitoring an HTTP connection, emitting an event if the connection is lost/restored.


### Primary Election / Failover Policies
Expand Down
4 changes: 2 additions & 2 deletions guide/blueprints/test/usage-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ This `TestEffector` example demonstrates the use of the `TestCase` and `TestSens

- `TestCase` entity starts its children sequentially
- asserts that the `webappcluster` entity `service.isUp` sensor is `true` within 10 minutes of the parent `TestCase` entity starting. Blocks start of the next child until it obtains a result (or times out).
- `deploy` effector invoked to deploy war to a `newcontext` with a 5 minute timeout to allow completion of the deploy task.
- asserts `/newcontext` url returns a HTTP status code 200 within 5 minutes of the effector being invoked (Note that this timeout is relative to the preceding test entity as they are being sequentially run as children of a `TestCase` entity).
- `deploy` effector invoked to deploy WAR to a `newcontext` with a 5 minute timeout to allow completion of the deploy task.
- asserts `/newcontext` URL returns a HTTP status code 200 within 5 minutes of the effector being invoked (Note that this timeout is relative to the preceding test entity as they are being sequentially run as children of a `TestCase` entity).

!CODEFILE "example_yaml/testcases/effector-test-snippet.yaml"

Expand Down
26 changes: 13 additions & 13 deletions guide/blueprints/winrm/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ parameters available for WinRM.
* host <String>: Host to connect to (required).Default value `null`
* port <Integer>: WinRM port to use when connecting to the remote machine.<br>
If no port is specified then it defaults to a port depending on the `winrm.useHttps` flag.
* winrm.useHttps <Boolean>: The parameter tells the machine sensors whether the winrm port is over https. If the parameter is true then 5986 will be used as a winrm port.<br>
* winrm.useHttps <Boolean>: The parameter tells the machine sensors whether the WinRM port is over HTTPS. If the parameter is true then 5986 will be used as a WinRM port.<br>
Default value: `false`
* retriesOfNetworkFailures <Integer>: The parameter sets the number of retries for connection failures. If you use high value, consider taking care for the machine's network.<br>
Default value: `4`
* winrm.useNtlm <Boolean>: The parameter configures tells the machine sensors whether the winrm port is over https. If the parameter is true then 5986 will be used as a winrm port.<br>
* winrm.useNtlm <Boolean>: The parameter configures tells the machine sensors whether the WinRM port is over HTTPS. If the parameter is true then 5986 will be used as a WinRM port.<br>
Default value: `true`
* winrm.computerName <String>: Windows Computer Name to use for authentication.<br>
Default value: `null`
Expand All @@ -33,17 +33,17 @@ and it will be used to instantiate a `org.apache.brooklyn.util.core.internal.win

## WinRM Connectivity Diagnostics

If you are experiencing problems with a windows blueprint against a jclouds location
If you are experiencing problems with a Windows blueprint against a jclouds location
where Apache Brooklyn complains about failing to connect to the IP you should check those things.

1. Apache Brooklyn is using correct username and password
1. Apache Brooklyn can reach the IP of the provisioned machine. WinRM port 5985 or 5986 is also reachable from Apache Brooklyn.
1. Check whether `WinRmMachineLocation#getDefaultUserMetadataString(ConfigurationSupportInternal)` is applied on the VM.
This script should be passed to the cloud and executed in order to configure WinRM according to Apache Brooklyn requirements for authentication.
So far windows startup script are known to be supported on AWS EC2 and VCloud Director.
So far Windows startup script are known to be supported on AWS EC2 and VCloud Director.
If your cloud doesn't use this script then tune WinRM parameters accordingly.
1. Check whether you use winrm over http or over https.
1. If you are using WinRM over http then make sure WinRM service on target VM has `AllowUnencrypted = true`
1. Check whether you use WinRM over HTTP or over HTTPS.
1. If you are using WinRM over HTTP then make sure WinRM service on target VM has `AllowUnencrypted = true`

If the quick list above doesn't help then follow the steps bellow.

Expand All @@ -54,12 +54,12 @@ After you determined what is the username and the password you can proceed with
*(Notice that for cloud providers which use Auto Generated password will not be logged.
For these cases use Java Debug to retrieve ot or provision a VM manually with the same parameters when using Apache Brooklyn to provision a jclouds location.)*

The first step is to find what is the winrm service configuration on the target host.
The first step is to find what is the WinRM service configuration on the target host.

1. If you have RDP access or KVM like access to the VM then check the winrm service status with the command bellow.
1. If you have RDP access or KVM like access to the VM then check the WinRM service status with the command bellow.
`winrm get winrm/config/service`
If you are using http you should have AllowUnencrypted to false.
Encryption is supported only over https.
If you are using HTTP you should have AllowUnencrypted to false.
Encryption is supported only over HTTPS.
Sample output:

MaxConcurrentOperations = 4294967295
Expand Down Expand Up @@ -102,7 +102,7 @@ Use an Apache Brooklyn BYON blueprint to try easily other connection options.

1. Check IP is reachable from Apache Brooklyn instance
Check whether `telnet 10.0.0.1 5985` makes successfully a socket.
1. If AllowUnencrypted is false and you are using winrm over http then apply `winrm set winrm/config/service @{AllowUnencrypted="true"}`
1. If AllowUnencrypted is false and you are using WinRM over HTTP then apply `winrm set winrm/config/service @{AllowUnencrypted="true"}`
*If jclouds or the cloud provider doesn't support passing `sysprep-specialize-script-cmd` then consider modifying Windows VM Image.*
1. Check your username and password. Notice in Windows passwords are case sensitive.
Here is how it looks log from a wrong password:
Expand All @@ -115,8 +115,8 @@ Use an Apache Brooklyn BYON blueprint to try easily other connection options.

1. When having wrong password you may want to try logging on a different domain
This is possible from `brooklyn.winrm.config.winrm.computerName` location config.
1. If you want to configure Windows target host with https then check the article [Configuring WINRM for HTTPS](https://support.microsoft.com/en-us/kb/2019527)
1. If you are still seeing authorization errors then try connecting via winrm with the embedded winrs client.
1. If you want to configure Windows target host with HTTPS then check the article [Configuring WINRM for HTTPS](https://support.microsoft.com/en-us/kb/2019527)
1. If you are still seeing authorization errors then try connecting via WinRM with the embedded winrs client.
First make sure you have the server in trusted hosts.

Then execute a simple command like
Expand Down
Loading

0 comments on commit edc13bd

Please sign in to comment.