GitHub user tbouron opened a pull request:
https://github.com/apache/brooklyn-dist/pull/104
WIP - Improve RPM/DEB packages
The aim of this PR is to:
1. use Karaf launcher
2. improve the package to to handle properly installations and upgrades
This is spirit, this does change a couple of things:
- Install each version of Brooklyn into its own folder
`/opt/brooklyn-<version>`. This means that all data and binaries are kept so a
rollback will be easy.
- symlink `/opt/brooklyn` to `/opt/brooklyn-<version>` currently
installing/upgrading.
- configuration files are now installed under `/etc/brooklyn`. Upon update,
conflicts will be handled differently:
- for RPM, if a file has been edited and the new version is different that
the base old version, the user edited version will be kept as-is and the new
version will be written at `<filename>.rpmnew`. Otherwise, the new version is
applied. This will be reported in the console when doing the `yum update
<package.rpm>`.
- for DEB, the `dpkg` tool will ask the user what to do.
- log files are stored in `/opt/brooklyn-<version>/data/log` as this is
best-practice (and will allow us to use decanter out of the box \o/). A symlink
from `/var/log/brooklyn` to this directory is also created.
- the `brooklyn` service **is not started automatically**.
- home directory of the amp user uses the default given by the OS.
- persistence is on by default and data are written on `/var/lib/brooklyn`.
- admin credential are setup by default to `admin`:`password`. This is
ensure a nice experience for first time user, out of the box, rather than going
through all the logs to find out the autogenerated password.
This has been tested with the [following
tests](https://github.com/apache/brooklyn-dist/tree/master/shared-packaging/src/test/yaml).
But, **there is still an issue with the DEB package to fix**
|Package|`systemd`|`upstart`|
|---|:---:|:---:|
|DEB|â
|â|
|RPM|â
|â
|
They all work **except DEB package with upstart**
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tbouron/brooklyn-dist feature/improve-rpm-deb
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-dist/pull/104.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 #104
----
commit 1eb9be8e44f2416df8f45438c780a806d149fb83
Author: Thomas Bouron <[email protected]>
Date: 2017-09-06T10:18:08Z
Extracting catalog item into their own file
commit 34b00f3e74d60255bdc47f8d0e37317fb72ecd65
Author: Thomas Bouron <[email protected]>
Date: 2017-09-06T13:59:22Z
WIP - Improve RPM package (Currently service "launch" ok but brooklyn is
not started)
commit 3de6996f4024b7bf7567576c9919734aea3db7df
Author: Thomas Bouron <[email protected]>
Date: 2017-09-07T16:09:02Z
Improve RPM package
commit c406974606817dfbc43f772e7a3a10cc16554a5e
Author: Thomas Bouron <[email protected]>
Date: 2017-09-08T14:47:06Z
Improve DEB package
----
---