You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2016/07/25 08:52:46 UTC
[1/3] brooklyn-docs git commit: Instructions on setup.script
Repository: brooklyn-docs
Updated Branches:
refs/heads/master f128794ee -> 1679a909c
Instructions on setup.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/a9bbc226
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/a9bbc226
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/a9bbc226
Branch: refs/heads/master
Commit: a9bbc2267336be2ceefcf5553f1d9d00314c0ae1
Parents: 95e2ce5
Author: Duncan Godwin <du...@cloudsoftcorp.com>
Authored: Thu Jul 21 17:20:34 2016 +0100
Committer: Duncan Godwin <du...@cloudsoftcorp.com>
Committed: Thu Jul 21 17:20:34 2016 +0100
----------------------------------------------------------------------
guide/ops/locations/_clouds.md | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/a9bbc226/guide/ops/locations/_clouds.md
----------------------------------------------------------------------
diff --git a/guide/ops/locations/_clouds.md b/guide/ops/locations/_clouds.md
index 5082776..72352b7 100644
--- a/guide/ops/locations/_clouds.md
+++ b/guide/ops/locations/_clouds.md
@@ -174,9 +174,18 @@ For more keys and more detail on the keys below, see
- Use `dontCreateUser` to have Brooklyn run as the initial `loginUser` (usually `root`),
without creating any other user.
-- A post-provisioning `setup.script` can be specified (as a URL) to run an additional script,
- before making the `Location` available to entities,
- optionally also using `setup.script.vars` (set as `key1:value1,key2:value2`)
+- A post-provisioning `setup.script` can be specified to run an additional script, before making the `Location`
+ available to entities. This may take the form of a URL of the script or a [base64](https://en.wikipedia.org/wiki/Base64)
+ encoded script with the prefix `data:text/plain;base64,` to denote this.
+ For example if you wanted to disable a yum repository called `reponame` prior to using the machine, you could use the following command:
+
+ `sudo yum-config-manager --disable reponame`
+
+ Once base64 encoded (with a tool such as [this](https://www.base64encode.org/)), plus the prefix, this property would be:
+
+ `setup.script: data:text/plain;base64,c3VkbyB5dW0tY29uZmlnLW1hbmFnZXIgLS1kaXNhYmxlIHJlcG9uYW1l`
+
+ Optionally `setup.script.vars` can also be used to set variables (set as `key1:value1,key2:value2`)
- Use `openIptables: true` to automatically configure `iptables`, to open the TCP ports required by
the software process. One can alternatively use `stopIptables: true` to entirely stop the
[3/3] brooklyn-docs git commit: Closes #95
Posted by sv...@apache.org.
Closes #95
Instructions on setup.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/1679a909
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/1679a909
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/1679a909
Branch: refs/heads/master
Commit: 1679a909c04afdfdba32c894cb21c61b79fae239
Parents: f128794 dd4b35d
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Mon Jul 25 11:52:28 2016 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Mon Jul 25 11:52:28 2016 +0300
----------------------------------------------------------------------
guide/ops/locations/_clouds.md | 33 ++++++++++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[2/3] brooklyn-docs git commit: Addressed review comments
Posted by sv...@apache.org.
Addressed review comments
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/dd4b35d0
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/dd4b35d0
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/dd4b35d0
Branch: refs/heads/master
Commit: dd4b35d06b8b37f4f53e3b0c6bb86724c037de99
Parents: a9bbc22
Author: Duncan Godwin <du...@cloudsoftcorp.com>
Authored: Fri Jul 22 11:31:33 2016 +0100
Committer: Duncan Godwin <du...@cloudsoftcorp.com>
Committed: Fri Jul 22 11:31:33 2016 +0100
----------------------------------------------------------------------
guide/ops/locations/_clouds.md | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/dd4b35d0/guide/ops/locations/_clouds.md
----------------------------------------------------------------------
diff --git a/guide/ops/locations/_clouds.md b/guide/ops/locations/_clouds.md
index 72352b7..9aee611 100644
--- a/guide/ops/locations/_clouds.md
+++ b/guide/ops/locations/_clouds.md
@@ -175,17 +175,35 @@ For more keys and more detail on the keys below, see
without creating any other user.
- A post-provisioning `setup.script` can be specified to run an additional script, before making the `Location`
- available to entities. This may take the form of a URL of the script or a [base64](https://en.wikipedia.org/wiki/Base64)
- encoded script with the prefix `data:text/plain;base64,` to denote this.
+ available to entities. This may take the form of a URL of a script or a [data URI](https://en.wikipedia.org/wiki/Data_URI_scheme).
+ Note that if using a data URI it is usually a good idea to [base64](https://en.wikipedia.org/wiki/Base64) this string to escape problem characters
+ in more complex scripts. The base64 encoded script should then be prefixed with `data:text/plain;base64,` to denote this.
For example if you wanted to disable a yum repository called `reponame` prior to using the machine, you could use the following command:
`sudo yum-config-manager --disable reponame`
- Once base64 encoded (with a tool such as [this](https://www.base64encode.org/)), plus the prefix, this property would be:
+ Base64 encoding can be done with a with a tool such as [this](https://www.base64encode.org/) or a linux command such as:
+
+ `echo "sudo yum-config-manager --disable reponame" | base64`
+
+ With the base64 prefix this would then look like this:
`setup.script: data:text/plain;base64,c3VkbyB5dW0tY29uZmlnLW1hbmFnZXIgLS1kaXNhYmxlIHJlcG9uYW1l`
- Optionally `setup.script.vars` can also be used to set variables (set as `key1:value1,key2:value2`)
+ The `setup.script` can also take [FreeMarker](http://freemarker.org/) variables in a `setup.script.vars`
+ property. Variables are set in the format `key1:value1,key2:value2` and used in the form `${key1}`. So for the above example:
+
+ `setup.script.vars: repository:reponame`
+
+ then
+
+ `setup.script: data:sudo yum-config-manager --disable ${repository}`
+
+ or encoded in base64:
+
+ `setup.script: data:text/plain;base64,c3VkbyB5dW0tY29uZmlnLW1hbmFnZXIgLS1kaXNhYmxlICR7cmVwb3NpdG9yeX0=`
+
+ This enables the name of the repository to be passed in to the script.
- Use `openIptables: true` to automatically configure `iptables`, to open the TCP ports required by
the software process. One can alternatively use `stopIptables: true` to entirely stop the