From 46640cb89531a342f26071f8f52f63164afe0ab1 Mon Sep 17 00:00:00 2001 From: Sam Corbett Date: Thu, 19 May 2016 16:13:18 +0100 Subject: [PATCH 1/2] Fix code block formatting ```yaml does not work on the website. --- guide/ops/locations/_clouds.md | 2 - guide/ops/locations/_more-clouds.md | 65 +++++++++++++---------------- guide/yaml/test/test-entities.md | 17 ++++---- guide/yaml/winrm/index.md | 7 ++-- 4 files changed, 39 insertions(+), 52 deletions(-) diff --git a/guide/ops/locations/_clouds.md b/guide/ops/locations/_clouds.md index ffde083b..8d045999 100644 --- a/guide/ops/locations/_clouds.md +++ b/guide/ops/locations/_clouds.md @@ -241,8 +241,6 @@ If the method call cannot be matched to the template options available - for exa specific option but your location is an OpenStack cloud - then a warning is logged and the option is ignored. - - See the following resources for more information: - [AWS VPC issues which may affect users with older AWS accounts](vpc-issues.html) diff --git a/guide/ops/locations/_more-clouds.md b/guide/ops/locations/_more-clouds.md index acfd274f..ee8b9791 100644 --- a/guide/ops/locations/_more-clouds.md +++ b/guide/ops/locations/_more-clouds.md @@ -26,7 +26,6 @@ is included below. You may also find these sources helpful: sometimes required for various clouds. - ## Amazon Web Services (AWS) ### Credentials @@ -172,6 +171,7 @@ For example, for dev/demo purposes an "everything" network could be created that || Source IP Ranges || 0.0.0.0/0 | || Allowed protocols and ports || tcp:0-65535 and udp:0-65535 | + ## IBM SoftLayer ### VLAN Selection @@ -185,15 +185,13 @@ The VLAN ID can be set explicitly using the fields `primaryBackendNetworkComponentNetworkVlanId` of `SoftLayerTemplateOptions` when specifying the location being used in the blueprint, as follows: -```YAML -location: - jclouds:softlayer: - region: ams01 - templateOptions: - # Enter your preferred network IDs - primaryNetworkComponentNetworkVlanId: 1153481 - primaryBackendNetworkComponentNetworkVlanId: 1153483 -``` + location: + jclouds:softlayer: + region: ams01 + templateOptions: + # Enter your preferred network IDs + primaryNetworkComponentNetworkVlanId: 1153481 + primaryBackendNetworkComponentNetworkVlanId: 1153483 This method requires that a VM already exist and you look up the IDs of its VLANs, for example in the SoftLayer console UI, and that subsequently at least @@ -210,16 +208,14 @@ end-users. To use this method, we tell brooklyn to use `SoftLayerSameVlanLocationCustomizer` as a location customizer. This can be done on a location as follows: -```YAML -location: - jclouds:softlayer: - region: lon02 - customizers: - - $brooklyn:object: - type: org.apache.brooklyn.location.jclouds.softlayer.SoftLayerSameVlanLocationCustomizer - softlayer.vlan.scopeUid: "my-custom-scope" - softlayer.vlan.timeout: 10m -``` + location: + jclouds:softlayer: + region: lon02 + customizers: + - $brooklyn:object: + type: org.apache.brooklyn.location.jclouds.softlayer.SoftLayerSameVlanLocationCustomizer + softlayer.vlan.scopeUid: "my-custom-scope" + softlayer.vlan.timeout: 10m Usually you will want the scope to be unique to a single application, but if you need multiple applications to share the same VLAN, simply configure them with @@ -228,27 +224,24 @@ the same scope identifier. It is also possible with many blueprints to specify this as one of the `provisioning.properties` on an *application*: -```YAML -services: -- type: org.apache.brooklyn.entity.stock.BasicApplication - id: same-vlan-application - brooklyn.config: - provisioning.properties: - customizers: - - $brooklyn:object: - type: org.apache.brooklyn.location.jclouds.softlayer.SoftLayerSameVlanLocationCustomizer - softlayer.vlan.scopeUid: "my-custom-scope" - softlayer.vlan.timeout: 10m -``` + services: + - type: org.apache.brooklyn.entity.stock.BasicApplication + id: same-vlan-application + brooklyn.config: + provisioning.properties: + customizers: + - $brooklyn:object: + type: org.apache.brooklyn.location.jclouds.softlayer.SoftLayerSameVlanLocationCustomizer + softlayer.vlan.scopeUid: "my-custom-scope" + softlayer.vlan.timeout: 10m If you are writing an entity in Java, you can also use the helper method `forScope(String)` to create the customizer. Configure the provisioning flags as follows: -```Java -JcloudsLocationCustomizer vlans = SoftLayerSameVlanLocationCustomizer.forScope("my-custom-scope"); -flags.put(JcloudsLocationConfig.JCLOUDS_LOCATION_CUSTOMIZERS.getName(), ImmutableList.of(vlans)); -``` + JcloudsLocationCustomizer vlans = SoftLayerSameVlanLocationCustomizer.forScope("my-custom-scope"); + flags.put(JcloudsLocationConfig.JCLOUDS_LOCATION_CUSTOMIZERS.getName(), ImmutableList.of(vlans)); + ### Configuration Options diff --git a/guide/yaml/test/test-entities.md b/guide/yaml/test/test-entities.md index b8b3f2ba..5a02d37a 100644 --- a/guide/yaml/test/test-entities.md +++ b/guide/yaml/test/test-entities.md @@ -155,17 +155,14 @@ The following conditions are provided by those test entities above that include Assertions may be provided as a simple map: -```yaml - assert: - contains: 2 users - matches: .*[\d]* days.* -``` + assert: + contains: 2 users + matches: .*[\d]* days.* + If there is the need to make multiple assertions with the same key, the assertions can be specified as a list of such maps: -```yaml - assert: - - contains: 2 users - - contains: 2 days -``` + assert: + - contains: 2 users + - contains: 2 days diff --git a/guide/yaml/winrm/index.md b/guide/yaml/winrm/index.md index 731c83df..d9ab2e8e 100644 --- a/guide/yaml/winrm/index.md +++ b/guide/yaml/winrm/index.md @@ -446,10 +446,9 @@ Launching the blueprint bellow was giving constantly this type of error on launc With series of tests we concluded that on the Vcloud Director environment we were using a restart was happening ~2 minutes after the VM is provisioned. Logging in the host and search for System event of type 1074 in Windows Event Viewer, we found two 1074 events where the second one was -```none -The process C:\Windows\system32\winlogon.exe (W2K12-STD) has initiated the restart of computer WIN-XXXX on behalf of user -NT AUTHORITY\SYSTEM for the following reason: Operating System: Upgrade (Planned) Reason Code: 0x80020003 Shutdown Type: restart Comment: -``` + + The process C:\Windows\system32\winlogon.exe (W2K12-STD) has initiated the restart of computer WIN-XXXX on behalf of user + NT AUTHORITY\SYSTEM for the following reason: Operating System: Upgrade (Planned) Reason Code: 0x80020003 Shutdown Type: restart Comment: Normally on other clouds only one restart event is registered and the first time winrm connection is made the Windows VM is ready for use. From 88de0be372aae6f42474bb17e47e8e799045e475 Mon Sep 17 00:00:00 2001 From: Sam Corbett Date: Thu, 19 May 2016 16:13:57 +0100 Subject: [PATCH 2/2] Documentation on configuring Openstack networks and floating IPs --- guide/ops/locations/_more-clouds.md | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/guide/ops/locations/_more-clouds.md b/guide/ops/locations/_more-clouds.md index ee8b9791..7d96704c 100644 --- a/guide/ops/locations/_more-clouds.md +++ b/guide/ops/locations/_more-clouds.md @@ -265,3 +265,42 @@ sensors, with the same names as the last two configuration keys. ***NOTE*** If the SoftLayer location is already configured with specific VLANs then this customizer will have no effect. + + +## Openstack + +### Networks + +When multiple networks are available you should indicate which ones machines should join. +Do this by setting the desired values id as an option in the +**[templateOptions](#custom-template-options)** configuration: + + location: + jclouds:openstack-nova: + ... + templateOptions: + # Assign the node to all networks in the list. + networks: + - network-one-id + - network-two-id + - ... + + +### Floating IPs + +Configuration of floating IPs is as networks; specify the pools to use as another +[template option](#custom-template-options): + + location: + jclouds:openstack-nova: + ... + templateOptions: + # Pool names to use when allocating a floating IP + floatingIpPoolNames: + - "pool name" + + +### Other features + +Consult jclouds' [Nova template options](https://jclouds.apache.org/reference/javadoc/1.9.x/org/jclouds/openstack/nova/v2_0/compute/options/NovaTemplateOptions.html) +for futher options when configuring Openstack locations.