[2/2] brooklyn-server git commit: This closes #84

2016-03-27 Thread aledsage
This closes #84


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/52e0c4e1
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/52e0c4e1
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/52e0c4e1

Branch: refs/heads/master
Commit: 52e0c4e194b3c75fbe19d0f84fc84ce9bfa07a33
Parents: 660ebbb 69548bd
Author: Aled Sage 
Authored: Sun Mar 27 16:43:41 2016 +0100
Committer: Aled Sage 
Committed: Sun Mar 27 16:43:41 2016 +0100

--
 pom.xml  | 2 +-
 .../org/apache/brooklyn/location/winrm/WinRmMachineLocation.java | 1 +
 .../org/apache/brooklyn/util/core/internal/winrm/WinRmTool.java  | 4 ++--
 .../brooklyn/util/core/internal/winrm/winrm4j/Winrm4jTool.java   | 3 +++
 4 files changed, 7 insertions(+), 3 deletions(-)
--




[2/2] brooklyn-server git commit: This closes #83

2016-03-25 Thread aledsage
This closes #83


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/1aeb0f57
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/1aeb0f57
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/1aeb0f57

Branch: refs/heads/master
Commit: 1aeb0f57e633d1ba268b5a4de9a7d3edc3715777
Parents: 0c03691 b8b98f2
Author: Aled Sage 
Authored: Fri Mar 25 18:15:30 2016 +
Committer: Aled Sage 
Committed: Fri Mar 25 18:15:30 2016 +

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--




[2/3] brooklyn-docs git commit: fix invoke params app example

2016-03-25 Thread aledsage
fix invoke params app example


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/32368e45
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/32368e45
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/32368e45

Branch: refs/heads/master
Commit: 32368e459a777211aa668636d345b7b3b2eee0a6
Parents: 92b86eb
Author: John McCabe 
Authored: Tue Mar 22 11:06:18 2016 +
Committer: John McCabe 
Committed: Tue Mar 22 11:06:18 2016 +

--
 guide/ops/cli/cli-usage-guide.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/32368e45/guide/ops/cli/cli-usage-guide.md
--
diff --git a/guide/ops/cli/cli-usage-guide.md b/guide/ops/cli/cli-usage-guide.md
index 16590cf..95a329c 100644
--- a/guide/ops/cli/cli-usage-guide.md
+++ b/guide/ops/cli/cli-usage-guide.md
@@ -258,13 +258,13 @@ $ br app WebCluster entity NginxController:CZ8Q effector 
update invoke
 Parameters can also be passed to the effector:
 
 {% highlight text %}
-$ br app WebCluster entity NginxController:CZ8Q effector restart invoke 
restartChildren=true
+$ br app WebCluster entity NginxController:CZ8Q effector restart invoke -P 
restartChildren=true
 {% endhighlight %}
 
 If a parameter value is complex or spans multiple lines, it may be provided in 
a file and used like this:
 
 {% highlight text %}
-$ br app WebCluster effector start invoke locations=@data.txt
+$ br app WebCluster effector start invoke -P locations=@data.txt
 {% endhighlight %}
 
 Shortcut commands are available for the 3 standard effectors of `start`, 
`restart` and `stop`.



[1/3] brooklyn-docs git commit: fix invoke params examples

2016-03-25 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 2d5193051 -> 9f04c11ef


fix invoke params examples


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/92b86eb3
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/92b86eb3
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/92b86eb3

Branch: refs/heads/master
Commit: 92b86eb31d67b4e7d307b66957f60cfdd65baaaf
Parents: df024e3
Author: John McCabe 
Authored: Tue Mar 22 11:05:02 2016 +
Committer: John McCabe 
Committed: Tue Mar 22 11:05:02 2016 +

--
 guide/ops/cli/cli-ref-guide.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/92b86eb3/guide/ops/cli/cli-ref-guide.md
--
diff --git a/guide/ops/cli/cli-ref-guide.md b/guide/ops/cli/cli-ref-guide.md
index 772aa5e..1148f57 100644
--- a/guide/ops/cli/cli-ref-guide.md
+++ b/guide/ops/cli/cli-ref-guide.md
@@ -217,7 +217,7 @@ policy   pol
 - `br  effector  invoke`  
   Invoke the effector without any parameters.
 
-- `br  effector  invoke [= ...]`  
+- `br  effector  invoke [-P = ...]`
   Invoke the effector with one of more parameters.
 
 - `br  effector`  
@@ -229,7 +229,7 @@ policy   pol
 - `br  effector  invoke`  
   Invoke the effector without any parameters.
 
-- `br  effector  invoke [= ...]`  
+- `br  effector  invoke [-P = ...]`
   Invoke the effector with one of more parameters.  
   If the parameter value is
   complex or multi-lined it may be provided in a file and referenced as:  



[3/3] brooklyn-docs git commit: This closes #32

2016-03-25 Thread aledsage
This closes #32


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/9f04c11e
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/9f04c11e
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/9f04c11e

Branch: refs/heads/master
Commit: 9f04c11ef4081ed5b56f0a12622f26a73b95502c
Parents: 2d51930 32368e4
Author: Aled Sage 
Authored: Fri Mar 25 18:00:41 2016 +
Committer: Aled Sage 
Committed: Fri Mar 25 18:00:41 2016 +

--
 guide/ops/cli/cli-ref-guide.md   | 4 ++--
 guide/ops/cli/cli-usage-guide.md | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--




[1/3] brooklyn-server git commit: AbstractEntity: improve error message on previouslyOwned

2016-03-25 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master f4be19000 -> 0c036913e


AbstractEntity: improve error message on previouslyOwned

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/7d7c1a83
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/7d7c1a83
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/7d7c1a83

Branch: refs/heads/master
Commit: 7d7c1a836a5d426b47f82d64202d5859896e140b
Parents: f4be190
Author: Aled Sage 
Authored: Fri Mar 25 15:18:55 2016 +
Committer: Aled Sage 
Committed: Fri Mar 25 15:18:55 2016 +

--
 .../java/org/apache/brooklyn/core/entity/AbstractEntity.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/7d7c1a83/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java
--
diff --git 
a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java 
b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java
index 5422fb6..1406855 100644
--- a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java
+++ b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java
@@ -218,7 +218,7 @@ public abstract class AbstractEntity extends 
AbstractBrooklynObject implements E
 // FIXME we do not currently support changing parents, but to implement a 
cluster that can shrink we need to support at least
 // orphaning (i.e. removing ownership). This flag notes if the entity has 
previously had a parent, and if an attempt is made to
 // set a new parent an exception will be thrown.
-boolean previouslyOwned = false;
+private boolean previouslyOwned = false;
 
 /**
  * Whether we are still being constructed, in which case never warn in 
"assertNotYetOwned"
@@ -609,7 +609,7 @@ public abstract class AbstractEntity extends 
AbstractBrooklynObject implements E
 }
 // If we have previously had a parent and are trying to change to 
another one...
 if (previouslyOwned && entity != null)
-throw new UnsupportedOperationException("Cannot set a parent of 
"+this+" because it has previously had a parent");
+throw new UnsupportedOperationException("Cannot set a parent of 
"+this+" as "+entity+" because it has previously had a parent");
 // We don't have a parent, never have and are changing to having a 
parent...
 
 //make sure there is no loop



[3/3] brooklyn-server git commit: This closes #82

2016-03-25 Thread aledsage
This closes #82


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/0c036913
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/0c036913
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/0c036913

Branch: refs/heads/master
Commit: 0c036913e65865c4acc8a38a2b0523081f119e1d
Parents: f4be190 67a724e
Author: Aled Sage 
Authored: Fri Mar 25 16:23:00 2016 +
Committer: Aled Sage 
Committed: Fri Mar 25 16:23:00 2016 +

--
 .../brooklyn/core/entity/AbstractEntity.java|   4 +-
 .../entity/group/DynamicMultiGroupImpl.java |  38 +-
 .../group/DynamicMultiGroupRebindTest.java  | 120 +++
 .../entity/group/DynamicMultiGroupTest.java |  28 +
 4 files changed, 161 insertions(+), 29 deletions(-)
--




[1/2] brooklyn-library git commit: Fix: ElasticSearch used Java version

2016-03-25 Thread aledsage
Repository: brooklyn-library
Updated Branches:
  refs/heads/master 3216b7a42 -> 67a4dda36


Fix: ElasticSearch used Java version

Making ElasticSearch to use JavaSoftwareProcessDriver so the correct
java version is installed. ElasticSearch used to install java via
BashCommands#installJavaLatestOrWarn(). It prevents setting the
installed java version as default when:
- the VM image comes with preinstalled jdk 6 or jdk7
- CentOS version of JDK8 doesn't update the default automatically



Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/c8a450c0
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/c8a450c0
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/c8a450c0

Branch: refs/heads/master
Commit: c8a450c039911f14dbf196aabdf0927ce543503e
Parents: 3216b7a
Author: Yavor Yanchev 
Authored: Fri Mar 25 15:44:27 2016 +0200
Committer: Yavor Yanchev 
Committed: Fri Mar 25 15:44:27 2016 +0200

--
 .../entity/nosql/elasticsearch/ElasticSearchNode.java   |  3 ++-
 .../nosql/elasticsearch/ElasticSearchNodeDriver.java|  4 ++--
 .../nosql/elasticsearch/ElasticSearchNodeSshDriver.java | 12 
 3 files changed, 12 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/c8a450c0/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNode.java
--
diff --git 
a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNode.java
 
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNode.java
index 4a3e908..d972efc 100644
--- 
a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNode.java
+++ 
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNode.java
@@ -29,6 +29,7 @@ import 
org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey.StringAt
 import org.apache.brooklyn.core.sensor.PortAttributeSensorAndConfigKey;
 import org.apache.brooklyn.core.sensor.Sensors;
 import org.apache.brooklyn.entity.database.DatastoreMixins;
+import org.apache.brooklyn.entity.java.UsesJava;
 import org.apache.brooklyn.entity.software.base.SoftwareProcess;
 import org.apache.brooklyn.entity.webapp.WebAppServiceConstants;
 import org.apache.brooklyn.util.core.ResourcePredicates;
@@ -41,7 +42,7 @@ import org.apache.brooklyn.util.core.flags.SetFromFlag;
 + "It provides a distributed, multitenant-capable full-text search 
engine with a RESTful web interface and "
 + "schema-free JSON documents.")
 @ImplementedBy(ElasticSearchNodeImpl.class)
-public interface ElasticSearchNode extends SoftwareProcess, 
DatastoreMixins.HasDatastoreUrl {
+public interface ElasticSearchNode extends SoftwareProcess, UsesJava, 
DatastoreMixins.HasDatastoreUrl {
 
 @SetFromFlag("version")
 ConfigKey SUGGESTED_VERSION = 
ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "1.2.1");

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/c8a450c0/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeDriver.java
--
diff --git 
a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeDriver.java
 
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeDriver.java
index 82640cd..7c8334d 100644
--- 
a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeDriver.java
+++ 
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeDriver.java
@@ -18,8 +18,8 @@
  */
 package org.apache.brooklyn.entity.nosql.elasticsearch;
 
-import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
+import org.apache.brooklyn.entity.java.JavaSoftwareProcessDriver;
 
-public interface ElasticSearchNodeDriver extends SoftwareProcessDriver {
+public interface ElasticSearchNodeDriver extends JavaSoftwareProcessDriver {
 
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/c8a450c0/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeSshDriver.java
--
diff --git 
a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeSshDriver.java
 
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeSshDriver.java
index 4380d04..764ab0f 100644
--- 

[2/2] brooklyn-library git commit: This closes #26

2016-03-25 Thread aledsage
This closes #26


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/67a4dda3
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/67a4dda3
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/67a4dda3

Branch: refs/heads/master
Commit: 67a4dda36fcc0eaa628a5a887bdb07f953e06610
Parents: 3216b7a c8a450c
Author: Aled Sage 
Authored: Fri Mar 25 16:19:53 2016 +
Committer: Aled Sage 
Committed: Fri Mar 25 16:19:53 2016 +

--
 .../entity/nosql/elasticsearch/ElasticSearchNode.java   |  3 ++-
 .../nosql/elasticsearch/ElasticSearchNodeDriver.java|  4 ++--
 .../nosql/elasticsearch/ElasticSearchNodeSshDriver.java | 12 
 3 files changed, 12 insertions(+), 7 deletions(-)
--




[3/5] brooklyn-server git commit: deserializingClassRenames: include TestEntity etc

2016-03-24 Thread aledsage
deserializingClassRenames: include TestEntity etc

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/d08cda63
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/d08cda63
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/d08cda63

Branch: refs/heads/master
Commit: d08cda63f0d217a89937e7612988c46ab455d0c1
Parents: 4cad100
Author: Aled Sage 
Authored: Fri Mar 25 00:27:08 2016 +
Committer: Aled Sage 
Committed: Fri Mar 25 00:27:08 2016 +

--
 .../core/mgmt/persist/deserializingClassRenames.properties  | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d08cda63/core/src/main/resources/org/apache/brooklyn/core/mgmt/persist/deserializingClassRenames.properties
--
diff --git 
a/core/src/main/resources/org/apache/brooklyn/core/mgmt/persist/deserializingClassRenames.properties
 
b/core/src/main/resources/org/apache/brooklyn/core/mgmt/persist/deserializingClassRenames.properties
index a5801c9..a86bea0 100644
--- 
a/core/src/main/resources/org/apache/brooklyn/core/mgmt/persist/deserializingClassRenames.properties
+++ 
b/core/src/main/resources/org/apache/brooklyn/core/mgmt/persist/deserializingClassRenames.properties
@@ -1421,3 +1421,12 @@ brooklyn.util.crypto.TrustingSslSocketFactory
 org.apache.brooklyn.test.TrustingSslSocketFactory  
  : org.apache.brooklyn.util.http.TrustingSslSocketFactory
 org.apache.brooklyn.util.core.http.HttpTool
  : org.apache.brooklyn.util.http.HttpTool
 org.apache.brooklyn.util.core.http.HttpToolResponse
  : org.apache.brooklyn.util.http.HttpToolResponse
+
+brooklyn.test.entity.TestEntity
  : org.apache.brooklyn.core.test.entity.TestEntity
+brooklyn.test.entity.TestEntityImpl
  : org.apache.brooklyn.core.test.entity.TestEntityImpl
+brooklyn.test.entity.TestCluster   
  : org.apache.brooklyn.core.test.entity.TestCluster
+brooklyn.test.entity.TestClusterImpl   
  : org.apache.brooklyn.core.test.entity.TestClusterImpl
+brooklyn.test.entity.TestApplication   
  : org.apache.brooklyn.core.test.entity.TestApplication
+brooklyn.test.entity.TestApplicationImpl   
  : org.apache.brooklyn.core.test.entity.TestApplicationImpl
+brooklyn.test.entity.BlockingEntity
  : org.apache.brooklyn.core.test.entity.BlockingEntity
+brooklyn.test.entity.BlockingEntityImpl
  : org.apache.brooklyn.core.test.entity.BlockingEntityImpl
\ No newline at end of file



[4/5] brooklyn-server git commit: softwareProcess.restart: even on error, set expected=running

2016-03-24 Thread aledsage
softwareProcess.restart: even on error, set expected=running

Previously if the restart failed in some way (e.g. an error in the 
launch script or a timeout waiting for serviceUp), we would leave the 
expectedState as “starting”. This meant that serviceUp=false was not
rendered as an error.

Always setting expected=running is better, but is not great. For 
example, if a script fails in restart then we won’t mark the 
entity as onFire if the basic service-up checks still pass. This is
different from the start() behaviour. But then we are doing less than
in start (e.g. in start a script failure could mean that a WAR was not
installed so the simple serviceUp reachability check would not be
sufficient if customize() had failed).

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/a0418bfb
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/a0418bfb
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/a0418bfb

Branch: refs/heads/master
Commit: a0418bfb4805c2f1443e2077d9362127e644ff1f
Parents: d08cda6
Author: Aled Sage 
Authored: Fri Mar 25 00:29:51 2016 +
Committer: Aled Sage 
Committed: Fri Mar 25 00:29:51 2016 +

--
 .../base/SoftwareProcessDriverLifecycleEffectorTasks.java   | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a0418bfb/software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessDriverLifecycleEffectorTasks.java
--
diff --git 
a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessDriverLifecycleEffectorTasks.java
 
b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessDriverLifecycleEffectorTasks.java
index cb4149a..1e174c0 100644
--- 
a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessDriverLifecycleEffectorTasks.java
+++ 
b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessDriverLifecycleEffectorTasks.java
@@ -82,9 +82,12 @@ public class SoftwareProcessDriverLifecycleEffectorTasks 
extends MachineLifecycl
 private class PostRestartTask implements Runnable {
 @Override
 public void run() {
-postStartCustom();
-postRestartCustom();
-ServiceStateLogic.setExpectedState(entity(), Lifecycle.RUNNING);
+try {
+postStartCustom();
+postRestartCustom();
+} finally {
+ServiceStateLogic.setExpectedState(entity(), 
Lifecycle.RUNNING);
+}
 }
 }
 



[1/2] brooklyn-library git commit: Fix KafkaZooKeeper archive directory name format

2016-03-24 Thread aledsage
Repository: brooklyn-library
Updated Branches:
  refs/heads/master 51f715b52 -> 3216b7a42


Fix KafkaZooKeeper archive directory name format


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/e34382e6
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/e34382e6
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/e34382e6

Branch: refs/heads/master
Commit: e34382e6a660b82e66490e73ccc63327cf17d5a8
Parents: 8a23940
Author: Sam Corbett 
Authored: Tue Mar 22 11:55:16 2016 +
Committer: Sam Corbett 
Committed: Tue Mar 22 11:55:16 2016 +

--
 .../brooklyn/entity/messaging/kafka/KafkaZooKeeper.java  | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/e34382e6/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeper.java
--
diff --git 
a/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeper.java
 
b/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeper.java
index 5aee6d2..aef59eb 100644
--- 
a/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeper.java
+++ 
b/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/kafka/KafkaZooKeeper.java
@@ -23,6 +23,7 @@ import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.annotation.Effector;
 import org.apache.brooklyn.core.annotation.EffectorParam;
 import org.apache.brooklyn.core.config.BasicConfigKey;
+import org.apache.brooklyn.core.config.ConfigKeys;
 import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
 import org.apache.brooklyn.entity.software.base.SoftwareProcess;
 import org.apache.brooklyn.entity.zookeeper.ZooKeeperNode;
@@ -52,6 +53,13 @@ public interface KafkaZooKeeper extends ZooKeeperNode, Kafka 
{
 "kafka.zookeeper.configTemplate", "Kafka zookeeper configuration 
template (in freemarker format)",
 
"classpath://org/apache/brooklyn/entity/messaging/kafka/zookeeper.properties");
 
+// This is defined by both ZooKeeperNode ("zookeeper-%s") and Kafka 
("kafka_%s").
+// The latter is correct.
+@SetFromFlag("archiveNameFormat")
+ConfigKey ARCHIVE_DIRECTORY_NAME_FORMAT = 
ConfigKeys.newConfigKeyWithDefault(
+SoftwareProcess.ARCHIVE_DIRECTORY_NAME_FORMAT,
+"kafka_%s");
+
 @Effector(description = "Create a topic with a single partition and only 
one replica")
 void createTopic(@EffectorParam(name = "topic") String topic);
 }



[2/2] brooklyn-library git commit: This closes #20

2016-03-24 Thread aledsage
This closes #20


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/3216b7a4
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/3216b7a4
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/3216b7a4

Branch: refs/heads/master
Commit: 3216b7a4231c2fbcc2e7362a0c83ed7dfa259291
Parents: 51f715b e34382e
Author: Aled Sage 
Authored: Fri Mar 25 00:39:25 2016 +
Committer: Aled Sage 
Committed: Fri Mar 25 00:39:25 2016 +

--
 .../brooklyn/entity/messaging/kafka/KafkaZooKeeper.java  | 8 
 1 file changed, 8 insertions(+)
--




[2/3] brooklyn-library git commit: Set ElasticSearch.DATASTORE_URL

2016-03-24 Thread aledsage
Set ElasticSearch.DATASTORE_URL

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/47bdecfe
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/47bdecfe
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/47bdecfe

Branch: refs/heads/master
Commit: 47bdecfebe7333ce84af0cd568e1e9742c7ccfcf
Parents: 0a50c13
Author: Aled Sage 
Authored: Wed Mar 23 20:47:59 2016 +
Committer: Aled Sage 
Committed: Fri Mar 25 00:37:18 2016 +

--
 .../entity/nosql/elasticsearch/ElasticSearchNodeImpl.java   | 6 +-
 .../elasticsearch/ElasticSearchNodeIntegrationTest.java | 9 +
 2 files changed, 14 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/47bdecfe/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
--
diff --git 
a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
 
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
index a2a4652..ccb09e8 100644
--- 
a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
+++ 
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeImpl.java
@@ -70,7 +70,11 @@ public class ElasticSearchNodeImpl extends 
SoftwareProcessImpl implements Elasti
 protected void connectSensors() {
 super.connectSensors();
 Integer rawPort = getAttribute(HTTP_PORT);
+String hostname = getAttribute(HOSTNAME);
 checkNotNull(rawPort, "HTTP_PORT sensors not set for %s; is an 
acceptable port available?", this);
+
+sensors().set(DATASTORE_URL, String.format("http://%s:%s;, hostname, 
rawPort));
+
 HostAndPort hp = 
BrooklynAccessUtils.getBrooklynAccessibleAddress(this, rawPort);
 Function getNodeId = new 
Function() {
 @Override public String apply(Maybe input) {
@@ -80,7 +84,7 @@ public class ElasticSearchNodeImpl extends 
SoftwareProcessImpl implements Elasti
 return 
input.get().getAsJsonObject().entrySet().iterator().next().getKey();
 }
 };
-
+
 if (isHttpMonitoringEnabled()) {
 boolean retrieveUsageMetrics = getConfig(RETRIEVE_USAGE_METRICS);
 

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/47bdecfe/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeIntegrationTest.java
--
diff --git 
a/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeIntegrationTest.java
 
b/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeIntegrationTest.java
index e6412f8..a37d430 100644
--- 
a/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeIntegrationTest.java
+++ 
b/software/nosql/src/test/java/org/apache/brooklyn/entity/nosql/elasticsearch/ElasticSearchNodeIntegrationTest.java
@@ -19,6 +19,8 @@
 package org.apache.brooklyn.entity.nosql.elasticsearch;
 
 import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
 
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -31,9 +33,12 @@ import 
org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
 import org.apache.brooklyn.core.entity.trait.Startable;
 import org.apache.brooklyn.core.test.entity.TestApplication;
 import org.apache.brooklyn.feed.http.HttpValueFunctions;
+import org.apache.brooklyn.test.Asserts;
 import org.apache.brooklyn.test.EntityTestUtils;
+import org.apache.brooklyn.util.http.HttpAsserts;
 import org.apache.brooklyn.util.http.HttpTool;
 import org.apache.brooklyn.util.http.HttpToolResponse;
+import org.apache.brooklyn.util.net.Networking;
 import org.apache.http.client.methods.HttpGet;
 import org.bouncycastle.util.Strings;
 import org.testng.annotations.AfterMethod;
@@ -43,6 +48,7 @@ import 
org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocati
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
+import com.google.common.net.HostAndPort;
 
 public class ElasticSearchNodeIntegrationTest {
 
@@ -65,8 +71,11 @@ public class ElasticSearchNodeIntegrationTest {
 public void testStartupAndShutdown() {
 elasticSearchNode = 
app.createAndManageChild(EntitySpec.create(ElasticSearchNode.class));
 

[3/3] brooklyn-library git commit: This closes #23

2016-03-24 Thread aledsage
This closes #23


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/51f715b5
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/51f715b5
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/51f715b5

Branch: refs/heads/master
Commit: 51f715b52dac450e53d5bf106b5a3261e14058cc
Parents: 0a50c13 3299958
Author: Aled Sage 
Authored: Fri Mar 25 00:38:06 2016 +
Committer: Aled Sage 
Committed: Fri Mar 25 00:38:06 2016 +

--
 .../elasticsearch/ElasticSearchNodeImpl.java|  6 ++-
 .../ElasticSearchClusterIntegrationTest.java|  9 +++--
 .../ElasticSearchNodeIntegrationTest.java   | 40 ++--
 3 files changed, 29 insertions(+), 26 deletions(-)
--




[1/2] brooklyn-library git commit: Move custom-enable-credssp.ps1 to brooklyn-server

2016-03-24 Thread aledsage
Repository: brooklyn-library
Updated Branches:
  refs/heads/master be0d23240 -> 3fa4e751e


Move custom-enable-credssp.ps1 to brooklyn-server


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/b30d7c2f
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/b30d7c2f
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/b30d7c2f

Branch: refs/heads/master
Commit: b30d7c2f589bdb81eca58d1efa57b73eaa7aed96
Parents: be0d232
Author: Valentin Aitken 
Authored: Tue Mar 22 23:13:06 2016 +0200
Committer: Valentin Aitken 
Committed: Tue Mar 22 23:13:19 2016 +0200

--
 .../database/mssql/Custom-Enable-CredSSP.ps1| 131 ---
 .../brooklyn/entity/database/mssql/mssql.yaml   |   4 +-
 2 files changed, 2 insertions(+), 133 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/b30d7c2f/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/Custom-Enable-CredSSP.ps1
--
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/Custom-Enable-CredSSP.ps1
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/Custom-Enable-CredSSP.ps1
deleted file mode 100644
index ef2ee5c..000
--- 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/Custom-Enable-CredSSP.ps1
+++ /dev/null
@@ -1,131 +0,0 @@
-#!ps1
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you 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
-#
-#  http://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.
-#
-# Resources:
-#  https://github.com/mwrock/boxstarter/blob/master/LICENSE.txt
-#  
https://github.com/mwrock/boxstarter/blob/master/Boxstarter.Chocolatey/Enable-BoxstarterCredSSP.ps1
-
-function Custom-Enable-CredSSP {
-<#
-.SYNOPSIS
-Enables and configures CredSSP Authentication to be used in PowerShell 
remoting sessions
-
-.DESCRIPTION
-Enabling CredSSP allows a caller from one remote session to authenticate on 
other remote
-resources. This is known as credential delegation. By default, PowerShell 
sessions do not
-use credSSP and therefore cannot bake a "second hop" to use other remote 
resources that
-require their authentication token.
-
-This command will enable CredSSP and add all RemoteHostsToTrust to the CredSSP 
trusted
-hosts list. It will also edit the users group policy to allow Fresh Credential 
Delegation.
-
-.PARAMETER RemoteHostsToTrust
-A list of ComputerNames to add to the CredSSP Trusted hosts list.
-
-.OUTPUTS
-A list of the original trusted hosts on the local machine.
-
-.EXAMPLE
-Custom-Enable-CredSSP box1,box2
-
-
-#>
-param(
-[string[]] $RemoteHostsToTrust
-)
-
-# Required to be running for using CredSSP
-winrm quickconfig -transport:http -quiet
-
-& winrm set winrm/config/service/auth '@{CredSSP="true"}'
-If ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
-
-& winrm set winrm/config/client/auth '@{CredSSP="true"}'
-If ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
-
-$Result=@{
-Success=$False;
-PreviousCSSPTrustedHosts=$null;
-PreviousFreshCredDelegationHostCount=0
-}
-
-Write-Host "Configuring CredSSP settings..."
-$credssp = Get-WSManCredSSP
-
-$ComputersToAdd = @()
-$idxHosts=$credssp[0].IndexOf(": ")
-if($idxHosts -gt -1){
-$credsspEnabled=$True
-$Result.PreviousCSSPTrustedHosts=$credssp[0].substring($idxHosts+2)
-$hostArray=$Result.PreviousCSSPTrustedHosts.Split(",")
-$RemoteHostsToTrust | ? { $hostArray -notcontains "wsman/$_" } | % { 
$ComputersToAdd += $_ }
-}
-else {
-$ComputersToAdd = $RemoteHostsToTrust
-}
-
-if($ComputersToAdd.Count -gt 0){
-try {
-Enable-WSManCredSSP -DelegateComputer $ComputersToAdd -Role Client 
-Force -ErrorAction Stop | Out-Null
-}
-catch {
-Write-BoxstarterMessage "Enable-WSManCredSSP failed with: $_" 
-Verbose
-return $result
-}
-}
-
-$key = 

[2/2] brooklyn-library git commit: This closes #22

2016-03-24 Thread aledsage
This closes #22


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/3fa4e751
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/3fa4e751
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/3fa4e751

Branch: refs/heads/master
Commit: 3fa4e751e289433be63ee3cf88a125f38b2e43a6
Parents: be0d232 b30d7c2
Author: Aled Sage 
Authored: Thu Mar 24 16:30:38 2016 +
Committer: Aled Sage 
Committed: Thu Mar 24 16:30:38 2016 +

--
 .../database/mssql/Custom-Enable-CredSSP.ps1| 131 ---
 .../brooklyn/entity/database/mssql/mssql.yaml   |   4 +-
 2 files changed, 2 insertions(+), 133 deletions(-)
--




[2/2] brooklyn-server git commit: This closes #75

2016-03-24 Thread aledsage
This closes #75


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/3c051adc
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/3c051adc
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/3c051adc

Branch: refs/heads/master
Commit: 3c051adc720c6921c6dc5bd032786254b8c0d734
Parents: a4976ed 25aeb0b
Author: Aled Sage 
Authored: Thu Mar 24 16:28:33 2016 +
Committer: Aled Sage 
Committed: Thu Mar 24 16:28:33 2016 +

--
 .../brooklyn/logback-logger-excludes.xml|   2 +-
 .../software/base/custom-enable-credssp.ps1 | 131 +++
 2 files changed, 132 insertions(+), 1 deletion(-)
--




[1/2] brooklyn-server git commit: Add Windows script for enabling CredSSP

2016-03-24 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master a4976ed19 -> 3c051adc7


Add Windows script for enabling CredSSP


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/25aeb0bb
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/25aeb0bb
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/25aeb0bb

Branch: refs/heads/master
Commit: 25aeb0bbaea82fe91332b28ac5c6da5b8885bf02
Parents: b8211ed
Author: Valentin Aitken 
Authored: Tue Mar 22 23:16:51 2016 +0200
Committer: Valentin Aitken 
Committed: Thu Mar 24 15:50:09 2016 +0200

--
 .../brooklyn/logback-logger-excludes.xml|   2 +-
 .../software/base/custom-enable-credssp.ps1 | 131 +++
 2 files changed, 132 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/25aeb0bb/logging/logback-includes/src/main/resources/brooklyn/logback-logger-excludes.xml
--
diff --git 
a/logging/logback-includes/src/main/resources/brooklyn/logback-logger-excludes.xml
 
b/logging/logback-includes/src/main/resources/brooklyn/logback-logger-excludes.xml
index 93e6138..0b3824c 100644
--- 
a/logging/logback-includes/src/main/resources/brooklyn/logback-logger-excludes.xml
+++ 
b/logging/logback-includes/src/main/resources/brooklyn/logback-logger-excludes.xml
@@ -62,5 +62,5 @@
 
 
 
-
+
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/25aeb0bb/software/base/src/main/resources/org/apache/brooklyn/software/base/custom-enable-credssp.ps1
--
diff --git 
a/software/base/src/main/resources/org/apache/brooklyn/software/base/custom-enable-credssp.ps1
 
b/software/base/src/main/resources/org/apache/brooklyn/software/base/custom-enable-credssp.ps1
new file mode 100644
index 000..ef2ee5c
--- /dev/null
+++ 
b/software/base/src/main/resources/org/apache/brooklyn/software/base/custom-enable-credssp.ps1
@@ -0,0 +1,131 @@
+#!ps1
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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
+#
+#  http://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.
+#
+# Resources:
+#  https://github.com/mwrock/boxstarter/blob/master/LICENSE.txt
+#  
https://github.com/mwrock/boxstarter/blob/master/Boxstarter.Chocolatey/Enable-BoxstarterCredSSP.ps1
+
+function Custom-Enable-CredSSP {
+<#
+.SYNOPSIS
+Enables and configures CredSSP Authentication to be used in PowerShell 
remoting sessions
+
+.DESCRIPTION
+Enabling CredSSP allows a caller from one remote session to authenticate on 
other remote
+resources. This is known as credential delegation. By default, PowerShell 
sessions do not
+use credSSP and therefore cannot bake a "second hop" to use other remote 
resources that
+require their authentication token.
+
+This command will enable CredSSP and add all RemoteHostsToTrust to the CredSSP 
trusted
+hosts list. It will also edit the users group policy to allow Fresh Credential 
Delegation.
+
+.PARAMETER RemoteHostsToTrust
+A list of ComputerNames to add to the CredSSP Trusted hosts list.
+
+.OUTPUTS
+A list of the original trusted hosts on the local machine.
+
+.EXAMPLE
+Custom-Enable-CredSSP box1,box2
+
+
+#>
+param(
+[string[]] $RemoteHostsToTrust
+)
+
+# Required to be running for using CredSSP
+winrm quickconfig -transport:http -quiet
+
+& winrm set winrm/config/service/auth '@{CredSSP="true"}'
+If ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
+
+& winrm set winrm/config/client/auth '@{CredSSP="true"}'
+If ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
+
+$Result=@{
+Success=$False;
+PreviousCSSPTrustedHosts=$null;
+PreviousFreshCredDelegationHostCount=0
+}
+
+Write-Host "Configuring CredSSP settings..."
+$credssp = Get-WSManCredSSP
+
+$ComputersToAdd = @()
+$idxHosts=$credssp[0].IndexOf(": ")
+if($idxHosts -gt -1){
+$credsspEnabled=$True
+$Result.PreviousCSSPTrustedHosts=$credssp[0].substring($idxHosts+2)
+

[1/2] brooklyn-docs git commit: Minor wording changes around option of installing binaries in own environment

2016-03-24 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 0f14d7ef4 -> 2d5193051


Minor wording changes around option of installing binaries in own environment


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/ba6e888c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/ba6e888c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/ba6e888c

Branch: refs/heads/master
Commit: ba6e888cdb2ab5c8c79c89f61489c653074af89a
Parents: df024e3
Author: Murdo Aird 
Authored: Thu Mar 24 11:35:04 2016 +
Committer: Murdo Aird 
Committed: Thu Mar 24 11:35:04 2016 +

--
 guide/start/running.md | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ba6e888c/guide/start/running.md
--
diff --git a/guide/start/running.md b/guide/start/running.md
index 380fe96..4cb508a 100644
--- a/guide/start/running.md
+++ b/guide/start/running.md
@@ -9,7 +9,7 @@ This guide will walk you through deploying an example 3-tier 
web application to
 
 An overview of core [Brooklyn 
concepts](./concept-quickstart.html){:target="_blank"} is available for 
reference.
 
-Two methods of deployment are detailed in this tutorial, using virtualisation 
with Vagrant and a local install. Both assume that you are using Linux or Mac 
OS X.
+Two methods of deployment are detailed in this tutorial, using virtualisation 
with Vagrant and an install in your own environment (such as your local machine 
or in your private/public cloud). Both assume that you are using Linux or Mac 
OS X. To get you up-and-running quickly, the Vagrant option will provision four 
compute nodes for you to deploy applications to. 
 
 ## Install Apache Brooklyn
 
@@ -45,7 +45,7 @@ $ cd apache-brooklyn-{{site.brooklyn-version}}-vagrant
 
 
 
-b) Local Install
+b) Install
 
 Download the Apache Brooklyn binary distribution as described on [the download 
page]({{site.path.website}}/download/){:target="_blank"}.
 
@@ -85,7 +85,7 @@ you may wish to set up other configuration options first:
 
 
 Vagrant
-Local Install
+Install
 
 
 
@@ -108,7 +108,7 @@ $ vagrant ssh brooklyn --command 'sudo journalctl -n15 -f 
-u brooklyn'
 
 
 
-b) Local Install
+b) Install
 
 Now start Apache Brooklyn with the following command:
 



[2/2] brooklyn-docs git commit: This closes #34

2016-03-24 Thread aledsage
This closes #34


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/2d519305
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/2d519305
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/2d519305

Branch: refs/heads/master
Commit: 2d5193051ced7ced254219cf3e7f51c68afc18f5
Parents: 0f14d7e ba6e888
Author: Aled Sage 
Authored: Thu Mar 24 14:51:43 2016 +
Committer: Aled Sage 
Committed: Thu Mar 24 14:51:43 2016 +

--
 guide/start/running.md | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2d519305/guide/start/running.md
--
diff --cc guide/start/running.md
index 8af578e,4cb508a..1566b6f
--- a/guide/start/running.md
+++ b/guide/start/running.md
@@@ -45,19 -45,10 +45,19 @@@ $ cd apache-brooklyn-{{site.brooklyn-ve
  
  
  
- b) Local Install
+ b) Install
  
 -Download the Apache Brooklyn binary distribution as described on [the 
download page]({{site.path.website}}/download/){:target="_blank"}.
 +Download the Apache Brooklyn RPM distribution (CentOS 7, RHEL 7.x only) from:
 
+https://www.apache.org/dyn/closer.lua/brooklyn/apache-brooklyn-{{site.brooklyn-version}}-1.noarch.rpm
  
 +Other binary distributions are also available at [the download 
page]({{site.path.website}}/download/){:target="_blank"}.
 +
 +### Install the RPM package:
 +{% highlight bash %}
 +$ sudo yum install apache-brooklyn-{{site.brooklyn-version}}-1.rpm
 +{% endhighlight %}
 +
 +### Install from other distributions:
  {% if brooklyn_version contains 'SNAPSHOT' %}
  Extract the `tar.gz` archive (note: as this is a -SNAPSHOT version, your 
filename will be slightly different):
  {% else %}



[1/2] brooklyn-server git commit: BasicSpecParameter: fix compatibility of persisted state

2016-03-23 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 43a8816c8 -> ae57587eb


BasicSpecParameter: fix compatibility of persisted state

Support old-style persisted state, by implementing readResolve()


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/1d63e39d
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/1d63e39d
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/1d63e39d

Branch: refs/heads/master
Commit: 1d63e39d3569ae9de23747e3e19590f19c67f743
Parents: b8211ed
Author: Aled Sage 
Authored: Wed Mar 23 00:50:41 2016 +
Committer: Aled Sage 
Committed: Wed Mar 23 20:29:25 2016 +

--
 .../apache/brooklyn/core/objs/BasicSpecParameter.java  | 13 +
 1 file changed, 13 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/1d63e39d/core/src/main/java/org/apache/brooklyn/core/objs/BasicSpecParameter.java
--
diff --git 
a/core/src/main/java/org/apache/brooklyn/core/objs/BasicSpecParameter.java 
b/core/src/main/java/org/apache/brooklyn/core/objs/BasicSpecParameter.java
index 2bc2346..ea041b2 100644
--- a/core/src/main/java/org/apache/brooklyn/core/objs/BasicSpecParameter.java
+++ b/core/src/main/java/org/apache/brooklyn/core/objs/BasicSpecParameter.java
@@ -69,6 +69,19 @@ public class BasicSpecParameter implements 
SpecParameter{
 private final ConfigKey configKey;
 private final AttributeSensor sensor;
 
+// For backwards compatibility of persisted state.
+// Automatically called by xstream (which is used under the covers by 
XmlMementoSerializer).
+// Required for those who have state from a version between
+// 29th October 2015 and 21st January 2016 (when this class was 
introduced, and then when it was changed).
+private ConfigKey type;
+private Object readResolve() {
+if (type != null && configKey == null) {
+return new BasicSpecParameter(label, pinned, type, sensor);
+} else {
+return this;
+}
+}
+
 @Beta // TBD whether "pinned" stays
 public BasicSpecParameter(String label, boolean pinned, ConfigKey 
config) {
 this(label, pinned, config, null);



[2/2] brooklyn-server git commit: This closes #76

2016-03-23 Thread aledsage
This closes #76


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/ae57587e
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/ae57587e
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/ae57587e

Branch: refs/heads/master
Commit: ae57587ebcf69c8e07c1e24250483aac0eb3b6d1
Parents: 43a8816 1d63e39
Author: Aled Sage 
Authored: Wed Mar 23 20:30:34 2016 +
Committer: Aled Sage 
Committed: Wed Mar 23 20:30:34 2016 +

--
 .../apache/brooklyn/core/objs/BasicSpecParameter.java  | 13 +
 1 file changed, 13 insertions(+)
--




[2/2] brooklyn-library git commit: This closes #21

2016-03-22 Thread aledsage
This closes #21


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/be0d2324
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/be0d2324
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/be0d2324

Branch: refs/heads/master
Commit: be0d23240d6c165b752f54985c4079c45a33dc48
Parents: d7d44f9 d645aa8
Author: Aled Sage 
Authored: Tue Mar 22 20:32:43 2016 +
Committer: Aled Sage 
Committed: Tue Mar 22 20:32:43 2016 +

--
 .../database/mssql/Custom-Enable-CredSSP.ps1| 131 +++
 .../entity/database/mssql/installmssql.ps1  |  33 +++--
 .../brooklyn/entity/database/mssql/mssql.yaml   |   9 +-
 3 files changed, 152 insertions(+), 21 deletions(-)
--




[1/3] brooklyn-dist git commit: RPM: /var/log/brooklyn permission is 700

2016-03-21 Thread aledsage
Repository: brooklyn-dist
Updated Branches:
  refs/heads/master ab035402d -> d0609597b


RPM: /var/log/brooklyn permission is 700

The log file could potentially contain credentials (depending on how
Brooklyn is used) so make sure it’s not visible/readable.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/f1cd94a0
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/f1cd94a0
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/f1cd94a0

Branch: refs/heads/master
Commit: f1cd94a06c4cdef0c24b0378e25cd04cb7fc02e7
Parents: ab03540
Author: Aled Sage 
Authored: Fri Mar 18 23:12:41 2016 +
Committer: Aled Sage 
Committed: Sat Mar 19 00:00:50 2016 +

--
 packaging/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/f1cd94a0/packaging/pom.xml
--
diff --git a/packaging/pom.xml b/packaging/pom.xml
index 9838aa7..4b7cd09 100644
--- a/packaging/pom.xml
+++ b/packaging/pom.xml
@@ -122,7 +122,7 @@
 
 /var/log/brooklyn
 true
-644
+700
 brooklyn
 brooklyn
 



[3/3] brooklyn-dist git commit: This closes #24

2016-03-21 Thread aledsage
This closes #24


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/d0609597
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/d0609597
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/d0609597

Branch: refs/heads/master
Commit: d0609597b5e38d5cbc8f52f8b996a2ebc63132e3
Parents: ab03540 8cbed0d
Author: Aled Sage 
Authored: Mon Mar 21 10:21:28 2016 +
Committer: Aled Sage 
Committed: Mon Mar 21 10:21:28 2016 +

--
 packaging/pom.xml  | 2 +-
 packaging/src/service/brooklyn.service | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--




[2/2] brooklyn-client git commit: This closes #9

2016-03-19 Thread aledsage
This closes #9


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/285013a1
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/285013a1
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/285013a1

Branch: refs/heads/master
Commit: 285013a19abad7f4bcb224e77ce2a86fcb38ea52
Parents: bf696e5 daf8fea
Author: Aled Sage 
Authored: Sat Mar 19 22:30:30 2016 +
Committer: Aled Sage 
Committed: Sat Mar 19 22:30:30 2016 +

--
 io/config.go | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--




[1/2] brooklyn-client git commit: Close config file object (deferred close)

2016-03-19 Thread aledsage
Repository: brooklyn-client
Updated Branches:
  refs/heads/master bf696e55b -> 285013a19


Close config file object (deferred close)


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/daf8fea0
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/daf8fea0
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/daf8fea0

Branch: refs/heads/master
Commit: daf8fea098c4ff2e9ea2468ae7f9cf73c69a40dc
Parents: bf696e5
Author: Lyuben Blagoev 
Authored: Thu Mar 17 09:33:28 2016 +0200
Committer: Lyuben Blagoev 
Committed: Thu Mar 17 09:33:28 2016 +0200

--
 io/config.go | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/daf8fea0/io/config.go
--
diff --git a/io/config.go b/io/config.go
index 4ba80ab..ea9ca01 100644
--- a/io/config.go
+++ b/io/config.go
@@ -20,9 +20,10 @@ package io
 
 import (
"encoding/json"
-   "github.com/apache/brooklyn-client/error_handler"
"os"
"path/filepath"
+
+   "github.com/apache/brooklyn-client/error_handler"
 )
 
 type Config struct {
@@ -48,12 +49,12 @@ func GetConfig() (config *Config) {
 }
 
 func (config *Config) Write() {
-
// Create file as read/write by user (but does not change perms of 
existing file)
fileToWrite, err := os.OpenFile(config.FilePath, 
os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
error_handler.ErrorExit(err)
}
+   defer fileToWrite.Close()
 
enc := json.NewEncoder(fileToWrite)
enc.Encode(config.Map)
@@ -64,6 +65,8 @@ func (config *Config) Read() {
if err != nil {
error_handler.ErrorExit(err)
}
+   defer fileToRead.Close()
+
dec := json.NewDecoder(fileToRead)
dec.Decode()
 }



[2/2] brooklyn-dist git commit: This closes #23

2016-03-19 Thread aledsage
This closes #23


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/a2d513b9
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/a2d513b9
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/a2d513b9

Branch: refs/heads/master
Commit: a2d513b9d47adf66c79925eade1eadb452891f87
Parents: 5ee9370 a789125
Author: Aled Sage 
Authored: Fri Mar 18 09:57:26 2016 +
Committer: Aled Sage 
Committed: Fri Mar 18 09:57:26 2016 +

--
 packaging/pom.xml | 5 -
 1 file changed, 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/a2d513b9/packaging/pom.xml
--



[3/3] brooklyn-server git commit: This closes #63

2016-03-18 Thread aledsage
This closes #63


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/3767000c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/3767000c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/3767000c

Branch: refs/heads/master
Commit: 3767000c6a1f122e35e29040ad1e6138bcebe2dc
Parents: d059088 29ec1ff
Author: Aled Sage 
Authored: Fri Mar 18 23:18:37 2016 +
Committer: Aled Sage 
Committed: Fri Mar 18 23:18:37 2016 +

--
 .../core/test/BrooklynMgmtUnitTestSupport.java  | 12 +++-
 .../usage/ApplicationUsageTrackingTest.java | 31 ++--
 .../org/apache/brooklyn/util/http/HttpTool.java |  3 +-
 3 files changed, 16 insertions(+), 30 deletions(-)
--




[2/4] brooklyn-library git commit: Add sudo to setup of hosts file.

2016-03-18 Thread aledsage
Add sudo to setup of hosts file.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/7e97a26b
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/7e97a26b
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/7e97a26b

Branch: refs/heads/master
Commit: 7e97a26b9e79ab8e04c4052d4a2a5658f6f4d62d
Parents: cf65e18
Author: Geoff Macartney 
Authored: Fri Mar 11 22:35:36 2016 +
Committer: Geoff Macartney 
Committed: Fri Mar 11 22:35:36 2016 +

--
 .../entity/cm/ansible/AnsiblePlaybookTasks.java | 25 
 1 file changed, 21 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/7e97a26b/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsiblePlaybookTasks.java
--
diff --git 
a/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsiblePlaybookTasks.java
 
b/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsiblePlaybookTasks.java
index d22ccab..0589ee7 100644
--- 
a/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsiblePlaybookTasks.java
+++ 
b/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsiblePlaybookTasks.java
@@ -19,10 +19,10 @@
 package org.apache.brooklyn.entity.cm.ansible;
 
 import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.mgmt.TaskAdaptable;
 import org.apache.brooklyn.api.mgmt.TaskFactory;
 import org.apache.brooklyn.core.effector.EffectorTasks;
 import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
+import org.apache.brooklyn.util.collections.MutableList;
 import org.apache.brooklyn.util.core.ResourceUtils;
 import org.apache.brooklyn.util.core.task.Tasks;
 import org.apache.brooklyn.util.core.task.system.ProcessTaskFactory;
@@ -35,7 +35,6 @@ import org.yaml.snakeyaml.DumperOptions;
 import org.yaml.snakeyaml.Yaml;
 
 import static org.apache.brooklyn.core.effector.ssh.SshEffectorTasks.ssh;
-import static org.apache.brooklyn.util.ssh.BashCommands.pipeTextToFile;
 import static org.apache.brooklyn.util.ssh.BashCommands.sudo;
 
 public class AnsiblePlaybookTasks {
@@ -110,7 +109,25 @@ public class AnsiblePlaybookTasks {
 }
 
 public static TaskFactory setUpHostsFile(String installDir, boolean 
force) {
-return ssh(pipeTextToFile("localhost ansible_connection=local", 
"/etc/ansible/hosts"))
-.summary("write hosts file");}
+final String hostsFile = "/etc/ansible/hosts";
+final String tempFile = "/tmp/hosts";
+String checkInstalled = !force ? "which ansible || " : "";
+return sshCommands(
+checkInstalled + " {",
+sudo("rm -f " + hostsFile),
+"echo 'localhost ansible_connection=local' > " + tempFile,
+sudo("mv " + tempFile + " " + hostsFile),
+"}"
+)
+.requiringExitCodeZero()
+.summary("write hosts file");
+}
+
+
+public static SshEffectorTasks.SshEffectorTaskFactory 
sshCommands(String line, String... lines) {
+final MutableList.Builder builder = 
MutableList.builder().add(line);
+builder.addAll(lines);
+return ssh(Strings.join(builder.build(), "\n"));
+}
 }
 



[1/4] brooklyn-library git commit: Add creation of /etc/ansible hosts during install.

2016-03-18 Thread aledsage
Repository: brooklyn-library
Updated Branches:
  refs/heads/master c19037bcd -> d7d44f9ff


Add creation of /etc/ansible hosts during install.

This allows replacement of the command form

   ansible-playbook -i \"localhost,\" -c local  whatever

 with

   ansible-playbook whatever

 and also supports the possibility that playbooks can modify the hosts file 
e.g. by adding additional groups that included roles require.

 For example the following playbook modifies the hosts to add a tomcat-server 
group, in order to install an example ansible from the github examples repo.

 name: multi
 location:
   red1
 services:
 - serviceType: brooklyn.entity.basic.SameServerEntity
   name: Entities
   brooklyn.children:

   - serviceType: org.apache.brooklyn.entity.cm.ansible.AnsibleEntity
 id: bootstrap
 service.name: crond
 playbook: bootstrap
 playbook.yaml: |
 ---
 - hosts: localhost
   tasks:
   - shell: printf "[tomcat-servers]\nlocalhost 
ansible_connection=local\n" >> /etc/ansible/hosts
   - file: path=/etc/ansible/playbooks state=directory mode=0755
   - get_url: 
url=https://github.com/ansible/ansible-examples/archive/master.zip 
dest=/tmp/master.zip mode=0440
   - command: unzip -o -d /etc/ansible/playbooks /tmp/master.zip

   - serviceType: org.apache.brooklyn.entity.stock.BasicApplication
 start.latch: 
$brooklyn:component("bootstrap").attributeWhenReady("service.isUp")
 brooklyn.children:
 - type: org.apache.brooklyn.entity.cm.ansible.AnsibleEntity
   name: test
   service.name: tomcat
   playbook: tomcat
   playbook.yaml: |
   ---
   - hosts: localhost
   - include: 
/etc/ansible/playbooks/ansible-examples-master/tomcat-standalone/site.yml
 vars:
 http_port: 8080
 https_port: 8443
 admin_username: admin
 admin_password: secret


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/cf65e18d
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/cf65e18d
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/cf65e18d

Branch: refs/heads/master
Commit: cf65e18d1b775d3528c9ba05c1229d748a6807bd
Parents: fad103e
Author: Geoff Macartney 
Authored: Fri Mar 11 17:25:25 2016 +
Committer: Geoff Macartney 
Committed: Fri Mar 11 17:25:25 2016 +

--
 .../cm/ansible/AnsibleLifecycleEffectorTasks.java|  1 +
 .../entity/cm/ansible/AnsiblePlaybookTasks.java  | 15 +++
 2 files changed, 12 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/cf65e18d/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsibleLifecycleEffectorTasks.java
--
diff --git 
a/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsibleLifecycleEffectorTasks.java
 
b/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsibleLifecycleEffectorTasks.java
index e51d9e9..ccf8303 100644
--- 
a/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsibleLifecycleEffectorTasks.java
+++ 
b/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsibleLifecycleEffectorTasks.java
@@ -118,6 +118,7 @@ public class AnsibleLifecycleEffectorTasks extends 
MachineLifecycleEffectorTasks
 }
 
 DynamicTasks.queue(AnsiblePlaybookTasks.installAnsible(installDir, 
false));
+DynamicTasks.queue(AnsiblePlaybookTasks.setUpHostsFile(installDir, 
false));
 
 if (getExtraVars() != null) {
 
DynamicTasks.queue(AnsiblePlaybookTasks.configureExtraVars(getRunDir(), 
extraVars, false));

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/cf65e18d/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsiblePlaybookTasks.java
--
diff --git 
a/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsiblePlaybookTasks.java
 
b/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsiblePlaybookTasks.java
index 152bc61..d22ccab 100644
--- 
a/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsiblePlaybookTasks.java
+++ 
b/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsiblePlaybookTasks.java
@@ -19,6 +19,7 @@
 package org.apache.brooklyn.entity.cm.ansible;
 
 import org.apache.brooklyn.api.entity.Entity;
+import org.apache.brooklyn.api.mgmt.TaskAdaptable;
 import org.apache.brooklyn.api.mgmt.TaskFactory;
 import 

[1/2] brooklyn-server git commit: BrooklynNode: support initial catalog.bom conf

2016-03-15 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 1f6d5d987 -> b70c2b0b6


BrooklynNode: support initial catalog.bom conf


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/b98d5b2c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/b98d5b2c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/b98d5b2c

Branch: refs/heads/master
Commit: b98d5b2c33b26d128e7d8353d869edb261bbbdb0
Parents: f20bf0e
Author: Aled Sage 
Authored: Fri Mar 11 21:57:45 2016 +
Committer: Aled Sage 
Committed: Mon Mar 14 22:08:10 2016 +

--
 .../entity/brooklynnode/BrooklynNode.java   | 17 -
 .../brooklynnode/BrooklynNodeSshDriver.java | 27 +++-
 .../BrooklynNodeIntegrationTest.java| 72 +---
 3 files changed, 102 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/b98d5b2c/software/base/src/main/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNode.java
--
diff --git 
a/software/base/src/main/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNode.java
 
b/software/base/src/main/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNode.java
index 55c2e27..aae5455 100644
--- 
a/software/base/src/main/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNode.java
+++ 
b/software/base/src/main/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNode.java
@@ -170,24 +170,35 @@ public interface BrooklynNode extends SoftwareProcess, 
UsesJava {
 "brooklynnode.brooklynproperties.local.contents", "Contents for 
the launch-specific brooklyn properties file", null);
 
 // For use in testing primarily
-/** @deprecated since 0.7.0; TODO this should support BOM files */
+/** @deprecated since 0.7.0; instead set the catalog initial bom */
 @Deprecated
 @SetFromFlag("brooklynCatalogRemotePath")
 public static final ConfigKey BROOKLYN_CATALOG_REMOTE_PATH = 
ConfigKeys.newStringConfigKey(
 "brooklynnode.brooklyncatalog.remotepath", "Remote path for the 
brooklyn catalog.xml file to be uploaded", "${HOME}/.brooklyn/catalog.xml");
 
-/** @deprecated since 0.7.0; TODO this should support BOM files */
+/** @deprecated since 0.7.0; instead use {@link 
#BROOKLYN_CATALOG_INITIAL_BOM_URI} */
 @Deprecated
 @SetFromFlag("brooklynCatalogUri")
 public static final ConfigKey BROOKLYN_CATALOG_URI = 
ConfigKeys.newStringConfigKey(
 "brooklynnode.brooklyncatalog.uri", "URI for the brooklyn 
catalog.xml file (uploaded to ~/.brooklyn/catalog.xml)", null);
 
-/** @deprecated since 0.7.0; TODO this should support BOM files */
+/** @deprecated since 0.7.0; instead use {@link 
#BROOKLYN_CATALOG_INITIAL_BOM_CONTENTS} */
 @Deprecated
 @SetFromFlag("brooklynCatalogContents")
 public static final ConfigKey BROOKLYN_CATALOG_CONTENTS = 
ConfigKeys.newStringConfigKey(
 "brooklynnode.brooklyncatalog.contents", "Contents for the 
brooklyn catalog.xml file (uploaded to ~/.brooklyn/catalog.xml)", null);
 
+public static final ConfigKey 
BROOKLYN_CATALOG_INITIAL_BOM_REMOTE_PATH = ConfigKeys.newStringConfigKey(
+"brooklynnode.catalog.initial.bom.remotepath", 
+"Remote path for the launch-specific initial catalog file to be 
uploaded", 
+"${driver.runDir}/brooklyn-local.bom");
+
+public static final ConfigKey BROOKLYN_CATALOG_INITIAL_BOM_URI = 
ConfigKeys.newStringConfigKey(
+"brooklynnode.catalog.initial.bom.uri", "URI for the catalog .bom 
file (to overwrite the default)", null);
+
+public static final ConfigKey 
BROOKLYN_CATALOG_INITIAL_BOM_CONTENTS = ConfigKeys.newStringConfigKey(
+"brooklynnode.catalog.initial.bom.contents", "Contents for the 
catalog .bom file (to overwrite the default)", null);
+
 @SuppressWarnings({ "rawtypes", "unchecked" })
 @SetFromFlag("enabledHttpProtocols")
 public static final BasicAttributeSensorAndConfigKey 
ENABLED_HTTP_PROTOCOLS = new BasicAttributeSensorAndConfigKey(

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/b98d5b2c/software/base/src/main/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNodeSshDriver.java
--
diff --git 
a/software/base/src/main/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNodeSshDriver.java
 
b/software/base/src/main/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNodeSshDriver.java
index 5e2caa2..bdcad9d 100644
--- 
a/software/base/src/main/java/org/apache/brooklyn/entity/brooklynnode/BrooklynNodeSshDriver.java
+++ 

[2/3] brooklyn-library git commit: Update NonProvisioningController

2016-03-14 Thread aledsage
Update NonProvisioningController

- Bring the code more inline with how AbstractController is written.
- Tested it with the downstream project:
  https://github.com/cloudsoft/brooklyn-aws-elb/


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/7e695d19
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/7e695d19
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/7e695d19

Branch: refs/heads/master
Commit: 7e695d19ef599d2d67ab81822106781db6bbfe33
Parents: 3bdd17e
Author: Aled Sage 
Authored: Fri Feb 19 19:37:06 2016 +
Committer: Aled Sage 
Committed: Fri Mar 11 22:28:25 2016 +

--
 .../entity/proxy/AbstractControllerImpl.java|   2 +-
 .../proxy/AbstractNonProvisionedController.java |   4 +
 .../AbstractNonProvisionedControllerImpl.java   | 321 ---
 3 files changed, 219 insertions(+), 108 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/7e695d19/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
--
diff --git 
a/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
 
b/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
index 47ef7a9..257882d 100644
--- 
a/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
+++ 
b/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
@@ -499,7 +499,7 @@ public abstract class AbstractControllerImpl extends 
SoftwareProcessImpl impleme
 }
 
 // Utilities for modifying an AttributeSensor of type map
-private static class MapAttribute {
+static class MapAttribute {
 public static  V put(Entity entity, AttributeSensor> 
attribute, K key, V value) {
 Map oldMap = entity.getAttribute(attribute);
 Map newMap = MutableMap.copyOf(oldMap);

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/7e695d19/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractNonProvisionedController.java
--
diff --git 
a/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractNonProvisionedController.java
 
b/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractNonProvisionedController.java
index 70df171..cbcfe65 100644
--- 
a/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractNonProvisionedController.java
+++ 
b/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractNonProvisionedController.java
@@ -18,6 +18,8 @@
  */
 package org.apache.brooklyn.entity.proxy;
 
+import java.util.Set;
+
 import org.apache.brooklyn.api.entity.Entity;
 import org.apache.brooklyn.api.entity.ImplementedBy;
 
@@ -25,4 +27,6 @@ import org.apache.brooklyn.api.entity.ImplementedBy;
 public interface AbstractNonProvisionedController extends LoadBalancer, Entity 
{
 
 public boolean isActive();
+
+Set getServerPoolAddresses();
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/7e695d19/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractNonProvisionedControllerImpl.java
--
diff --git 
a/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractNonProvisionedControllerImpl.java
 
b/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractNonProvisionedControllerImpl.java
index 137be36..c26235a 100644
--- 
a/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractNonProvisionedControllerImpl.java
+++ 
b/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractNonProvisionedControllerImpl.java
@@ -18,9 +18,9 @@
  */
 package org.apache.brooklyn.entity.proxy;
 
-import static com.google.common.base.Preconditions.checkState;
 import static org.apache.brooklyn.util.JavaGroovyEquivalents.groovyTruth;
 
+import java.net.URI;
 import java.util.Collection;
 import java.util.Map;
 import java.util.Set;
@@ -28,20 +28,28 @@ import java.util.Set;
 import org.apache.brooklyn.api.entity.Entity;
 import org.apache.brooklyn.api.entity.Group;
 import org.apache.brooklyn.api.location.Location;
+import org.apache.brooklyn.api.mgmt.Task;
+import org.apache.brooklyn.api.policy.Policy;
 import org.apache.brooklyn.api.policy.PolicySpec;
 import org.apache.brooklyn.api.sensor.AttributeSensor;
 import org.apache.brooklyn.core.entity.AbstractEntity;
+import org.apache.brooklyn.core.entity.Entities;
+import 

[3/3] brooklyn-library git commit: This closes #10

2016-03-14 Thread aledsage
This closes #10


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/8a239404
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/8a239404
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/8a239404

Branch: refs/heads/master
Commit: 8a239404bc218e6cbd31071fee59fc787486ff4d
Parents: 65fb696 7e695d1
Author: Aled Sage 
Authored: Mon Mar 14 09:51:58 2016 +
Committer: Aled Sage 
Committed: Mon Mar 14 09:51:58 2016 +

--
 .../entity/proxy/AbstractControllerImpl.java|   5 +-
 .../proxy/AbstractNonProvisionedController.java |   4 +
 .../AbstractNonProvisionedControllerImpl.java   | 321 ---
 3 files changed, 220 insertions(+), 110 deletions(-)
--




[1/3] brooklyn-library git commit: AbstractControllerImpl: minor tidies

2016-03-14 Thread aledsage
Repository: brooklyn-library
Updated Branches:
  refs/heads/master 65fb69694 -> 8a239404b


AbstractControllerImpl: minor tidies

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/3bdd17e3
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/3bdd17e3
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/3bdd17e3

Branch: refs/heads/master
Commit: 3bdd17e3b70a30278a897496b0aab10f6f894ffb
Parents: 65fb696
Author: Aled Sage 
Authored: Fri Feb 19 19:36:05 2016 +
Committer: Aled Sage 
Committed: Fri Mar 11 17:51:55 2016 +

--
 .../org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/3bdd17e3/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
--
diff --git 
a/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
 
b/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
index 5c4c443..47ef7a9 100644
--- 
a/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
+++ 
b/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/AbstractControllerImpl.java
@@ -80,7 +80,6 @@ public abstract class AbstractControllerImpl extends 
SoftwareProcessImpl impleme
 protected AbstractMembershipTrackingPolicy serverPoolMemberTrackerPolicy;
 // final because this is the synch target
 final protected Set serverPoolAddresses = Sets.newLinkedHashSet();
-protected Map serverPoolTargets = Maps.newLinkedHashMap();
 
 public AbstractControllerImpl() {
 this(MutableMap.of(), null, null);
@@ -150,7 +149,7 @@ public abstract class AbstractControllerImpl extends 
SoftwareProcessImpl impleme
 // but synch in case invoked at other times; and note if !isActive 
during start means we miss some after this,
 // we will update again on postStart after setting isActive=true
 Map serverPoolTargets = Maps.newLinkedHashMap();
-for (Entity member : getServerPool().getMembers()) {
+for (Entity member : serverPool.getMembers()) {
 if (belongsInServerPool(member)) {
 if (LOG.isTraceEnabled()) LOG.trace("Done {} checkEntity 
{}", this, member);
 String address = getAddressOfEntity(member);



[2/2] brooklyn-library git commit: This closes #17

2016-03-11 Thread aledsage
This closes #17


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/65fb6969
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/65fb6969
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/65fb6969

Branch: refs/heads/master
Commit: 65fb696945ec84b036da6b45ddcf87573848df26
Parents: fad103e 1e7c2ce
Author: Aled Sage 
Authored: Fri Mar 11 17:48:18 2016 +
Committer: Aled Sage 
Committed: Fri Mar 11 17:48:18 2016 +

--
 .../java/org/apache/brooklyn/entity/cm/ansible/AnsibleEntity.java  | 2 ++
 1 file changed, 2 insertions(+)
--




[1/2] brooklyn-library git commit: Adding @Catalog annotation to the AnsibleEntity

2016-03-11 Thread aledsage
Repository: brooklyn-library
Updated Branches:
  refs/heads/master fad103e96 -> 65fb69694


Adding @Catalog annotation to the AnsibleEntity

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/1e7c2ce0
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/1e7c2ce0
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/1e7c2ce0

Branch: refs/heads/master
Commit: 1e7c2ce0be12e100bf9211777db591764ddf3813
Parents: fad103e
Author: Yavor Yanchev 
Authored: Fri Mar 11 11:24:30 2016 +0200
Committer: Yavor Yanchev 
Committed: Fri Mar 11 11:24:30 2016 +0200

--
 .../java/org/apache/brooklyn/entity/cm/ansible/AnsibleEntity.java  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/1e7c2ce0/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsibleEntity.java
--
diff --git 
a/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsibleEntity.java
 
b/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsibleEntity.java
index a2c9676..a795b76 100644
--- 
a/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsibleEntity.java
+++ 
b/software/cm/ansible/src/main/java/org/apache/brooklyn/entity/cm/ansible/AnsibleEntity.java
@@ -18,6 +18,7 @@
  */
 package org.apache.brooklyn.entity.cm.ansible;
 
+import org.apache.brooklyn.api.catalog.Catalog;
 import org.apache.brooklyn.api.entity.ImplementedBy;
 import org.apache.brooklyn.core.annotation.Effector;
 import org.apache.brooklyn.core.annotation.EffectorParam;
@@ -25,6 +26,7 @@ import org.apache.brooklyn.core.effector.MethodEffector;
 import org.apache.brooklyn.entity.software.base.SoftwareProcess;
 
 @ImplementedBy(AnsibleEntityImpl.class)
+@Catalog(name="AnsibleEntity", description="Software managed by Ansible CM")
 public interface AnsibleEntity extends SoftwareProcess, AnsibleConfig {
 
 MethodEffector ANSIBLE_COMMAND = new 
MethodEffector<>(AnsibleEntity.class, "ansibleCommand");



[2/3] brooklyn-docs git commit: typo

2016-03-11 Thread aledsage
typo


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/e5f836e3
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/e5f836e3
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/e5f836e3

Branch: refs/heads/master
Commit: e5f836e35afefe4e5fd35f34265938a7fc363b46
Parents: f483e6a
Author: Duncan Godwin 
Authored: Fri Mar 11 12:27:25 2016 +
Committer: Duncan Godwin 
Committed: Fri Mar 11 12:27:25 2016 +

--
 guide/ops/catalog/index.md | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/e5f836e3/guide/ops/catalog/index.md
--
diff --git a/guide/ops/catalog/index.md b/guide/ops/catalog/index.md
index 3b33128..230eedc 100644
--- a/guide/ops/catalog/index.md
+++ b/guide/ops/catalog/index.md
@@ -13,11 +13,10 @@ children:
 ---
 
 Apache Brooklyn provides a **catalog**, which is a persisted collection of 
versioned blueprints and other resources. 
-Blueprints in the catalog can be deployed directly, via the Brooklyn REST API 
or the web console,
+A set of blueprints is loaded from the `default.catalog.bom` in the Brooklyn 
folder by default and additional ones can be added through the web console or 
CLI. 
+Blueprints in the catalog can be deployed directly, via the Brooklyn CLI or 
the web console,
 or referenced in other blueprints using their `id`.
 
-A set of blueprints is loaded from `default.catalog.bom` in the brooklyn 
folder by default.
-
  
 ### Catalog Items YAML Syntax
 



[3/3] brooklyn-docs git commit: This closes #28

2016-03-11 Thread aledsage
This closes #28


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/c95a55cd
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/c95a55cd
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/c95a55cd

Branch: refs/heads/master
Commit: c95a55cd6b7cce5cf66b119078590159323c783b
Parents: 8f63114 e5f836e
Author: Aled Sage 
Authored: Fri Mar 11 17:42:57 2016 +
Committer: Aled Sage 
Committed: Fri Mar 11 17:42:57 2016 +

--
 guide/ops/catalog/index.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--




[1/2] brooklyn-server git commit: Remove Incubator DISCLAIMER file

2016-03-11 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master f20bf0e77 -> f8476be1b


Remove Incubator DISCLAIMER file


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/dde1124a
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/dde1124a
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/dde1124a

Branch: refs/heads/master
Commit: dde1124a9257304ae5869142eb61ac2f6b86ae17
Parents: f20bf0e
Author: Richard Downer 
Authored: Fri Mar 11 13:35:01 2016 +
Committer: Richard Downer 
Committed: Fri Mar 11 13:35:41 2016 +

--
 parent/pom.xml| 3 +--
 utils/jmx/jmxmp-ssl-agent/pom.xml | 5 -
 2 files changed, 1 insertion(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dde1124a/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 08d69e3..5e721a3 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1109,7 +1109,7 @@
   
 
 
-
 
 org.apache.maven.plugins
@@ -1122,7 +1122,6 @@
 
 
 
org.apache:apache-jar-resource-bundle:1.4
-
org.apache:apache-incubator-disclaimer-resource-bundle:1.1
 
 
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dde1124a/utils/jmx/jmxmp-ssl-agent/pom.xml
--
diff --git a/utils/jmx/jmxmp-ssl-agent/pom.xml 
b/utils/jmx/jmxmp-ssl-agent/pom.xml
index 930f0a3..123e6f4 100644
--- a/utils/jmx/jmxmp-ssl-agent/pom.xml
+++ b/utils/jmx/jmxmp-ssl-agent/pom.xml
@@ -78,7 +78,6 @@
 
 META-INF/LICENSE
 META-INF/NOTICE
-META-INF/DISCLAIMER
 
 
 
@@ -90,10 +89,6 @@
 META-INF/NOTICE
 src/main/license/NOTICE.shaded
 
-
-META-INF/DISCLAIMER
-src/main/license/DISCLAIMER.shaded
-
 
 
 



[2/2] brooklyn-server git commit: This closes #57

2016-03-11 Thread aledsage
This closes #57


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/f8476be1
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/f8476be1
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/f8476be1

Branch: refs/heads/master
Commit: f8476be1bb408f0020695e7a71c27ca30a01eeb9
Parents: f20bf0e dde1124
Author: Aled Sage 
Authored: Fri Mar 11 17:38:42 2016 +
Committer: Aled Sage 
Committed: Fri Mar 11 17:38:42 2016 +

--
 parent/pom.xml| 3 +--
 utils/jmx/jmxmp-ssl-agent/pom.xml | 5 -
 2 files changed, 1 insertion(+), 7 deletions(-)
--




[2/2] brooklyn-dist git commit: This closes #16

2016-03-11 Thread aledsage
This closes #16


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/6b906265
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/6b906265
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/6b906265

Branch: refs/heads/master
Commit: 6b906265fbc8a54dae21fe26b453681fe8d9baf4
Parents: 29baf8c 43bc853
Author: Aled Sage 
Authored: Fri Mar 11 17:32:33 2016 +
Committer: Aled Sage 
Committed: Fri Mar 11 17:32:33 2016 +

--
 all/pom.xml | 5 +
 1 file changed, 5 insertions(+)
--




[2/2] brooklyn-dist git commit: This closes #13

2016-03-11 Thread aledsage
This closes #13


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/dadbc93a
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/dadbc93a
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/dadbc93a

Branch: refs/heads/master
Commit: dadbc93ac3df6b4625b2f0c1d2cf582eb962119c
Parents: 7177e20 87818e5
Author: Aled Sage 
Authored: Fri Mar 11 17:28:50 2016 +
Committer: Aled Sage 
Committed: Fri Mar 11 17:28:50 2016 +

--
 packaging/pom.xml | 26 --
 pom.xml   |  1 +
 2 files changed, 9 insertions(+), 18 deletions(-)
--




[1/2] brooklyn-dist git commit: Add packaging to pom modules, fix version

2016-03-11 Thread aledsage
Repository: brooklyn-dist
Updated Branches:
  refs/heads/master 7177e2070 -> dadbc93ac


Add packaging to pom modules, fix version


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/87818e5d
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/87818e5d
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/87818e5d

Branch: refs/heads/master
Commit: 87818e5d3fd168582cc10f65fb3eb106ab712ae2
Parents: b38cdc7
Author: alrick87 
Authored: Wed Mar 9 08:52:23 2016 -0800
Committer: alrick87 
Committed: Fri Mar 11 09:15:29 2016 -0800

--
 packaging/pom.xml | 26 --
 pom.xml   |  1 +
 2 files changed, 9 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/87818e5d/packaging/pom.xml
--
diff --git a/packaging/pom.xml b/packaging/pom.xml
index c4c0a99..ece4b01 100644
--- a/packaging/pom.xml
+++ b/packaging/pom.xml
@@ -19,8 +19,8 @@
 -->
 http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
 4.0.0
-jar
-brooklyn-dist
+pom
+brooklyn-packaging
 Brooklyn RPM Package
 
 Brooklyn RPM Package for Centos 7 and RHEL 7 operating systems
@@ -36,22 +36,9 @@
 
 
 org.apache.brooklyn
-brooklyn-all
+brooklyn-dist
 ${project.version}
 
-
-
-
-org.apache.brooklyn
-brooklyn-test-support
-${project.version}
-test
-
-
-org.testng
-testng
-test
-
 
 
 
@@ -63,7 +50,7 @@
 
 generate-rpm
 
-rpm
+attached-rpm
 
 
 
@@ -72,8 +59,11 @@
 ASL 2.0
 Applications/Internet
 
-true
+noarch
 Linux
+
+java
+
 
 
 /etc/brooklyn

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/87818e5d/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 976e575..fd4b767 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,6 +74,7 @@
 downstream-parent
 all
 dist
+packaging
 vagrant
 archetypes/quickstart
 



[2/2] brooklyn-docs git commit: This closes #27

2016-03-10 Thread aledsage
This closes #27


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/8f63114b
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/8f63114b
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/8f63114b

Branch: refs/heads/master
Commit: 8f63114b4849995e56e307919caf4d00518a155b
Parents: 5676dda 1c2e836
Author: Aled Sage 
Authored: Thu Mar 10 21:09:55 2016 +
Committer: Aled Sage 
Committed: Thu Mar 10 21:09:55 2016 +

--
 guide/dev/env/maven-build.md | 2 ++
 1 file changed, 2 insertions(+)
--




[1/2] brooklyn-docs git commit: Update maven-build.md

2016-03-10 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 5676dda50 -> 8f63114b4


Update maven-build.md

Add notes about building RPM packages.

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/1c2e8360
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/1c2e8360
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/1c2e8360

Branch: refs/heads/master
Commit: 1c2e8360ea82943d4a04daf1aedf8dc731c0668d
Parents: 5676dda
Author: Aleksandr Vasilev 
Authored: Thu Mar 10 08:16:47 2016 -0800
Committer: Aleksandr Vasilev 
Committed: Thu Mar 10 08:16:47 2016 -0800

--
 guide/dev/env/maven-build.md | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/1c2e8360/guide/dev/env/maven-build.md
--
diff --git a/guide/dev/env/maven-build.md b/guide/dev/env/maven-build.md
index 2f01899..1635397 100644
--- a/guide/dev/env/maven-build.md
+++ b/guide/dev/env/maven-build.md
@@ -25,6 +25,8 @@ Key things to note if you're new to Maven:
 
 * Add ``-Dno-go-client`` to skip building the ``brooklyn-client`` project 
(useful if you don't have Go installed).
 
+* You may need to install ``rpm`` package to build RPM packages: ``brew 
install rpm`` for Mac OS, ``apt-get install rpm`` for Ubuntu, ``yum install 
rpm`` for Centos/RHEL.
+
 * Run ``-PIntegration`` to run integration tests, or ``-PLive`` to run live 
tests
   ([tests described here](../code/tests.html))
 



[1/3] brooklyn-docs git commit: Update/improve docs for java entities

2016-03-10 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master f858b171e -> 5676dda50


Update/improve docs for java entities

- In particular, updates the docs to follow the archetype changes
  made in https://github.com/apache/brooklyn-dist/pull/10

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/44e812ba
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/44e812ba
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/44e812ba

Branch: refs/heads/master
Commit: 44e812ba782f613f3df28220c82b6831b1ecc19a
Parents: a41e0d7
Author: Aled Sage 
Authored: Mon Mar 7 20:42:00 2016 +
Committer: Aled Sage 
Committed: Mon Mar 7 20:42:00 2016 +

--
 guide/java/archetype.md |  62 +++--
 guide/java/common-usage.md  | 235 ---
 guide/java/defining-and-deploying.md| 226 +++---
 guide/java/entity.md|  26 +-
 guide/java/feeds.md | 203 
 guide/java/gist_generator/GistGenerator.java|  29 +++
 .../java/gist_generator/GistGeneratorImpl.java  |  47 
 .../java/gist_generator/GistGeneratorTest.java  |  20 ++
 .../gist_generator/GistGeneratorYamlTest.java   |  39 +++
 guide/java/gist_generator/gist_create_token.png | Bin 0 -> 390046 bytes
 guide/java/gist_generator/gist_generator.bom|  15 ++
 guide/java/gist_generator/gist_grant_access.png | Bin 0 -> 411974 bytes
 guide/java/index.md |  19 +-
 guide/java/java_app/ExampleWebApp.java  |  30 +++
 guide/java/policies.md  |  10 +-
 ...topology-dependencies-management-policies.md |  69 --
 guide/java/topology-dependencies.md |  49 
 17 files changed, 804 insertions(+), 275 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/44e812ba/guide/java/archetype.md
--
diff --git a/guide/java/archetype.md b/guide/java/archetype.md
index ba3bc0e..3bd3426 100644
--- a/guide/java/archetype.md
+++ b/guide/java/archetype.md
@@ -7,9 +7,13 @@ categories: [use, guide, defining-applications]
 
 ### Maven Archetype
 
-Brooklyn includes a maven archetype, which can be used to create the project 
structure for a new application.
+Brooklyn includes a maven archetype, which can be used to create the project 
structure for 
+developing a new Java entity, and generating the OSGi bundle for it.
 
-This can be done interactively using:
+
+ Generating the Project
+
+The archetype can be used interactively, by running:
 {% highlight bash %}
 $ mvn archetype:generate
 {% endhighlight %}
@@ -33,32 +37,52 @@ $ mvn archetype:generate \
 {% endhighlight %}
 
 This will create a directory with the artifact name (e.g. "autobrick" in the 
example above).
-Note that if run from a directory containing a pom, it will also modify that 
pom to add this as a module!
+Note that if run from a directory containing a pom, it will also modify that 
pom to add this as 
+a module!
+
+The project will contain an example Java entity. You can test this using the 
supplied unit tests,
+and also replace it with your own code.
+
+The `README.md` file within the project gives further guidance.
 
-The project will contain an example app. You can run this, and also replace it 
with your own
-application code.
+
+ Building
 
 To build, run the commands:
 
 {% highlight bash %}
 $ cd autobrick
-$ mvn clean install assembly:assembly
+$ mvn clean install
 {% endhighlight %}
 
-The assembly command will build a complete standalone distribution archive in 
`target/autobrick-0.1.0-SNAPSHOT-dist.tar.gz`,
-suitable for redistribution and containing `./start.sh` in the root.
 
-An unpacked equivalent is placed in `target/autobrick-0.1.0-SNAPSHOT-dist`,
-thus you can run the single-node sample locally with:
+ Adding to the Catalog
 
-{% highlight bash %}
-$ cd target/autobrick-0.1.0-SNAPSHOT-dist/autobrick-0.1.0-SNAPSHOT/
-$ ./start.sh launch --single
-{% endhighlight %}
+The build will produce an OSGi bundle in 
`target/autobrick-0.1.0-SNAPSHOT.jar`, suitable for 
+use in the [Brooklyn catalog]({{ site.path.guide }}/ops/catalog/) (using 
`brooklyn.libraries`).
+
+The project comes with a `sample.bom` file, located in `src/test/resources`. 
You will first have 
+to copy the target jar to a suitable location, and update the URL in 
`sample.bom` to point at that 
+jar.
+
+The command below will use the REST api to add this to the catalog of a 
running Brooklyn instance:
+
+curl -u admin:pa55w0rd http://127.0.0.1:8081/v1/catalog --data-binary 
@src/test/resources/sample.bom
+
+The YAML blueprint below shows an example 

[3/3] brooklyn-docs git commit: This closes #24

2016-03-10 Thread aledsage
This closes #24


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/5676dda5
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/5676dda5
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/5676dda5

Branch: refs/heads/master
Commit: 5676dda502edafa72b10b8dbca01e9ef0656d9f1
Parents: f858b17 15898db
Author: Aled Sage 
Authored: Thu Mar 10 13:24:32 2016 +
Committer: Aled Sage 
Committed: Thu Mar 10 13:24:32 2016 +

--
 guide/java/archetype.md |  62 +++--
 guide/java/common-usage.md  | 237 ---
 guide/java/defining-and-deploying.md| 229 +++---
 guide/java/entity.md|  26 +-
 guide/java/feeds.md | 205 
 guide/java/gist_generator/GistGenerator.java|  29 +++
 .../java/gist_generator/GistGeneratorImpl.java  |  47 
 .../java/gist_generator/GistGeneratorTest.java  |  20 ++
 .../gist_generator/GistGeneratorYamlTest.java   |  39 +++
 guide/java/gist_generator/gist_create_token.png | Bin 0 -> 390046 bytes
 guide/java/gist_generator/gist_generator.bom|  15 ++
 guide/java/gist_generator/gist_grant_access.png | Bin 0 -> 411974 bytes
 guide/java/index.md |  19 +-
 guide/java/java_app/ExampleWebApp.java  |  62 +
 guide/java/policies.md  |  10 +-
 ...topology-dependencies-management-policies.md |  69 --
 guide/java/topology-dependencies.md |  53 +
 17 files changed, 847 insertions(+), 275 deletions(-)
--




[2/3] brooklyn-docs git commit: Java docs: incorporate review comments from #24

2016-03-10 Thread aledsage
Java docs: incorporate review comments from #24

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/15898db2
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/15898db2
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/15898db2

Branch: refs/heads/master
Commit: 15898db2c7f0aa519dd3d0c24cf392e74c28366d
Parents: 44e812b
Author: Aled Sage 
Authored: Thu Mar 10 13:22:51 2016 +
Committer: Aled Sage 
Committed: Thu Mar 10 13:22:51 2016 +

--
 guide/java/common-usage.md |  8 +++---
 guide/java/defining-and-deploying.md   | 19 --
 guide/java/feeds.md|  4 ++-
 guide/java/java_app/ExampleWebApp.java | 40 ++---
 guide/java/topology-dependencies.md| 10 +---
 5 files changed, 62 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/15898db2/guide/java/common-usage.md
--
diff --git a/guide/java/common-usage.md b/guide/java/common-usage.md
index d0f7ec5..ccafd9b 100644
--- a/guide/java/common-usage.md
+++ b/guide/java/common-usage.md
@@ -39,9 +39,11 @@ public static final ConfigKey ROOT_WAR = new 
ConfigKeys.newStringConfigK
 "WAR file to deploy as the ROOT, as URL (supporting file: and 
classpath: prefixes)");
 {% endhighlight %}
 
-One can optional define a `@SetFromFlag("war")`. This defines a short-hand for 
configuring the
-entity. However, it should be used with caution - the long form defined in the 
constructor should
-be meaningful and sufficient. Its use may be deprecated in a future release.
+One can optionally define a `@SetFromFlag("war")`. This defines a short-hand 
for configuring the
+entity. However, it should be used with caution - when using configuration set 
on a parent entity
+(and thus inherited), the `@SetFromFlag` short-form names are not checked. The 
long form defined 
+in the constructor should be meaningful and sufficient. The usage of 
`@SetFromFlag` is therefore
+discouraged.
 
 The type `AttributeSensorAndConfigKey` can be used to indicate that a 
config key should be resolved,
 and its value set as a sensor on the entity (when 
`ConfigToAttributes.apply(entity)` is called).

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/15898db2/guide/java/defining-and-deploying.md
--
diff --git a/guide/java/defining-and-deploying.md 
b/guide/java/defining-and-deploying.md
index fda711b..d754c82 100644
--- a/guide/java/defining-and-deploying.md
+++ b/guide/java/defining-and-deploying.md
@@ -51,14 +51,15 @@ To describe each part of this:
   have extended one of the other sub-types of Entity.
 * The `OAUTH_KEY` is a configuration key - it is configuration that can be set 
on the entity when 
   it is being instantiated.
-* The `@Effector` annotation indicates the the given method is an effector, so 
should be presented
+* The `@Effector` annotation indicates that the given method is an effector, 
so should be presented
   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. These will be  
-  presented in users of the entity, e.g. when invoking the effector via the 
web-console.
+* 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 
+  web-console.
 
 Note there is an alternative way of defining effectors - adding them to the 
entity dynamically, 
-discussed in the section [Dynamic Effectors](dynamic_effectors.html).
+discussed in the section [Dynamically Added 
Effectors](common-usage.html#dynamically-added-effectors).
 
 Next lets add the implementation. Create a new Java class named 
`GistGeneratorImpl`.
 
@@ -128,9 +129,9 @@ for how to store these credentials more securely.
 
 ## Building the OSGi Bundle
 
-We will build this as an [OSGi 
Bundle](https://www.osgi.org/developer/architecture/) so that it
-can be added to the Apache Brooklyn server at runtime, and so multiple 
versions of the blueprint 
-can be managed.
+Next we will build this example as an [OSGi 
Bundle](https://www.osgi.org/developer/architecture/) 
+so that it can be added to the Apache Brooklyn server at runtime, and so 
multiple versions of the  
+blueprint can be managed.
 
 The `mvn clean install` will automatically do this, creating a jar inside the 
`target/` sub-directory
 of the project. This works by using the 
@@ -156,7 +157,9 @@ available for test purposes.*
 The 

[3/3] brooklyn-docs git commit: This closes #23

2016-03-10 Thread aledsage
This closes #23


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/a9ca1130
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/a9ca1130
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/a9ca1130

Branch: refs/heads/master
Commit: a9ca113093fed3c25a5227d21fff7a6f29f52e0a
Parents: ae8b0ab 5921673
Author: Aled Sage 
Authored: Thu Mar 10 10:44:30 2016 +
Committer: Aled Sage 
Committed: Thu Mar 10 10:44:30 2016 +

--
 _build/build-pdf.sh | 29 +
 _build/build.sh |  6 --
 _build/buildPDF.sh  | 28 
 style/css/printable.css |  9 +
 4 files changed, 42 insertions(+), 30 deletions(-)
--




[2/3] brooklyn-docs git commit: Renamed script & optimised

2016-03-10 Thread aledsage
Renamed script & optimised


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/59216734
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/59216734
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/59216734

Branch: refs/heads/master
Commit: 59216734945a6667fc440c108b175350a4f3ff7c
Parents: 2a70855
Author: Duncan Godwin 
Authored: Mon Mar 7 15:28:55 2016 +
Committer: Duncan Godwin 
Committed: Mon Mar 7 15:28:55 2016 +

--
 _build/build-pdf.sh | 29 +
 _build/build.sh |  8 
 _build/buildPDF.sh  | 32 
 3 files changed, 33 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/59216734/_build/build-pdf.sh
--
diff --git a/_build/build-pdf.sh b/_build/build-pdf.sh
new file mode 100755
index 000..175458e
--- /dev/null
+++ b/_build/build-pdf.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+#
+# this generates A PDF from a HTML file
+
+if [ ! -x _build/build.sh ] ; then
+  echo "ERROR: script must be run in root of docs dir"
+  exit 1
+fi
+
+if [ "$#" -lt 2 ] ; then
+   echo "Usage: build-pdf.sh   [user-style-sheet]"
+   exit 1
+fi
+
+if ! command -v wkhtmltopdf >/dev/null 2>&1; then
+   echo "ERROR: script requires wkhtmltopdf but it's not installed."
+   exit 1
+fi
+   
+# run the PDF build with wkhtmltopdf
+wkhtmltopdf ${3:+--user-style-sheet $3} --page-size Letter --margin-top 0.75in 
--margin-right 0.75in --margin-bottom 0.75in --margin-left 0.75in --encoding 
UTF-8 $1 $2
+
+if [ $? -eq 1 ] ; then
+   echo "Note that ContentNotFoundError is usually because of the invalid 
relational path of a local resource such as an image"
+elif [ $? -eq 0 ] ; then
+   echo "PDF Built successfully."
+else 
+   exit $?
+fi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/59216734/_build/build.sh
--
diff --git a/_build/build.sh b/_build/build.sh
index 6bc7d45..f7a9848 100755
--- a/_build/build.sh
+++ b/_build/build.sh
@@ -191,12 +191,12 @@ function build_pdf() {
   PDF_STARTED_LOG="_pdf/pdf_gen_started.log"
   
   if [ "$SKIP_PDF_MANUAL" != "true" ]; then
-_build/buildPDF.sh "_site/zoneMergeManual.html" "_pdf/UserManual.pdf" 2>&1 
| tee $PDF_MANUAL_LOG
-_build/buildPDF.sh "_site/zoneMergeManual.html" 
"_pdf/UserManual_printable.pdf" "./style/css/printable.css" 2>&1 | tee 
$PDF_MANUAL_LOG
+_build/build-pdf.sh "_site/zoneMergeManual.html" "_pdf/UserManual.pdf" 
2>&1 | tee $PDF_MANUAL_LOG
+_build/build-pdf.sh "_site/zoneMergeManual.html" 
"_pdf/UserManual_printable.pdf" "./style/css/printable.css" 2>&1 | tee 
$PDF_MANUAL_LOG
   fi
   if [ "$SKIP_PDF_STARTED" != "true" ]; then
-_build/buildPDF.sh "_site/zoneMergeStarted.html" "_pdf/GettingStarted.pdf" 
2>&1 | tee $PDF_STARTED_LOG
-_build/buildPDF.sh "_site/zoneMergeStarted.html" 
"_pdf/GettingStarted_printable.pdf" "./style/css/printable.css" 2>&1 | tee 
$PDF_STARTED_LOG
+_build/build-pdf.sh "_site/zoneMergeStarted.html" 
"_pdf/GettingStarted.pdf" 2>&1 | tee $PDF_STARTED_LOG
+_build/build-pdf.sh "_site/zoneMergeStarted.html" 
"_pdf/GettingStarted_printable.pdf" "./style/css/printable.css" 2>&1 | tee 
$PDF_STARTED_LOG
   fi
 }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/59216734/_build/buildPDF.sh
--
diff --git a/_build/buildPDF.sh b/_build/buildPDF.sh
deleted file mode 100755
index ad9d95a..000
--- a/_build/buildPDF.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env bash
-#
-# this generates A PDF from a HTML file
-
-if [ ! -x _build/build.sh ] ; then
-  echo "ERROR: script must be run in root of docs dir"
-  exit 1
-fi
-
-if [ "$#" -lt 2 ] ; then
-   echo "Usage: buildPDF.sh   [user-style-sheet]"
-   exit 1
-fi
-
-if ! command -v wkhtmltopdf >/dev/null 2>&1; then
-   echo "ERROR: script requires wkhtmltopdf but it's not installed."
-   exit 1
-fi
-   
-# run the PDF build with wkhtmltopdf
-if [ -z "$3" ] ; then
-   wkhtmltopdf --page-size Letter --margin-top 0.75in --margin-right 
0.75in --margin-bottom 0.75in --margin-left 0.75in --encoding UTF-8 $1 $2
-else
-   wkhtmltopdf --user-style-sheet $3 --page-size Letter --margin-top 
0.75in --margin-right 0.75in --margin-bottom 0.75in --margin-left 0.75in 
--encoding UTF-8 $1 $2
-fi
-if [ $? -eq 1 ] ; then
-   echo "Note that ContentNotFoundError is usually because of the invalid 
relational path of a local resource such as an image"
-elif [ $? -eq 0 ] ; then
- 

[03/10] brooklyn-docs git commit: Fixed typo

2016-03-10 Thread aledsage
Fixed typo


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/5d6d8452
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/5d6d8452
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/5d6d8452

Branch: refs/heads/master
Commit: 5d6d84527241ee845f70083ae91da3e1e8060b2c
Parents: a594c06
Author: Duncan Godwin 
Authored: Fri Mar 4 14:34:02 2016 +
Committer: Duncan Godwin 
Committed: Mon Mar 7 16:54:43 2016 +

--
 _plugins/page_structure.rb | 1 +
 guide/index.md | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/5d6d8452/_plugins/page_structure.rb
--
diff --git a/_plugins/page_structure.rb b/_plugins/page_structure.rb
index 4e01559..fbfd5a2 100644
--- a/_plugins/page_structure.rb
+++ b/_plugins/page_structure.rb
@@ -52,6 +52,7 @@ module PageStructureUtils
 end
 ##
 # Sorts a list of yaml children, if there's no numbering, use the YAML 
order to create a numbering
+# NOTE: doesn't alter the returned object as that seemed to break things 
downstream
 #
 def self.sortYAMLSectionPositions(yaml)
   position = Hash.new

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/5d6d8452/guide/index.md
--
diff --git a/guide/index.md b/guide/index.md
index 5c7ced3..cdb3b46 100644
--- a/guide/index.md
+++ b/guide/index.md
@@ -5,12 +5,12 @@ breadcrumbs:
 - /website/documentation/index.md
 - index.md
 children:
-- { path: /guide/start/index.md, section_position: 3.1.2 }
+- { path: /guide/start/index.md }
 - { path: /guide/misc/download.md }
 - { path: /guide/concepts/index.md }
 - { path: /guide/yaml/index.md }
 - { path: /guide/java/index.md }
-- { path: /guide/ops/index.md, section_position: 2 }
+- { path: /guide/ops/index.md }
 - { path: /guide/misc/index.md }
 ---
 



[05/10] brooklyn-docs git commit: Updated page structure & locations

2016-03-10 Thread aledsage
Updated page structure & locations


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/95eb8a47
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/95eb8a47
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/95eb8a47

Branch: refs/heads/master
Commit: 95eb8a4749de2993a5bc63cd9431d8df05a8f506
Parents: bf43bd0
Author: Duncan Godwin 
Authored: Mon Feb 29 11:32:04 2016 +
Committer: Duncan Godwin 
Committed: Mon Mar 7 16:54:43 2016 +

--
 _plugins/page_structure.rb  | 103 +
 _plugins/site_structure.rb  |  20 +
 guide/ops/locations/1.1_cloud-setup.md  |  86 
 guide/ops/locations/1_clouds.md | 239 ++
 .../2_inheritance-and-named-locations.md|  78 
 guide/ops/locations/3.1_ssh-keys.md |  86 
 guide/ops/locations/3_localhost.md  |  31 ++
 guide/ops/locations/4_byon.md   |  72 +++
 guide/ops/locations/6_more-locations.md |  52 +++
 guide/ops/locations/index.md| 439 +--
 10 files changed, 769 insertions(+), 437 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/95eb8a47/_plugins/page_structure.rb
--
diff --git a/_plugins/page_structure.rb b/_plugins/page_structure.rb
new file mode 100644
index 000..9579397
--- /dev/null
+++ b/_plugins/page_structure.rb
@@ -0,0 +1,103 @@
+#
+# Adds a liquid tag to build a page on the contents of the folder it's in
+# 
+# Pulls in files in the format _.md in the order of version 
number. Ignores files not in this format.
+#
+
+require 'rubygems'
+require 'yaml'
+require "kramdown"
+
+module PageStructureUtils
+  
+  class ChildPage
+def initialize(yaml, content)
+  @page_yaml=yaml
+  @page_content=content
+end
+def content()
+  @page_content
+end
+def yaml()
+  @page_yaml
+end
+def to_s # called with print / puts
+  "YAML : #{@page_yaml}, Content : #{@page_content}"
+end
+  
+def self.parseChildPagesFromParent(page)
+  # get the base directory of the current file
+  $baseFile = Dir.pwd+page['dir']
+  # list all of the files in that directory
+  $listings = Dir[$baseFile+"/*"]
+  # filter by the key pattern
+  $listings = $listings.select{ |i| i[/[\d\.]\_.*\.md/] }
+  # Sort the files based on the Gem::Version of the prefix
+  $listings = $listings.sort{ |x,y| Gem::Version.new((File.basename 
x).partition('_').first) <=> Gem::Version.new((File.basename 
y).partition('_').first)  }
+  # loop through them and merge the content
+  $allPages = []
+
+  for $listing in $listings
+$textContent = ""
+yamlContent = nil
+
+# read the file
+$fileContent = IO.read($listing)
+# try and split of any YAML
+$partitionedFileContent = $fileContent.split('---');
+# if there's potentially partitioned YAML try and parse it
+if $partitionedFileContent.size > 2
+  # try and parse the YAML
+  yamlContent = YAML.load($partitionedFileContent[1])
+  # if we can, use it
+  if yamlContent != nil && yamlContent != false
+$textContent = $partitionedFileContent[2]
+  end
+end
+
+# if there's no text content set yet, just use the whole file
+if $textContent == ""
+  # use the whole file content
+  $textContent = $fileContent
+end
+# append the current file to the content
+($allPages ||= []) << ChildPage.new(yamlContent, $textContent)
+
+  end
+  # return the combined content
+  $allPages
+end
+  end
+  
+  class IncludePageContentTag < Liquid::Tag
+  def initialize(tag_name, text, tokens)
+super
+@text = text.strip
+  end
+  def render(context)
+$childPages = ChildPage.parseChildPagesFromParent(context['page'])
+$content = ""
+for $childPage in $childPages
+  #append the content
+  $content = $content+$childPage.content()
+end
+site = context.registers[:site]
+pageHash = context.registers[:page]
+  
+# not sure how to get the page object so look through site.pages for 
the current URL
+page = nil;
+for currPage in site.pages
+  if currPage['url'] == pageHash['url']
+page = currPage
+break
+  end
+end
+
+# render the included content with the current page renderer
+info = { :filters => [Jekyll::Filters], :registers 

[01/10] brooklyn-docs git commit: Fixed YAML in content bug

2016-03-10 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master bf43bd004 -> ae8b0abb3


Fixed YAML in content bug


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/f000a31a
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/f000a31a
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/f000a31a

Branch: refs/heads/master
Commit: f000a31a50abd4b8ac1c8a373ba6411df36b59bc
Parents: b5b2161
Author: Duncan Godwin 
Authored: Mon Mar 7 15:48:49 2016 +
Committer: Duncan Godwin 
Committed: Mon Mar 7 16:54:43 2016 +

--
 _plugins/page_structure.rb  | 4 ++--
 contributing/inline-children.md | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/f000a31a/_plugins/page_structure.rb
--
diff --git a/_plugins/page_structure.rb b/_plugins/page_structure.rb
index 07caf17..6b3a2a1 100644
--- a/_plugins/page_structure.rb
+++ b/_plugins/page_structure.rb
@@ -115,7 +115,7 @@ module PageStructureUtils
   yamlContent['section_position'] = Integer::MAX
 end
 # if there's YAML, check it has the section_position tag and put 
it into child pages
-($allPages ||= []) << ChildPage.new(yamlContent, 
$partitionedFileContent[2])
+($allPages ||= []) << ChildPage.new(yamlContent, 
$partitionedFileContent[2..-1].join('---'))
   end
 end 
   end
@@ -154,7 +154,7 @@ module PageStructureUtils
   yamlContent = YAML.load($partitionedFileContent[1])
   # if we can, use it
   if yamlContent != nil && yamlContent != false
-$textContent = $partitionedFileContent[2]
+$textContent = $partitionedFileContent[2..-1].join('---')
   end
 end
 

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/f000a31a/contributing/inline-children.md
--
diff --git a/contributing/inline-children.md b/contributing/inline-children.md
index d6270bb..08eaa38 100644
--- a/contributing/inline-children.md
+++ b/contributing/inline-children.md
@@ -29,11 +29,11 @@ The content from these inline sections can then be included 
in the page content
 in an example from 
[/guide/ops/locations/index.md](https://github.com/apache/brooklyn-docs/blob/master/guide/ops/locations/index.md){:target="_blank"}:
 
 
-
+---
 title: Locations
 layout: website-normal
 check_directory_for_children: true
-
+---
 
 Locations are the environments to which Brooklyn deploys applications, 
including:
 



[09/10] brooklyn-docs git commit: Clarified Numbering

2016-03-10 Thread aledsage
Clarified Numbering


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/89843345
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/89843345
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/89843345

Branch: refs/heads/master
Commit: 898433458a47c4a93240ec4c18e6ec94d1d3a71a
Parents: e04b38e
Author: Duncan Godwin 
Authored: Wed Mar 9 15:38:01 2016 +
Committer: Duncan Godwin 
Committed: Wed Mar 9 15:38:01 2016 +

--
 _plugins/page_structure.rb | 1 +
 contributing/ordering.md   | 6 --
 2 files changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/89843345/_plugins/page_structure.rb
--
diff --git a/_plugins/page_structure.rb b/_plugins/page_structure.rb
index d2e419b..b1697bd 100644
--- a/_plugins/page_structure.rb
+++ b/_plugins/page_structure.rb
@@ -64,6 +64,7 @@ module PageStructureUtils
   yaml.each do |i|
 if i.instance_of? String
   position[i] = $major+"."+$minor.to_s
+  $minor += 1
 else
   # get the key for this type of child
   defining_param = getDefiningParameterFromHash(i)

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/89843345/contributing/ordering.md
--
diff --git a/contributing/ordering.md b/contributing/ordering.md
index ff2a0f9..428360c 100644
--- a/contributing/ordering.md
+++ b/contributing/ordering.md
@@ -14,8 +14,10 @@ For inline children, sourced using 
`check_directory_for_children: true`, this `s
 The format for `section_position` is that of software versioning, i.e `A.B... 
Z` where A, B etc are numbers of decreasing value. Position `1.1.0` would appear
 before version `1.0.4` for example. This allows an infinite number of sub 
pages between each `section_position`.
 
-Any un-versioned pages are automatically numbered to follow on from the last 
numbered page, or `1.1` if no pages are yet numbered. For
-example, if a numbered page, `1.4` is followed by a non-numbered page, the 
non-numbered page would be auto-numbered as `1.4.1`.
+Any un-versioned pages are automatically numbered to add a new minor version 
from the last page if that was numbered or increment the minor
+if it was not. If no pages are yet numbered, the numbering is started at 
`1.1`. For example, if a numbered page, `1.4` is followed by a 
+non-numbered page, the non-numbered page would be auto-numbered as `1.4.1`. If 
this page is followed by another non-numbered page it would
+be auto-numbered as `1.4.2`.
 
 For example, a set of children pages numbered like this:
 



[06/10] brooklyn-docs git commit: Added global support for section position

2016-03-10 Thread aledsage
Added global support for section position


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/cfa914de
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/cfa914de
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/cfa914de

Branch: refs/heads/master
Commit: cfa914ded11bb466e8bf57793d4fb811f767a049
Parents: 95eb8a4
Author: Duncan Godwin 
Authored: Thu Mar 3 13:46:09 2016 +
Committer: Duncan Godwin 
Committed: Mon Mar 7 16:54:43 2016 +

--
 _plugins/page_structure.rb  | 114 -
 _plugins/site_structure.rb  |  13 +-
 guide/ops/locations/1.1_cloud-setup.md  |  86 ---
 guide/ops/locations/1_clouds.md | 239 --
 .../2_inheritance-and-named-locations.md|  78 --
 guide/ops/locations/3.1_ssh-keys.md |  86 ---
 guide/ops/locations/3_localhost.md  |  31 ---
 guide/ops/locations/4_byon.md   |  72 --
 guide/ops/locations/6_more-locations.md |  52 
 guide/ops/locations/byon.md |  74 ++
 guide/ops/locations/cloud-specific-setup.md |  88 +++
 guide/ops/locations/clouds.md   | 241 +++
 guide/ops/locations/index.md|   2 +-
 .../inheritance-and-named-locations.md  |  80 ++
 guide/ops/locations/localhost.md|  33 +++
 guide/ops/locations/more-locations.md   |  17 +-
 guide/ops/locations/ssh-keys.md |  13 +-
 17 files changed, 648 insertions(+), 671 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/cfa914de/_plugins/page_structure.rb
--
diff --git a/_plugins/page_structure.rb b/_plugins/page_structure.rb
index 9579397..2833be3 100644
--- a/_plugins/page_structure.rb
+++ b/_plugins/page_structure.rb
@@ -12,19 +12,112 @@ module PageStructureUtils
   
   class ChildPage
 def initialize(yaml, content)
-  @page_yaml=yaml
-  @page_content=content
-end
-def content()
-  @page_content
-end
-def yaml()
-  @page_yaml
+  @yaml=yaml
+  @content=content
 end
+attr_accessor :yaml
+attr_accessor :content
 def to_s # called with print / puts
-  "YAML : #{@page_yaml}, Content : #{@page_content}"
+  "YAML : #{@yaml}" #, Content : #{@content}"
 end
+
+##
+# Sort a list of children by their YAML containing section positions. Do 
this with Gem:Version
+#
+#
+def self.sortBySectionPositions(yaml)
   
+  $major = "1"
+  $minor = 1
+  # first check all the child pages are numbered, if not, number them in 
the order they are
+  yaml.each do |i|
+if i.yaml['section_position'] == nil
+  i.yaml['section_position'] = $major+"."+$minor.to_s
+  $minor += 1
+else
+  # Store any major, start incrementing minor
+  $major = i.yaml['section_position'].to_s
+  $minor = 1
+end
+  end
+  
+  # return the comparison between the versions
+  yaml.sort{ |x,y| Gem::Version.new(x.yaml['section_position'].to_s) <=> 
Gem::Version.new(y.yaml['section_position'].to_s) }
+end
+##
+# Sorts a list of yaml children, if there's no numbering, use the YAML 
order to create a numbering
+#
+def self.sortYAMLSectionPositions(yaml)
+#  puts "a > "+yaml.to_s
+  hashArray = []
+  $major = "1"
+  $minor = 1
+  # first check all the child pages are numbered, if not, number them in 
the order they are
+  yaml.each do |i|
+hash = {}
+# if it's a string, convert it to a hash
+if i.instance_of? String
+  hash = { "path" => i }
+else
+  hash = i
+end
+if i['section_position'] == nil
+  hash['section_position'] = $major+"."+$minor.to_s
+  $minor += 1
+else
+  # Store any major, start incrementing minor
+  $major = i['section_position'].to_s
+  $minor = 1
+end
+hashArray << hash
+  end
+  # return the comparison between the versions (NB: sort! for in-place 
sorting)
+  hashArray.sort!{ |x,y| Gem::Version.new(x['section_position'].to_s) <=> 
Gem::Version.new(y['section_position'].to_s) }
+#  puts "2 > "+hashArray.to_s
+end
+
+##
+# This function looks at all the *.md files at the YAML in the headers and 
produces a list of children ordered by section_position
+#
+#
+def self.parseChildYAMLFromParent(page)
+  # get the base directory of the current file
+  $baseFile = Dir.pwd+page['dir']
+

[04/10] brooklyn-docs git commit: Fixed single page bugs

2016-03-10 Thread aledsage
Fixed single page bugs


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/a594c062
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/a594c062
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/a594c062

Branch: refs/heads/master
Commit: a594c062b6986492c1f3bf853b3e1cc49e776cd5
Parents: cfa914d
Author: Duncan Godwin 
Authored: Fri Mar 4 14:25:11 2016 +
Committer: Duncan Godwin 
Committed: Mon Mar 7 16:54:43 2016 +

--
 _plugins/page_structure.rb | 65 +---
 guide/index.md |  4 +-
 guide/start/policies.md| 95 ++---
 style/css/singlePage.css   | 12 ++
 4 files changed, 134 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/a594c062/_plugins/page_structure.rb
--
diff --git a/_plugins/page_structure.rb b/_plugins/page_structure.rb
index 2833be3..4e01559 100644
--- a/_plugins/page_structure.rb
+++ b/_plugins/page_structure.rb
@@ -10,6 +10,12 @@ require "kramdown"
 
 module PageStructureUtils
   
+  class MyHash < Hash
+def to_s
+  "cheese"
+end
+  end
+  
   class ChildPage
 def initialize(yaml, content)
   @yaml=yaml
@@ -48,33 +54,42 @@ module PageStructureUtils
 # Sorts a list of yaml children, if there's no numbering, use the YAML 
order to create a numbering
 #
 def self.sortYAMLSectionPositions(yaml)
-#  puts "a > "+yaml.to_s
-  hashArray = []
-  $major = "1"
-  $minor = 1
-  # first check all the child pages are numbered, if not, number them in 
the order they are
-  yaml.each do |i|
-hash = {}
-# if it's a string, convert it to a hash
-if i.instance_of? String
-  hash = { "path" => i }
-else
-  hash = i
-end
-if i['section_position'] == nil
-  hash['section_position'] = $major+"."+$minor.to_s
-  $minor += 1
-else
-  # Store any major, start incrementing minor
-  $major = i['section_position'].to_s
+  position = Hash.new
+  $major = "1"
   $minor = 1
+  # go through and generate a position for each
+  yaml.each do |i|
+if i.instance_of? String
+  position[i] = $major+"."+$minor.to_s
+else
+  if i['section_position'] == nil
+position[i['path']] = $major+"."+$minor.to_s
+$minor += 1
+  else
+# Store any major, start incrementing minor
+position[i['path']] = i['section_position'].to_s
+$major = i['section_position'].to_s
+$minor = 1
+  end
+end
+  end
+  # sort on the position (NB: sort! for in-place sorting)
+  yaml.sort!{ |x,y| 
+$pos_x = nil
+$pos_y = nil
+if x.instance_of? String
+  $pos_x = position[x]
+else
+  $pos_x = position[x['path']]
+end
+if y.instance_of? String
+  $pos_y = position[y]
+else
+  $pos_y = position[y['path']]
+end
+Gem::Version.new($pos_x.to_s) <=> Gem::Version.new($pos_y.to_s) 
+}
 end
-hashArray << hash
-  end
-  # return the comparison between the versions (NB: sort! for in-place 
sorting)
-  hashArray.sort!{ |x,y| Gem::Version.new(x['section_position'].to_s) <=> 
Gem::Version.new(y['section_position'].to_s) }
-#  puts "2 > "+hashArray.to_s
-end
 
 ##
 # This function looks at all the *.md files at the YAML in the headers and 
produces a list of children ordered by section_position

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/a594c062/guide/index.md
--
diff --git a/guide/index.md b/guide/index.md
index cdb3b46..5c7ced3 100644
--- a/guide/index.md
+++ b/guide/index.md
@@ -5,12 +5,12 @@ breadcrumbs:
 - /website/documentation/index.md
 - index.md
 children:
-- { path: /guide/start/index.md }
+- { path: /guide/start/index.md, section_position: 3.1.2 }
 - { path: /guide/misc/download.md }
 - { path: /guide/concepts/index.md }
 - { path: /guide/yaml/index.md }
 - { path: /guide/java/index.md }
-- { path: /guide/ops/index.md }
+- { path: /guide/ops/index.md, section_position: 2 }
 - { path: /guide/misc/index.md }
 ---
 

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/a594c062/guide/start/policies.md
--
diff --git 

[10/10] brooklyn-docs git commit: This closes #20

2016-03-10 Thread aledsage
This closes #20


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/ae8b0abb
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/ae8b0abb
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/ae8b0abb

Branch: refs/heads/master
Commit: ae8b0abb342505b2c008d14b0861a848c2324622
Parents: bf43bd0 8984334
Author: Aled Sage 
Authored: Thu Mar 10 10:31:59 2016 +
Committer: Aled Sage 
Committed: Thu Mar 10 10:31:59 2016 +

--
 README.md   |   8 +-
 _plugins/page_structure.rb  | 220 ++
 _plugins/site_structure.rb  |  29 ++
 contributing/index.md   |  15 +
 contributing/inline-children.md |  54 +++
 contributing/ordering.md|  48 ++
 contributing/pdf-manual.md  |  58 +++
 contributing/site-structure.md  |  29 ++
 guide/ops/locations/byon.md |  74 
 guide/ops/locations/clouds.md   | 248 +++
 guide/ops/locations/index.md| 439 +--
 .../inheritance-and-named-locations.md  |  80 
 guide/ops/locations/localhost.md|  33 ++
 guide/ops/locations/more-clouds.md  |   8 +-
 guide/ops/locations/more-locations.md   |  55 ---
 guide/ops/locations/special-locations.md|  54 +++
 guide/ops/locations/ssh-keys.md |  13 +-
 guide/ops/locations/vpc-issues.md   |  32 --
 guide/start/policies.md |  95 +++-
 style/css/singlePage.css|  12 +
 20 files changed, 1057 insertions(+), 547 deletions(-)
--




[07/10] brooklyn-docs git commit: Merged conflicts from #19 & order bug

2016-03-10 Thread aledsage
Merged conflicts from #19 & order bug


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/5ee36ffd
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/5ee36ffd
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/5ee36ffd

Branch: refs/heads/master
Commit: 5ee36ffd47cbfd57433559322ae273092d42d6b3
Parents: f000a31
Author: Duncan Godwin 
Authored: Tue Mar 8 10:14:16 2016 +
Committer: Duncan Godwin 
Committed: Tue Mar 8 10:14:16 2016 +

--
 _plugins/page_structure.rb  | 20 -
 guide/ops/locations/cloud-specific-setup.md | 88 
 guide/ops/locations/clouds.md   | 21 +++--
 guide/ops/locations/index.md|  2 +
 .../inheritance-and-named-locations.md  |  2 +-
 guide/ops/locations/localhost.md|  2 +-
 guide/ops/locations/more-clouds.md  |  8 +-
 guide/ops/locations/more-locations.md   | 54 
 guide/ops/locations/special-locations.md| 54 
 guide/ops/locations/ssh-keys.md |  2 +-
 guide/ops/locations/vpc-issues.md   | 32 ---
 11 files changed, 95 insertions(+), 190 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/5ee36ffd/_plugins/page_structure.rb
--
diff --git a/_plugins/page_structure.rb b/_plugins/page_structure.rb
index 6b3a2a1..d2e419b 100644
--- a/_plugins/page_structure.rb
+++ b/_plugins/page_structure.rb
@@ -45,6 +45,14 @@ module PageStructureUtils
   yaml.sort{ |x,y| Gem::Version.new(x.yaml['section_position'].to_s) <=> 
Gem::Version.new(y.yaml['section_position'].to_s) }
 end
 ##
+# This goes through the hash looking for the keys for the different types 
of children
+#
+def self.getDefiningParameterFromHash(hash)
+  param_name = hash['path']
+  param_name = (param_name == nil ? hash['link'] : param_name)
+   (param_name == nil ? hash['section'] : param_name)
+end
+##
 # Sorts a list of yaml children, if there's no numbering, use the YAML 
order to create a numbering
 # NOTE: doesn't alter the returned object as that seemed to break things 
downstream
 #
@@ -57,12 +65,14 @@ module PageStructureUtils
 if i.instance_of? String
   position[i] = $major+"."+$minor.to_s
 else
+  # get the key for this type of child
+  defining_param = getDefiningParameterFromHash(i)
   if i['section_position'] == nil
-position[i['path']] = $major+"."+$minor.to_s
+position[defining_param] = $major+"."+$minor.to_s
 $minor += 1
   else
 # Store any major, start incrementing minor
-position[i['path']] = i['section_position'].to_s
+position[defining_param] = i['section_position'].to_s
 $major = i['section_position'].to_s
 $minor = 1
   end
@@ -75,12 +85,14 @@ module PageStructureUtils
 if x.instance_of? String
   $pos_x = position[x]
 else
-  $pos_x = position[x['path']]
+  defining_param = getDefiningParameterFromHash(x)
+  $pos_x = position[defining_param]
 end
 if y.instance_of? String
   $pos_y = position[y]
 else
-  $pos_y = position[y['path']]
+  defining_param = getDefiningParameterFromHash(y)
+  $pos_y = position[defining_param]
 end
 Gem::Version.new($pos_x.to_s) <=> Gem::Version.new($pos_y.to_s) 
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/5ee36ffd/guide/ops/locations/cloud-specific-setup.md
--
diff --git a/guide/ops/locations/cloud-specific-setup.md 
b/guide/ops/locations/cloud-specific-setup.md
deleted file mode 100644
index 56a701a..000
--- a/guide/ops/locations/cloud-specific-setup.md
+++ /dev/null
@@ -1,88 +0,0 @@

-section: Cloud Specific Setup
-section_type: inline
-section_position: 1.1

-
-### Cloud Specific Setup
-
-To connect to a Cloud, Brooklyn requires appropriate credentials. These 
comprise the "identity" and 
-"credential" in Brooklyn terminology. 
-
-For private clouds (and for some clouds being targeted using a standard API), 
the "endpoint"
-must also be specified, which is the cloud's URL.
-
-The [jclouds guides](https://jclouds.apache.org/guides) includes documentation 
on configuring 
-different clouds.
-
-
- AWS
-
-# Credentials
-
-AWS has an 

[08/10] brooklyn-docs git commit: Visibility correction

2016-03-10 Thread aledsage
Visibility correction


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/e04b38e3
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/e04b38e3
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/e04b38e3

Branch: refs/heads/master
Commit: e04b38e3261fbfd58fc0b7f7a6361b5825eaf5c5
Parents: 5ee36ff
Author: Duncan Godwin 
Authored: Wed Mar 9 13:50:19 2016 +
Committer: Duncan Godwin 
Committed: Wed Mar 9 13:50:19 2016 +

--
 guide/start/policies.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/e04b38e3/guide/start/policies.md
--
diff --git a/guide/start/policies.md b/guide/start/policies.md
index a12e77f..a1b2001 100644
--- a/guide/start/policies.md
+++ b/guide/start/policies.md
@@ -16,7 +16,7 @@ review and/or change the the location where the application 
will be deployed.
 You will need four machines for this example: one for the load-balancer 
(nginx), and three for the 
 Tomcat cluster (but you can reduce this by changing the `maxPoolSize` below).
 
-
+
 {% highlight yaml %}
 name: Tomcat Cluster
 



[1/2] brooklyn-dist git commit: switch to wily64 - vivid64 ubuntu box no longer available - see https://bugs.launchpad.net/ubuntu/+bug/1553119

2016-03-08 Thread aledsage
Repository: brooklyn-dist
Updated Branches:
  refs/heads/master b38cdc72c -> 88205485d


switch to wily64 - vivid64 ubuntu box no longer available
- see https://bugs.launchpad.net/ubuntu/+bug/1553119


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/a0acef43
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/a0acef43
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/a0acef43

Branch: refs/heads/master
Commit: a0acef43e60d29c3d8aee1cacaf4a40c7bdcab41
Parents: f1561b6
Author: John McCabe 
Authored: Mon Mar 7 10:04:36 2016 +
Committer: John McCabe 
Committed: Mon Mar 7 10:04:36 2016 +

--
 vagrant/src/main/vagrant/servers.yaml | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/a0acef43/vagrant/src/main/vagrant/servers.yaml
--
diff --git a/vagrant/src/main/vagrant/servers.yaml 
b/vagrant/src/main/vagrant/servers.yaml
index 8c0c45e..f1931b8 100644
--- a/vagrant/src/main/vagrant/servers.yaml
+++ b/vagrant/src/main/vagrant/servers.yaml
@@ -38,7 +38,7 @@ default_config:
 run_os_update: true
 servers:
   - name: brooklyn
-box: ubuntu/vivid64
+box: ubuntu/wily64
 ram: 2048
 cpus: 4
 ip: 10.10.10.100
@@ -52,22 +52,22 @@ servers:
 - sudo systemctl start brooklyn
 - sudo systemctl enable brooklyn
   - name: byon1
-box: ubuntu/vivid64
+box: ubuntu/wily64
 ram: 512
 cpus: 2
 ip: 10.10.10.101
   - name: byon2
-box: ubuntu/vivid64
+box: ubuntu/wily64
 ram: 512
 cpus: 2
 ip: 10.10.10.102
   - name: byon3
-box: ubuntu/vivid64
+box: ubuntu/wily64
 ram: 512
 cpus: 2
 ip: 10.10.10.103
   - name: byon4
-box: ubuntu/vivid64
+box: ubuntu/wily64
 ram: 512
 cpus: 2
 ip: 10.10.10.104



[1/2] brooklyn-dist git commit: mvn archetype: change to be OSGi java entity

2016-03-08 Thread aledsage
Repository: brooklyn-dist
Updated Branches:
  refs/heads/master f1561b631 -> b38cdc72c


mvn archetype: change to be OSGi java entity

Previously, the generated project included example Java apps and
example main class, with an assembly to produce a stand-alone distort.

This deletes all of those, replacing it with a simple example Java
blueprint. It also includes java-based tests (including for testing
the YAML, and using the YAML test framework).


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/4545ac2a
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/4545ac2a
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/4545ac2a

Branch: refs/heads/master
Commit: 4545ac2a97bd7f89db6dcd4190463fd5c4500db9
Parents: b14ee79
Author: Aled Sage 
Authored: Wed Mar 2 12:11:07 2016 +
Committer: Aled Sage 
Committed: Tue Mar 8 09:08:31 2016 +

--
 archetypes/quickstart/pom.xml   |   8 +-
 .../quickstart/src/brooklyn-sample/README.md|  74 +-
 .../quickstart/src/brooklyn-sample/pom.xml  |  85 
 .../src/main/assembly/assembly.xml  |  88 
 .../src/main/assembly/files/README.txt  |  96 -
 .../src/main/assembly/files/conf/logback.xml|  11 --
 .../src/main/assembly/scripts/start.sh  |  40 --
 .../java/com/acme/sample/brooklyn/MySample.java |  38 +
 .../com/acme/sample/brooklyn/MySampleImpl.java  |  74 ++
 .../com/acme/sample/brooklyn/SampleMain.java|  81 ---
 .../app/ClusterWebServerDatabaseSample.java | 137 ---
 .../sample/app/SingleWebServerSample.java   |  32 -
 .../src/main/resources/logback-custom.xml   |  10 --
 .../main/resources/visitors-creation-script.sql |  35 -
 .../com/acme/sample/brooklyn/MySampleTest.java  |  36 +
 .../acme/sample/brooklyn/MySampleYamlTest.java  |  73 ++
 .../app/SampleLocalhostIntegrationTest.java |  81 ---
 .../brooklyn/sample/app/SampleUnitTest.java |  69 --
 .../src/test/resources/sample-test.yaml |  43 ++
 .../src/test/resources/sample.bom   |  12 ++
 20 files changed, 378 insertions(+), 745 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4545ac2a/archetypes/quickstart/pom.xml
--
diff --git a/archetypes/quickstart/pom.xml b/archetypes/quickstart/pom.xml
index f47c395..c83a3db 100644
--- a/archetypes/quickstart/pom.xml
+++ b/archetypes/quickstart/pom.xml
@@ -139,7 +139,9 @@
   ${basedir}/src/brooklyn-sample/
   ${basedir}
   src/main/resources/archetype-resources/
-   **/* 
+  
+**/*
+  

 src/main/java/** 
 src/test/java/** 
@@ -217,9 +219,9 @@
 **/src/main/resources/logback-custom.xml
 **/src/brooklyn-sample/README.md
 **/src/brooklyn-sample/pom.xml
-
**/src/brooklyn-sample/src/main/assembly/files/conf/*
 
**/src/brooklyn-sample/src/main/java/**/*.java
-
**/src/brooklyn-sample/src/main/resources/logback-custom.xml
+
**/src/brooklyn-sample/src/test/resources/**/*.bom
+
**/src/brooklyn-sample/src/test/resources/**/*.yaml
 
**/src/brooklyn-sample/src/test/java/**/*.java
   
 

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/4545ac2a/archetypes/quickstart/src/brooklyn-sample/README.md
--
diff --git a/archetypes/quickstart/src/brooklyn-sample/README.md 
b/archetypes/quickstart/src/brooklyn-sample/README.md
index c431a7d..9737cd0 100644
--- a/archetypes/quickstart/src/brooklyn-sample/README.md
+++ b/archetypes/quickstart/src/brooklyn-sample/README.md
@@ -1,31 +1,27 @@
 brooklyn-sample
 ===
 
-This is a Sample Brooklyn project, showing how to define an application
-which Brooklyn will deploy and manage.
+This is a Sample Brooklyn project, showing how to write a Java-based entity 
and 
+build it as an OSGi bundle that can be used in a Brooklyn catalog.
 
 This sample project is intended to be customized to suit your purposes: but
-search for all lines containing the word "sample" to make sure all the
+search for all lines containing the word "sample" or "acme" to make sure all 
the
 references to this being a sample are removed!   
 
-To build an assembly, simply run:
+To easily find the bits you should customize, do a:
+
+grep -ri sample src/ *.*
 
-mvn clean assembly:assembly
 
-This creates a tarball with 

[2/2] brooklyn-dist git commit: This closes #10

2016-03-08 Thread aledsage
This closes #10


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/b38cdc72
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/b38cdc72
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/b38cdc72

Branch: refs/heads/master
Commit: b38cdc72ce083ebab383b83e823f0c8e826e51c2
Parents: f1561b6 4545ac2
Author: Aled Sage 
Authored: Tue Mar 8 09:11:02 2016 +
Committer: Aled Sage 
Committed: Tue Mar 8 09:11:02 2016 +

--
 archetypes/quickstart/pom.xml   |   8 +-
 .../quickstart/src/brooklyn-sample/README.md|  74 +-
 .../quickstart/src/brooklyn-sample/pom.xml  |  85 
 .../src/main/assembly/assembly.xml  |  88 
 .../src/main/assembly/files/README.txt  |  96 -
 .../src/main/assembly/files/conf/logback.xml|  11 --
 .../src/main/assembly/scripts/start.sh  |  40 --
 .../java/com/acme/sample/brooklyn/MySample.java |  38 +
 .../com/acme/sample/brooklyn/MySampleImpl.java  |  74 ++
 .../com/acme/sample/brooklyn/SampleMain.java|  81 ---
 .../app/ClusterWebServerDatabaseSample.java | 137 ---
 .../sample/app/SingleWebServerSample.java   |  32 -
 .../src/main/resources/logback-custom.xml   |  10 --
 .../main/resources/visitors-creation-script.sql |  35 -
 .../com/acme/sample/brooklyn/MySampleTest.java  |  36 +
 .../acme/sample/brooklyn/MySampleYamlTest.java  |  73 ++
 .../app/SampleLocalhostIntegrationTest.java |  81 ---
 .../brooklyn/sample/app/SampleUnitTest.java |  69 --
 .../src/test/resources/sample-test.yaml |  43 ++
 .../src/test/resources/sample.bom   |  12 ++
 20 files changed, 378 insertions(+), 745 deletions(-)
--




[1/2] brooklyn-server git commit: Fix WinRM default port for a BYON location

2016-03-04 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 2845946a1 -> 1370ee663


Fix WinRM default port for a BYON location


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/2d4c3cd9
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/2d4c3cd9
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/2d4c3cd9

Branch: refs/heads/master
Commit: 2d4c3cd977f5f6a753b8e2774b5f09bec50a7382
Parents: 2845946
Author: Valentin Aitken 
Authored: Thu Mar 3 19:32:27 2016 +0200
Committer: Valentin Aitken 
Committed: Thu Mar 3 19:33:24 2016 +0200

--
 .../org/apache/brooklyn/location/byon/ByonLocationResolver.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/2d4c3cd9/core/src/main/java/org/apache/brooklyn/location/byon/ByonLocationResolver.java
--
diff --git 
a/core/src/main/java/org/apache/brooklyn/location/byon/ByonLocationResolver.java
 
b/core/src/main/java/org/apache/brooklyn/location/byon/ByonLocationResolver.java
index c747c35..3fa528e 100644
--- 
a/core/src/main/java/org/apache/brooklyn/location/byon/ByonLocationResolver.java
+++ 
b/core/src/main/java/org/apache/brooklyn/location/byon/ByonLocationResolver.java
@@ -161,9 +161,10 @@ public class ByonLocationResolver extends 
AbstractLocationResolver {
 String host;
 int port;
 if (ssh != null) {
-userAndHostAndPort = parseUserAndHostAndPort((String)ssh, 22);
+userAndHostAndPort = parseUserAndHostAndPort(ssh, 22);
 } else {
-userAndHostAndPort = parseUserAndHostAndPort((String)winrm, 5985);
+// TODO set to null and rely on the MachineLocation. If not then 
make a dependency to WinRmMachineLocation and use its config key name.
+userAndHostAndPort = parseUserAndHostAndPort(winrm, 
vals.get("winrm.useHttps") != null && (Boolean)vals.get("winrm.useHttps") ? 
5986 : 5985);
 }
 
 // If there is a tcpPortMapping defined for the connection-port, then 
use that for ssh/winrm machine



[2/3] brooklyn-dist git commit: Avoid using global properties

2016-03-01 Thread aledsage
Avoid using global properties


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/7ec87825
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/7ec87825
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/7ec87825

Branch: refs/heads/master
Commit: 7ec87825c840e5bd92a61046655b5cd3fbcffd1b
Parents: 5b1f9b6
Author: alrick87 
Authored: Tue Mar 1 18:24:30 2016 +0300
Committer: alrick87 
Committed: Tue Mar 1 18:24:30 2016 +0300

--
 packaging/src/service/brooklyn.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/7ec87825/packaging/src/service/brooklyn.service
--
diff --git a/packaging/src/service/brooklyn.service 
b/packaging/src/service/brooklyn.service
index 11352c6..825d22d 100644
--- a/packaging/src/service/brooklyn.service
+++ b/packaging/src/service/brooklyn.service
@@ -24,7 +24,7 @@ Type=simple
 WorkingDirectory=/opt/brooklyn/
 Environment="JAVA_OPTS=-Dbrooklyn.location.localhost.address=127.0.0.1 
-Dlogback.configurationFile=/etc/brooklyn/logback.xml -Xms256m -Xmx1g 
-XX:MaxPermSize=256m"
 
Environment="CLASSPATH=/opt/brooklyn/conf:/opt/brooklyn/lib/patch/*:/opt/brooklyn/lib/brooklyn/*:/opt/brooklyn/lib/dropins/*"
-ExecStart=/usr/bin/java org.apache.brooklyn.cli.Main launch 
--localBrooklynProperties /etc/brooklyn/brooklyn.conf --persist auto
+ExecStart=/usr/bin/java org.apache.brooklyn.cli.Main launch 
--noGlobalBrooklynProperties --localBrooklynProperties 
/etc/brooklyn/brooklyn.conf --persist auto
 Restart=always
 User=brooklyn
 Group=brooklyn



[1/3] brooklyn-dist git commit: Add RPM packaging

2016-03-01 Thread aledsage
Repository: brooklyn-dist
Updated Branches:
  refs/heads/master b14ee7912 -> 8975719dc


Add RPM packaging


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/5b1f9b6a
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/5b1f9b6a
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/5b1f9b6a

Branch: refs/heads/master
Commit: 5b1f9b6a7ca8ec17d0eda3bd416f3dde01eb84fa
Parents: 00248bc
Author: alrick87 
Authored: Mon Feb 22 18:07:08 2016 +0300
Committer: alrick87 
Committed: Mon Feb 29 17:46:47 2016 +0300

--
 packaging/pom.xml  | 176 
 packaging/src/conf/brooklyn.conf   |  26 
 packaging/src/conf/logback.xml |  24 
 packaging/src/service/brooklyn.service |  33 ++
 4 files changed, 259 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/5b1f9b6a/packaging/pom.xml
--
diff --git a/packaging/pom.xml b/packaging/pom.xml
new file mode 100644
index 000..c4c0a99
--- /dev/null
+++ b/packaging/pom.xml
@@ -0,0 +1,176 @@
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+jar
+brooklyn-dist
+Brooklyn RPM Package
+
+Brooklyn RPM Package for Centos 7 and RHEL 7 operating systems
+
+
+
+org.apache.brooklyn
+brooklyn-dist-root
+0.9.0-SNAPSHOT  
+../pom.xml
+
+
+
+
+org.apache.brooklyn
+brooklyn-all
+${project.version}
+
+
+
+
+org.apache.brooklyn
+brooklyn-test-support
+${project.version}
+test
+
+
+org.testng
+testng
+test
+
+
+
+
+
+org.codehaus.mojo
+rpm-maven-plugin
+2.1.5
+
+
+generate-rpm
+
+rpm
+
+
+
+
+apache-brooklyn
+ASL 2.0
+Applications/Internet
+
+true
+Linux
+
+
+/etc/brooklyn
+true
+755
+brooklyn
+brooklyn
+
+
+src/conf
+
+
+
+
+/etc/brooklyn
+false
+true
+600
+brooklyn
+brooklyn
+
+
+src/conf/brooklyn.conf
+
+
+
+
+/etc/brooklyn
+false
+true
+644
+brooklyn
+brooklyn
+
+
+src/conf/logback.xml
+
+
+
+
+/opt/brooklyn
+755
+brooklyn
+brooklyn
+
+
+
../dist/target/brooklyn-dist/brooklyn
+
+
+
+
+/var/lib/brooklyn
+true
+755
+brooklyn
+brooklyn
+
+
+/var/log/brooklyn
+true
+644
+brooklyn
+brooklyn
+
+   

[2/2] brooklyn-docs git commit: This closes #22

2016-03-01 Thread aledsage
This closes #22


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/a41e0d78
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/a41e0d78
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/a41e0d78

Branch: refs/heads/master
Commit: a41e0d785a6740a86b75ec389d5bf5cec792dd8d
Parents: 31cf15a 5bc5fe1
Author: Aled Sage 
Authored: Tue Mar 1 10:33:17 2016 +
Committer: Aled Sage 
Committed: Tue Mar 1 10:33:17 2016 +

--
 guide/yaml/winrm/index.md | 96 --
 1 file changed, 55 insertions(+), 41 deletions(-)
--




[1/2] brooklyn-docs git commit: winrm: document re-authenticate with CredSSP

2016-03-01 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 31cf15ae8 -> a41e0d785


winrm: document re-authenticate with CredSSP

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/5bc5fe1b
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/5bc5fe1b
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/5bc5fe1b

Branch: refs/heads/master
Commit: 5bc5fe1bc77beda4f0703a6f8bba98cfee412d68
Parents: 31cf15a
Author: Aled Sage 
Authored: Tue Mar 1 10:11:11 2016 +
Committer: Aled Sage 
Committed: Tue Mar 1 10:11:11 2016 +

--
 guide/yaml/winrm/index.md | 96 --
 1 file changed, 55 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/5bc5fe1b/guide/yaml/winrm/index.md
--
diff --git a/guide/yaml/winrm/index.md b/guide/yaml/winrm/index.md
index 335cddd..005cd98 100644
--- a/guide/yaml/winrm/index.md
+++ b/guide/yaml/winrm/index.md
@@ -116,25 +116,9 @@ The installation script - referred to as 
`/Users/richard/install7zip.ps1` in the
 
 Start-Process "msiexec" -ArgumentList '/qn','/i',$Dl 
-RedirectStandardOutput ( [System.IO.Path]::Combine($Path, "stdout.txt") ) 
-RedirectStandardError ( [System.IO.Path]::Combine($Path, "stderr.txt") ) -Wait
 
-In some the installer command may not obtain properly Administrator priviliges 
and you may get access is denied error during the setup process.
-For this case we strongly recommend enabling CredSSP and using the 
`Invoke-Command`.
-
-Here is a snippet for enabling CredSSP and using `Invoke-Command` through it.
-
-& winrm set winrm/config/service/auth '@{CredSSP="true"}'
-& winrm set winrm/config/client/auth '@{CredSSP="true"}'
-#
-$pass = '${attribute['windows.password']}'
-$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
-$mycreds = New-Object System.Management.Automation.PSCredential 
($($env:COMPUTERNAME + "\${location.user}"), $secpasswd)
-#
-$exitCode = Invoke-Command -ComputerName $env:COMPUTERNAME -Credential 
$mycreds -ScriptBlock {
-param($driveLetter)
-$process = Start-Process ( $driveLetter + "setup.exe") -ArgumentList 
"/ConfigurationFile=C:\ConfigurationFile.ini" -RedirectStandardOutput 
"C:\sqlout.txt" -RedirectStandardError "C:\sqlerr.txt" -Wait -PassThru 
-NoNewWindow
-$process.ExitCode
-} -Authentication CredSSP -ArgumentList $driveLetter
-#
-exit $exitCode
+Where security-related operation are to be executed, it may require the use of 
`CredSSP` to obtain
+the correct Administrator privileges: you may otherwise get an access denied 
error. See the sub-section 
+[How and Why to re-authenticate within a powershell 
script](#how-and-why-to-re-authenticate-within-a-powershell-script) for more 
details.
 
 This is only a very simple example. A more complex example can be found in the 
[Microsoft SQL Server blueprint in the
 Brooklyn source code]({{ site.brooklyn.url.git 
}}/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql).
@@ -294,39 +278,68 @@ for paths in their Powershell scripts (e.g. for 
installation, configuration file
 
 ### How and Why to re-authenticate within a powershell script
 
-Brooklyn will run powershell scripts by making a WinRM call over HTTP. For 
most scripts this will work, however for
-some scripts (e.g. MSSQL installation), this will fail even if the script can 
be run locally (e.g. by using RDP to
-connect to the machine and running the script manually)
+Some installation scripts require the use of security-related operations. In 
some environments,  
+these fail by default when executed over WinRM, even though the script may 
succeed when run locally   
+(e.g. by using RDP to connect to the machine and running the script manually). 
There may be no  
+clear indication from Windows why it failed (e.g. for MSSQL install, the only 
clue is a   
+security exception in the installation log).
 
-For example in the case of MS SQL server installation, there was no clear 
indication of why this would not work. 
-The only clue was a security exception in the installation log.
+When a script is run over WinRM, the credentials under which the script are 
run are marked as
+'remote' credentials, which are prohibited from running certain 
security-related operations. The 
+solution is to obtain a new set of credentials within the script and use those 
credentials to 
+required commands.
 
-When a script is run over WinRM over HTTP, the credentials under which the 
script are run are marked as
-'remote' credentials, which are prohibited from running certain 
security-related operations. The solution 

[1/2] brooklyn-docs git commit: WinRM documentation - run as Administrator

2016-03-01 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master c87b43fbb -> 31cf15ae8


WinRM documentation - run as Administrator


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/5d9ea1b5
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/5d9ea1b5
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/5d9ea1b5

Branch: refs/heads/master
Commit: 5d9ea1b57fd725611d1732ab581add8c140986a9
Parents: c87b43f
Author: Valentin Aitken 
Authored: Tue Mar 1 11:10:26 2016 +0200
Committer: Valentin Aitken 
Committed: Tue Mar 1 11:18:36 2016 +0200

--
 guide/yaml/winrm/index.md | 20 
 1 file changed, 20 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/5d9ea1b5/guide/yaml/winrm/index.md
--
diff --git a/guide/yaml/winrm/index.md b/guide/yaml/winrm/index.md
index a787aa0..335cddd 100644
--- a/guide/yaml/winrm/index.md
+++ b/guide/yaml/winrm/index.md
@@ -116,6 +116,26 @@ The installation script - referred to as 
`/Users/richard/install7zip.ps1` in the
 
 Start-Process "msiexec" -ArgumentList '/qn','/i',$Dl 
-RedirectStandardOutput ( [System.IO.Path]::Combine($Path, "stdout.txt") ) 
-RedirectStandardError ( [System.IO.Path]::Combine($Path, "stderr.txt") ) -Wait
 
+In some the installer command may not obtain properly Administrator priviliges 
and you may get access is denied error during the setup process.
+For this case we strongly recommend enabling CredSSP and using the 
`Invoke-Command`.
+
+Here is a snippet for enabling CredSSP and using `Invoke-Command` through it.
+
+& winrm set winrm/config/service/auth '@{CredSSP="true"}'
+& winrm set winrm/config/client/auth '@{CredSSP="true"}'
+#
+$pass = '${attribute['windows.password']}'
+$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
+$mycreds = New-Object System.Management.Automation.PSCredential 
($($env:COMPUTERNAME + "\${location.user}"), $secpasswd)
+#
+$exitCode = Invoke-Command -ComputerName $env:COMPUTERNAME -Credential 
$mycreds -ScriptBlock {
+param($driveLetter)
+$process = Start-Process ( $driveLetter + "setup.exe") -ArgumentList 
"/ConfigurationFile=C:\ConfigurationFile.ini" -RedirectStandardOutput 
"C:\sqlout.txt" -RedirectStandardError "C:\sqlerr.txt" -Wait -PassThru 
-NoNewWindow
+$process.ExitCode
+} -Authentication CredSSP -ArgumentList $driveLetter
+#
+exit $exitCode
+
 This is only a very simple example. A more complex example can be found in the 
[Microsoft SQL Server blueprint in the
 Brooklyn source code]({{ site.brooklyn.url.git 
}}/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql).
 



[2/2] brooklyn-docs git commit: This closes #21

2016-03-01 Thread aledsage
This closes #21


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/31cf15ae
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/31cf15ae
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/31cf15ae

Branch: refs/heads/master
Commit: 31cf15ae86889cb6345c1738997028495ad38ea7
Parents: c87b43f 5d9ea1b
Author: Aled Sage 
Authored: Tue Mar 1 09:26:29 2016 +
Committer: Aled Sage 
Committed: Tue Mar 1 09:26:29 2016 +

--
 guide/yaml/winrm/index.md | 20 
 1 file changed, 20 insertions(+)
--




[01/10] brooklyn-docs git commit: Renamed files & scripts

2016-02-25 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 7d24e76b3 -> c87b43fbb


Renamed files & scripts


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/70c731f4
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/70c731f4
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/70c731f4

Branch: refs/heads/master
Commit: 70c731f48844907615f2e82b7cfcfe359da86ca3
Parents: 5985336
Author: Duncan Godwin 
Authored: Mon Feb 8 12:10:32 2016 +
Committer: Duncan Godwin 
Committed: Thu Feb 25 14:50:25 2016 +

--
 README.md  |  2 ++
 _build/build.sh|  4 ++--
 _config.yml|  7 ++-
 singlePageManual.html  | 26 --
 singlePageStarted.html | 25 -
 zoneMergeManual.html   | 28 
 zoneMergeStarted.html  | 27 +++
 7 files changed, 65 insertions(+), 54 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70c731f4/README.md
--
diff --git a/README.md b/README.md
index 9f2465b..5b6cf54 100644
--- a/README.md
+++ b/README.md
@@ -59,6 +59,8 @@ Some issues we've encountered are:
(more details 
[here](http://www.nokogiri.org/tutorials/installing_nokogiri.html))
  * on Ubuntu, `sudo apt-get install libxslt-dev libxml2-dev`
 
+If you are building the PDF documentation, this requires 
[wkhtmltopdf](http://wkhtmltopdf.org/). 
+You can download it from [here](http://wkhtmltopdf.org/downloads.html) or use 
the usual apt-get / yum / brew.
 
 Seeing the Website and Docs
 ---

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70c731f4/_build/build.sh
--
diff --git a/_build/build.sh b/_build/build.sh
index ee3d331..7b734d5 100755
--- a/_build/build.sh
+++ b/_build/build.sh
@@ -191,10 +191,10 @@ function build_pdf() {
   PDF_STARTED_LOG="_pdf/pdf_gen_started.log"
   
   if [ "$SKIP_PDF_MANUAL" != "true" ]; then
-_build/buildPDF.sh "_site/singlePageManual.html" "_pdf/UserManual.pdf" 
2>&1 | tee $PDF_MANUAL_LOG
+_build/buildPDF.sh "_site/zoneMergeManual.html" "_pdf/UserManual.pdf" 2>&1 
| tee $PDF_MANUAL_LOG
   fi
   if [ "$SKIP_PDF_STARTED" != "true" ]; then
-_build/buildPDF.sh "_site/singlePageStarted.html" 
"_pdf/GettingStarted.pdf" 2>&1 | tee $PDF_STARTED_LOG
+_build/buildPDF.sh "_site/zoneMergeStarted.html" "_pdf/GettingStarted.pdf" 
2>&1 | tee $PDF_STARTED_LOG
   fi
 }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70c731f4/_config.yml
--
diff --git a/_config.yml b/_config.yml
index 7b634b2..bb44fb5 100644
--- a/_config.yml
+++ b/_config.yml
@@ -29,7 +29,7 @@ path:
   guide: /guide
   website: /website
   v: /v
-
+  
 # Use local copies of dependencies in dev build (switched to remote using URLs 
for prod build)
 dependency_mode: local
 dependency_urls:
@@ -46,7 +46,12 @@ sass:
 sass_dir: style/css
 
 brooklyn-stable-version: 0.8.0-incubating
+brooklyn-base-url: https://brooklyn.apache.org
 
+pdf-rewrite-prefixes: 
+'/guide' : '/v/0.9.0-SNAPSHOT'
+'/website' : ''
+
 brooklyn-version: 0.9.0-SNAPSHOT # BROOKLYN_VERSION
 brooklyn-snapshot-git-branch: master   # if line above is SNAPSHOT this should 
point to corresponding git branch (e.g. master, 0.4)
 

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70c731f4/singlePageManual.html
--
diff --git a/singlePageManual.html b/singlePageManual.html
deleted file mode 100644
index bfdfa69..000
--- a/singlePageManual.html
+++ /dev/null
@@ -1,26 +0,0 @@

-title: Apache Brooklyn Manual
-layout: singlePage
-page_mask: usermanual-pdf-exclude

-   
-   
-   Apache Brooklyn: User Manual
-   
-   Contents
-   
-   
- {% assign visited = "" | split: "|" %}
- {% for node in site.data.menu  %}
- {% push site_items node %}
- {% include singlepage-item.html %}
- {% endfor %}
-   
-
-   {% assign visitedb = "" | split: "|" %}
-   {% for node in site.data.menu  %}
- {% push site_items node %}
- {% include singlepage-content.html %}
- {% endfor %}
- 
-  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70c731f4/singlePageStarted.html
--

[10/10] brooklyn-docs git commit: This closes #4

2016-02-25 Thread aledsage
This closes #4


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/c87b43fb
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/c87b43fb
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/c87b43fb

Branch: refs/heads/master
Commit: c87b43fbb638a52651b12a5843890bf8b90f8d2d
Parents: 7d24e76 f78c5e9
Author: Aled Sage 
Authored: Thu Feb 25 15:39:16 2016 +
Committer: Aled Sage 
Committed: Thu Feb 25 15:39:16 2016 +

--
 .gitignore |   1 +
 README.md  |   2 +
 _build/build.sh|  36 ++
 _build/buildPDF.sh |  28 +
 _config.yml|   8 +-
 _includes/singlepage-content.html  |  51 +
 _includes/singlepage-item.html |  41 +++
 _layouts/singlePage.html   |  30 +
 _plugins/regex_filter.rb   | 118 
 _plugins/stringTools.rb|  35 ++
 guide/concepts/stop-start-restart-behaviour.md |   4 +-
 guide/dev/index.md |   1 +
 guide/java/index.md|   1 +
 guide/misc/index.md|   1 +
 guide/ops/index.md |   1 +
 guide/start/blueprints.md  |   8 +-
 guide/start/index.md   |   1 +
 guide/start/managing.md|  24 ++--
 guide/start/running.md |  15 ++-
 style/css/singlePage.css   |  56 ++
 website/community/index.md |   2 +
 website/developers/index.md|   1 +
 website/documentation/index.md |   1 +
 website/download/index.md  |   2 +
 website/learnmore/blueprint-tour.md|   1 +
 website/learnmore/catalog/catalog-item.html|   2 +
 website/learnmore/catalog/index.html   |   2 +
 website/learnmore/index.md |   1 +
 website/meta/sitemap.md|   1 +
 website/meta/versions.md   |   1 +
 zoneMergeManual.html   |  31 +
 zoneMergeStarted.html  |  31 +
 32 files changed, 519 insertions(+), 19 deletions(-)
--




[03/10] brooklyn-docs git commit: Combine Brooklyn docs into single page/pdf - for review

2016-02-25 Thread aledsage
Combine Brooklyn docs into single page/pdf - for review


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/cbdf51d1
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/cbdf51d1
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/cbdf51d1

Branch: refs/heads/master
Commit: cbdf51d17705284d40736087fae2f3fd9eeec14c
Parents: 7d24e76
Author: Duncan Godwin 
Authored: Tue Feb 2 11:03:42 2016 +
Committer: Duncan Godwin 
Committed: Thu Feb 25 14:50:25 2016 +

--
 .gitignore|  1 +
 _build/build.sh   | 28 +---
 _build/buildPDF.sh| 25 ++
 _includes/singlepage-content.html | 59 ++
 _includes/singlepage-item.html| 46 ++
 _layouts/singlePage.html  | 15 +
 _plugins/regex_filter.rb  | 12 +++
 guide/dev/index.md|  1 +
 guide/java/index.md   |  1 +
 guide/misc/index.md   |  1 +
 guide/ops/index.md|  1 +
 guide/start/index.md  |  1 +
 singlePageManual.html | 26 +++
 singlePageStarted.html| 26 +++
 website/community/index.md|  2 ++
 website/developers/index.md   |  1 +
 website/documentation/index.md|  1 +
 website/learnmore/index.md|  1 +
 website/meta/sitemap.md   |  1 +
 website/meta/versions.md  |  1 +
 20 files changed, 246 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/cbdf51d1/.gitignore
--
diff --git a/.gitignore b/.gitignore
index 806a062..97a4608 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,6 +31,7 @@ brooklyn*.log.*
 
 ignored
 _site
+_pdf
 _config_local.yml
 .sass-cache
 style/js/catalog/items.js

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/cbdf51d1/_build/build.sh
--
diff --git a/_build/build.sh b/_build/build.sh
index b4c8f15..1438424 100755
--- a/_build/build.sh
+++ b/_build/build.sh
@@ -31,9 +31,10 @@ function help() {
   echo "* --skip-javadoc : to skip javadoc build"
   echo "* --quick-javadoc : to do a quick javadoc build (for testing)"
   echo "* --serve : serve files from _site after building (for testing)"
-  echo "* --install : install files from _site to the appropriate place in 
"'$'"BROOKLYN_SITE_DIR (or ../../brooklyn-site-public)"
+  echo "* --install : install files from _site to the appropriate place in 
"'$'"BROOKLYN_SITE_DIR (or ../../incubator-brooklyn-site-public)"
   echo "* --skip-htmlproof : skip the HTML Proof run on _site"
   echo "* --quick-htmlproof : do a fast HTML Proof run on _site (not checking 
external links)"
+  echo "* --skip-pdf : skip generation of the PDF Documentation"
   echo ""
 }
 
@@ -156,6 +157,10 @@ function parse_arguments() {
   QUICK_HTMLPROOF=true
   shift
   ;;
+"--skip-pdf")
+  SKIP_PDF=true
+  shift
+  ;;
 *)
   echo "ERROR: invalid argument '"$1"'"
   exit 1
@@ -165,12 +170,25 @@ function parse_arguments() {
 }
 
 # Runs htmlproof against _site
+function build_pdf() {
+  if [ "$SKIP_PDF" == "true" ]; then
+return
+  fi
+  echo "Running PDF Generation on _site/UserManual.html"
+  rm -rf _pdf
+  mkdir -p _pdf
+  PDF_MANUAL_LOG="_pdf/pdf_gen_manual.log"
+  PDF_STARTED_LOG="_pdf/pdf_gen_started.log"
+  _build/buildPDF.sh "_site/singlePageManual.html" "_pdf/UserManual.pdf" 2>&1 
| tee $PDF_MANUAL_LOG
+  _build/buildPDF.sh "_site/singlePageStarted.html" "_pdf/GettingStarted.pdf" 
2>&1 | tee $PDF_STARTED_LOG
+}
+
+# Runs htmlproof against _site
 function test_site() {
   if [ "$SKIP_HTMLPROOF" == "true" ]; then
 return
   fi
   echo "Running htmlproof on _site"
-  mkdir -p _build/target
   HTMLPROOF_LOG="_build/target/htmlproof.log"
   if [ "$QUICK_HTMLPROOF" == "true" ]; then
 HTMLPROOF_OPTS="$HTMLPROOF_OPTS --disable_external"
@@ -250,8 +268,8 @@ function make_install() {
   fi
   if [ ! -z ${QUICK_JAVADOC+SET} ]; then echo "ERROR: --install not permitted 
when doing quick javadoc" ; return 1 ; fi
 
-  SITE_DIR=${BROOKLYN_SITE_DIR-../../brooklyn-site-public}
-  ls $SITE_DIR/style/img/apache-brooklyn-logo-244px-wide.png > /dev/null || { 
echo "ERROR: cannot find brooklyn-site-public; set BROOKLYN_SITE_DIR" ; return 
1 ; }
+  SITE_DIR=${BROOKLYN_SITE_DIR-../../incubator-brooklyn-site-public}
+  ls $SITE_DIR/style/img/apache-brooklyn-logo-244px-wide.png > /dev/null || { 
echo "ERROR: cannot find incubator-brooklyn-site-public; set BROOKLYN_SITE_DIR" 
; return 1 ; }
   if [ -z 

[07/10] brooklyn-docs git commit: Updates to spacing and script

2016-02-25 Thread aledsage
Updates to spacing and script


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/b6ae8329
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/b6ae8329
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/b6ae8329

Branch: refs/heads/master
Commit: b6ae8329c7aa8b11c703b0748e84e9e5b586287a
Parents: de1d17f
Author: Duncan Godwin 
Authored: Mon Feb 22 13:58:07 2016 +
Committer: Duncan Godwin 
Committed: Thu Feb 25 14:52:55 2016 +

--
 _build/buildPDF.sh   |  9 ---
 style/css/singlePage.css | 60 +--
 zoneMergeManual.html | 32 +++
 zoneMergeStarted.html| 31 +++---
 4 files changed, 67 insertions(+), 65 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/b6ae8329/_build/buildPDF.sh
--
diff --git a/_build/buildPDF.sh b/_build/buildPDF.sh
index a3d1196..a41ca69 100755
--- a/_build/buildPDF.sh
+++ b/_build/buildPDF.sh
@@ -7,14 +7,15 @@ if [ ! -x _build/build.sh ] ; then
   exit 1
 fi
 
-if [ "$#" -lt 2 ] ; then
+if [ "$#" -ne 2 ] ; then
echo "Usage: buildPDF.sh  "
exit 1
 fi
 
-command -v wkhtmltopdf >/dev/null 2>&1 || { 
-   echo "ERROR: script requires wkhtmltopdf but it's not installed." >&2; 
exit 1;
-   }
+if ! command -v wkhtmltopdf >/dev/null 2>&1; then
+   echo "ERROR: script requires wkhtmltopdf but it's not installed."
+   exit 1
+fi

 # run the PDF build with wkhtmltopdf
 wkhtmltopdf --page-size Letter --margin-top 0.75in --margin-right 0.75in 
--margin-bottom 0.75in --margin-left 0.75in --encoding UTF-8 $1 $2

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/b6ae8329/style/css/singlePage.css
--
diff --git a/style/css/singlePage.css b/style/css/singlePage.css
index 0517ddb..07d7395 100644
--- a/style/css/singlePage.css
+++ b/style/css/singlePage.css
@@ -1,56 +1,56 @@
 /* Fix the bootstrap parts so they show the content not the controls*/
 .nav.nav-tabs{
-   display: none;
+  display: none;
 }
 .tab-content > .tab-pane {
-display: inline;
+  display: inline;
 }
 .fade {
-opacity: 1;
+  opacity: 1;
 }
 #next, *[id$='_next']{
-   display: none;
+  display: none;
 }
 .collapse {
-display: block;
+  display: block;
 }
 .section-breaker {
-   page-break-before:always;
+  page-break-before:always;
 }
 .panel-heading{
-   padding-bottom: 15px;
+  padding-bottom: 15px;
 }
 /* The styled bootstrap panels */
 .panel-body, .panel-default{
-   background: none;
-   border: 0px solid #fff !important;
-   box-shadow: none;
-   padding: 0px;
+  background: none;
+  border: 0px solid #fff !important;
+  box-shadow: none;
+  padding: 0px;
 }
 .panel-default > .panel-heading{
-   background: none;
-   border: 0px solid #fff !important;
-   box-shadow: none;
-   padding-top: 0px;
-   padding-right: 0px;
-   padding-left: 0px;
+  background: none;
+  border: 0px solid #fff !important;
+  box-shadow: none;
+  padding-top: 0px;
+  padding-right: 0px;
+  padding-left: 0px;
 }
 pre, pre code{
-   overflow: auto;
-   white-space: pre-wrap;   /* CSS 3 */
-white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
-white-space: -pre-wrap;  /* Opera 4-6 */
-white-space: -o-pre-wrap;/* Opera 7 */
-word-wrap: break-word;   /* Internet Explorer 5.5+ */
+  overflow: auto;
+  white-space: pre-wrap;   /* CSS 3 */
+  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+  white-space: -pre-wrap;  /* Opera 4-6 */
+  white-space: -o-pre-wrap;/* Opera 7 */
+  word-wrap: break-word;   /* Internet Explorer 5.5+ */
 }
 .goToTop{
-   padding-right: 25px;
-padding-top: 75px;
-   float: right;
-font-size: 20pt;
-font-weight: bold;
+  padding-right: 25px;
+  padding-top: 75px;
+  float: right;
+  font-size: 20pt;
+  font-weight: bold;
 }
 #content_container h1{
-   display: inline-block;
-   width: 95%;
+  display: inline-block;
+  width: 95%;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/b6ae8329/zoneMergeManual.html
--
diff --git a/zoneMergeManual.html b/zoneMergeManual.html
index 89c57f1..d1b8e6e 100644
--- a/zoneMergeManual.html
+++ b/zoneMergeManual.html
@@ -8,24 +8,24 @@ availablePages: []
 ---
 {% comment %}{% endcomment %}
 
-   
+

Apache Brooklyn: User Manual

-   Contents
+   Contents

-   
-

[09/10] brooklyn-docs git commit: Exclusion and style updates

2016-02-25 Thread aledsage
Exclusion and style updates


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/de1d17fc
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/de1d17fc
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/de1d17fc

Branch: refs/heads/master
Commit: de1d17fc53254e12d93765debbbfc120cdb1c3ec
Parents: ad3cad8
Author: Duncan Godwin 
Authored: Wed Feb 10 09:34:13 2016 +
Committer: Duncan Godwin 
Committed: Thu Feb 25 14:52:55 2016 +

--
 style/css/singlePage.css| 2 +-
 website/download/index.md   | 2 ++
 website/learnmore/catalog/catalog-item.html | 2 ++
 website/learnmore/catalog/index.html| 2 ++
 4 files changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/de1d17fc/style/css/singlePage.css
--
diff --git a/style/css/singlePage.css b/style/css/singlePage.css
index f8f14f6..0517ddb 100644
--- a/style/css/singlePage.css
+++ b/style/css/singlePage.css
@@ -8,7 +8,7 @@
 .fade {
 opacity: 1;
 }
-#next{
+#next, *[id$='_next']{
display: none;
 }
 .collapse {

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/de1d17fc/website/download/index.md
--
diff --git a/website/download/index.md b/website/download/index.md
index 077e068..c4fc01e 100644
--- a/website/download/index.md
+++ b/website/download/index.md
@@ -1,6 +1,8 @@
 ---
 layout: website-normal
 title: Download
+started-pdf-exclude: true
+usermanual-pdf-exclude: true
 children:
 - { path: /guide/misc/download.md, title: Details }
 - { path: verify.md, title: Verify }

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/de1d17fc/website/learnmore/catalog/catalog-item.html
--
diff --git a/website/learnmore/catalog/catalog-item.html 
b/website/learnmore/catalog/catalog-item.html
index abff4c4..f0e0108 100644
--- a/website/learnmore/catalog/catalog-item.html
+++ b/website/learnmore/catalog/catalog-item.html
@@ -1,5 +1,7 @@
 ---
 title: Catalog
+page_mask: usermanual-pdf-exclude
+page_mask: started-pdf-exclude
 ---
 

[08/10] brooklyn-docs git commit: Style updates & jump to top

2016-02-25 Thread aledsage
Style updates & jump to top


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/ad3cad82
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/ad3cad82
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/ad3cad82

Branch: refs/heads/master
Commit: ad3cad8266f56cef6c276100c06eab4cd6459d9c
Parents: f3c06f5
Author: Duncan Godwin 
Authored: Tue Feb 9 15:49:38 2016 +
Committer: Duncan Godwin 
Committed: Thu Feb 25 14:52:55 2016 +

--
 _includes/singlepage-content.html |  3 +--
 style/css/singlePage.css  | 11 +++
 zoneMergeManual.html  |  2 +-
 zoneMergeStarted.html |  2 +-
 4 files changed, 14 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ad3cad82/_includes/singlepage-content.html
--
diff --git a/_includes/singlepage-content.html 
b/_includes/singlepage-content.html
index 7d24206..5fadfe2 100644
--- a/_includes/singlepage-content.html
+++ b/_includes/singlepage-content.html
@@ -16,13 +16,12 @@
 {% capture pid %}{{ item.title | remove:'/' | replace:' ','-' | 
downcase }}{% endcapture %}
 {% if item_content != null %}

-   {{ item_title }}
+   {{ item_title }}^
{% comment %}

{% endcomment %}
-   
{% comment %}{% endcomment %}
{% capture page_url %}{{ item_url | replace_regex:'[^\/]*$', '' }}{% 
endcapture %}


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ad3cad82/style/css/singlePage.css
--
diff --git a/style/css/singlePage.css b/style/css/singlePage.css
index 4b03262..f8f14f6 100644
--- a/style/css/singlePage.css
+++ b/style/css/singlePage.css
@@ -42,4 +42,15 @@ pre, pre code{
 white-space: -pre-wrap;  /* Opera 4-6 */
 white-space: -o-pre-wrap;/* Opera 7 */
 word-wrap: break-word;   /* Internet Explorer 5.5+ */
+}
+.goToTop{
+   padding-right: 25px;
+padding-top: 75px;
+   float: right;
+font-size: 20pt;
+font-weight: bold;
+}
+#content_container h1{
+   display: inline-block;
+   width: 95%;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ad3cad82/zoneMergeManual.html
--
diff --git a/zoneMergeManual.html b/zoneMergeManual.html
index 3111d01..89c57f1 100644
--- a/zoneMergeManual.html
+++ b/zoneMergeManual.html
@@ -10,7 +10,7 @@ availablePages: []
 


-   Apache Brooklyn: User Manual
+   Apache Brooklyn: User Manual

Contents


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ad3cad82/zoneMergeStarted.html
--
diff --git a/zoneMergeStarted.html b/zoneMergeStarted.html
index 3cc0e3a..3cf4710 100644
--- a/zoneMergeStarted.html
+++ b/zoneMergeStarted.html
@@ -10,7 +10,7 @@ availablePages: []
 


-   Apache Brooklyn: Getting Started Guide
+   Apache Brooklyn: Getting Started Guide

Contents




[02/10] brooklyn-docs git commit: Updated single page theme

2016-02-25 Thread aledsage
Updated single page theme


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/59853364
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/59853364
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/59853364

Branch: refs/heads/master
Commit: 598533648ef48da07ecdedc45c5d37a0a97dc7fa
Parents: 247a1b5
Author: Duncan Godwin 
Authored: Fri Feb 5 11:56:35 2016 +
Committer: Duncan Godwin 
Committed: Thu Feb 25 14:50:25 2016 +

--
 _build/build.sh| 21 ++--
 _includes/singlepage-content.html  | 32 +
 _includes/singlepage-item.html | 14 ++--
 _layouts/singlePage.html   |  8 +
 _plugins/stringTools.rb| 26 ++
 guide/concepts/stop-start-restart-behaviour.md |  4 +--
 guide/start/blueprints.md  |  2 +-
 guide/start/running.md |  2 +-
 singlePageManual.html  |  6 ++--
 singlePageStarted.html |  5 ++-
 style/css/singlePage.css   | 38 +
 website/learnmore/blueprint-tour.md|  1 +
 12 files changed, 121 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/59853364/_build/build.sh
--
diff --git a/_build/build.sh b/_build/build.sh
index 6081145..ee3d331 100755
--- a/_build/build.sh
+++ b/_build/build.sh
@@ -34,7 +34,9 @@ function help() {
   echo "* --install : install files from _site to the appropriate place in 
"'$'"BROOKLYN_SITE_DIR (or ../../brooklyn-site-public)"
   echo "* --skip-htmlproof : skip the HTML Proof run on _site"
   echo "* --quick-htmlproof : do a fast HTML Proof run on _site (not checking 
external links)"
-  echo "* --skip-pdf : skip generation of the PDF Documentation"
+  echo "* --skip-pdf : skip generation of all PDF Documentation"
+  echo "* --skip-pdf-manual : skip generation of the PDF Manual"
+  echo "* --skip-pdf-started : skip generation of the Getting Started PDF"
   echo ""
 }
 
@@ -161,6 +163,14 @@ function parse_arguments() {
   SKIP_PDF=true
   shift
   ;;
+"--skip-pdf-manual")
+  SKIP_PDF_MANUAL=true
+  shift
+  ;;
+"--skip-pdf-started")
+  SKIP_PDF_STARTED=true
+  shift
+  ;;
 *)
   echo "ERROR: invalid argument '"$1"'"
   exit 1
@@ -179,8 +189,13 @@ function build_pdf() {
   mkdir -p _pdf
   PDF_MANUAL_LOG="_pdf/pdf_gen_manual.log"
   PDF_STARTED_LOG="_pdf/pdf_gen_started.log"
-  _build/buildPDF.sh "_site/singlePageManual.html" "_pdf/UserManual.pdf" 2>&1 
| tee $PDF_MANUAL_LOG
-  _build/buildPDF.sh "_site/singlePageStarted.html" "_pdf/GettingStarted.pdf" 
2>&1 | tee $PDF_STARTED_LOG
+  
+  if [ "$SKIP_PDF_MANUAL" != "true" ]; then
+_build/buildPDF.sh "_site/singlePageManual.html" "_pdf/UserManual.pdf" 
2>&1 | tee $PDF_MANUAL_LOG
+  fi
+  if [ "$SKIP_PDF_STARTED" != "true" ]; then
+_build/buildPDF.sh "_site/singlePageStarted.html" 
"_pdf/GettingStarted.pdf" 2>&1 | tee $PDF_STARTED_LOG
+  fi
 }
 
 # Runs htmlproof against _site

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/59853364/_includes/singlepage-content.html
--
diff --git a/_includes/singlepage-content.html 
b/_includes/singlepage-content.html
index 4b10bf8..18fc1b7 100644
--- a/_includes/singlepage-content.html
+++ b/_includes/singlepage-content.html
@@ -1,5 +1,5 @@
 {% pop site_items item %}
-{% if item[pageMask] != true %}
+{% if item[page.page_mask] != true %}

{% set_hash_entry item path item_path %}
{% set_hash_entry item url item_url %}
@@ -7,15 +7,6 @@
{% set_hash_entry item title item_title %}
{% set_hash_entry item id item_id %}

-   {% unless item_path %}
-{% unless item_url %}
- {% puts error, null item_url %}
- {% putp item %}
- {% putv item_url %}
- {% fail item missing path and url (jekyll block evaluation order can 
cause this) %}
-{% endunless %}
-   {% endunless %}
-   
 {% if visitedb contains item_title %}
  {% comment %}  {% endcomment %}
 {% elsif item['external'] %}
@@ -24,7 +15,7 @@
 {% else %}
 {% capture pid %}{{ item.title | remove:'/' | replace:' ','-' | 
downcase }}{% endcapture %}
 {% if item_content != null %}
-   
+   
{{ item_title }}
{% comment %}
{% endcomment %}
{% capture page_url %}{{ item_url | replace_regex:'[^\/]*$', '' }}{% 
endcapture %}
-   {% 

[1/2] brooklyn-server git commit: Revert winrmPort sensor in VanillaWindowsProcess

2016-02-25 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 798fbbbd0 -> 972854a8c


Revert winrmPort sensor in VanillaWindowsProcess

- rename RDP_PORT and WINRM_PORT to values
  keeping the .port configuration convention


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/fba4412e
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/fba4412e
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/fba4412e

Branch: refs/heads/master
Commit: fba4412e2bfe26a6da045a079b48bba663c691f2
Parents: 5b01f8f
Author: Valentin Aitken 
Authored: Mon Feb 15 12:04:03 2016 +0200
Committer: Valentin Aitken 
Committed: Thu Feb 18 15:16:41 2016 +0200

--
 .../software/base/VanillaWindowsProcess.java| 24 +---
 .../base/VanillaWindowsProcessImpl.java |  4 
 .../util/core/internal/winrm/WinRmTool.java |  2 +-
 3 files changed, 26 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/fba4412e/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcess.java
--
diff --git 
a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcess.java
 
b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcess.java
index eb64063..0e6673c 100644
--- 
a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcess.java
+++ 
b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcess.java
@@ -103,7 +103,25 @@ public interface VanillaWindowsProcess extends 
AbstractVanillaProcess {
 // TODO If automatic updates are enabled and there are updates waiting to 
be installed, thirty minutes may not be sufficient...
 ConfigKey REBOOT_COMPLETED_TIMEOUT = 
ConfigKeys.newDurationConfigKey("reboot.completed.timeout",
 "duration to wait whilst waiting for a machine to finish 
rebooting, and thus to become available again", Duration.minutes(30));
-
-AttributeSensor RDP_PORT = Sensors.newIntegerSensor("rdpPort");
-AttributeSensor WINRM_PORT = 
Sensors.newIntegerSensor(WinRmTool.PROP_PORT.getName());
+
+AttributeSensor RDP_PORT = Sensors.newIntegerSensor("rdp.port", 
"RDP port used by the machine of this entity.");
+AttributeSensor WINRM_PORT = 
Sensors.newIntegerSensor("winrm.port", "WinRM port used by the machine of this 
entity.");
+
+/**
+ * @deprecated since 0.9.0; use {@link #RDP_PORT} instead.
+ */
+@Deprecated
+AttributeSensor RDP_PORT_CAMEL_CASE = 
Sensors.newIntegerSensor("rdpPort", "[DEPRECATED] instead use 'rdp.port'");
+
+/**
+ * @deprecated since 0.9.0; use {@link #WINRM_PORT} instead.
+ */
+@Deprecated
+AttributeSensor WINRM_PORT_CAMEL_CASE = 
Sensors.newIntegerSensor("winrmPort", "[DEPRECATED] instead use 'winrm.port'");
+
+/**
+ * @deprecated since 0.9.0; use {@link #WINRM_PORT} instead.
+ */
+@Deprecated
+AttributeSensor WINRM_PORT_SHORTEN = 
Sensors.newIntegerSensor("port", "[DEPRECATED] instead use 'winrm.port'");
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/fba4412e/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcessImpl.java
--
diff --git 
a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcessImpl.java
 
b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcessImpl.java
index b6a7d0e..c3e0aa2 100644
--- 
a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcessImpl.java
+++ 
b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcessImpl.java
@@ -33,9 +33,13 @@ public class VanillaWindowsProcessImpl extends 
SoftwareProcessImpl implements Va
 protected void preStart() {
 super.preStart();
 sensors().set(RDP_PORT, 3389);
+sensors().set(RDP_PORT_CAMEL_CASE, 3389);
+
 WinRmMachineLocation loc = 
Iterables.getFirst(Iterables.filter(getLocations(), 
WinRmMachineLocation.class), null);
 if (loc != null) {
 sensors().set(WINRM_PORT, loc.getPort());
+sensors().set(WINRM_PORT_SHORTEN, loc.getPort());
+sensors().set(WINRM_PORT_CAMEL_CASE, loc.getPort());
 }
 }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/fba4412e/software/winrm/src/main/java/org/apache/brooklyn/util/core/internal/winrm/WinRmTool.java
--
diff --git 

[1/2] brooklyn-server git commit: Fix external-config for jclouds credentials

2016-02-18 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master fa19e8f5f -> 8da814a9f


Fix external-config for jclouds credentials

- Adds ResolvingConfigBag, which resolves deferred-supplier on get()
- Use that in jcloudsLocation.getComputeService(ConfigBag)

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/291eb7d2
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/291eb7d2
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/291eb7d2

Branch: refs/heads/master
Commit: 291eb7d2c08fe40b6acd6895a3c126b4455005c0
Parents: a5103bb
Author: Aled Sage 
Authored: Wed Feb 17 14:57:57 2016 +
Committer: Aled Sage 
Committed: Wed Feb 17 14:57:57 2016 +

--
 .../util/core/config/ResolvingConfigBag.java| 122 +++
 .../location/jclouds/JcloudsLocation.java   |  10 +-
 2 files changed, 128 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/291eb7d2/core/src/main/java/org/apache/brooklyn/util/core/config/ResolvingConfigBag.java
--
diff --git 
a/core/src/main/java/org/apache/brooklyn/util/core/config/ResolvingConfigBag.java
 
b/core/src/main/java/org/apache/brooklyn/util/core/config/ResolvingConfigBag.java
new file mode 100644
index 000..5c6c3ad
--- /dev/null
+++ 
b/core/src/main/java/org/apache/brooklyn/util/core/config/ResolvingConfigBag.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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
+ *
+ * http://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.
+ */
+package org.apache.brooklyn.util.core.config;
+
+import java.util.Map;
+
+import org.apache.brooklyn.api.mgmt.ExecutionContext;
+import org.apache.brooklyn.api.mgmt.ManagementContext;
+import org.apache.brooklyn.config.ConfigKey;
+import org.apache.brooklyn.util.core.task.DeferredSupplier;
+import org.apache.brooklyn.util.core.task.Tasks;
+import org.apache.brooklyn.util.exceptions.Exceptions;
+import org.apache.brooklyn.util.guava.Maybe;
+
+import com.google.common.annotations.Beta;
+import com.google.common.base.Function;
+import com.google.common.collect.Maps;
+
+/**
+ * As for {@link ConfigBag}, but resolves values that are of type {@link 
DeferredSupplier}.
+ */
+@Beta
+public class ResolvingConfigBag extends ConfigBag {
+
+// Relies on various getters all delegating to a few common methods.
+
+private final ManagementContext mgmt;
+protected final ConfigBag parentBag;
+
+protected transient volatile Function transformer;
+
+
+@Beta
+public static ConfigBag newInstanceExtending(ManagementContext mgmt, 
ConfigBag parentBag) {
+return new ResolvingConfigBag(mgmt, parentBag);
+}
+
+public ResolvingConfigBag(ManagementContext mgmt, ConfigBag parentBag) {
+this.mgmt = mgmt;
+this.parentBag = parentBag;
+copy(parentBag);
+}
+
+protected Function getTransformer() {
+if (transformer == null) {
+transformer = new Function() {
+@Override public Object apply(Object input) {
+if (input instanceof DeferredSupplier) {
+try {
+ExecutionContext exec = 
mgmt.getServerExecutionContext();
+return Tasks.resolveValue(input, Object.class, 
exec);
+} catch (Exception e) {
+throw Exceptions.propagate(e);
+}
+}
+return input;
+}
+};
+}
+return transformer;
+}
+@Override
+public void markUsed(String key) {
+super.markUsed(key);
+if (parentBag!=null)
+parentBag.markUsed(key);
+}
+
+@Override
+public Map getAllConfig() {
+// Lazily transform copy of map
+return Maps.transformValues(super.getAllConfig(), getTransformer());
+}
+
+   

[1/2] brooklyn-server git commit: Adds equals and hashcode to DslComponent and related classes

2016-02-18 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master a5103bba5 -> a2820e5f6


Adds equals and hashcode to DslComponent and related classes


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/a721273c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/a721273c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/a721273c

Branch: refs/heads/master
Commit: a721273c6eac9f969752babba86d249d97611fac
Parents: 0a5f3e1
Author: Martin Harris 
Authored: Fri Feb 12 16:51:22 2016 +
Committer: Martin Harris 
Committed: Wed Feb 17 12:25:33 2016 +

--
 .../spi/dsl/methods/BrooklynDslCommon.java  | 73 
 .../brooklyn/spi/dsl/methods/DslComponent.java  | 56 +++
 2 files changed, 129 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a721273c/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/BrooklynDslCommon.java
--
diff --git 
a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/BrooklynDslCommon.java
 
b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/BrooklynDslCommon.java
index 88a1f1d..48ea03f 100644
--- 
a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/BrooklynDslCommon.java
+++ 
b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/BrooklynDslCommon.java
@@ -58,6 +58,7 @@ import org.apache.brooklyn.util.text.Strings;
 import org.apache.commons.beanutils.BeanUtils;
 
 import com.google.common.base.Function;
+import com.google.common.base.Objects;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
@@ -231,6 +232,20 @@ public class BrooklynDslCommon {
 }
 
 @Override
+public int hashCode() {
+return Objects.hashCode(pattern, args);
+}
+
+@Override
+public boolean equals(Object obj) {
+if (this == obj) return true;
+if (obj == null || getClass() != obj.getClass()) return false;
+DslFormatString that = DslFormatString.class.cast(obj);
+return Objects.equal(this.pattern, that.pattern) &&
+Arrays.deepEquals(this.args, that.args);
+}
+
+@Override
 public String toString() {
 return "$brooklyn:formatString("+
 JavaStringEscapes.wrapJavaString(pattern)+
@@ -258,6 +273,21 @@ public class BrooklynDslCommon {
 }
 
 @Override
+public int hashCode() {
+return Objects.hashCode(source, pattern, replacement);
+}
+
+@Override
+public boolean equals(Object obj) {
+if (this == obj) return true;
+if (obj == null || getClass() != obj.getClass()) return false;
+DslRegexReplacement that = DslRegexReplacement.class.cast(obj);
+return Objects.equal(this.pattern, that.pattern) &&
+Objects.equal(this.replacement, that.replacement) &&
+Objects.equal(this.source, that.source);
+}
+
+@Override
 public String toString() {
 return String.format("$brooklyn:regexReplace(%s:%s:%s)",source, 
pattern, replacement);
 }
@@ -344,6 +374,21 @@ public class BrooklynDslCommon {
 }
 
 @Override
+public int hashCode() {
+return Objects.hashCode(type, fields, config);
+}
+
+@Override
+public boolean equals(Object obj) {
+if (this == obj) return true;
+if (obj == null || getClass() != obj.getClass()) return false;
+DslObject that = DslObject.class.cast(obj);
+return Objects.equal(this.type, that.type) &&
+Objects.equal(this.fields, that.fields) &&
+Objects.equal(this.config, that.config);
+}
+
+@Override
 public String toString() {
 return "$brooklyn:object(\""+type.getName()+"\")";
 }
@@ -383,6 +428,20 @@ public class BrooklynDslCommon {
 }
 
 @Override
+public int hashCode() {
+return Objects.hashCode(providerName, key);
+}
+
+@Override
+public boolean equals(Object obj) {
+if (this == obj) return true;
+if (obj == null || getClass() != obj.getClass()) return false;
+DslExternal that = DslExternal.class.cast(obj);
+return Objects.equal(this.providerName, that.providerName) &&
+Objects.equal(this.key, that.key);
+}
+
+@Override
 

[2/2] brooklyn-server git commit: This closes #24

2016-02-18 Thread aledsage
This closes #24


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/a2820e5f
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/a2820e5f
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/a2820e5f

Branch: refs/heads/master
Commit: a2820e5f63439ee942f527898140414c3da38b09
Parents: a5103bb a721273
Author: Aled Sage 
Authored: Thu Feb 18 09:45:10 2016 +
Committer: Aled Sage 
Committed: Thu Feb 18 09:45:10 2016 +

--
 .../spi/dsl/methods/BrooklynDslCommon.java  | 73 
 .../brooklyn/spi/dsl/methods/DslComponent.java  | 56 +++
 2 files changed, 129 insertions(+)
--




[1/3] brooklyn-docs git commit: Adds “enricher” to the glossary

2016-02-03 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master b8a5ca566 -> 3dfa639ca


Adds “enricher” to the glossary

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/54b00bf8
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/54b00bf8
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/54b00bf8

Branch: refs/heads/master
Commit: 54b00bf8a1f7c1b0df345b991c68b451ceec8900
Parents: af1220f
Author: Aled Sage 
Authored: Wed Feb 3 16:26:44 2016 +
Committer: Aled Sage 
Committed: Wed Feb 3 16:26:59 2016 +

--
 website/documentation/glossary.md | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/54b00bf8/website/documentation/glossary.md
--
diff --git a/website/documentation/glossary.md 
b/website/documentation/glossary.md
index 0651068..6846d23 100644
--- a/website/documentation/glossary.md
+++ b/website/documentation/glossary.md
@@ -44,6 +44,12 @@ be described in [YAML][].
 An operation on an [entity][].
 
 
+ Enricher
+
+Generates new events or [sensor][] values (metrics) for an entity, usually by 
aggregating 
+or modifying data from one or more other sensors.
+
+
  Entity
 
 A component of an application or system. This could be a physical component, a
@@ -71,10 +77,10 @@ A human-readable data format.
 * [Wikipedia article](http://en.wikipedia.org/wiki/YAML) on YAML
 
 
- Apache Jclouds
+ Apache jclouds
 
 An open source Java library that provides a consistent interface to many
-clouds. Apache Brooklyn uses Apache Jclouds as its core cloud abstraction.
+clouds. Apache Brooklyn uses Apache jclouds as its core cloud abstraction.
 
 ## See also
 * [Project homepage](https://jclouds.apache.org/)



[3/3] brooklyn-docs git commit: This closes #5

2016-02-03 Thread aledsage
This closes #5


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/3dfa639c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/3dfa639c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/3dfa639c

Branch: refs/heads/master
Commit: 3dfa639ca16d705f17cbd55ae4048227259a4638
Parents: b8a5ca5 54b00bf
Author: Aled Sage 
Authored: Wed Feb 3 16:27:29 2016 +
Committer: Aled Sage 
Committed: Wed Feb 3 16:27:29 2016 +

--
 guide/start/example_yaml/mycluster.yaml |  59 
 guide/start/policies.md | 497 +--
 website/documentation/glossary.md   |  10 +-
 3 files changed, 450 insertions(+), 116 deletions(-)
--




[2/3] brooklyn-docs git commit: Changed wording

2016-02-03 Thread aledsage
Changed wording


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/f9594c3e
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/f9594c3e
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/f9594c3e

Branch: refs/heads/master
Commit: f9594c3e7731ef190120effca66edcaa30c2e92d
Parents: cd5628b
Author: Duncan Godwin 
Authored: Wed Feb 3 12:02:23 2016 +
Committer: Duncan Godwin 
Committed: Wed Feb 3 12:02:23 2016 +

--
 guide/start/running.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/f9594c3e/guide/start/running.md
--
diff --git a/guide/start/running.md b/guide/start/running.md
index 636887b..2e5b650 100644
--- a/guide/start/running.md
+++ b/guide/start/running.md
@@ -23,7 +23,7 @@ Two methods of deployment are detailed in this tutorial, 
using virtualisation wi
 
 
 
-[Vagrant](https://www.vagrantup.com/){:target="_blank"} is a software package 
which automates the process of setting up virtual environments such as [Oracle 
VirtualBox](https://www.virtualbox.org){:target="_blank"}. We recommend it as
+[Vagrant](https://www.vagrantup.com/){:target="_blank"} is a software package 
which automates the process of setting up virtual machines (VM) such as [Oracle 
VirtualBox](https://www.virtualbox.org){:target="_blank"}. We recommend it as
 the easiest way of getting started with Apache Brooklyn.
 
 Firstly, download and install:
@@ -31,7 +31,7 @@ Firstly, download and install:
  * [Vagrant](http://www.vagrantup.com/downloads){:target="_blank"}
  * [Oracle 
VirtualBox](https://www.virtualbox.org/wiki/Downloads){:target="_blank"}
  
-Then download the default Apache Brooklyn vagrant configuration from 
[here](https://www.apache.org/dyn/closer.lua?action=download=brooklyn/apache-brooklyn-{{site.brooklyn-version}}/apache-brooklyn-{{site.brooklyn-version}}-vagrant.tar.gz){:target="_blank"}.
 This configuration contains everything you need to get started using Apache 
Brooklyn.
+Then download the provided Apache Brooklyn vagrant configuration from 
[here](https://www.apache.org/dyn/closer.lua?action=download=brooklyn/apache-brooklyn-{{site.brooklyn-version}}/apache-brooklyn-{{site.brooklyn-version}}-vagrant.tar.gz){:target="_blank"}.
 This archive contains everything you need to create an environment for use 
with this guide, providing an Apache Brooklyn instance and some blank VMs.
 
 Extract the `tar.gz` archive and navigate into the expanded 
`apache-brooklyn-{{site.brooklyn-version}}-vagrant` folder
 



[1/3] brooklyn-docs git commit: Corrections to Getting Started & Vagrant URL

2016-02-03 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 3dfa639ca -> ea07b78d6


Corrections to Getting Started & Vagrant URL


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/cd5628b3
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/cd5628b3
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/cd5628b3

Branch: refs/heads/master
Commit: cd5628b37abc19b8ba23bc520102a424c8c2e9a6
Parents: 1ff8161
Author: Duncan Godwin 
Authored: Wed Feb 3 11:41:08 2016 +
Committer: Duncan Godwin 
Committed: Wed Feb 3 11:41:08 2016 +

--
 _includes/base-head.html | 8 +---
 guide/start/running.md   | 8 
 2 files changed, 9 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/cd5628b3/_includes/base-head.html
--
diff --git a/_includes/base-head.html b/_includes/base-head.html
index 3f79d02..18c2c6f 100644
--- a/_includes/base-head.html
+++ b/_includes/base-head.html
@@ -7,17 +7,18 @@
 
 
 
-
 
 
 
 
 
 
-
 
-
 
+{% if page.url contains "/start/" %}
+
+
+
 
 $(function(){
   $('body').glossarizer({
@@ -28,3 +29,4 @@ $(function(){
   });
 });
 
+{% endif %}

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/cd5628b3/guide/start/running.md
--
diff --git a/guide/start/running.md b/guide/start/running.md
index 5da792c..636887b 100644
--- a/guide/start/running.md
+++ b/guide/start/running.md
@@ -31,13 +31,13 @@ Firstly, download and install:
  * [Vagrant](http://www.vagrantup.com/downloads){:target="_blank"}
  * [Oracle 
VirtualBox](https://www.virtualbox.org/wiki/Downloads){:target="_blank"}
  
-Then download the default Apache Brooklyn vagrant configuration from 
[here](https://github.com/johnmccabe/vagrant-brooklyn-getting-started/archive/master.tar.gz){:target="_blank"}.
 This configuration contains everything you need to get started using Apache 
Brooklyn.
+Then download the default Apache Brooklyn vagrant configuration from 
[here](https://www.apache.org/dyn/closer.lua?action=download=brooklyn/apache-brooklyn-{{site.brooklyn-version}}/apache-brooklyn-{{site.brooklyn-version}}-vagrant.tar.gz){:target="_blank"}.
 This configuration contains everything you need to get started using Apache 
Brooklyn.
 
-Extract the `tar.gz` archive and navigate into the expanded 
`vagrant-brooklyn-getting-started-master` folder
+Extract the `tar.gz` archive and navigate into the expanded 
`apache-brooklyn-{{site.brooklyn-version}}-vagrant` folder
 
 {% highlight bash %}
-$ tar xvf master.tar.gz
-$ cd vagrant-brooklyn-getting-started-master
+$ tar xvf apache-brooklyn-{{site.brooklyn-version}}-vagrant.tar.gz
+$ cd apache-brooklyn-{{site.brooklyn-version}}-vagrant
 {% endhighlight %}
 
 



[3/3] brooklyn-docs git commit: This closes #7

2016-02-03 Thread aledsage
This closes #7


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/ea07b78d
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/ea07b78d
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/ea07b78d

Branch: refs/heads/master
Commit: ea07b78d6456469147a162b29005dce246d32e9a
Parents: 3dfa639 f9594c3
Author: Aled Sage 
Authored: Wed Feb 3 16:43:33 2016 +
Committer: Aled Sage 
Committed: Wed Feb 3 16:43:33 2016 +

--
 _includes/base-head.html |  8 +---
 guide/start/running.md   | 10 +-
 2 files changed, 10 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ea07b78d/guide/start/running.md
--
diff --cc guide/start/running.md
index 5871c4d,2e5b650..ed78028
--- a/guide/start/running.md
+++ b/guide/start/running.md
@@@ -28,16 -28,16 +28,16 @@@ the easiest way of getting started wit
  
  Firstly, download and install:
  
 - * [Vagrant](http://www.vagrantup.com/downloads){:target="_blank"}
 + * [Vagrant](https://www.vagrantup.com/downloads.html){:target="_blank"}
   * [Oracle 
VirtualBox](https://www.virtualbox.org/wiki/Downloads){:target="_blank"}
   
- Then download the default Apache Brooklyn vagrant configuration from 
[here](https://github.com/johnmccabe/vagrant-brooklyn-getting-started/archive/master.tar.gz){:target="_blank"}.
 This configuration contains everything you need to get started using Apache 
Brooklyn.
+ Then download the provided Apache Brooklyn vagrant configuration from 
[here](https://www.apache.org/dyn/closer.lua?action=download=brooklyn/apache-brooklyn-{{site.brooklyn-version}}/apache-brooklyn-{{site.brooklyn-version}}-vagrant.tar.gz){:target="_blank"}.
 This archive contains everything you need to create an environment for use 
with this guide, providing an Apache Brooklyn instance and some blank VMs.
  
- Extract the `tar.gz` archive and navigate into the expanded 
`vagrant-brooklyn-getting-started-master` folder
+ Extract the `tar.gz` archive and navigate into the expanded 
`apache-brooklyn-{{site.brooklyn-version}}-vagrant` folder
  
  {% highlight bash %}
- $ tar xvf master.tar.gz
- $ cd vagrant-brooklyn-getting-started-master
+ $ tar xvf apache-brooklyn-{{site.brooklyn-version}}-vagrant.tar.gz
+ $ cd apache-brooklyn-{{site.brooklyn-version}}-vagrant
  {% endhighlight %}
  
  



[1/2] brooklyn-docs git commit: Fix vagrant download link

2016-02-02 Thread aledsage
Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 1ff816171 -> b8a5ca566


Fix vagrant download link

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/5c7efb35
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/5c7efb35
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/5c7efb35

Branch: refs/heads/master
Commit: 5c7efb353ed52e34070a7c4962d29a2891bb3ea5
Parents: 1ff8161
Author: Aled Sage 
Authored: Tue Feb 2 09:28:14 2016 +
Committer: Aled Sage 
Committed: Tue Feb 2 09:28:14 2016 +

--
 guide/start/running.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/5c7efb35/guide/start/running.md
--
diff --git a/guide/start/running.md b/guide/start/running.md
index 5da792c..5871c4d 100644
--- a/guide/start/running.md
+++ b/guide/start/running.md
@@ -28,7 +28,7 @@ the easiest way of getting started with Apache Brooklyn.
 
 Firstly, download and install:
 
- * [Vagrant](http://www.vagrantup.com/downloads){:target="_blank"}
+ * [Vagrant](https://www.vagrantup.com/downloads.html){:target="_blank"}
  * [Oracle 
VirtualBox](https://www.virtualbox.org/wiki/Downloads){:target="_blank"}
  
 Then download the default Apache Brooklyn vagrant configuration from 
[here](https://github.com/johnmccabe/vagrant-brooklyn-getting-started/archive/master.tar.gz){:target="_blank"}.
 This configuration contains everything you need to get started using Apache 
Brooklyn.



[2/2] brooklyn-docs git commit: This closes #3

2016-02-02 Thread aledsage
This closes #3


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/b8a5ca56
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/b8a5ca56
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/b8a5ca56

Branch: refs/heads/master
Commit: b8a5ca56610cf5dacec26c31d3f5d14d7dfc4feb
Parents: 1ff8161 5c7efb3
Author: Aled Sage 
Authored: Tue Feb 2 11:35:44 2016 +
Committer: Aled Sage 
Committed: Tue Feb 2 11:35:44 2016 +

--
 guide/start/running.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--




[1/2] incubator-brooklyn git commit: mark ConnectionFailureDetectorTest.java as Integration because it requires ports accessible

2016-01-26 Thread aledsage
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master b50e17645 -> 81f552b82


mark ConnectionFailureDetectorTest.java as Integration because it requires 
ports accessible

the failure log is recorded at:
https://gist.github.com/davidx/1a21649a5e637b7b2a6a


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/0482cbd9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/0482cbd9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/0482cbd9

Branch: refs/heads/master
Commit: 0482cbd9c3f9197c032f9188837fc872d94aebc7
Parents: 5118860
Author: Alex Heneveld 
Authored: Thu Jan 21 09:41:44 2016 +
Committer: Alex Heneveld 
Committed: Thu Jan 21 09:42:29 2016 +

--
 .../brooklyn/policy/ha/ConnectionFailureDetectorTest.java | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0482cbd9/brooklyn-server/policy/src/test/java/org/apache/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
--
diff --git 
a/brooklyn-server/policy/src/test/java/org/apache/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
 
b/brooklyn-server/policy/src/test/java/org/apache/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
index 1b34c11..25f8d54 100644
--- 
a/brooklyn-server/policy/src/test/java/org/apache/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
+++ 
b/brooklyn-server/policy/src/test/java/org/apache/brooklyn/policy/ha/ConnectionFailureDetectorTest.java
@@ -37,19 +37,24 @@ import org.apache.brooklyn.core.entity.Entities;
 import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
 import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
 import org.apache.brooklyn.core.test.entity.TestApplication;
+import org.apache.brooklyn.policy.ha.HASensors.FailureDescriptor;
 import org.apache.brooklyn.test.Asserts;
 import org.apache.brooklyn.util.collections.MutableMap;
 import org.apache.brooklyn.util.time.Duration;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
-import org.apache.brooklyn.policy.ha.HASensors.FailureDescriptor;
 
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.net.HostAndPort;
 
+@Test(groups="Integration")
+// can fail if a firewall is in place on high-numbered ephemeral ports;
+// at least one report of *test* failures, as in no events coming in;
+// log unavailable but the test has been passing everywhere else so we
+// suspect some environments don't support this test
 public class ConnectionFailureDetectorTest {
 
 private static final int TIMEOUT_MS = 30*1000;



[2/2] incubator-brooklyn git commit: This closes #1172

2016-01-22 Thread aledsage
This closes #1172


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/80f7f621
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/80f7f621
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/80f7f621

Branch: refs/heads/master
Commit: 80f7f62162e024817e0754677fbcc3124ec56ed7
Parents: b28ba02 76c761b
Author: Aled Sage 
Authored: Fri Jan 22 17:53:45 2016 +
Committer: Aled Sage 
Committed: Fri Jan 22 17:53:45 2016 +

--
 .../guide/ops/externalized-configuration.md| 17 +
 1 file changed, 17 insertions(+)
--




[1/2] incubator-brooklyn git commit: Adds catalog item example to externalized-configuration.md

2016-01-22 Thread aledsage
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master b28ba027e -> 80f7f6216


Adds catalog item example to externalized-configuration.md


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/76c761b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/76c761b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/76c761b1

Branch: refs/heads/master
Commit: 76c761b19fe43f204bcf215315b97e8411a3cba1
Parents: b28ba02
Author: Aled Sage 
Authored: Fri Jan 22 15:03:41 2016 +
Committer: Aled Sage 
Committed: Fri Jan 22 17:52:20 2016 +

--
 .../guide/ops/externalized-configuration.md| 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/76c761b1/brooklyn-docs/guide/ops/externalized-configuration.md
--
diff --git a/brooklyn-docs/guide/ops/externalized-configuration.md 
b/brooklyn-docs/guide/ops/externalized-configuration.md
index ea6c63c..24fd4eb 100644
--- a/brooklyn-docs/guide/ops/externalized-configuration.md
+++ b/brooklyn-docs/guide/ops/externalized-configuration.md
@@ -122,6 +122,23 @@ 
brooklyn.location.jclouds.aws-ec2.credential=$brooklyn:external("mysupplier", "a
 {% endhighlight %}
 
 
+## Referring to External Configuration in Catalog Items
+
+The same blueprint language DSL can be used within YAML catalog items. For 
example:
+
+brooklyn.catalog:
+  id: com.example.myblueprint
+  version: 1.2.3
+  brooklyn.libraries:
+  - >
+
$brooklyn:formatString("https://%s:%s...@repo.example.com/libs/myblueprint-1.2.3.jar;,
 
+external("mysuppier", "username"), external("mysupplier", "password"))
+  item:
+type: com.example.MyBlueprint
+
+Note the `>` in the example above is used to split across multiple lines.
+
+
 ## Suppliers available with Brooklyn
 
 Brooklyn ships with a number of external configuration suppliers ready to use.



[3/3] incubator-brooklyn git commit: This closes #1163

2016-01-20 Thread aledsage
This closes #1163


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/27cd0920
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/27cd0920
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/27cd0920

Branch: refs/heads/master
Commit: 27cd0920d8aace4c6192d45821f8306d027c3f4e
Parents: 2f3e465 56f9cdd
Author: Aled Sage 
Authored: Wed Jan 20 16:09:17 2016 +
Committer: Aled Sage 
Committed: Wed Jan 20 16:09:17 2016 +

--
 .../brooklyn/EmptySoftwareProcessYamlTest.java  | 28 +-
 .../brooklyn/EmptyWindowsProcessYamlTest.java   | 51 ++
 .../software/base/EmptySoftwareProcess.java |  4 +
 .../software/base/EmptySoftwareProcessImpl.java | 12 ++-
 .../software/base/EmptyWindowsProcess.java  | 38 
 .../base/EmptyWindowsProcessDriver.java | 22 +
 .../software/base/EmptyWindowsProcessImpl.java  | 49 ++
 .../base/EmptyWindowsProcessWinRmDriver.java| 97 
 8 files changed, 297 insertions(+), 4 deletions(-)
--




[1/2] incubator-brooklyn git commit: Additional security for MySQL

2016-01-18 Thread aledsage
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 778bc5278 -> ba913f13a


Additional security for MySQL 

- it changes the default of sql_mode to include "NO_AUTO_CREATE_USER"
- it will prevent the GRANT statement from automatically creating new
user accounts unless authentication information is specified.

Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/10f5392d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/10f5392d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/10f5392d

Branch: refs/heads/master
Commit: 10f5392d57107ebc70b75e40f97b54c34b5bfc78
Parents: 93dd48d
Author: Yavor Yanchev 
Authored: Mon Jan 18 17:51:22 2016 +0200
Committer: Yavor Yanchev 
Committed: Mon Jan 18 17:51:22 2016 +0200

--
 .../org/apache/brooklyn/entity/database/mysql/mysql.conf | 4 
 .../org/apache/brooklyn/entity/database/mysql/mysql_master.conf  | 4 
 .../org/apache/brooklyn/entity/database/mysql/mysql_slave.conf   | 4 
 3 files changed, 12 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/10f5392d/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
--
diff --git 
a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
 
b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
index 85f55ab..1583b73 100644
--- 
a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
+++ 
b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
@@ -15,5 +15,9 @@ datadir = ${driver.dataDir}
 bind-address= 0.0.0.0
 # skip-networking
 
+#Prevent the GRANT statement from automatically creating new user accounts if 
it would otherwise do so,
+#unless authentication information is specified
+sql_mode = NO_AUTO_CREATE_USER
+
 # Custom configuration options
 ${driver.mySqlServerOptionsString}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/10f5392d/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
--
diff --git 
a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
 
b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
index 791f2da..54a773b 100644
--- 
a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
+++ 
b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
@@ -15,6 +15,10 @@ datadir = ${driver.dataDir}
 bind-address= 0.0.0.0
 # skip-networking
 
+#Prevent the GRANT statement from automatically creating new user accounts if 
it would otherwise do so,
+#unless authentication information is specified
+sql_mode = NO_AUTO_CREATE_USER
+
 # Replication config
 server-id   = 1
 binlog-format   = mixed

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/10f5392d/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
--
diff --git 
a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
 
b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
index 1c69423..b4af02a 100644
--- 
a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
+++ 
b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
@@ -16,6 +16,10 @@ datadir = ${driver.dataDir}
 bind-address= 0.0.0.0
 # skip-networking
 
+#Prevent the GRANT statement from automatically creating new user accounts if 
it would otherwise do so,
+#unless authentication information is specified
+sql_mode = NO_AUTO_CREATE_USER
+
 # Replication config
 server-id   = ${config["mysql.server_id"]}
 relay-log   = mysql-slave-${config["mysql.server_id"]}-relay



[2/2] incubator-brooklyn git commit: This closes #1157

2016-01-18 Thread aledsage
This closes #1157


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/ba913f13
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/ba913f13
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/ba913f13

Branch: refs/heads/master
Commit: ba913f13a732390ccbca9f958f2ec2c6f11a8285
Parents: 778bc52 10f5392
Author: Aled Sage 
Authored: Mon Jan 18 22:14:51 2016 +
Committer: Aled Sage 
Committed: Mon Jan 18 22:14:51 2016 +

--
 .../org/apache/brooklyn/entity/database/mysql/mysql.conf | 4 
 .../org/apache/brooklyn/entity/database/mysql/mysql_master.conf  | 4 
 .../org/apache/brooklyn/entity/database/mysql/mysql_slave.conf   | 4 
 3 files changed, 12 insertions(+)
--




[1/5] incubator-brooklyn git commit: AutoScaler test: remove unnecessary timeout config

2016-01-15 Thread aledsage
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 848f75053 -> d9d13371c


AutoScaler test: remove unnecessary timeout config

succeedsEventually calls can just use the default timeout (unless it’s 
a performance test where it must complete in a faster time!)

Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/ffbad25d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/ffbad25d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/ffbad25d

Branch: refs/heads/master
Commit: ffbad25dcb78a58f77746f40ca3f127cada1ccb0
Parents: a91889d
Author: Aled Sage 
Authored: Mon Jan 11 11:39:51 2016 +
Committer: Aled Sage 
Committed: Thu Jan 14 10:45:13 2016 +

--
 .../autoscaling/AutoScalerPolicyMetricTest.java | 29 ++--
 1 file changed, 14 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ffbad25d/brooklyn-server/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
--
diff --git 
a/brooklyn-server/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
 
b/brooklyn-server/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
index 9582523..2794d3a 100644
--- 
a/brooklyn-server/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
+++ 
b/brooklyn-server/policy/src/test/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicyMetricTest.java
@@ -46,7 +46,6 @@ import com.google.common.collect.Lists;
 
 public class AutoScalerPolicyMetricTest {
 
-private static long TIMEOUT_MS = 1;
 private static long SHORT_WAIT_MS = 250;
 
 private static final AttributeSensor MY_ATTRIBUTE = 
Sensors.newIntegerSensor("autoscaler.test.intAttrib");
@@ -76,7 +75,7 @@ public class AutoScalerPolicyMetricTest {
 Asserts.succeedsContinually(ImmutableMap.of("timeout", SHORT_WAIT_MS), 
currentSizeAsserter(tc, 1));
 
 tc.sensors().set(MY_ATTRIBUTE, 101);
-Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), 
currentSizeAsserter(tc, 2));
+Asserts.succeedsEventually(currentSizeAsserter(tc, 2));
 }
 
 @Test
@@ -90,7 +89,7 @@ public class AutoScalerPolicyMetricTest {
 Asserts.succeedsContinually(ImmutableMap.of("timeout", SHORT_WAIT_MS), 
currentSizeAsserter(tc, 2));
 
 tc.sensors().set(MY_ATTRIBUTE, 49);
-Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), 
currentSizeAsserter(tc, 1));
+Asserts.succeedsEventually(currentSizeAsserter(tc, 1));
 }
 
 @Test(groups="Integration")
@@ -102,11 +101,11 @@ public class AutoScalerPolicyMetricTest {
 
 // workload 200 so requires doubling size to 10 to handle: (200*5)/100 
= 10
 tc.sensors().set(MY_ATTRIBUTE, 200);
-Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), 
currentSizeAsserter(tc, 10));
+Asserts.succeedsEventually(currentSizeAsserter(tc, 10));
 
 // workload 5, requires 1 entity: (10*110)/100 = 11
 tc.sensors().set(MY_ATTRIBUTE, 110);
-Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), 
currentSizeAsserter(tc, 11));
+Asserts.succeedsEventually(currentSizeAsserter(tc, 11));
 }
 
 @Test(groups="Integration")
@@ -118,14 +117,14 @@ public class AutoScalerPolicyMetricTest {
 
 // workload can be handled by 4 servers, within its valid range: 
(49*5)/50 = 4.9
 tc.sensors().set(MY_ATTRIBUTE, 49);
-Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), 
currentSizeAsserter(tc, 4));
+Asserts.succeedsEventually(currentSizeAsserter(tc, 4));
 
 // workload can be handled by 4 servers, within its valid range: 
(25*4)/50 = 2
 tc.sensors().set(MY_ATTRIBUTE, 25);
-Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), 
currentSizeAsserter(tc, 2));
+Asserts.succeedsEventually(currentSizeAsserter(tc, 2));
 
 tc.sensors().set(MY_ATTRIBUTE, 0);
-Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), 
currentSizeAsserter(tc, 1));
+Asserts.succeedsEventually(currentSizeAsserter(tc, 1));
 }
 
 @Test(groups="Integration")
@@ -140,11 +139,11 @@ public class AutoScalerPolicyMetricTest {
 
 // Decreases to min-size only
 tc.sensors().set(MY_ATTRIBUTE, 0);
-Asserts.succeedsEventually(ImmutableMap.of("timeout", TIMEOUT_MS), 
currentSizeAsserter(tc, 2));
+

[4/5] incubator-brooklyn git commit: BROOKLYN-212: more improvements

2016-01-15 Thread aledsage
BROOKLYN-212: more improvements

- Resizable.resize: throw InsufficientCapacityException if didn’t 
  manage to reach target size, rather than only if didn’t manage to
  increase in size at all.
- DynamicCluster: delete nodes that throw NoMachinesAvailableException,
  rather than putting them in quarantine.
- Fix AutoScalerPolicy’s max-capacity high-water mark, when 
  resizeUpStabilizationDelay is used.

Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/4245bd62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/4245bd62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/4245bd62

Branch: refs/heads/master
Commit: 4245bd628172ad25bfbf745a9ad259f11050b3ea
Parents: ffbad25
Author: Aled Sage 
Authored: Thu Jan 14 10:43:50 2016 +
Committer: Aled Sage 
Committed: Thu Jan 14 10:46:09 2016 +

--
 .../brooklyn/core/entity/trait/Resizable.java   |  6 +-
 .../brooklyn/entity/group/DynamicCluster.java   | 10 +++
 .../entity/group/DynamicClusterImpl.java| 45 ++
 .../core/test/entity/TestClusterImpl.java   | 17 ++--
 .../entity/group/DynamicClusterTest.java| 88 +---
 .../policy/autoscaling/AutoScalerPolicy.java| 31 ---
 .../autoscaling/AutoScalerPolicyMetricTest.java | 34 +++-
 .../AutoScalerPolicyNoMoreMachinesTest.java | 56 +
 8 files changed, 223 insertions(+), 64 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4245bd62/brooklyn-server/core/src/main/java/org/apache/brooklyn/core/entity/trait/Resizable.java
--
diff --git 
a/brooklyn-server/core/src/main/java/org/apache/brooklyn/core/entity/trait/Resizable.java
 
b/brooklyn-server/core/src/main/java/org/apache/brooklyn/core/entity/trait/Resizable.java
index 1fca9f3..36e6ba8 100644
--- 
a/brooklyn-server/core/src/main/java/org/apache/brooklyn/core/entity/trait/Resizable.java
+++ 
b/brooklyn-server/core/src/main/java/org/apache/brooklyn/core/entity/trait/Resizable.java
@@ -32,7 +32,8 @@ import org.apache.brooklyn.core.effector.MethodEffector;
 public interface Resizable {
 
 /**
- * Indicates that resizing up (at all) is not possible, because there is 
insufficient capacity.
+ * Indicates that resizing up to the desired size is not possible - only 
resized to the 
+ * {@link Resizable#getCurrentSize()}, because there is insufficient 
capacity.
  */
 public static class InsufficientCapacityException extends RuntimeException 
{
 private static final long serialVersionUID = 953230498564942446L;
@@ -53,7 +54,8 @@ public interface Resizable {
  * @param desiredSize the new size of the entity group.
  * @return the new size of the group.
  * 
- * @throws InsufficientCapacityException If the request was to grow, but 
there is no capacity to grow at all
+ * @throws InsufficientCapacityException If the request was to grow, but 
there is no capacity to grow to
+ * the desired size.
  */
 @Effector(description="Changes the size of the entity (e.g. the number of 
nodes in a cluster)")
 Integer resize(@EffectorParam(name="desiredSize", description="The new 
size of the cluster") Integer desiredSize);

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4245bd62/brooklyn-server/core/src/main/java/org/apache/brooklyn/entity/group/DynamicCluster.java
--
diff --git 
a/brooklyn-server/core/src/main/java/org/apache/brooklyn/entity/group/DynamicCluster.java
 
b/brooklyn-server/core/src/main/java/org/apache/brooklyn/entity/group/DynamicCluster.java
index f528db7..781cb0c 100644
--- 
a/brooklyn-server/core/src/main/java/org/apache/brooklyn/entity/group/DynamicCluster.java
+++ 
b/brooklyn-server/core/src/main/java/org/apache/brooklyn/entity/group/DynamicCluster.java
@@ -48,6 +48,7 @@ import org.apache.brooklyn.util.time.Duration;
 
 import com.google.common.annotations.Beta;
 import com.google.common.base.Function;
+import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Multimap;
 import com.google.common.reflect.TypeToken;
@@ -101,6 +102,15 @@ public interface DynamicCluster extends AbstractGroup, 
Cluster, MemberReplaceabl
 ConfigKey QUARANTINE_FAILED_ENTITIES = 
ConfigKeys.newBooleanConfigKey(
 "dynamiccluster.quarantineFailedEntities", "If true, will 
quarantine entities that fail to start; if false, will get rid of them (i.e. 
delete them)", true);
 
+@SetFromFlag("quarantineFilter")
+ConfigKey QUARANTINE_FILTER = 
ConfigKeys.newConfigKey(
+ 

[1/2] incubator-brooklyn git commit: BROOKLYN-215: fix NPE when SshMachineLocation.port==null

2016-01-15 Thread aledsage
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 289eb5b85 -> 848f75053


BROOKLYN-215: fix NPE when SshMachineLocation.port==null


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/e07f0ee1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/e07f0ee1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/e07f0ee1

Branch: refs/heads/master
Commit: e07f0ee16a71c932b9b8adfbd1bbf2bb5f7d19c6
Parents: 289eb5b
Author: Aled Sage 
Authored: Fri Jan 15 13:18:13 2016 +
Committer: Aled Sage 
Committed: Fri Jan 15 13:18:43 2016 +

--
 .../location/ssh/SshMachineLocation.java| 19 +--
 .../rebind/RebindSshMachineLocationTest.java| 20 +++-
 2 files changed, 36 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e07f0ee1/brooklyn-server/core/src/main/java/org/apache/brooklyn/location/ssh/SshMachineLocation.java
--
diff --git 
a/brooklyn-server/core/src/main/java/org/apache/brooklyn/location/ssh/SshMachineLocation.java
 
b/brooklyn-server/core/src/main/java/org/apache/brooklyn/location/ssh/SshMachineLocation.java
index 5e74e7c..b059858 100644
--- 
a/brooklyn-server/core/src/main/java/org/apache/brooklyn/location/ssh/SshMachineLocation.java
+++ 
b/brooklyn-server/core/src/main/java/org/apache/brooklyn/location/ssh/SshMachineLocation.java
@@ -89,6 +89,7 @@ import 
org.apache.brooklyn.util.core.task.system.internal.ExecWithLoggingHelpers
 import org.apache.brooklyn.util.exceptions.Exceptions;
 import org.apache.brooklyn.util.exceptions.RuntimeInterruptedException;
 import 
org.apache.brooklyn.util.guava.KeyTransformingLoadingCache.KeyTransformingSameTypeLoadingCache;
+import org.apache.brooklyn.util.guava.Maybe;
 import org.apache.brooklyn.util.pool.BasicPool;
 import org.apache.brooklyn.util.pool.Pool;
 import org.apache.brooklyn.util.ssh.BashCommands;
@@ -389,7 +390,7 @@ public class SshMachineLocation extends AbstractLocation 
implements MachineLocat
 private BasicPool buildPool(final Map properties) {
 return BasicPool.builder()
 .name(getDisplayName()+"@"+address+":"+getPort()+
-(config().getRaw(SSH_HOST).isPresent() ? 
"("+getConfig(SSH_HOST)+":"+getConfig(SSH_PORT)+")" : "")+
+(config().getRaw(SSH_HOST).isPresent() ? 
"("+getConfig(SSH_HOST)+":"+getPort()+")" : "")+
 ":hash"+System.identityHashCode(this))
 .supplier(new Supplier() {
 @Override public SshTool get() {
@@ -550,7 +551,21 @@ public class SshMachineLocation extends AbstractLocation 
implements MachineLocat
 
 /** port for SSHing */
 public int getPort() {
-return getConfig(SshTool.PROP_PORT);
+// Prefer PROP_PORT (i.e. "port"). However if that is explicitly null 
or is not set, then see if
+// SSH_PORT (i.e. "brooklyn.ssh.config.port") has been set and use 
that.
+// If neither is set (or is explicitly set to null), then use the 
default PROP_PORT value.
+//
+// Note we don't just rely on config().get(PROP_PORT) returning the 
default, because we hit a rebind
+// error where the location's port configuration had been explicitly 
set to null.
+// See https://issues.apache.org/jira/browse/BROOKLYN-215
+
+Maybe raw = config().getRaw(SshTool.PROP_PORT);
+if (raw.orNull() == null && config().getRaw(SSH_PORT).orNull() != 
null) {
+return config().get(SSH_PORT);
+} else {
+Integer result = config().get(SshTool.PROP_PORT);
+return (result != null) ? result : 
SshTool.PROP_PORT.getDefaultValue();
+}
 }
 
 protected  T execSsh(final Map props, final 
Function task) {

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e07f0ee1/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindSshMachineLocationTest.java
--
diff --git 
a/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindSshMachineLocationTest.java
 
b/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindSshMachineLocationTest.java
index 92fdb55..ec8cacb 100644
--- 
a/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindSshMachineLocationTest.java
+++ 
b/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindSshMachineLocationTest.java
@@ -80,5 +80,23 @@ public class RebindSshMachineLocationTest extends 

[2/2] incubator-brooklyn git commit: This closes #1125

2016-01-14 Thread aledsage
This closes #1125


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/ed289ece
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/ed289ece
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/ed289ece

Branch: refs/heads/master
Commit: ed289eceb18a480d4d729aad0bcd924594eb3550
Parents: a2fde1a 4f4c4a5
Author: Aled Sage 
Authored: Thu Jan 14 16:46:42 2016 +
Committer: Aled Sage 
Committed: Thu Jan 14 16:46:42 2016 +

--
 brooklyn-server/pom.xml | 2 +-
 brooklyn-server/utils/rest-swagger/pom.xml  | 4 
 .../org/apache/brooklyn/rest/apidoc/ApiListingResource.java | 5 +++--
 3 files changed, 8 insertions(+), 3 deletions(-)
--




[2/3] incubator-brooklyn git commit: Test catalog item tags serialization

2016-01-14 Thread aledsage
Test catalog item tags serialization


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/9c64872f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/9c64872f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/9c64872f

Branch: refs/heads/master
Commit: 9c64872fa2e204c8091cf1d7fefa90403747595c
Parents: f9591d9
Author: Svetoslav Neykov 
Authored: Thu Jan 14 17:17:25 2016 +0200
Committer: Svetoslav Neykov 
Committed: Thu Jan 14 17:17:25 2016 +0200

--
 .../apache/brooklyn/core/catalog/internal/CatalogDtoTest.java   | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/9c64872f/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/catalog/internal/CatalogDtoTest.java
--
diff --git 
a/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/catalog/internal/CatalogDtoTest.java
 
b/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/catalog/internal/CatalogDtoTest.java
index dc3662c..228c922 100644
--- 
a/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/catalog/internal/CatalogDtoTest.java
+++ 
b/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/catalog/internal/CatalogDtoTest.java
@@ -39,12 +39,14 @@ import 
org.apache.brooklyn.core.catalog.internal.CatalogUtils;
 import org.apache.brooklyn.core.catalog.internal.CatalogXmlSerializer;
 import 
org.apache.brooklyn.core.catalog.internal.CatalogClasspathDo.CatalogScanningModes;
 import org.apache.brooklyn.core.entity.Entities;
+import org.apache.brooklyn.core.mgmt.BrooklynTags;
 import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
 import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
 import org.apache.brooklyn.core.test.entity.TestApplication;
 import org.apache.brooklyn.core.test.entity.TestEntity;
 import org.apache.brooklyn.util.core.BrooklynMavenArtifacts;
 import org.apache.brooklyn.util.maven.MavenRetriever;
+import org.apache.commons.lang3.ClassUtils;
 
 import com.google.common.collect.ImmutableList;
 
@@ -111,6 +113,9 @@ public class CatalogDtoTest {
 
testEntitiesJavaCatalog.addEntry(CatalogItemBuilder.newTemplate(TestApplication.class.getCanonicalName(),
 BasicBrooklynCatalog.NO_VERSION)
 .displayName("Test App from JAR")
 .javaType(TestApplication.class.getCanonicalName())
+.tag(BrooklynTags.newNotesTag("Some notes for catalog 
testing"))
+.tag(BrooklynTags.newYamlSpecTag("This is the spec for a test 
catalog item"))
+
.tag(BrooklynTags.newTraitsTag(ClassUtils.getAllInterfaces(TestApplication.class)))
 .build());
 
testEntitiesJavaCatalog.addEntry(CatalogItemBuilder.newEntity(TestEntity.class.getCanonicalName(),
 BasicBrooklynCatalog.NO_VERSION)
 .displayName("Test Entity from JAR")



<    5   6   7   8   9   10   11   >