You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ri...@apache.org on 2017/10/16 13:45:02 UTC
[08/18] brooklyn-docs git commit: explain the `brooklyn-demo-sample`
external provider
explain the `brooklyn-demo-sample` external provider
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/68ffa5b4
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/68ffa5b4
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/68ffa5b4
Branch: refs/heads/master
Commit: 68ffa5b47b8959a594ab776d67d1f6b9f428741f
Parents: 8926d06
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri Sep 8 13:12:55 2017 +0100
Committer: Duncan Godwin <dr...@googlemail.com>
Committed: Tue Sep 26 15:23:22 2017 +0100
----------------------------------------------------------------------
guide/ops/externalized-configuration.md | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/68ffa5b4/guide/ops/externalized-configuration.md
----------------------------------------------------------------------
diff --git a/guide/ops/externalized-configuration.md b/guide/ops/externalized-configuration.md
index 6440a03..941e277 100644
--- a/guide/ops/externalized-configuration.md
+++ b/guide/ops/externalized-configuration.md
@@ -30,8 +30,12 @@ services:
wars.root: http://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.8.0-incubating/brooklyn-example-hello-world-sql-webapp-0.8.0-incubating.war
http.port: 8080+
java.sysprops:
- brooklyn.example.db.url: $brooklyn:formatString("jdbc:postgresql://%s/myappdb?user=%s\\&password=%s",
- external("servers", "postgresql"), external("credentials", "postgresql-user"), external("credentials", "postgresql-password"))
+ brooklyn.example.db.url:
+ $brooklyn:formatString:
+ - jdbc:postgresql://%s/myappdb?user=%s\\&password=%s
+ - $brooklyn:external("servers", "postgresql")
+ - $brooklyn:external("credentials", "postgresql-user")
+ - $brooklyn:external("credentials", "postgresql-password")
{% endhighlight %}
You can see that when we are building up the JDBC URL, we are using the `external` function. This takes two parameters:
@@ -64,6 +68,18 @@ brooklyn.external.credentials.appId=MyApp
In this case, the list of servers is stored in a properties file located on an Operations Department web server, and the
credentials are stored in an instance of [Vault](https://www.vaultproject.io/).
+More information on these providers is below.
+
+For demo purposes, there is a pre-defined external provider called
+`brooklyn-demo-sample` which defines `hidden-brooklyn-password` as `br00k11n`.
+This is used in some of the sample blueprints, referencing `$brooklyn:external("brooklyn-demo-sample", "hidden-brooklyn-password")`.
+The value used here can be overridden with the following in your `brooklyn.properties`:
+
+{% highlight properties %}
+brooklyn.external.brooklyn-demo-sample=org.apache.brooklyn.core.config.external.InPlaceExternalConfigSupplier
+brooklyn.external.brooklyn-demo-sample.hidden-brooklyn-password=new_password
+{% endhighlight %}
+
## Defining Suppliers