Skip to content
Permalink
Browse files
Workaround lack of {{ }} in code blocks
  • Loading branch information
rdowner authored and tbouron committed Oct 16, 2017
1 parent 8fef522 commit 0a5af4fa31c6e55c8cb2d40a2a1244dabe876168
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 53 deletions.
@@ -26,8 +26,7 @@ to be created.
Alternatively, all options can be supplied at the command line. For example,
if creating a project named "autobrick" for "com.acme":

```bash
$ BROOKLYN_VERSION={{ book.brooklyn_version }}
<pre><code class="lang-sh">$ BROOKLYN_VERSION={{ book.brooklyn_version }}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.brooklyn \
-DarchetypeArtifactId=brooklyn-archetype-quickstart \
@@ -36,8 +35,7 @@ $ mvn archetype:generate \
-DartifactId=autobrick \
-Dversion=0.1.0-SNAPSHOT \
-DpackageName=com.acme.autobrick \
-DinteractiveMode=false
```
-DinteractiveMode=false</code></pre>

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
@@ -109,19 +109,14 @@ Release notes can be found [here](release-notes.md).

If you use Maven, you can add Brooklyn with the following in your pom:

<!-- the comment is included due to a jekyll/highlight bug which
removes indentation on the first line in a highlight block;
we want the actual XML indented so you can cut and paste into a pom.xml sensibly -->
```xml
<!-- include all Brooklyn items in our project -->
<dependencies>
<dependency>
<groupId>org.apache.brooklyn</groupId>
<artifactId>brooklyn-all</artifactId>
<version>{{ book.brooklyn_version }}</version>
</dependency>
</dependencies>
```
<pre><code class="lang-xml"> &lt;!-- include all Brooklyn items in our project --&gt;
&lt;dependencies&gt;
&lt;dependency&gt;
&lt;groupId&gt;org.apache.brooklyn&lt;/groupId&gt;
&lt;artifactId&gt;brooklyn-all&lt;/artifactId&gt;
&lt;version&gt;{{ book.brooklyn_version }}&lt;/version&gt;
&lt;/dependency&gt;
&lt;/dependencies&gt;</code></pre>

`brooklyn-all` brings in all dependencies, including jclouds.
If you prefer a smaller repo you might want just ``brooklyn-core``, ``brooklyn-policies``,
@@ -23,10 +23,8 @@ you may wish to set up some other configuration options first,

Now start Brooklyn with the following command:

```bash
$ cd apache-brooklyn-{{ book.brooklyn_version }}
$ bin/brooklyn launch
```
<pre><code class="lang-sh">$ cd apache-brooklyn-{{ book.brooklyn_version }}
$ bin/brooklyn launch</code></pre>

Please refer to the [Server CLI Reference](../server-cli-reference.md) for details of other possible command line options.

@@ -48,24 +48,18 @@ Expand the `tar.gz` archive:
{% endif %}

{% if 'SNAPSHOT' in book.brooklyn_version %}
```bash
% tar -zxf apache-brooklyn-dist-{{ book.brooklyn_version_stable }}-timestamp-dist.tar.gz
```
<pre><code class="lang-sh">tar -zxf apache-brooklyn-dist-{{ book.brooklyn_version_stable }}-timestamp-dist.tar.gz</code></pre>
{% else %}
```bash
% tar -zxf apache-brooklyn-{{ book.brooklyn_version_stable }}-dist.tar.gz
```
<pre><code class="lang-sh">% tar -zxf apache-brooklyn-{{ book.brooklyn_version_stable }}-dist.tar.gz</code></pre>
{% endif %}

This will create a `apache-brooklyn-{{ book.brooklyn_version_stable }}` folder.
This will create a <code class="lang-sh">apache-brooklyn-{{ book.brooklyn_version_stable }}</code> folder.

Let's setup some paths for easy commands.

```bash
% cd apache-brooklyn-{{ book.brooklyn_version_stable }}
<pre><code class="lang-sh">% cd apache-brooklyn-{{ book.brooklyn_version_stable }}
% BROOKLYN_DIR="$(pwd)"
% export PATH=$PATH:$BROOKLYN_DIR/bin/
```
% export PATH=$PATH:$BROOKLYN_DIR/bin/</code></pre>


### Configuring brooklyn.cfg
@@ -45,12 +45,10 @@ Then download the provided Apache Brooklyn vagrant configuration from
This archive contains everything you need to create an environment for use with this guide, providing an Apache Brooklyn instance and some blank VMs.
{% endif %}

Extract the `tar.gz` archive and navigate into the expanded `apache-brooklyn-{{book.brooklyn_version}}-vagrant` folder {% if 'SNAPSHOT' in book.brooklyn_version %}(note: as this is a -SNAPSHOT version, your filename will be slightly different){% endif %}
Extract the `tar.gz` archive and navigate into the expanded <code>apache-brooklyn-{{book.brooklyn_version}}-vagrant</code> folder {% if 'SNAPSHOT' in book.brooklyn_version %}(note: as this is a -SNAPSHOT version, your filename will be slightly different){% endif %}

```bash
$ tar xvf apache-brooklyn-{{book.brooklyn_version}}-vagrant.tar.gz
$ cd apache-brooklyn-{{book.brooklyn_version}}-vagrant
```
<pre><code class="lang-sh">$ tar xvf apache-brooklyn-{{book.brooklyn_version}}-vagrant.tar.gz
$ cd apache-brooklyn-{{book.brooklyn_version}}-vagrant</code></pre>

{% sample lang="centos" -%}
### Installing on CentOS & Red Hat Enterprise Linux 7
@@ -69,9 +67,7 @@ Download the Apache Brooklyn [RPM distribution](https://www.apache.org/dyn/close

Once downloaded, run the following shell command as root:

```bash
$ yum install apache-brooklyn-{{book.brooklyn_version}}-1.rpm
```
<pre><code class="lang-sh">$ yum install apache-brooklyn-{{book.brooklyn_version}}-1.rpm</code></pre>

{% sample lang="ubuntu" -%}
### Installing on Ubuntu 7 Debian
@@ -88,10 +84,7 @@ Download the Apache Brooklyn [deb distribution](https://www.apache.org/dyn/close

Once downloaded, run the following shell command:

```bash
$ sudo dpkg -i apache-brooklyn_{{book.brooklyn_version}}_noarch.deb
```

<pre><code class="lang-sh">$ sudo dpkg -i apache-brooklyn_{{book.brooklyn_version}}_noarch.deb</code></pre>

{% sample lang="osx" -%}
### Installing on other Linux distributions, OSX and other UNIX-like platforms
@@ -101,19 +94,15 @@ For Linux or OSX please download the Apache Brooklyn `tar.gz` archive from the [
{% if 'SNAPSHOT' in book.brooklyn_version %}
Extract the `tar.gz` archive (note: as this is a -SNAPSHOT version, your filename will be slightly different):
{% else %}
Extract the `tar.gz` archive and navigate into the expanded `apache-brooklyn-{{ book.brooklyn_version }}` folder.
Extract the `tar.gz` archive and navigate into the expanded <code class="lang-sh">apache-brooklyn-{{ book.brooklyn_version }}</code> folder.
{% endif %}

{% if 'SNAPSHOT' in book.brooklyn_version %}
```bash
$ tar -zxf apache-brooklyn-dist-{{ book.brooklyn_version }}-timestamp-dist.tar.gz
$ cd apache-brooklyn-{{ book.brooklyn_version }}
```
<pre><code class="lang-sh">$ tar -zxf apache-brooklyn-dist-{{ book.brooklyn_version }}-timestamp-dist.tar.gz
$ cd apache-brooklyn-{{ book.brooklyn_version }}</code></pre>
{% else %}
```bash
$ tar -zxf apache-brooklyn-{{ book.brooklyn_version }}-dist.tar.gz
$ cd apache-brooklyn-{{ book.brooklyn_version }}
```
<pre><code class="lang-sh">tar -zxf apache-brooklyn-{{ book.brooklyn_version }}-dist.tar.gz
$ cd apache-brooklyn-{{ book.brooklyn_version }}</code></pre>
{% endif %}


0 comments on commit 0a5af4f

Please sign in to comment.