You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/01 18:29:22 UTC

[48/50] brooklyn-docs git commit: update download links and instructions to reflect dist archive structure, and be a little bit clearer in general (backport cherry-picked from master)

update download links and instructions to reflect dist archive structure,
and be a little bit clearer in general
(backport cherry-picked from master)


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

Branch: refs/heads/0.4.0
Commit: 6c04910d1899f0050e845c816b1249e85f48d66c
Parents: defcfd5
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Tue Jan 8 13:50:33 2013 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Mon Jan 14 16:50:53 2013 +0000

----------------------------------------------------------------------
 docs/_config.yml                                |  1 +
 docs/_includes/fields.md                        |  8 +++++
 docs/_plugins/read.rb                           |  2 ++
 docs/meta/versions.md                           |  4 +--
 docs/start/download.md                          |  4 +--
 docs/use/examples/before-begin.include.md       | 32 ++++++++++++++++----
 .../examples/webcluster/webcluster.include.md   | 10 +++---
 7 files changed, 47 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/6c04910d/docs/_config.yml
----------------------------------------------------------------------
diff --git a/docs/_config.yml b/docs/_config.yml
index 7346ee7..6c0e706 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -1,4 +1,5 @@
 markdown: rdiscount
 brooklyn-version: 0.4.0-SNAPSHOT  # BROOKLYN_VERSION
+brooklyn-snapshot-git-branch: 0.4   # if line above is SNAPSHOT this should point to corresponding git branch (e.g. master, 0.4)
 brooklyn-root-url: /
 url: /v/0.4.0-SNAPSHOT  # BROOKLYN_VERSION

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/6c04910d/docs/_includes/fields.md
----------------------------------------------------------------------
diff --git a/docs/_includes/fields.md b/docs/_includes/fields.md
new file mode 100644
index 0000000..72beb0f
--- /dev/null
+++ b/docs/_includes/fields.md
@@ -0,0 +1,8 @@
+{% if site.brooklyn-version contains 'SNAPSHOT' %}{% capture SNAPSHOT %}true{% endcapture %}{% endif %}
+
+{% capture maven_this_version_base_url %}http://developers.cloudsoftcorp.com/maven/{% if SNAPSHOT %}snapshots/{% else %}releases/{% endif %}{% endcapture %}
+{% capture dist_url_dir %}{{ maven_this_version_base_url }}io/brooklyn/brooklyn-dist/{{ site.brooklyn-version }}{% endcapture %}
+{% if SNAPSHOT %}{% else %}
+  {% capture dist_url_zip %}{{ dist_url_dir }}/brooklyn-{{ site.brooklyn-version }}-dist.zip{% endcapture %}
+  {% capture dist_url_zip %}{{ dist_url_tgz }}/brooklyn-{{ site.brooklyn-version }}-dist.tar.gz{% endcapture %}
+{% endif %}

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/6c04910d/docs/_plugins/read.rb
----------------------------------------------------------------------
diff --git a/docs/_plugins/read.rb b/docs/_plugins/read.rb
index 153bc88..6ad390a 100644
--- a/docs/_plugins/read.rb
+++ b/docs/_plugins/read.rb
@@ -3,6 +3,8 @@
 
 # there is also readj which reads a file and applies jekyll processing to it
 # handy if we want to include a toc.json file which itself calls {% readj child/toc.json %}
+# (note however variables do not seem to be exported when use readj (TODO),
+# although they are exported if you have _includes/file.md and use the standard include file)
 
 # the argument can be a variable or a filename literal (not quoted)
 # TODO: figure out how to accept a quoted string as an argument

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/6c04910d/docs/meta/versions.md
----------------------------------------------------------------------
diff --git a/docs/meta/versions.md b/docs/meta/versions.md
index 6bd9dff..b0df112 100644
--- a/docs/meta/versions.md
+++ b/docs/meta/versions.md
@@ -12,8 +12,8 @@ toc: /toc.json
 {% if site.server %} 
 > **Server (debug) mode detected.**
 
-> *Links to other versions will likely not work when running in server/debug mode.
-Files must be copied to the brooklyncentral.github.com repo for many of the links below to resolve correctly.*
+> *Links to other versions on this page and others will likely not work when running in server/debug mode.
+Files must be copied to the brooklyncentral.github.com repo for these links to resolve correctly.*
 
 > *Debug page generated {{ site.time }}*
 {% endif %}

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/6c04910d/docs/start/download.md
----------------------------------------------------------------------
diff --git a/docs/start/download.md b/docs/start/download.md
index f0d8942..a53dd8e 100644
--- a/docs/start/download.md
+++ b/docs/start/download.md
@@ -15,12 +15,12 @@ toc: ../toc.json
 <a name="distro"></a>
 ## The Distro
 
-{% capture maven_this_version_base_url %}http://developers.cloudsoftcorp.com/maven/{% if site.brooklyn-version contains 'SNAPSHOT' %}snapshots/{% else %}releases/{% endif %}{% endcapture %}
+{% include fields.md %}
 
 You can grab the distribution artifact, containing Brooklyn, its dependencies and launch scripts, 
 here{% if site.brooklyn-version contains 'SNAPSHOT' %} (but please **check the date** on snapshot artifacts){% endif %}:
 
-* [{{ site.brooklyn-version }}]({{ maven_this_version_base_url }}io/brooklyn/brooklyn-dist/{{ site.brooklyn-version }}/)
+* [{{ site.brooklyn-version }}]({{ dist_url_dir }}/)
 * [all stable versions](http://developers.cloudsoftcorp.com/maven/releases/io/brooklyn/brooklyn-dist/)
 * [all snapshot versions](http://developers.cloudsoftcorp.com/maven/snapshots/io/brooklyn/brooklyn-dist/)
 

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/6c04910d/docs/use/examples/before-begin.include.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/before-begin.include.md b/docs/use/examples/before-begin.include.md
index 3c99973..d453943 100644
--- a/docs/use/examples/before-begin.include.md
+++ b/docs/use/examples/before-begin.include.md
@@ -2,25 +2,45 @@
 
 To use the examples, you'll need ``curl``, ``java``, and ``maven`` (v3) installed.
 
+{% include fields.md %}
+
+{% if SNAPSHOT %}
+
+First, grab a copy of the Brooklyn snapshot distribution you wish to use from [the repo]({{ dist_url_dir }}/)
+(or build it yourself following instructions [here]({{ site.url }}/dev/build/)),
+unpack it to your favourite location (e.g. `$(pwd)`), 
+and export `BROOKLYN_HOME`:
+
+{% highlight bash %}
+% export BROOKLYN_HOME=$(pwd)/brooklyn-{{ site.brooklyn-version }}/
+{% endhighlight %}
+
+{% else %}
+
 First, grab a copy of the Brooklyn distribution:
 
 {% highlight bash %}
-% curl -LO http://developers.cloudsoftcorp.com/maven/releases/io/brooklyn/brooklyn-dist/0.4.0-M2/brooklyn-dist-0.4.0-M2-dist.tar.gz
+% curl -LO {{ dist_url_tgz }}
 % tar xvzf brooklyn-dist-0.4.0-M2-dist.tar.gz
-% export BROOKLYN_HOME=$(pwd)/brooklyn
+% export BROOKLYN_HOME=$(pwd)/brooklyn-{{ site.brooklyn-version }}/
 {% endhighlight %}
 
+{% endif %}
+
+
 Then, grab a copy of the brooklyn-examples source code and build with Maven:
 
 {% highlight bash %}
 % git clone https://github.com/brooklyncentral/brooklyn-examples.git
 % cd brooklyn-examples
-% git checkout 0.4.0-M2
+% git checkout {% if SNAPSHOT %}{{ site.brooklyn-snapshot-git-branch }}{% else %}{{ site.brooklyn-version }}{% endif %}
 % mvn clean install
 {% endhighlight %}
 
-For more information about where to download brooklyn please
+{% if SNAPSHOT %}Please note, these instructions are for a SNAPSHOT release of Brooklyn,
+so proceed with caution. 
+For the latest stable version, go [here](/meta/versions.html). {% endif %}
+For more information on ways to download Brooklyn please
 see the [download page]({{site.url}}/start/download.html).
-
-If you wish to learn more about the Brooklyn CLI used for launching an app,
+For more information on the Brooklyn CLI and launching apps,
 please visit [this section of the user guide]({{site.url}}/use/guide/management/index.html#cli).

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/6c04910d/docs/use/examples/webcluster/webcluster.include.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/webcluster/webcluster.include.md b/docs/use/examples/webcluster/webcluster.include.md
index 37ca544..8a2b3a2 100644
--- a/docs/use/examples/webcluster/webcluster.include.md
+++ b/docs/use/examples/webcluster/webcluster.include.md
@@ -36,11 +36,11 @@ public class SingleWebServerExample extends AbstractApplication {
 }
 {% endhighlight %}
 
-You can run this (on *nix or Mac) as follows:
+You can run this as follows (on *nix or Mac, assuming `ssh localhost` requires no password or passphrase):
 
 {% highlight bash %}
 % ${BROOKLYN_HOME}/bin/brooklyn launch --app brooklyn.demo.SingleWebServerExample \
---location localhost
+  --location localhost
 {% endhighlight %}
 
 
@@ -53,7 +53,8 @@ With appropriate setup (as described [here]({{ site.url }}/use/guide/management/
 this can also be deployed to your favourite cloud, let's pretend it's Amazon Ireland, as follows: 
 
 {% highlight bash %}
-% ${BROOKLYN_HOME}/bin/brooklyn launch --app brooklyn.demo.SingleWebServerExample --location aws-ec2:eu-west-1
+% ${BROOKLYN_HOME}/bin/brooklyn launch --app brooklyn.demo.SingleWebServerExample \
+  --location aws-ec2:eu-west-1
 {% endhighlight %}
 
 
@@ -62,7 +63,8 @@ this can also be deployed to your favourite cloud, let's pretend it's Amazon Ire
 Ready for something more interesting?  Try this:
 
 {% highlight bash %}
-% ${BROOKLYN_HOME}/bin/brooklyn launch --app brooklyn.demo.WebClusterDatabaseExample --location localhost
+% ${BROOKLYN_HOME}/bin/brooklyn launch --app brooklyn.demo.WebClusterDatabaseExample \
+  --location localhost
 {% endhighlight %}
 
 This launches the class ``WebClusterDatabaseExample`` (also described in the [walkthrough]({{ site.url }}/start/walkthrough/index.html))