You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by tbouron <gi...@git.apache.org> on 2017/09/14 09:45:53 UTC
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
GitHub user tbouron opened a pull request:
https://github.com/apache/brooklyn-docs/pull/212
Add update instructions for RPM/DEB and bin distribution
This requires the `paths.html` page available with #210
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tbouron/brooklyn-docs update/update-instructions
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-docs/pull/212.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #212
----
----
---
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/212#discussion_r140802173
--- Diff: guide/ops/upgrade.md ---
@@ -0,0 +1,356 @@
+---
+title: Upgrade
+layout: website-normal
+---
+
+This guide provides all necessary information to upgrade Apache Brooklyn for both the RPM/DEB and Tarball packages.
+
+## Backwards Compatibility
+
+Apache Brooklyn version 0.12.0 onward runs primarily inside a Karaf container. When upgrading from 0.11.0 or below,
+this update changes the mechanisms for launching Brooklyn.
+This will impact any custom scripting around the launching of Brooklyn, and the supplying of command line arguments.
+
+Use of the `lib/dropins` and `lib/patch` folders will no longer work (because Karaf does not support that kind of classloading).
+Instead, code must be built and installed as [OSGi bundles](https://en.wikipedia.org/wiki/OSGi#Bundles).
+
+## Upgrading
+
+* Use of RPM and DEB is now recommended where possible, rather than the tar.gz. This entirely replaces the previous install.
+
+* CentOS 7.x is recommended over CentOS 6.x (note: the RPM **will not work** on CentOS 6.x)
+
+### Upgrade from Apache Brooklyn 0.12.0 onward
+
+{::options parse_block_html="true" /}
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. **Important!** Backup persisted state and custom configuration, in case you need to rollback to a previous version.
+
+ 1. By default, persisted state is located at `/var/lib/brooklyn`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `/etc/brooklyn/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `/var/log/brooklyn/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `/etc/brooklyn`.
+
+2. Upgrade Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package
+
+ 2. Upgrade Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum upgrade apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ If there are conflicts in configuration files (located in `/etc/brooklyn`), the upgrade will behave differently based
+ on the package you are using:
+
+ * RPM: the upgrade will keep the previously installed one and save the new version, with the suffix `.rpmsave`.
+ You will then need to check and manually resolve those.
+ * DEB: the upgrade will ask you what to do.
+
+3. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive)
+
+</div>
+
+<div id="impl-2" class="tab-pane fade">
+
+1. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep karaf`), then use `sudo kill <JAVA_PID>`
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `~/.brooklyn/brooklyn-persisted-state`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new tarball zip package.
+
+ 2. Install Brooklyn:
+
+ tar -zxf apache-brooklyn-xxxx.tar.gz
+ cd apache-brooklyn-xxxx
+
+4. Restore any changes to the configuration files (see step 2).
+
+5. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
+ If you do not have such errors you can proceed.
+
+ 4. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ 5. Change the `highAvailabilityMode` to the default (AUTO) by commenting it out in `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+
+6. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive).
+
+7. Update the catalog, using the br command:
+
+ 1. Download the br tool (i.e. from the "CLI Download" link in the web-console).
+
+ 2. Login with br: `br login http://localhost:8081 <user> <password>`.
+
+ 3. Update the catalog: `br catalog add /opt/brooklyn/catalog/catalog.bom`.
+
+</div>
+</div>
+
+### Upgrade from Apache Brooklyn 0.11.0 and below
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. Stop Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep brooklyn`), then use `sudo kill <JAVA_PID>`.
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `/opt/brooklyn/.brooklyn/`..
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Delete the existing Apache Brooklyn install:
+
+ 1. Remove Brooklyn package:
+
+ # CentOS / RHEL
+ sudo yum erase apache-brooklyn
+
+ # Ubuntu / Debian
+ sudo dpkg -r apache-brooklyn
+
+ 2. On CentOS 7 run `sudo systemctl daemon-reload`.
+
+ 3. Confirm that Brooklyn is definitely not running (see step 1 above).
+
+ 4. Delete the Brooklyn install directory: `sudo rm -r /opt/brooklyn`.
+
+4. Make sure you have Java 8.
+ By default CentOS images come with JRE6 which is incompatible version for Brooklyn.
+ If CentOS is prior to 6.8 upgrade nss: `yum -y upgrade nss`
+
+5. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package.
+
+ 2. Install Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum install apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ 3. Wait for Brooklyn to be fully started (i.e. its web-console to be responsive).
+
+6. Restore the persisted state and configuration.
+
+ 1. Stop the Brooklyn service:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS 6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ Confirm that Brooklyn is no longer running (see step 1).
+
+ 2. Restore the persisted state directory into `/var/lib/brooklyn` and any changes to the configuration files (see step 2).
+ Ensure owner/permissions are correct for the persisted state directory, e.g.:
+ `sudo chown -r brooklyn:brooklyn /var/lib/brooklyn`
+
+7. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
--- End diff --
Should be `/etc/brooklyn/...`
---
[GitHub] brooklyn-docs issue #212: Add update instructions for RPM/DEB and bin distri...
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on the issue:
https://github.com/apache/brooklyn-docs/pull/212
@aledsage Comments addressed
---
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/212#discussion_r140767366
--- Diff: guide/ops/upgrade.md ---
@@ -0,0 +1,356 @@
+---
+title: Upgrade
+layout: website-normal
+---
+
+This guide provides all necessary information to upgrade Apache Brooklyn for both the RPM/DEB and Tarball packages.
+
+## Backwards Compatibility
+
+Apache Brooklyn version 0.12.0 onward runs primarily inside a Karaf container. When upgrading from 0.11.0 or below,
+this update changes the mechanisms for launching Brooklyn.
+This will impact any custom scripting around the launching of Brooklyn, and the supplying of command line arguments.
+
+Use of the `lib/dropins` and `lib/patch` folders will no longer work (because Karaf does not support that kind of classloading).
+Instead, code must be built and installed as [OSGi bundles](https://en.wikipedia.org/wiki/OSGi#Bundles).
+
+## Upgrading
+
+* Use of RPM and DEB is now recommended where possible, rather than the tar.gz. This entirely replaces the previous install.
+
+* CentOS 7.x is recommended over CentOS 6.x (note: the RPM **will not work** on CentOS 6.x)
+
+### Upgrade from Apache Brooklyn 0.12.0 onward
+
+{::options parse_block_html="true" /}
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. **Important!** Backup persisted state and custom configuration, in case you need to rollback to a previous version.
+
+ 1. By default, persisted state is located at `/var/lib/brooklyn`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `/etc/brooklyn/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `/var/log/brooklyn/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `/etc/brooklyn`.
+
+2. Upgrade Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package
+
+ 2. Upgrade Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum upgrade apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ If there are conflicts in configuration files (located in `/etc/brooklyn`), the upgrade will behave differently based
+ on the package you are using:
+
+ * RPM: the upgrade will keep the previously installed one and save the new version, with the suffix `.rpmsave`.
+ You will then need to check and manually resolve those.
+ * DEB: the upgrade will ask you what to do.
+
+3. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive)
+
+</div>
+
+<div id="impl-2" class="tab-pane fade">
+
+1. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep karaf`), then use `sudo kill <JAVA_PID>`
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `~/.brooklyn/brooklyn-persisted-state`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new tarball zip package.
+
+ 2. Install Brooklyn:
+
+ tar -zxf apache-brooklyn-xxxx.tar.gz
+ cd apache-brooklyn-xxxx
+
+4. Restore any changes to the configuration files (see step 2).
+
+5. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
+ If you do not have such errors you can proceed.
+
+ 4. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ 5. Change the `highAvailabilityMode` to the default (AUTO) by commenting it out in `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+
+6. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive).
+
+7. Update the catalog, using the br command:
+
+ 1. Download the br tool (i.e. from the "CLI Download" link in the web-console).
+
+ 2. Login with br: `br login http://localhost:8081 <user> <password>`.
+
+ 3. Update the catalog: `br catalog add /opt/brooklyn/catalog/catalog.bom`.
+
+</div>
+</div>
+
+### Upgrade from Apache Brooklyn 0.11.0 and below
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. Stop Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep brooklyn`), then use `sudo kill <JAVA_PID>`.
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `/opt/brooklyn/.brooklyn/`..
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Delete the existing Apache Brooklyn install:
+
+ 1. Remove Brooklyn package:
+
+ # CentOS / RHEL
+ sudo yum erase apache-brooklyn
+
+ # Ubuntu / Debian
+ sudo dpkg -r apache-brooklyn
+
+ 2. On CentOS 7 run `sudo systemctl daemon-reload`.
+
+ 3. Confirm that Brooklyn is definitely not running (see step 1 above).
+
+ 4. Delete the Brooklyn install directory: `sudo rm -r /opt/brooklyn`.
--- End diff --
Also need to `sudo rm -r /var/log/brooklyn/`.
---
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/212#discussion_r140822950
--- Diff: guide/ops/upgrade.md ---
@@ -0,0 +1,356 @@
+---
+title: Upgrade
+layout: website-normal
+---
+
+This guide provides all necessary information to upgrade Apache Brooklyn for both the RPM/DEB and Tarball packages.
+
+## Backwards Compatibility
+
+Apache Brooklyn version 0.12.0 onward runs primarily inside a Karaf container. When upgrading from 0.11.0 or below,
+this update changes the mechanisms for launching Brooklyn.
+This will impact any custom scripting around the launching of Brooklyn, and the supplying of command line arguments.
+
+Use of the `lib/dropins` and `lib/patch` folders will no longer work (because Karaf does not support that kind of classloading).
+Instead, code must be built and installed as [OSGi bundles](https://en.wikipedia.org/wiki/OSGi#Bundles).
+
+## Upgrading
+
+* Use of RPM and DEB is now recommended where possible, rather than the tar.gz. This entirely replaces the previous install.
+
+* CentOS 7.x is recommended over CentOS 6.x (note: the RPM **will not work** on CentOS 6.x)
+
+### Upgrade from Apache Brooklyn 0.12.0 onward
+
+{::options parse_block_html="true" /}
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. **Important!** Backup persisted state and custom configuration, in case you need to rollback to a previous version.
+
+ 1. By default, persisted state is located at `/var/lib/brooklyn`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `/etc/brooklyn/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `/var/log/brooklyn/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `/etc/brooklyn`.
+
+2. Upgrade Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package
+
+ 2. Upgrade Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum upgrade apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ If there are conflicts in configuration files (located in `/etc/brooklyn`), the upgrade will behave differently based
+ on the package you are using:
+
+ * RPM: the upgrade will keep the previously installed one and save the new version, with the suffix `.rpmsave`.
+ You will then need to check and manually resolve those.
+ * DEB: the upgrade will ask you what to do.
+
+3. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive)
+
+</div>
+
+<div id="impl-2" class="tab-pane fade">
+
+1. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep karaf`), then use `sudo kill <JAVA_PID>`
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `~/.brooklyn/brooklyn-persisted-state`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new tarball zip package.
+
+ 2. Install Brooklyn:
+
+ tar -zxf apache-brooklyn-xxxx.tar.gz
+ cd apache-brooklyn-xxxx
+
+4. Restore any changes to the configuration files (see step 2).
+
+5. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
+ If you do not have such errors you can proceed.
+
+ 4. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ 5. Change the `highAvailabilityMode` to the default (AUTO) by commenting it out in `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+
+6. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive).
+
+7. Update the catalog, using the br command:
+
+ 1. Download the br tool (i.e. from the "CLI Download" link in the web-console).
+
+ 2. Login with br: `br login http://localhost:8081 <user> <password>`.
+
+ 3. Update the catalog: `br catalog add /opt/brooklyn/catalog/catalog.bom`.
+
+</div>
+</div>
+
+### Upgrade from Apache Brooklyn 0.11.0 and below
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. Stop Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep brooklyn`), then use `sudo kill <JAVA_PID>`.
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `/opt/brooklyn/.brooklyn/`..
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Delete the existing Apache Brooklyn install:
+
+ 1. Remove Brooklyn package:
+
+ # CentOS / RHEL
+ sudo yum erase apache-brooklyn
+
+ # Ubuntu / Debian
+ sudo dpkg -r apache-brooklyn
+
+ 2. On CentOS 7 run `sudo systemctl daemon-reload`.
+
+ 3. Confirm that Brooklyn is definitely not running (see step 1 above).
+
+ 4. Delete the Brooklyn install directory: `sudo rm -r /opt/brooklyn`.
--- End diff --
Good catch, will amend
---
[GitHub] brooklyn-docs issue #212: Add update instructions for RPM/DEB and bin distri...
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on the issue:
https://github.com/apache/brooklyn-docs/pull/212
I added the links for the DEB package on the download pages. This is subject to our ability of building the DEB and RPM package for snapshot though /cc @richardcloudsoft
---
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/212#discussion_r140804115
--- Diff: guide/ops/upgrade.md ---
@@ -0,0 +1,356 @@
+---
+title: Upgrade
+layout: website-normal
+---
+
+This guide provides all necessary information to upgrade Apache Brooklyn for both the RPM/DEB and Tarball packages.
+
+## Backwards Compatibility
+
+Apache Brooklyn version 0.12.0 onward runs primarily inside a Karaf container. When upgrading from 0.11.0 or below,
+this update changes the mechanisms for launching Brooklyn.
+This will impact any custom scripting around the launching of Brooklyn, and the supplying of command line arguments.
+
+Use of the `lib/dropins` and `lib/patch` folders will no longer work (because Karaf does not support that kind of classloading).
+Instead, code must be built and installed as [OSGi bundles](https://en.wikipedia.org/wiki/OSGi#Bundles).
+
+## Upgrading
+
+* Use of RPM and DEB is now recommended where possible, rather than the tar.gz. This entirely replaces the previous install.
+
+* CentOS 7.x is recommended over CentOS 6.x (note: the RPM **will not work** on CentOS 6.x)
+
+### Upgrade from Apache Brooklyn 0.12.0 onward
+
+{::options parse_block_html="true" /}
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. **Important!** Backup persisted state and custom configuration, in case you need to rollback to a previous version.
+
+ 1. By default, persisted state is located at `/var/lib/brooklyn`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `/etc/brooklyn/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `/var/log/brooklyn/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `/etc/brooklyn`.
+
+2. Upgrade Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package
+
+ 2. Upgrade Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum upgrade apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ If there are conflicts in configuration files (located in `/etc/brooklyn`), the upgrade will behave differently based
+ on the package you are using:
+
+ * RPM: the upgrade will keep the previously installed one and save the new version, with the suffix `.rpmsave`.
+ You will then need to check and manually resolve those.
+ * DEB: the upgrade will ask you what to do.
+
+3. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive)
+
+</div>
+
+<div id="impl-2" class="tab-pane fade">
+
+1. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep karaf`), then use `sudo kill <JAVA_PID>`
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `~/.brooklyn/brooklyn-persisted-state`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new tarball zip package.
+
+ 2. Install Brooklyn:
+
+ tar -zxf apache-brooklyn-xxxx.tar.gz
+ cd apache-brooklyn-xxxx
+
+4. Restore any changes to the configuration files (see step 2).
+
+5. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
+ If you do not have such errors you can proceed.
+
+ 4. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ 5. Change the `highAvailabilityMode` to the default (AUTO) by commenting it out in `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+
+6. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive).
+
+7. Update the catalog, using the br command:
+
+ 1. Download the br tool (i.e. from the "CLI Download" link in the web-console).
+
+ 2. Login with br: `br login http://localhost:8081 <user> <password>`.
+
+ 3. Update the catalog: `br catalog add /opt/brooklyn/catalog/catalog.bom`.
+
+</div>
+</div>
+
+### Upgrade from Apache Brooklyn 0.11.0 and below
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. Stop Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep brooklyn`), then use `sudo kill <JAVA_PID>`.
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `/opt/brooklyn/.brooklyn/`..
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Delete the existing Apache Brooklyn install:
+
+ 1. Remove Brooklyn package:
+
+ # CentOS / RHEL
+ sudo yum erase apache-brooklyn
+
+ # Ubuntu / Debian
+ sudo dpkg -r apache-brooklyn
+
+ 2. On CentOS 7 run `sudo systemctl daemon-reload`.
+
+ 3. Confirm that Brooklyn is definitely not running (see step 1 above).
+
+ 4. Delete the Brooklyn install directory: `sudo rm -r /opt/brooklyn`.
+
+4. Make sure you have Java 8.
+ By default CentOS images come with JRE6 which is incompatible version for Brooklyn.
+ If CentOS is prior to 6.8 upgrade nss: `yum -y upgrade nss`
+
+5. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package.
+
+ 2. Install Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum install apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ 3. Wait for Brooklyn to be fully started (i.e. its web-console to be responsive).
+
+6. Restore the persisted state and configuration.
+
+ 1. Stop the Brooklyn service:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS 6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ Confirm that Brooklyn is no longer running (see step 1).
+
+ 2. Restore the persisted state directory into `/var/lib/brooklyn` and any changes to the configuration files (see step 2).
+ Ensure owner/permissions are correct for the persisted state directory, e.g.:
+ `sudo chown -r brooklyn:brooklyn /var/lib/brooklyn`
+
+7. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
--- End diff --
I'd use `sudo grep -E "Rebind|WARN|ERROR" /var/log/brooklyn/brooklyn.info.log` (important to include something like "Rebind" so the user sees a message about success, as well as some benign (?) warnings).
---
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/212#discussion_r140802434
--- Diff: guide/ops/upgrade.md ---
@@ -0,0 +1,356 @@
+---
+title: Upgrade
+layout: website-normal
+---
+
+This guide provides all necessary information to upgrade Apache Brooklyn for both the RPM/DEB and Tarball packages.
+
+## Backwards Compatibility
+
+Apache Brooklyn version 0.12.0 onward runs primarily inside a Karaf container. When upgrading from 0.11.0 or below,
+this update changes the mechanisms for launching Brooklyn.
+This will impact any custom scripting around the launching of Brooklyn, and the supplying of command line arguments.
+
+Use of the `lib/dropins` and `lib/patch` folders will no longer work (because Karaf does not support that kind of classloading).
+Instead, code must be built and installed as [OSGi bundles](https://en.wikipedia.org/wiki/OSGi#Bundles).
+
+## Upgrading
+
+* Use of RPM and DEB is now recommended where possible, rather than the tar.gz. This entirely replaces the previous install.
+
+* CentOS 7.x is recommended over CentOS 6.x (note: the RPM **will not work** on CentOS 6.x)
+
+### Upgrade from Apache Brooklyn 0.12.0 onward
+
+{::options parse_block_html="true" /}
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. **Important!** Backup persisted state and custom configuration, in case you need to rollback to a previous version.
+
+ 1. By default, persisted state is located at `/var/lib/brooklyn`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `/etc/brooklyn/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `/var/log/brooklyn/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `/etc/brooklyn`.
+
+2. Upgrade Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package
+
+ 2. Upgrade Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum upgrade apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ If there are conflicts in configuration files (located in `/etc/brooklyn`), the upgrade will behave differently based
+ on the package you are using:
+
+ * RPM: the upgrade will keep the previously installed one and save the new version, with the suffix `.rpmsave`.
+ You will then need to check and manually resolve those.
+ * DEB: the upgrade will ask you what to do.
+
+3. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive)
+
+</div>
+
+<div id="impl-2" class="tab-pane fade">
+
+1. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep karaf`), then use `sudo kill <JAVA_PID>`
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `~/.brooklyn/brooklyn-persisted-state`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new tarball zip package.
+
+ 2. Install Brooklyn:
+
+ tar -zxf apache-brooklyn-xxxx.tar.gz
+ cd apache-brooklyn-xxxx
+
+4. Restore any changes to the configuration files (see step 2).
+
+5. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
+ If you do not have such errors you can proceed.
+
+ 4. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ 5. Change the `highAvailabilityMode` to the default (AUTO) by commenting it out in `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+
+6. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive).
+
+7. Update the catalog, using the br command:
+
+ 1. Download the br tool (i.e. from the "CLI Download" link in the web-console).
+
+ 2. Login with br: `br login http://localhost:8081 <user> <password>`.
+
+ 3. Update the catalog: `br catalog add /opt/brooklyn/catalog/catalog.bom`.
+
+</div>
+</div>
+
+### Upgrade from Apache Brooklyn 0.11.0 and below
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. Stop Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep brooklyn`), then use `sudo kill <JAVA_PID>`.
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `/opt/brooklyn/.brooklyn/`..
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Delete the existing Apache Brooklyn install:
+
+ 1. Remove Brooklyn package:
+
+ # CentOS / RHEL
+ sudo yum erase apache-brooklyn
+
+ # Ubuntu / Debian
+ sudo dpkg -r apache-brooklyn
+
+ 2. On CentOS 7 run `sudo systemctl daemon-reload`.
+
+ 3. Confirm that Brooklyn is definitely not running (see step 1 above).
+
+ 4. Delete the Brooklyn install directory: `sudo rm -r /opt/brooklyn`.
+
+4. Make sure you have Java 8.
+ By default CentOS images come with JRE6 which is incompatible version for Brooklyn.
+ If CentOS is prior to 6.8 upgrade nss: `yum -y upgrade nss`
+
+5. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package.
+
+ 2. Install Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum install apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ 3. Wait for Brooklyn to be fully started (i.e. its web-console to be responsive).
+
+6. Restore the persisted state and configuration.
+
+ 1. Stop the Brooklyn service:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS 6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ Confirm that Brooklyn is no longer running (see step 1).
+
+ 2. Restore the persisted state directory into `/var/lib/brooklyn` and any changes to the configuration files (see step 2).
+ Ensure owner/permissions are correct for the persisted state directory, e.g.:
+ `sudo chown -r brooklyn:brooklyn /var/lib/brooklyn`
+
+7. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
--- End diff --
I'd say "ERROR mesages in the brooklyn log, e.g. ..." (rather than the `./log/...`)
---
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/212#discussion_r140823246
--- Diff: guide/ops/upgrade.md ---
@@ -0,0 +1,356 @@
+---
+title: Upgrade
+layout: website-normal
+---
+
+This guide provides all necessary information to upgrade Apache Brooklyn for both the RPM/DEB and Tarball packages.
+
+## Backwards Compatibility
+
+Apache Brooklyn version 0.12.0 onward runs primarily inside a Karaf container. When upgrading from 0.11.0 or below,
+this update changes the mechanisms for launching Brooklyn.
+This will impact any custom scripting around the launching of Brooklyn, and the supplying of command line arguments.
+
+Use of the `lib/dropins` and `lib/patch` folders will no longer work (because Karaf does not support that kind of classloading).
+Instead, code must be built and installed as [OSGi bundles](https://en.wikipedia.org/wiki/OSGi#Bundles).
+
+## Upgrading
+
+* Use of RPM and DEB is now recommended where possible, rather than the tar.gz. This entirely replaces the previous install.
+
+* CentOS 7.x is recommended over CentOS 6.x (note: the RPM **will not work** on CentOS 6.x)
+
+### Upgrade from Apache Brooklyn 0.12.0 onward
+
+{::options parse_block_html="true" /}
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. **Important!** Backup persisted state and custom configuration, in case you need to rollback to a previous version.
+
+ 1. By default, persisted state is located at `/var/lib/brooklyn`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `/etc/brooklyn/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `/var/log/brooklyn/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `/etc/brooklyn`.
+
+2. Upgrade Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package
+
+ 2. Upgrade Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum upgrade apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ If there are conflicts in configuration files (located in `/etc/brooklyn`), the upgrade will behave differently based
+ on the package you are using:
+
+ * RPM: the upgrade will keep the previously installed one and save the new version, with the suffix `.rpmsave`.
+ You will then need to check and manually resolve those.
+ * DEB: the upgrade will ask you what to do.
+
+3. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive)
+
+</div>
+
+<div id="impl-2" class="tab-pane fade">
+
+1. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep karaf`), then use `sudo kill <JAVA_PID>`
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `~/.brooklyn/brooklyn-persisted-state`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new tarball zip package.
+
+ 2. Install Brooklyn:
+
+ tar -zxf apache-brooklyn-xxxx.tar.gz
+ cd apache-brooklyn-xxxx
+
+4. Restore any changes to the configuration files (see step 2).
+
+5. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
+ If you do not have such errors you can proceed.
+
+ 4. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ 5. Change the `highAvailabilityMode` to the default (AUTO) by commenting it out in `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+
+6. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive).
+
+7. Update the catalog, using the br command:
+
+ 1. Download the br tool (i.e. from the "CLI Download" link in the web-console).
+
+ 2. Login with br: `br login http://localhost:8081 <user> <password>`.
+
+ 3. Update the catalog: `br catalog add /opt/brooklyn/catalog/catalog.bom`.
+
+</div>
+</div>
+
+### Upgrade from Apache Brooklyn 0.11.0 and below
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. Stop Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep brooklyn`), then use `sudo kill <JAVA_PID>`.
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `/opt/brooklyn/.brooklyn/`..
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Delete the existing Apache Brooklyn install:
+
+ 1. Remove Brooklyn package:
+
+ # CentOS / RHEL
+ sudo yum erase apache-brooklyn
+
+ # Ubuntu / Debian
+ sudo dpkg -r apache-brooklyn
+
+ 2. On CentOS 7 run `sudo systemctl daemon-reload`.
+
+ 3. Confirm that Brooklyn is definitely not running (see step 1 above).
+
+ 4. Delete the Brooklyn install directory: `sudo rm -r /opt/brooklyn`.
+
+4. Make sure you have Java 8.
+ By default CentOS images come with JRE6 which is incompatible version for Brooklyn.
+ If CentOS is prior to 6.8 upgrade nss: `yum -y upgrade nss`
+
+5. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package.
+
+ 2. Install Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum install apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ 3. Wait for Brooklyn to be fully started (i.e. its web-console to be responsive).
+
+6. Restore the persisted state and configuration.
+
+ 1. Stop the Brooklyn service:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS 6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ Confirm that Brooklyn is no longer running (see step 1).
+
+ 2. Restore the persisted state directory into `/var/lib/brooklyn` and any changes to the configuration files (see step 2).
+ Ensure owner/permissions are correct for the persisted state directory, e.g.:
+ `sudo chown -r brooklyn:brooklyn /var/lib/brooklyn`
+
+7. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
--- End diff --
Indeed, will amend
---
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/212#discussion_r140767511
--- Diff: guide/ops/upgrade.md ---
@@ -0,0 +1,356 @@
+---
+title: Upgrade
+layout: website-normal
+---
+
+This guide provides all necessary information to upgrade Apache Brooklyn for both the RPM/DEB and Tarball packages.
+
+## Backwards Compatibility
+
+Apache Brooklyn version 0.12.0 onward runs primarily inside a Karaf container. When upgrading from 0.11.0 or below,
+this update changes the mechanisms for launching Brooklyn.
+This will impact any custom scripting around the launching of Brooklyn, and the supplying of command line arguments.
+
+Use of the `lib/dropins` and `lib/patch` folders will no longer work (because Karaf does not support that kind of classloading).
+Instead, code must be built and installed as [OSGi bundles](https://en.wikipedia.org/wiki/OSGi#Bundles).
+
+## Upgrading
+
+* Use of RPM and DEB is now recommended where possible, rather than the tar.gz. This entirely replaces the previous install.
+
+* CentOS 7.x is recommended over CentOS 6.x (note: the RPM **will not work** on CentOS 6.x)
+
+### Upgrade from Apache Brooklyn 0.12.0 onward
+
+{::options parse_block_html="true" /}
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. **Important!** Backup persisted state and custom configuration, in case you need to rollback to a previous version.
+
+ 1. By default, persisted state is located at `/var/lib/brooklyn`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `/etc/brooklyn/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `/var/log/brooklyn/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `/etc/brooklyn`.
+
+2. Upgrade Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package
+
+ 2. Upgrade Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum upgrade apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ If there are conflicts in configuration files (located in `/etc/brooklyn`), the upgrade will behave differently based
+ on the package you are using:
+
+ * RPM: the upgrade will keep the previously installed one and save the new version, with the suffix `.rpmsave`.
+ You will then need to check and manually resolve those.
+ * DEB: the upgrade will ask you what to do.
+
+3. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive)
+
+</div>
+
+<div id="impl-2" class="tab-pane fade">
+
+1. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep karaf`), then use `sudo kill <JAVA_PID>`
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `~/.brooklyn/brooklyn-persisted-state`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new tarball zip package.
+
+ 2. Install Brooklyn:
+
+ tar -zxf apache-brooklyn-xxxx.tar.gz
+ cd apache-brooklyn-xxxx
+
+4. Restore any changes to the configuration files (see step 2).
+
+5. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
+ If you do not have such errors you can proceed.
+
+ 4. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ 5. Change the `highAvailabilityMode` to the default (AUTO) by commenting it out in `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+
+6. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive).
+
+7. Update the catalog, using the br command:
+
+ 1. Download the br tool (i.e. from the "CLI Download" link in the web-console).
+
+ 2. Login with br: `br login http://localhost:8081 <user> <password>`.
+
+ 3. Update the catalog: `br catalog add /opt/brooklyn/catalog/catalog.bom`.
+
+</div>
+</div>
+
+### Upgrade from Apache Brooklyn 0.11.0 and below
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. Stop Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep brooklyn`), then use `sudo kill <JAVA_PID>`.
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `/opt/brooklyn/.brooklyn/`..
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Delete the existing Apache Brooklyn install:
+
+ 1. Remove Brooklyn package:
+
+ # CentOS / RHEL
+ sudo yum erase apache-brooklyn
+
+ # Ubuntu / Debian
+ sudo dpkg -r apache-brooklyn
+
+ 2. On CentOS 7 run `sudo systemctl daemon-reload`.
+
+ 3. Confirm that Brooklyn is definitely not running (see step 1 above).
+
+ 4. Delete the Brooklyn install directory: `sudo rm -r /opt/brooklyn`.
+
+4. Make sure you have Java 8.
+ By default CentOS images come with JRE6 which is incompatible version for Brooklyn.
+ If CentOS is prior to 6.8 upgrade nss: `yum -y upgrade nss`
+
+5. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package.
+
+ 2. Install Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum install apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ 3. Wait for Brooklyn to be fully started (i.e. its web-console to be responsive).
--- End diff --
For me, brooklyn process wasn't running. Do you definitely expect it to auto-start on rpm install?
---
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/brooklyn-docs/pull/212
---
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/212#discussion_r140824045
--- Diff: guide/ops/upgrade.md ---
@@ -0,0 +1,356 @@
+---
+title: Upgrade
+layout: website-normal
+---
+
+This guide provides all necessary information to upgrade Apache Brooklyn for both the RPM/DEB and Tarball packages.
+
+## Backwards Compatibility
+
+Apache Brooklyn version 0.12.0 onward runs primarily inside a Karaf container. When upgrading from 0.11.0 or below,
+this update changes the mechanisms for launching Brooklyn.
+This will impact any custom scripting around the launching of Brooklyn, and the supplying of command line arguments.
+
+Use of the `lib/dropins` and `lib/patch` folders will no longer work (because Karaf does not support that kind of classloading).
+Instead, code must be built and installed as [OSGi bundles](https://en.wikipedia.org/wiki/OSGi#Bundles).
+
+## Upgrading
+
+* Use of RPM and DEB is now recommended where possible, rather than the tar.gz. This entirely replaces the previous install.
+
+* CentOS 7.x is recommended over CentOS 6.x (note: the RPM **will not work** on CentOS 6.x)
+
+### Upgrade from Apache Brooklyn 0.12.0 onward
+
+{::options parse_block_html="true" /}
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. **Important!** Backup persisted state and custom configuration, in case you need to rollback to a previous version.
+
+ 1. By default, persisted state is located at `/var/lib/brooklyn`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `/etc/brooklyn/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `/var/log/brooklyn/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `/etc/brooklyn`.
+
+2. Upgrade Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package
+
+ 2. Upgrade Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum upgrade apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ If there are conflicts in configuration files (located in `/etc/brooklyn`), the upgrade will behave differently based
+ on the package you are using:
+
+ * RPM: the upgrade will keep the previously installed one and save the new version, with the suffix `.rpmsave`.
+ You will then need to check and manually resolve those.
+ * DEB: the upgrade will ask you what to do.
+
+3. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive)
+
+</div>
+
+<div id="impl-2" class="tab-pane fade">
+
+1. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep karaf`), then use `sudo kill <JAVA_PID>`
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `~/.brooklyn/brooklyn-persisted-state`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new tarball zip package.
+
+ 2. Install Brooklyn:
+
+ tar -zxf apache-brooklyn-xxxx.tar.gz
+ cd apache-brooklyn-xxxx
+
+4. Restore any changes to the configuration files (see step 2).
+
+5. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
+ If you do not have such errors you can proceed.
+
+ 4. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ 5. Change the `highAvailabilityMode` to the default (AUTO) by commenting it out in `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+
+6. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive).
+
+7. Update the catalog, using the br command:
+
+ 1. Download the br tool (i.e. from the "CLI Download" link in the web-console).
+
+ 2. Login with br: `br login http://localhost:8081 <user> <password>`.
+
+ 3. Update the catalog: `br catalog add /opt/brooklyn/catalog/catalog.bom`.
+
+</div>
+</div>
+
+### Upgrade from Apache Brooklyn 0.11.0 and below
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. Stop Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep brooklyn`), then use `sudo kill <JAVA_PID>`.
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `/opt/brooklyn/.brooklyn/`..
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Delete the existing Apache Brooklyn install:
+
+ 1. Remove Brooklyn package:
+
+ # CentOS / RHEL
+ sudo yum erase apache-brooklyn
+
+ # Ubuntu / Debian
+ sudo dpkg -r apache-brooklyn
+
+ 2. On CentOS 7 run `sudo systemctl daemon-reload`.
+
+ 3. Confirm that Brooklyn is definitely not running (see step 1 above).
+
+ 4. Delete the Brooklyn install directory: `sudo rm -r /opt/brooklyn`.
+
+4. Make sure you have Java 8.
+ By default CentOS images come with JRE6 which is incompatible version for Brooklyn.
+ If CentOS is prior to 6.8 upgrade nss: `yum -y upgrade nss`
+
+5. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package.
+
+ 2. Install Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum install apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ 3. Wait for Brooklyn to be fully started (i.e. its web-console to be responsive).
+
+6. Restore the persisted state and configuration.
+
+ 1. Stop the Brooklyn service:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS 6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ Confirm that Brooklyn is no longer running (see step 1).
+
+ 2. Restore the persisted state directory into `/var/lib/brooklyn` and any changes to the configuration files (see step 2).
+ Ensure owner/permissions are correct for the persisted state directory, e.g.:
+ `sudo chown -r brooklyn:brooklyn /var/lib/brooklyn`
+
+7. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
--- End diff --
Make sense @aledsage, will update
---
[GitHub] brooklyn-docs pull request #212: Add update instructions for RPM/DEB and bin...
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/212#discussion_r140823147
--- Diff: guide/ops/upgrade.md ---
@@ -0,0 +1,356 @@
+---
+title: Upgrade
+layout: website-normal
+---
+
+This guide provides all necessary information to upgrade Apache Brooklyn for both the RPM/DEB and Tarball packages.
+
+## Backwards Compatibility
+
+Apache Brooklyn version 0.12.0 onward runs primarily inside a Karaf container. When upgrading from 0.11.0 or below,
+this update changes the mechanisms for launching Brooklyn.
+This will impact any custom scripting around the launching of Brooklyn, and the supplying of command line arguments.
+
+Use of the `lib/dropins` and `lib/patch` folders will no longer work (because Karaf does not support that kind of classloading).
+Instead, code must be built and installed as [OSGi bundles](https://en.wikipedia.org/wiki/OSGi#Bundles).
+
+## Upgrading
+
+* Use of RPM and DEB is now recommended where possible, rather than the tar.gz. This entirely replaces the previous install.
+
+* CentOS 7.x is recommended over CentOS 6.x (note: the RPM **will not work** on CentOS 6.x)
+
+### Upgrade from Apache Brooklyn 0.12.0 onward
+
+{::options parse_block_html="true" /}
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. **Important!** Backup persisted state and custom configuration, in case you need to rollback to a previous version.
+
+ 1. By default, persisted state is located at `/var/lib/brooklyn`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `/etc/brooklyn/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `/var/log/brooklyn/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `/etc/brooklyn`.
+
+2. Upgrade Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package
+
+ 2. Upgrade Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum upgrade apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ If there are conflicts in configuration files (located in `/etc/brooklyn`), the upgrade will behave differently based
+ on the package you are using:
+
+ * RPM: the upgrade will keep the previously installed one and save the new version, with the suffix `.rpmsave`.
+ You will then need to check and manually resolve those.
+ * DEB: the upgrade will ask you what to do.
+
+3. Start Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl start brooklyn
+ # CentOS 6 and older
+ sudo initctl start brooklyn
+
+ # Ubuntu / Debian
+ start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive)
+
+</div>
+
+<div id="impl-2" class="tab-pane fade">
+
+1. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep karaf`), then use `sudo kill <JAVA_PID>`
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `~/.brooklyn/brooklyn-persisted-state`.
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new tarball zip package.
+
+ 2. Install Brooklyn:
+
+ tar -zxf apache-brooklyn-xxxx.tar.gz
+ cd apache-brooklyn-xxxx
+
+4. Restore any changes to the configuration files (see step 2).
+
+5. Validate that the new release works, by starting in "HOT_BACKUP" mode.
+
+ 1. Before starting Brooklyn, reconfigure `./etc/org.apache.brooklyn.osgilauncher.cfg` and set `highAvailabilityMode=HOT_BACKUP`.
+ This way when Brooklyn is started, it will only read and validate the persisted state and will not write into it.
+
+ 2. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ 3. Check whether you have rebind ERROR messages in `./log/brooklyn.info.log`, e.g. `sudo grep -E "WARN|ERROR" /opt/brooklyn/log/brooklyn.debug.log`.
+ If you do not have such errors you can proceed.
+
+ 4. Stop Apache Brooklyn:
+
+ ./bin/stop brooklyn
+
+ 5. Change the `highAvailabilityMode` to the default (AUTO) by commenting it out in `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+
+6. Start Apache Brooklyn:
+
+ ./bin/start brooklyn
+
+ Wait for Brooklyn to be running (i.e. its web-console is responsive).
+
+7. Update the catalog, using the br command:
+
+ 1. Download the br tool (i.e. from the "CLI Download" link in the web-console).
+
+ 2. Login with br: `br login http://localhost:8081 <user> <password>`.
+
+ 3. Update the catalog: `br catalog add /opt/brooklyn/catalog/catalog.bom`.
+
+</div>
+</div>
+
+### Upgrade from Apache Brooklyn 0.11.0 and below
+
+<ul class="nav nav-tabs">
+ <li class="active impl-1-tab"><a data-target="#impl-1, .impl-1-tab" data-toggle="tab" href="#">RPM / DEB Packages</a></li>
+ <li class="impl-2-tab"><a data-target="#impl-2, .impl-2-tab" data-toggle="tab" href="#">Tarball</a></li>
+</ul>
+
+<div class="tab-content">
+<div id="impl-1" class="tab-pane fade in active">
+
+1. Stop Apache Brooklyn:
+
+ # CentOS 7 / RHEL
+ sudo systemctl stop brooklyn
+ # CentOS6 and older
+ sudo initctl stop brooklyn
+
+ # Ubuntu / Debian
+ stop brooklyn
+
+ If this does not stop it within a few seconds (as checked with `sudo ps aux | grep brooklyn`), then use `sudo kill <JAVA_PID>`.
+
+2. **Important!** Backup persisted state and custom configuration.
+
+ 1. By default, persisted state is located at `/opt/brooklyn/.brooklyn/`..
+ The `persistenceDir` and `persistenceLocation` are configured in the file `./etc/org.apache.brooklyn.osgilauncher.cfg`.
+ The persistence details will be logged in `./log/brooklyn.info.log` at startup time.
+
+ 2. Configuration files are in `./etc/`.
+ Any changes to these configuration files will need to be re-applied after reinstalling Brooklyn.
+
+3. Delete the existing Apache Brooklyn install:
+
+ 1. Remove Brooklyn package:
+
+ # CentOS / RHEL
+ sudo yum erase apache-brooklyn
+
+ # Ubuntu / Debian
+ sudo dpkg -r apache-brooklyn
+
+ 2. On CentOS 7 run `sudo systemctl daemon-reload`.
+
+ 3. Confirm that Brooklyn is definitely not running (see step 1 above).
+
+ 4. Delete the Brooklyn install directory: `sudo rm -r /opt/brooklyn`.
+
+4. Make sure you have Java 8.
+ By default CentOS images come with JRE6 which is incompatible version for Brooklyn.
+ If CentOS is prior to 6.8 upgrade nss: `yum -y upgrade nss`
+
+5. Install new version of Apache Brooklyn:
+
+ 1. [Download](../misc/download.html) the new RPM/DEB package.
+
+ 2. Install Apache Brooklyn:
+
+ # CentOS / RHEL
+ sudo yum install apache-brooklyn-xxxx.noarch.rpm
+
+ # Ubuntu / Debian
+ sudo dpkg -i apache-brooklyn-xxxx.all.deb
+
+ 3. Wait for Brooklyn to be fully started (i.e. its web-console to be responsive).
--- End diff --
Brooklyn does not start automatically, I'm missing a step here. Thanks @aledsage
---