[2/6] brooklyn-docs git commit: Add mention of location wizard into the documentation

2016-03-18 Thread heneveld
Add mention of location wizard into the documentation


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

Branch: refs/heads/master
Commit: 26c6bca65b40ecc48ca8809f5192b5612e75a984
Parents: c95a55c
Author: Thomas Bouron 
Authored: Wed Mar 16 16:37:16 2016 +
Committer: Thomas Bouron 
Committed: Thu Mar 17 09:30:15 2016 +

--
 guide/ops/locations/byon.md  | 3 +++
 guide/ops/locations/clouds.md| 4 
 guide/ops/locations/index.md | 3 ++-
 guide/ops/locations/localhost.md | 3 +++
 4 files changed, 12 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/26c6bca6/guide/ops/locations/byon.md
--
diff --git a/guide/ops/locations/byon.md b/guide/ops/locations/byon.md
index 9088754..38f6595 100644
--- a/guide/ops/locations/byon.md
+++ b/guide/ops/locations/byon.md
@@ -47,6 +47,9 @@ brooklyn.location.named.On-Prem\ Iron\ 
Example.privateKeyFile=~/.ssh/produser_id
 brooklyn.location.named.On-Prem\ Iron\ 
Example.privateKeyPassphrase=s3cr3tpassphrase
 {% endhighlight %}
 
+Alternatively, you can create a specific BYON location through the location 
wizard tool available within the web console.
+This location will be saved as a [catalog entry]({{ site.path.guide 
}}/ops/catalog/index.html#locations-in-catalog) for easy reusability.
+
 For more complex host configuration, one can define custom config values per 
machine. In the example 
 below, there will be two machines. The first will be a machine reachable on
 `ssh -i ~/.ssh/brooklyn.pem -p 8022 myuser@50.51.52.53`. The second is a 
windows machine, reachable 

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/26c6bca6/guide/ops/locations/clouds.md
--
diff --git a/guide/ops/locations/clouds.md b/guide/ops/locations/clouds.md
index cac9083..08109e0 100644
--- a/guide/ops/locations/clouds.md
+++ b/guide/ops/locations/clouds.md
@@ -37,6 +37,10 @@ 
brooklyn.location.jclouds.aws-ec2.credential=s3cr3tsq1rr3ls3cr3tsq1rr3ls3cr3tsq1
 
 And in this case you can reference the location in YAML with `location: 
jclouds:aws-ec2`.
 
+Alternatively, you can use the location wizard tool available within the web 
console
+to create any cloud location supported by http://jclouds.org";>Apache 
jclouds.
+This location will be saved as a [catalog entry]({{ site.path.guide 
}}/ops/catalog/index.html#locations-in-catalog) for easy reusability.
+
 Brooklyn irons out many of the differences between clouds so that blueprints 
run similarly
 in a wide range of locations, including setting up access and configuring 
images and machine specs.
 The configuration options are described in more detail below.

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/26c6bca6/guide/ops/locations/index.md
--
diff --git a/guide/ops/locations/index.md b/guide/ops/locations/index.md
index 29a80e4..8b74698 100644
--- a/guide/ops/locations/index.md
+++ b/guide/ops/locations/index.md
@@ -17,7 +17,8 @@ Brooklyn supports a wide range of locations:
   specifying already-existing hosts to use
 * And many others, including object stores and online services
 
-Configuration can be set in `~/.brooklyn/brooklyn.properties`
+Configuration can be set in `~/.brooklyn/brooklyn.properties`, through the
+location wizard tool available within the web console
 or directly in YAML when specifying a location.
 On some entities, config keys determining maching selection and provisioning 
behavior
 can also be set `in `provisioning.properties`.  

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/26c6bca6/guide/ops/locations/localhost.md
--
diff --git a/guide/ops/locations/localhost.md b/guide/ops/locations/localhost.md
index 27d19bf..7ac906a 100644
--- a/guide/ops/locations/localhost.md
+++ b/guide/ops/locations/localhost.md
@@ -17,6 +17,9 @@ brooklyn.location.localhost.privateKeyFile=~/.ssh/brooklyn_key
 brooklyn.location.localhost.privateKeyPassphrase=s3cr3tPASSPHRASE
 {% endhighlight %}
 
+Alternatively, you can create a specific localhost location through the 
location wizard tool available within the web console.
+This location will be saved as a [catalog entry]({{ site.path.guide 
}}/ops/catalog/index.html#locations-in-catalog) for easy reusability.
+
 If you encounter issues or for more information, see [SSH Keys Localhost 
Setup](ssh-keys.html#localhost-setup). 
 
 If you are normally prompted for a password 

[09/16] brooklyn-ui git commit: show plan yaml for locations in catalog, and make it more like entities detail

2016-03-18 Thread heneveld
show plan yaml for locations in catalog, and make it more like entities detail


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

Branch: refs/heads/master
Commit: dfd1a22ff5a15e05c97a46651bf072ff7a255c6d
Parents: 0fca312
Author: Alex Heneveld 
Authored: Thu Mar 17 16:04:42 2016 +
Committer: Alex Heneveld 
Committed: Thu Mar 17 16:04:42 2016 +

--
 .../assets/tpl/catalog/details-location.html| 47 
 1 file changed, 39 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/dfd1a22f/src/main/webapp/assets/tpl/catalog/details-location.html
--
diff --git a/src/main/webapp/assets/tpl/catalog/details-location.html 
b/src/main/webapp/assets/tpl/catalog/details-location.html
index 03dd596..e83fee5 100644
--- a/src/main/webapp/assets/tpl/catalog/details-location.html
+++ b/src/main/webapp/assets/tpl/catalog/details-location.html
@@ -19,25 +19,51 @@ under the License.
 
 
 
-<%- model.getIdentifierName() %>
-
 
+  <% if (model.get("catalog")) { %>
+
 Delete
+  <% } else { %>
+
+Delete
+  <% } %>
 
 
+<% if (model.get("name") != model.getPrettyName()) { %>
+<%- model.getPrettyName() %>
+<%- model.get("name") %>
+<% } else { %>
+<%- model.get("name") %>
+<% } %>
+<% if (model.get("description")) { %>
+<%- model.get("description") %>
+<% } %>
+
 
+
 
-Display Name:  <%- 
model.getPrettyName() || "" %>
-Reference Name:  <%- 
model.get("name") || "" %>
-Internal ID:  <%- 
model.get("id") || "" %>
 Implementation Spec:  <%- 
model.get("spec") || "" %>
+Internal ID:  <%- 
model.get("id") || "" %>
 
 
 
 
-<% if (!model.get("config") || _.isEmpty(model.get("config"))) { %>
-
+<% if (model.get("catalog") && model.get("catalog").planYaml) { %>
+
+<%- model.get("catalog").planYaml 
%>
+  
+<% } else if (!model.get("config") || _.isEmpty(model.get("config"))) { %>
+
+No configuration is defined explicitly on this item. All config is 
inherited or defined in properties.
+
+This item is not editable.
 <% } else { %>
 
 
@@ -54,6 +80,11 @@ under the License.
 <% }); %>
 
 
+
+
+Additional configuration may be inherited or defined in properties.
+
+This item is not editable.
 <% } %>
 
 



[03/16] brooklyn-ui git commit: Add location wizard within the catalog

2016-03-18 Thread heneveld
Add location wizard within the catalog


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

Branch: refs/heads/master
Commit: 90cfc6e58ebdb7ee58055a017d304dafe37c1c02
Parents: 4d25d3b
Author: Thomas Bouron 
Authored: Fri Mar 11 16:09:18 2016 +
Committer: Thomas Bouron 
Committed: Thu Mar 17 12:49:03 2016 +

--
 src/main/webapp/assets/css/base.css | 24 +
 src/main/webapp/assets/js/view/catalog.js   | 52 --
 src/main/webapp/assets/js/view/home.js  | 12 -
 .../webapp/assets/js/view/location-wizard.js| 55 +++-
 src/main/webapp/assets/tpl/home/summaries.html  |  2 +-
 .../assets/tpl/location-wizard/modal.html   |  2 +-
 6 files changed, 75 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/90cfc6e5/src/main/webapp/assets/css/base.css
--
diff --git a/src/main/webapp/assets/css/base.css 
b/src/main/webapp/assets/css/base.css
index be100e2..c6b17bb 100644
--- a/src/main/webapp/assets/css/base.css
+++ b/src/main/webapp/assets/css/base.css
@@ -1517,3 +1517,27 @@ textarea.param-value {
 .location-type .location-type-title {
 font-size: 30px;
 }
+#catalog-add-form .modal-header .close {
+display: none;
+}
+#catalog-add-form .modal-body {
+max-height: none;
+}
+#catalog-add-form .modal-body .tab-content {
+min-height: 0;
+background-color: transparent !important;
+padding: 0;
+}
+#catalog-add-form .location-type {
+border-color: #ddd;
+}
+
+#catalog-add-form .location-type:hover {
+border-color: #CCC;
+}
+#catalog-add-form .location-type.selected {
+border-color: #793;
+}
+#catalog-add-form .modal-footer {
+background-color: transparent;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/90cfc6e5/src/main/webapp/assets/js/view/catalog.js
--
diff --git a/src/main/webapp/assets/js/view/catalog.js 
b/src/main/webapp/assets/js/view/catalog.js
index 5c3e2ce..e10914b 100644
--- a/src/main/webapp/assets/js/view/catalog.js
+++ b/src/main/webapp/assets/js/view/catalog.js
@@ -18,6 +18,7 @@
 */
 define([
 "underscore", "jquery", "backbone", "brooklyn",
+"view/location-wizard",
 "model/location", "model/entity",
 "text!tpl/catalog/page.html",
 "text!tpl/catalog/details-entity.html",
@@ -30,6 +31,7 @@ define([
 
 "bootstrap", "jquery-form"
 ], function(_, $, Backbone, Brooklyn,
+LocationWizard,
 Location, Entity,
 CatalogPageHtml, DetailsEntityHtml, DetailsGenericHtml, 
LocationDetailsHtml,
 AddCatalogEntryHtml, AddYamlHtml, AddLocationHtml, EntryHtml) {
@@ -184,51 +186,15 @@ define([
 
 // Could adapt to edit existing locations too.
 function newLocationForm(addView, addViewParent) {
-// Renders with config key list
-var body = new (Backbone.View.extend({
-beforeClose: function() {
-if (this.configKeyList) {
-this.configKeyList.close();
-}
+return new LocationWizard({
+onLocationCreated: function(wizard, data) {
+addViewParent.loadAccordionItem("locations", data.id);
 },
-render: function() {
-this.configKeyList = new 
Brooklyn.view.ConfigKeyInputPairList().render();
-var template = _.template(AddLocationHtml);
-this.$el.html(template);
-this.$("#new-location-config").html(this.configKeyList.$el);
+onFinish: function(wizard, data) {
+addView.clearWithHtml( "Added: "+data.id+". Loading..." );
 },
-showError: function (message) {
-self.$(".catalog-save-error")
-.removeClass("hide")
-.find(".catalog-error-message")
-.html(message);
-}
-}));
-var form = new Brooklyn.view.Form({
-body: body,
-model: Location.Model,
-onSubmit: function (location) {
-var configKeys = body.configKeyList.getConfigKeys();
-if (!configKeys.displayName) {
-configKeys.displayName = location.get("name");
-}
-var submitButton = this.$(".catalog-submit-button");
-// "loading" is an indicator to Bootstrap, not a string to 
display
-submitButton.button("loading");
-location.set("config", conf

[11/16] brooklyn-ui git commit: allow catalog definition for locations to be edited

2016-03-18 Thread heneveld
allow catalog definition for locations to be edited

plus sketch of how to make other catalog items editable


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

Branch: refs/heads/master
Commit: 926ae8571766824bd004287ea4eacc69d45e82e0
Parents: dfd1a22
Author: Alex Heneveld 
Authored: Thu Mar 17 17:39:55 2016 +
Committer: Alex Heneveld 
Committed: Thu Mar 17 17:39:55 2016 +

--
 src/main/webapp/assets/js/view/catalog.js   | 42 +++-
 .../assets/tpl/catalog/details-location.html|  6 +--
 2 files changed, 42 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/926ae857/src/main/webapp/assets/js/view/catalog.js
--
diff --git a/src/main/webapp/assets/js/view/catalog.js 
b/src/main/webapp/assets/js/view/catalog.js
index 5c3e2ce..f77da8a 100644
--- a/src/main/webapp/assets/js/view/catalog.js
+++ b/src/main/webapp/assets/js/view/catalog.js
@@ -111,10 +111,50 @@ define([
 },
 
 composeItem: function(event) {
-// TODO could make this a catalog item
+// TODO we should store `catalogYaml` in the catalog so these can 
be edited
+// for now locations are edited, but other items are deployed 
(ugly and inconsistent)
+if (this.options.name == "locations") {
+  // old ui has planYaml inside a catalog block
+  this.composerEditItem(event, this.options.model.get("catalog"));
+} else {
+  // deploy the item
+  this.composerDeployItem(event);
+}
+},
+composerDeployItem: function(event) {
+Backbone.history.navigate("/v1/editor/app/"+ 
encodeURIComponent($(event.currentTarget).data("name")),
+{trigger: true});
+},
+composerEditItem: function(event, catalog) {
+// TODO ideally we get a catalogYaml from the object instead of 
recreating
+var planYaml = catalog.planYaml;
+
+// remove a brooklyn.locations: - ... prefix which brooklyn may 
insert for legacy reasons,
+// replace with single blank line
+if (planYaml.trim().startsWith("brooklyn.locations:")) {
+  planYaml = planYaml.replace(/^ *brooklyn.locations:( *\n)+/, "")
+  planYaml = "\n"+planYaml.replace(/^( *)(-)( *)/, "$1 $3")
+}
+var yaml = "brooklyn.catalog:\n"+
+  "  items:\n"+
+  "  - id: " + catalog.symbolicName + "\n"+
+  "# NB: the version may need to be increased\n"+
+  "version: " + catalog.version + "\n"+
+  (catalog.description ? "description: " + catalog.description 
+ "\n" : "") +
+  (catalog.iconUrl ? "iconUrl: " + catalog.iconUrl + "\n" : 
"") +
+  // any other fields?  
+  "itemType: location\n"+
+  "item:\n"+
+  this.prefixAllLines("  ", planYaml);
+Backbone.history.navigate("/v1/editor/catalog/_/"+ 
encodeURIComponent(yaml), 
+{trigger: true});
+},
+prefixAllLines: function(prefix, lines) {
+return prefix+lines.split("\n").join("\n"+prefix);
 Backbone.history.navigate("/v1/editor/app/"+ 
encodeURIComponent($(event.currentTarget).data("name")),
 {trigger: true});
 },
+
 deleteItem: function(event) {
 // Could use wait flag to block removal of model from collection
 // until server confirms deletion and success handler to perform

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/926ae857/src/main/webapp/assets/tpl/catalog/details-location.html
--
diff --git a/src/main/webapp/assets/tpl/catalog/details-location.html 
b/src/main/webapp/assets/tpl/catalog/details-location.html
index e83fee5..040dc3f 100644
--- a/src/main/webapp/assets/tpl/catalog/details-location.html
+++ b/src/main/webapp/assets/tpl/catalog/details-location.html
@@ -20,17 +20,13 @@ under the License.
 
 
 
-  <% if (model.get("catalog")) { %>
-
 Delete
   <% } else { %>
-
 Delete
   <% } %>



[12/16] brooklyn-dist git commit: Release Vagrantfile: don’t bother with Artifactory

2016-03-18 Thread heneveld
Release Vagrantfile: don’t bother with Artifactory

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

Branch: refs/heads/master
Commit: 0e5e10067ac3c54be21fe9a858e01c6245e52d42
Parents: 4c69c48
Author: Richard Downer 
Authored: Wed Mar 16 16:49:55 2016 +
Committer: Richard Downer 
Committed: Wed Mar 16 16:49:55 2016 +

--
 release/Vagrantfile  | 6 --
 release/settings.xml | 8 
 2 files changed, 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/0e5e1006/release/Vagrantfile
--
diff --git a/release/Vagrantfile b/release/Vagrantfile
index 2d823c1..83b8a7c 100644
--- a/release/Vagrantfile
+++ b/release/Vagrantfile
@@ -38,7 +38,6 @@ Vagrant.configure(2) do |config|
 vb.cpus = 2
   end
 
-  config.vm.network "forwarded_port", guest: 8008, host: 8008
 
   config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig"
   config.vm.provision "file", source: "~/.gnupg/gpg.conf", destination: 
".gnupg/gpg.conf"
@@ -52,13 +51,8 @@ Vagrant.configure(2) do |config|
   config.vm.provision "shell", inline: <<-SHELL
 apt-get update
 apt-get upgrade -y
-wget -q -O /tmp/artifactory.zip http://bit.ly/Hqv9aj
 apt-get install -y default-jdk git subversion xmlstarlet zip unzip 
language-pack-en vim-nox gnupg2 gnupg-agent pinentry-curses
 mkdir -p /opt
-unzip /tmp/artifactory.zip -d /opt
-sudo sed -i -e '/Connector port=/ s/=\".*\"/=\"'"8008"'\"/' 
/opt/artifactory*/tomcat/conf/server.xml
-/opt/artifactory*/bin/installService.sh
-service artifactory start
 chmod -R go= ~vagrant/.gnupg
 curl 
http://archive.apache.org/dist/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz
 | tar xz -C /opt
 ln -s /opt/apache-maven-3.1.1/bin/mvn /usr/local/bin

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/0e5e1006/release/settings.xml
--
diff --git a/release/settings.xml b/release/settings.xml
index 2b03994..365de49 100644
--- a/release/settings.xml
+++ b/release/settings.xml
@@ -16,14 +16,6 @@
 xxx
 xxx
 
-
-
-
-vagrant-ubuntu-trusty-64
-admin
-password
-
 
 
 



brooklyn-ui git commit: update license

2016-03-18 Thread heneveld
Repository: brooklyn-ui
Updated Branches:
  refs/heads/master 947f979e8 -> 559d39173


update license


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

Branch: refs/heads/master
Commit: 559d391734894d89196b3de3c93973c4fb22f799
Parents: 947f979
Author: Alex Heneveld 
Authored: Fri Mar 18 14:29:13 2016 +
Committer: Alex Heneveld 
Committed: Fri Mar 18 14:29:13 2016 +

--
 LICENSE| 6 ++
 src/main/license/files/LICENSE | 6 ++
 2 files changed, 12 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/559d3917/LICENSE
--
diff --git a/LICENSE b/LICENSE
index fc11334..ee8677c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -271,6 +271,12 @@ This project includes the software: DataTables Table 
plug-in for jQuery
   Used under the following license: The BSD 3-Clause (New BSD) License 
(http://opensource.org/licenses/BSD-3-Clause)
   Copyright (c) Allan Jardine (2008-2012)
 
+This project includes the software: jquery.easy-autocomplete.js
+  Available at: https://github.com/pawelczak/EasyAutocomplete
+  Version used: 1.3.1
+  Used under the following license: The MIT License 
(http://opensource.org/licenses/MIT)
+  Copyright (c) Łukasz Pawełczak (2015)
+
 This project includes the software: jQuery Form Plugin
   Available at: https://github.com/malsup/form
   Developed by: Mike Alsup (http://malsup.com/)

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/559d3917/src/main/license/files/LICENSE
--
diff --git a/src/main/license/files/LICENSE b/src/main/license/files/LICENSE
index fc11334..ee8677c 100644
--- a/src/main/license/files/LICENSE
+++ b/src/main/license/files/LICENSE
@@ -271,6 +271,12 @@ This project includes the software: DataTables Table 
plug-in for jQuery
   Used under the following license: The BSD 3-Clause (New BSD) License 
(http://opensource.org/licenses/BSD-3-Clause)
   Copyright (c) Allan Jardine (2008-2012)
 
+This project includes the software: jquery.easy-autocomplete.js
+  Available at: https://github.com/pawelczak/EasyAutocomplete
+  Version used: 1.3.1
+  Used under the following license: The MIT License 
(http://opensource.org/licenses/MIT)
+  Copyright (c) Łukasz Pawełczak (2015)
+
 This project includes the software: jQuery Form Plugin
   Available at: https://github.com/malsup/form
   Developed by: Mike Alsup (http://malsup.com/)



[10/16] brooklyn-ui git commit: Add help texts on all steps of the location wizard.

2016-03-18 Thread heneveld
Add help texts on all steps of the location wizard.


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

Branch: refs/heads/master
Commit: fd32f2d20e0358ea9711389f5474283974186c8e
Parents: 193c5b8
Author: Thomas Bouron 
Authored: Thu Mar 17 16:45:14 2016 +
Committer: Thomas Bouron 
Committed: Thu Mar 17 16:45:14 2016 +

--
 src/main/webapp/assets/css/base.css |  4 +
 .../webapp/assets/js/view/location-wizard.js| 95 +---
 .../tpl/location-wizard/location-type.html  |  8 +-
 3 files changed, 71 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/fd32f2d2/src/main/webapp/assets/css/base.css
--
diff --git a/src/main/webapp/assets/css/base.css 
b/src/main/webapp/assets/css/base.css
index 6ccd08b..8f05e59 100644
--- a/src/main/webapp/assets/css/base.css
+++ b/src/main/webapp/assets/css/base.css
@@ -1490,6 +1490,10 @@ textarea.param-value {
 .location-type-container {
 overflow: hidden;
 }
+.help-text {
+padding-top: 10px;
+font-style: italic;
+}
 .location-type {
 width: 160px;
 height: 200px;

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/fd32f2d2/src/main/webapp/assets/js/view/location-wizard.js
--
diff --git a/src/main/webapp/assets/js/view/location-wizard.js 
b/src/main/webapp/assets/js/view/location-wizard.js
index b7c6c6b..74374e2 100644
--- a/src/main/webapp/assets/js/view/location-wizard.js
+++ b/src/main/webapp/assets/js/view/location-wizard.js
@@ -60,12 +60,11 @@ define([
 },
 {
 title: '<%= type %> Location - Configuration',
-subtitle: 'Required information about your location',
 view: LocationConfiguration
 },
 {
 title: '<%= type %> Location - Provisioning',
-subtitle: 'Provisioning information about your location',
+subtitle: 'In many target locations, additional 
configuration may be supported. Enter any such options here. For information on 
available options consult the https://brooklyn.apache.org/v/latest/ops/locations/";>Brooklyn 
documentation. Alternatively you can skip this step.',
 view: LocationProvisioning
 }
 ];
@@ -98,7 +97,11 @@ define([
 var step = this.steps[this.step];
 
 
this.$('.location-wizard-title').html(_.template(step.title)({type: 
this.capitalize(this.type)}));
-
this.$('.location-wizard-subtitle').html(_.template(step.subtitle)({type: 
this.type}));
+if (_.has(step, 'subtitle')) {
+
this.$('.location-wizard-subtitle').html(_.template(step.subtitle)({type: 
this.type})).show();
+} else {
+this.$('.location-wizard-subtitle').hide();
+}
 
 // Render actions buttons
 var actionContainer = this.$('.location-wizard-actions').empty();
@@ -247,6 +250,8 @@ define([
 className: 'location-wizard-body',
 template: _.template(LocationTypeHtml),
 events: {
+'mouseenter .location-type': 'onDisplayHelp',
+'mouseleave .location-type': 'onHideHelp',
 'click .location-type': 'onSelectType'
 },
 
@@ -272,6 +277,15 @@ define([
 return this;
 },
 
+onDisplayHelp: function(event) {
+var $elm = this.$(event.currentTarget);
+this.$('.help-text').html($elm.data('help')).show();
+},
+
+onHideHelp: function(event) {
+this.$('.help-text').html('').hide();
+},
+
 onSelectType: function(event) {
 var $elm = this.$(event.currentTarget);
 var type = $elm.data('type');
@@ -306,19 +320,20 @@ define([
 cloud: [
 {
 id: 'name',
-label: 'location ID',
+label: 'Location ID',
 type: 'text',
+help: 'Label to identify this location. Typically this is 
lower case using hyphens and no spaces',
 require: true
 },
 {
 id: 'displayName',
-label: 'location name',
+label: 'Location Name',
 type: 'text',
-require: true
+help: 'Display name used throughout the web console'
  

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

2016-03-18 Thread heneveld
This closes #21


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

Branch: refs/heads/master
Commit: 5ee9370cc00a7e455a1b7238483f72cb330797b1
Parents: 01ac8ad 2a1370f
Author: Alex Heneveld 
Authored: Thu Mar 17 12:54:50 2016 +
Committer: Alex Heneveld 
Committed: Thu Mar 17 12:54:50 2016 +

--
 release/Vagrantfile  |  44 +++---
 release/clone-and-configure-repos.sh |  50 +++
 release/common.sh|  64 ++
 release/environment.sh   | 111 
 release/gpg-agent.conf   |   4 +-
 release/make-release-artifacts.sh| 139 ++
 release/settings.xml |   8 --
 7 files changed, 327 insertions(+), 93 deletions(-)
--




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

2016-03-18 Thread heneveld
Repository: brooklyn-ui
Updated Branches:
  refs/heads/master c64754d59 -> 0fca312d1


Remove Incubator DISCLAIMER file


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

Branch: refs/heads/master
Commit: 1418b65888cbed7f0dc08fdd7c3b34246140c8d6
Parents: c64754d
Author: Richard Downer 
Authored: Fri Mar 11 13:38:07 2016 +
Committer: Richard Downer 
Committed: Fri Mar 11 13:38:07 2016 +

--
 src/main/license/files/DISCLAIMER | 8 
 src/test/license/DISCLAIMER   | 8 
 2 files changed, 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/1418b658/src/main/license/files/DISCLAIMER
--
diff --git a/src/main/license/files/DISCLAIMER 
b/src/main/license/files/DISCLAIMER
deleted file mode 100644
index 9e6119b..000
--- a/src/main/license/files/DISCLAIMER
+++ /dev/null
@@ -1,8 +0,0 @@
-
-Apache Brooklyn is an effort undergoing incubation at The Apache Software 
Foundation (ASF), 
-sponsored by the Apache Incubator. Incubation is required of all newly 
accepted projects until 
-a further review indicates that the infrastructure, communications, and 
decision making process 
-have stabilized in a manner consistent with other successful ASF projects. 
While incubation 
-status is not necessarily a reflection of the completeness or stability of the 
code, it does 
-indicate that the project has yet to be fully endorsed by the ASF.
-

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/1418b658/src/test/license/DISCLAIMER
--
diff --git a/src/test/license/DISCLAIMER b/src/test/license/DISCLAIMER
deleted file mode 100644
index 9e6119b..000
--- a/src/test/license/DISCLAIMER
+++ /dev/null
@@ -1,8 +0,0 @@
-
-Apache Brooklyn is an effort undergoing incubation at The Apache Software 
Foundation (ASF), 
-sponsored by the Apache Incubator. Incubation is required of all newly 
accepted projects until 
-a further review indicates that the infrastructure, communications, and 
decision making process 
-have stabilized in a manner consistent with other successful ASF projects. 
While incubation 
-status is not necessarily a reflection of the completeness or stability of the 
code, it does 
-indicate that the project has yet to be fully endorsed by the ASF.
-



[01/16] brooklyn-ui git commit: Add first draft of the location wizard

2016-03-18 Thread heneveld
Repository: brooklyn-ui
Updated Branches:
  refs/heads/master 0fca312d1 -> 8c7b1dde3


Add first draft of the location wizard


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

Branch: refs/heads/master
Commit: 8ad9923f081a888f01661520fa5e0dfcf4433bd0
Parents: 4ac635a
Author: Thomas Bouron 
Authored: Thu Mar 10 15:24:53 2016 +
Committer: Thomas Bouron 
Committed: Thu Mar 17 12:48:26 2016 +

--
 src/main/webapp/assets/css/base.css |  31 ++
 src/main/webapp/assets/js/view/home.js  |  25 +-
 .../webapp/assets/js/view/location-wizard.js| 497 +++
 src/main/webapp/assets/tpl/home/summaries.html  |   3 +-
 .../location-wizard/location-configuration.html |  20 +
 .../location-wizard/location-provisioning.html  |  30 ++
 .../tpl/location-wizard/location-type.html  |  40 ++
 .../assets/tpl/location-wizard/modal.html   |  36 ++
 8 files changed, 679 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/8ad9923f/src/main/webapp/assets/css/base.css
--
diff --git a/src/main/webapp/assets/css/base.css 
b/src/main/webapp/assets/css/base.css
index a80f35b..be100e2 100644
--- a/src/main/webapp/assets/css/base.css
+++ b/src/main/webapp/assets/css/base.css
@@ -1486,3 +1486,34 @@ textarea.param-value {
 color: transparent;
 text-shadow: 0 0 5px rgba(0,0,0,0.5);
 }
+
+/* Location wizard */
+.location-type {
+width: 160px;
+height: 200px;
+float: left;
+text-align: center;
+border: 3px solid #EEE;
+position: relative;
+margin: 4px;
+}
+.location-type:hover {
+border-color: #CCC;
+}
+.location-type.selected {
+border-color: #793;
+}
+.location-type div {
+position: absolute;
+top: 50%;
+transform: translateY(-50%);
+width: 150px;
+padding: 5px;
+}
+.location-type .fa {
+font-size: 60px;
+margin-bottom: 20px;
+}
+.location-type .location-type-title {
+font-size: 30px;
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/8ad9923f/src/main/webapp/assets/js/view/home.js
--
diff --git a/src/main/webapp/assets/js/view/home.js 
b/src/main/webapp/assets/js/view/home.js
index ae2ba3a..375e670 100644
--- a/src/main/webapp/assets/js/view/home.js
+++ b/src/main/webapp/assets/js/view/home.js
@@ -24,6 +24,7 @@ define([
 "jquery", "underscore", "backbone",
 "view/viewutils", 
 "view/application-add-wizard",
+"view/location-wizard",
 "view/ha-summary",
 "model/location",
 "text!tpl/home/applications.html",
@@ -31,7 +32,7 @@ define([
 "text!tpl/home/app-entry.html",
 "bootstrap", "brooklyn-utils"
 ], function ($, _, Backbone, ViewUtils,
-AppAddWizard, HASummary, Location,
+AppAddWizard, LocationWizard , HASummary, Location,
 ApplicationsHtml, HomeSummariesHtml, AppEntryHtml) {
 
 var HomeView = Backbone.View.extend({
@@ -40,7 +41,8 @@ define([
 'click #add-new-application':'createApplication',
 'click #reload-brooklyn-properties': 'reloadBrooklynProperties',
 'click #clear-ha-node-records': 'clearHaNodeRecords',
-'click .addApplication':'createApplication'
+'click .addApplication':'createApplication',
+'click .addLocation': 'createLocation'
 },
 
 initialize:function () {
@@ -153,6 +155,25 @@ define([
 }
 },
 
+createLocation:function () {
+if (this._modal) {
+this._modal.close()
+}
+var that = this;
+if (this.options.offline || (this.options.cautionOverlay && 
this.options.cautionOverlay.warningActive)) {
+// don't show wizard
+} else {
+var wizard = new LocationWizard();
+this._modal = wizard;
+this.$(".add-app #modal-container").html(wizard.render().el);
+this.$(".add-app #modal-container .modal")
+.on("hidden",function () {
+wizard.close();
+that.options.locations.fetch({reset:true});
+}).modal('show');
+}
+},
+
 reloadBrooklynProperties: function() {
 var self = this;
 // indicate submitted

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/8ad9923f/src/main/webapp/assets/js/view/location-wizard.js
--
diff --git a/src/main/we

[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(-)
--




[13/18] brooklyn-server git commit: expand REST API to include catalog info, and update REST API for cleaned up LocationSpec access

2016-03-18 Thread heneveld
expand REST API to include catalog info, and update REST API for cleaned up 
LocationSpec access


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

Branch: refs/heads/master
Commit: b05185eb59dcd6ba2c4f4110ca9a4557f6b8ee0e
Parents: a3d7470
Author: Alex Heneveld 
Authored: Thu Mar 17 15:09:19 2016 +
Committer: Alex Heneveld 
Committed: Thu Mar 17 18:09:41 2016 +

--
 .../core/location/BasicLocationRegistry.java| 20 -
 .../core/location/CatalogLocationResolver.java  | 19 -
 .../brooklyn/rest/domain/LocationSummary.java   | 15 +++-
 .../rest/domain/LocationSummaryTest.java|  2 +-
 .../rest/resources/ApplicationResource.java |  3 +-
 .../rest/transform/LocationTransformer.java | 83 ++--
 .../rest/util/BrooklynRestResourceUtils.java|  7 +-
 .../rest/domain/LocationSummaryTest.java|  2 +-
 8 files changed, 77 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/b05185eb/core/src/main/java/org/apache/brooklyn/core/location/BasicLocationRegistry.java
--
diff --git 
a/core/src/main/java/org/apache/brooklyn/core/location/BasicLocationRegistry.java
 
b/core/src/main/java/org/apache/brooklyn/core/location/BasicLocationRegistry.java
index e117f73..3ab23df 100644
--- 
a/core/src/main/java/org/apache/brooklyn/core/location/BasicLocationRegistry.java
+++ 
b/core/src/main/java/org/apache/brooklyn/core/location/BasicLocationRegistry.java
@@ -118,8 +118,20 @@ import com.google.common.collect.Sets;
  * 
  * 
  * 
- * TODO There is no concept of a location version in this registry. The version
- * in the catalog is generally ignored.
+ * TODO we should change the registry to be a pass-through facade on top of 
the catalog,
+ * and shift to preferring catalog access mechanisms.
+ * this brings it in line with how we do other things;
+ * also this does not understand versions.
+ * to do this we will need to:
+ *  update the catalog on addition, setting a plan (ensuring 
serialization);
+ *  in case of a definition CHANGED in brooklyn.properties give an error 
if it means the plan has changed
+ *  (user could then remove from brooklyn.properties, if persistence on, 
or apply the update in the catalog;
+ *  ie similar semantics to defining an initial catalog via the CLI)
+ *  find and return the RegisteredType from the type-registry/catalog here
+ * 
+ * Once done, update the UI use /v1/catalog/locations instead of /v1/locations
+ * (currently the latter is the only way to list locations known in the 
LocationRegistry 
+ * ie those from brookln.properties.)
  */
 @SuppressWarnings({"rawtypes","unchecked"})
 public class BasicLocationRegistry implements LocationRegistry {
@@ -218,7 +230,7 @@ public class BasicLocationRegistry implements 
LocationRegistry {
 public void updateDefinedLocation(CatalogItem> 
item) {
 String id = item.getCatalogItemId();
 String symbolicName = item.getSymbolicName();
-String spec = CatalogLocationResolver.NAME + ":" + id;
+String spec = CatalogLocationResolver.createLegacyWrappedReference(id);
 Map config = ImmutableMap.of();
 BasicLocationDefinition locDefinition = new 
BasicLocationDefinition(symbolicName, symbolicName, spec, config);
 
@@ -233,7 +245,7 @@ public class BasicLocationRegistry implements 
LocationRegistry {
 public void updateDefinedLocation(RegisteredType item) {
 String id = item.getId();
 String symbolicName = item.getSymbolicName();
-String spec = CatalogLocationResolver.NAME + ":" + id;
+String spec = CatalogLocationResolver.createLegacyWrappedReference(id);
 Map config = ImmutableMap.of();
 BasicLocationDefinition locDefinition = new 
BasicLocationDefinition(symbolicName, symbolicName, spec, config);
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/b05185eb/core/src/main/java/org/apache/brooklyn/core/location/CatalogLocationResolver.java
--
diff --git 
a/core/src/main/java/org/apache/brooklyn/core/location/CatalogLocationResolver.java
 
b/core/src/main/java/org/apache/brooklyn/core/location/CatalogLocationResolver.java
index a218a66..5a06c53 100644
--- 
a/core/src/main/java/org/apache/brooklyn/core/location/CatalogLocationResolver.java
+++ 
b/core/src/main/java/org/apache/brooklyn/core/location/CatalogLocationResolver.java
@@ -28,9 +28,12 @@ import org.apache.brooklyn.api.location.LocationResolver;
 import org.apache.

[11/18] brooklyn-server git commit: update tests to use LocationRegistry spec methods

2016-03-18 Thread heneveld
update tests to use LocationRegistry spec methods

the CatalogYamlLocationTest.testLocationPartOfBlueprintDoesntLeak recently 
introduced to highlight the failure is now fixed,
although there are still port-manager-related failures


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

Branch: refs/heads/master
Commit: 3f1e4c61780e67c972ad6ba4785ed5537bbe9108
Parents: f755c25
Author: Alex Heneveld 
Authored: Wed Mar 16 20:44:31 2016 +
Committer: Alex Heneveld 
Committed: Thu Mar 17 12:03:38 2016 +

--
 .../camp/brooklyn/ByonLocationsYamlTest.java|  2 +-
 .../ExternalConfigBrooklynPropertiesTest.java   |  2 +-
 .../camp/brooklyn/LocationsYamlTest.java|  2 +-
 .../catalog/CatalogYamlLocationTest.java|  2 +-
 .../core/entity/EntityFunctionsTest.java|  2 +-
 .../core/entity/EntityPredicatesTest.java   |  2 +-
 .../core/entity/EntitySuppliersTest.java|  2 +-
 .../core/location/LocationManagementTest.java   |  8 ++---
 .../core/location/LocationPredicatesTest.java   |  2 +-
 .../core/location/LocationRegistryTest.java | 37 ++--
 .../access/BrooklynAccessUtilsTest.java |  2 +-
 .../PortForwardManagerLocationResolverTest.java |  2 +-
 .../access/PortForwardManagerRebindTest.java|  2 +-
 .../location/access/PortForwardManagerTest.java |  4 +--
 .../internal/LocalManagementContextTest.java|  8 ++---
 .../core/mgmt/rebind/RebindPolicyTest.java  |  2 +-
 .../core/test/entity/TestApplication.java   |  7 ++--
 .../core/test/entity/TestApplicationImpl.java   |  2 +-
 .../location/byon/ByonLocationResolverTest.java | 17 -
 .../location/byon/HostLocationResolverTest.java |  2 +-
 .../byon/SingleMachineLocationResolverTest.java |  2 +-
 .../SingleMachineProvisioningLocationTest.java  |  2 +-
 .../LocalhostLocationResolverTest.java  | 20 +--
 ...ocalhostMachineProvisioningLocationTest.java |  2 +-
 .../LocalhostProvisioningAndAccessTest.java |  2 +-
 .../multi/MultiLocationResolverTest.java| 11 +++---
 .../ssh/SshMachineLocationIntegrationTest.java  | 28 +--
 .../ssh/SshMachineLocationSshToolTest.java  |  4 +--
 .../mgmt/persist/jclouds/BlobStoreCleaner.java  |  2 +-
 .../persist/jclouds/BlobStoreExpiryTest.java|  2 +-
 .../mgmt/persist/jclouds/BlobStoreTest.java |  2 +-
 .../jclouds/JcloudsExpect100ContinueTest.java   |  2 +-
 .../jclouds/AbstractJcloudsStubbedLiveTest.java |  2 +-
 .../jclouds/JcloudsAddressesLiveTest.java   |  4 +--
 .../JcloudsByonLocationResolverAwsLiveTest.java |  4 +--
 ...dsByonLocationResolverSoftlayerLiveTest.java |  4 +--
 .../JcloudsByonLocationResolverTest.java|  2 +-
 .../jclouds/JcloudsByonRebindLiveTest.java  |  4 +--
 .../jclouds/JcloudsLocationMetadataTest.java|  4 +--
 .../JcloudsLocationRegisterMachineLiveTest.java |  6 ++--
 ...cloudsLocationReleasePortForwardingTest.java |  4 +--
 .../jclouds/JcloudsLocationResolverTest.java|  4 +--
 ...udsLocationSuspendResumeMachineLiveTest.java |  2 +-
 ...ationTemplateOptionsCustomisersLiveTest.java |  2 +-
 .../location/jclouds/JcloudsLoginLiveTest.java  | 26 +++---
 .../location/jclouds/JcloudsRebindLiveTest.java |  2 +-
 .../location/jclouds/JcloudsRebindStubTest.java |  2 +-
 .../location/jclouds/JcloudsSshingLiveTest.java |  2 +-
 .../location/jclouds/JcloudsSuseLiveTest.java   |  4 +--
 .../jclouds/RebindJcloudsLocationLiveTest.java  |  2 +-
 .../jclouds/RebindJcloudsLocationTest.java  |  2 +-
 ...loudsLocationUserLoginAndConfigLiveTest.java |  2 +-
 ...hineProvisioningLocationJcloudsLiveTest.java |  2 +-
 .../provider/AbstractJcloudsLocationTest.java   |  8 ++---
 .../provider/AwsEc2LocationWindowsLiveTest.java |  2 +-
 .../provider/CarrenzaLocationLiveTest.java  |  2 +-
 .../provider/RackspaceLocationLiveTest.java |  2 +-
 .../zone/AwsAvailabilityZoneExtensionTest.java  |  2 +-
 .../jclouds/os/CreateUserPolicyLiveTest.java| 13 ---
 .../rest/resources/LocationResourceTest.java|  4 +--
 .../SensorResourceIntegrationTest.java  |  2 +-
 .../rest/util/EntityLocationUtilsTest.java  |  2 +-
 .../rest/resources/LocationResourceTest.java|  4 +--
 .../SensorResourceIntegrationTest.java  |  2 +-
 .../rest/util/EntityLocationUtilsTest.java  |  2 +-
 .../brooklyn/entity/AbstractEc2LiveTest.java|  2 +-
 .../entity/AbstractGoogleComputeLiveTest.java   |  2 +-
 .../entity/AbstractSoftlayerLiveTest.java   |  2 +-
 .../entity/chef/ChefLiveTestSupport.java| 19 +-
 .../entity/machine/MachineEntityRebindTest.java |  2 +-
 .../machine/SetHostnameCustomizerLiveTest.java  |  2 +-
 .../entity/machine/po

[14/18] brooklyn-server git commit: Merge remote-tracking branch 'upstream/master' into fix-location-leak

2016-03-18 Thread heneveld
Merge remote-tracking branch 'upstream/master' into fix-location-leak


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

Branch: refs/heads/master
Commit: dfcc6dfc4fd6a6878008e1d31d2409269dce532c
Parents: b05185e a16f8c7
Author: Alex Heneveld 
Authored: Thu Mar 17 18:42:10 2016 +
Committer: Alex Heneveld 
Committed: Thu Mar 17 18:42:10 2016 +

--
 .../AbstractExternalConfigSupplier.java |   7 +-
 .../external/UrlsExternalConfigSupplier.java|  83 +++
 .../InPlaceExternalConfigSupplierTest.java  |  60 +++
 ...ropertiesFileExternalConfigSupplierTest.java |  81 +++
 .../UrlsExternalConfigSupplierTest.java | 103 +++
 .../BrooklynPropertiesFactoryHelperTest.java|   4 +-
 .../entity/brooklynnode/BrooklynNode.java   |  17 ++-
 .../brooklynnode/BrooklynNodeSshDriver.java |  27 -
 .../BrooklynNodeIntegrationTest.java|  72 +++--
 .../windows/WindowsPerformanceCounterFeed.java  |   2 +-
 .../src/main/license/DISCLAIMER.shaded  |   8 --
 11 files changed, 436 insertions(+), 28 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 org.apache.brooklyn.core.effector.EffectorTasks;
 import org.apache.brooklyn.core

[3/4] brooklyn-library git commit: Simplifications following review, use a simpler means of writing the hosts file.

2016-03-18 Thread aledsage
Simplifications following review, use a simpler means of writing the 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/824dc199
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/824dc199
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/824dc199

Branch: refs/heads/master
Commit: 824dc199a7ba1b2bcd114b388f43fed9c874a85f
Parents: 7e97a26
Author: Geoff Macartney 
Authored: Mon Mar 14 16:52:41 2016 +
Committer: Geoff Macartney 
Committed: Mon Mar 14 17:48:51 2016 +

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


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/824dc199/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 ccf8303..fd73c61 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,7 +118,7 @@ public class AnsibleLifecycleEffectorTasks extends 
MachineLifecycleEffectorTasks
 }
 
 DynamicTasks.queue(AnsiblePlaybookTasks.installAnsible(installDir, 
false));
-DynamicTasks.queue(AnsiblePlaybookTasks.setUpHostsFile(installDir, 
false));
+DynamicTasks.queue(AnsiblePlaybookTasks.setUpHostsFile(false));
 
 if (getExtraVars() != null) {
 
DynamicTasks.queue(AnsiblePlaybookTasks.configureExtraVars(getRunDir(), 
extraVars, false));

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/824dc199/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 0589ee7..d9f11c2 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
@@ -108,26 +108,12 @@ public class AnsiblePlaybookTasks {
 return " --extra-vars \"@" + EXTRA_VARS_FILENAME + "\" ";
 }
 
-public static TaskFactory setUpHostsFile(String installDir, boolean 
force) {
-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),
-"}"
-)
+public static TaskFactory setUpHostsFile(boolean force) {
+String checkInstalled = !force ? "grep 
localhost.ansible_connection=local /etc/ansible/hosts || " : "";
+return ssh(checkInstalled + sudo("echo 'localhost 
ansible_connection=local' | sudo tee /etc/ansible/hosts"))
 .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"));
-}
 }
 



[4/4] brooklyn-library git commit: This closes #19

2016-03-18 Thread aledsage
This closes #19


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

Branch: refs/heads/master
Commit: d7d44f9ff7a08fa412606b2d4e17d840c678bba4
Parents: c19037b 824dc19
Author: Aled Sage 
Authored: Fri Mar 18 23:25:15 2016 +
Committer: Aled Sage 
Committed: Fri Mar 18 23:25:15 2016 +

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




[2/2] brooklyn git commit: bump to tips of branches

2016-03-18 Thread heneveld
bump to tips of branches


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

Branch: refs/heads/master
Commit: f74dae097e71ac47c40bcd532d4934922cdfdf3e
Parents: b1e89c4
Author: Alex Heneveld 
Authored: Fri Mar 18 14:35:42 2016 +
Committer: Alex Heneveld 
Committed: Fri Mar 18 14:35:42 2016 +

--
 brooklyn-client  | 2 +-
 brooklyn-dist| 2 +-
 brooklyn-docs| 2 +-
 brooklyn-library | 2 +-
 brooklyn-server  | 2 +-
 brooklyn-ui  | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn/blob/f74dae09/brooklyn-client
--
diff --git a/brooklyn-client b/brooklyn-client
index e98252e..bf696e5 16
--- a/brooklyn-client
+++ b/brooklyn-client
@@ -1 +1 @@
-Subproject commit e98252e7e8c2a5c810c8483f6cd4eeed12172dde
+Subproject commit bf696e55b7f41b7db62c9975e90c3990b2595f9c

http://git-wip-us.apache.org/repos/asf/brooklyn/blob/f74dae09/brooklyn-dist
--
diff --git a/brooklyn-dist b/brooklyn-dist
index 26c4604..ab03540 16
--- a/brooklyn-dist
+++ b/brooklyn-dist
@@ -1 +1 @@
-Subproject commit 26c4604ca41d5b79829d595235b4fdc45b28aba9
+Subproject commit ab035402d4a3854d9666be6f4f08cb48ae4c30b1

http://git-wip-us.apache.org/repos/asf/brooklyn/blob/f74dae09/brooklyn-docs
--
diff --git a/brooklyn-docs b/brooklyn-docs
index 6e86cb0..df024e3 16
--- a/brooklyn-docs
+++ b/brooklyn-docs
@@ -1 +1 @@
-Subproject commit 6e86cb02081706c6d098c6f873d388d378e61471
+Subproject commit df024e3fa0f125f18289d432b8a611f9190e3d65

http://git-wip-us.apache.org/repos/asf/brooklyn/blob/f74dae09/brooklyn-library
--
diff --git a/brooklyn-library b/brooklyn-library
index 02abbab..c19037b 16
--- a/brooklyn-library
+++ b/brooklyn-library
@@ -1 +1 @@
-Subproject commit 02abbab09ab514524bb9a9edbd0a525447d15c99
+Subproject commit c19037bcdb89ec2226da7834cd0d058fc4e065af

http://git-wip-us.apache.org/repos/asf/brooklyn/blob/f74dae09/brooklyn-server
--
diff --git a/brooklyn-server b/brooklyn-server
index d03f254..d059088 16
--- a/brooklyn-server
+++ b/brooklyn-server
@@ -1 +1 @@
-Subproject commit d03f254ba19472e3fb5e0a7260cb07679991684a
+Subproject commit d0590884fd6eca38776d88c53c86e18ce8fd72cb

http://git-wip-us.apache.org/repos/asf/brooklyn/blob/f74dae09/brooklyn-ui
--
diff --git a/brooklyn-ui b/brooklyn-ui
index 18b073a..559d391 16
--- a/brooklyn-ui
+++ b/brooklyn-ui
@@ -1 +1 @@
-Subproject commit 18b073a95526c1842e6869916ac7a4d9960368c1
+Subproject commit 559d391734894d89196b3de3c93973c4fb22f799



[2/3] brooklyn-server git commit: Align HttpTool builder method signature with others in class

2016-03-18 Thread aledsage
Align HttpTool builder method signature with others in class


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

Branch: refs/heads/master
Commit: 29ec1ff0ecd36b07f489f4b3d8b928c42a0bfb13
Parents: 18403d0
Author: Sam Corbett 
Authored: Tue Mar 15 12:08:30 2016 +
Committer: Sam Corbett 
Committed: Tue Mar 15 12:30:40 2016 +

--
 .../src/main/java/org/apache/brooklyn/util/http/HttpTool.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/29ec1ff0/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
--
diff --git 
a/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java 
b/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
index b9167c7..0a4bc26 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/http/HttpTool.java
@@ -293,8 +293,9 @@ public class HttpTool {
 this.credentials = checkNotNull(val, "credentials");
 return this;
 }
-public void credential(Optional val) {
+public HttpClientBuilder credential(Optional val) {
 if (val.isPresent()) credentials = val.get();
+return this;
 }
 /** similar to curl --post301 -L` */
 public HttpClientBuilder laxRedirect(boolean val) {



[1/3] brooklyn-server git commit: Allow custom mgmt properties in unit test support

2016-03-18 Thread aledsage
Repository: brooklyn-server
Updated Branches:
  refs/heads/master d0590884f -> 3767000c6


Allow custom mgmt properties in unit test support


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

Branch: refs/heads/master
Commit: 18403d0d39e3ff13a6a0c469bb0b1c5e95f2a1c2
Parents: f8476be
Author: Sam Corbett 
Authored: Tue Mar 15 12:08:11 2016 +
Committer: Sam Corbett 
Committed: Tue Mar 15 12:30:39 2016 +

--
 .../core/test/BrooklynMgmtUnitTestSupport.java  | 12 +++-
 .../usage/ApplicationUsageTrackingTest.java | 31 ++--
 2 files changed, 14 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/18403d0d/core/src/test/java/org/apache/brooklyn/core/test/BrooklynMgmtUnitTestSupport.java
--
diff --git 
a/core/src/test/java/org/apache/brooklyn/core/test/BrooklynMgmtUnitTestSupport.java
 
b/core/src/test/java/org/apache/brooklyn/core/test/BrooklynMgmtUnitTestSupport.java
index 9742bce..ee2ab79 100644
--- 
a/core/src/test/java/org/apache/brooklyn/core/test/BrooklynMgmtUnitTestSupport.java
+++ 
b/core/src/test/java/org/apache/brooklyn/core/test/BrooklynMgmtUnitTestSupport.java
@@ -19,6 +19,7 @@
 package org.apache.brooklyn.core.test;
 
 import org.apache.brooklyn.core.entity.Entities;
+import org.apache.brooklyn.core.internal.BrooklynProperties;
 import org.apache.brooklyn.core.mgmt.internal.ManagementContextInternal;
 import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
 import org.slf4j.Logger;
@@ -40,7 +41,12 @@ public class BrooklynMgmtUnitTestSupport {
 @BeforeMethod(alwaysRun=true)
 public void setUp() throws Exception {
 if (mgmt == null) {
-mgmt = LocalManagementContextForTests.newInstance();
+BrooklynProperties brooklynProperties = getBrooklynProperties();
+if (brooklynProperties != null) {
+mgmt = 
LocalManagementContextForTests.newInstance(brooklynProperties);
+} else {
+mgmt = LocalManagementContextForTests.newInstance();
+}
 }
 }
 
@@ -58,4 +64,8 @@ public class BrooklynMgmtUnitTestSupport {
 }
 }
 
+protected BrooklynProperties getBrooklynProperties() {
+return null;
+}
+
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/18403d0d/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/core/mgmt/usage/ApplicationUsageTrackingTest.java
--
diff --git 
a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/core/mgmt/usage/ApplicationUsageTrackingTest.java
 
b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/core/mgmt/usage/ApplicationUsageTrackingTest.java
index 6f11431..9fc5a0f 100644
--- 
a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/core/mgmt/usage/ApplicationUsageTrackingTest.java
+++ 
b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/core/mgmt/usage/ApplicationUsageTrackingTest.java
@@ -29,21 +29,17 @@ import java.util.Set;
 
 import org.apache.brooklyn.api.entity.Application;
 import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.core.entity.Entities;
 import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.mgmt.internal.ManagementContextInternal;
-import org.apache.brooklyn.core.mgmt.usage.UsageListener.ApplicationMetadata;
 import org.apache.brooklyn.core.mgmt.usage.ApplicationUsage;
 import org.apache.brooklyn.core.mgmt.usage.ApplicationUsage.ApplicationEvent;
+import org.apache.brooklyn.core.mgmt.usage.UsageListener.ApplicationMetadata;
 import org.apache.brooklyn.core.objs.proxy.EntityProxy;
-import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
+import org.apache.brooklyn.core.test.BrooklynMgmtUnitTestSupport;
 import org.apache.brooklyn.core.test.entity.TestApplication;
 import org.apache.brooklyn.test.Asserts;
 import org.apache.brooklyn.util.time.Time;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
 import com.google.common.base.Predicates;
@@ -51,32 +47,11 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 
-public class ApplicationUsageTrackingTest {
+public class ApplicationUsageTrackingTest exten