Repository: brooklyn-dist Updated Branches: refs/heads/master d22a71e2c -> 38b85117f
Make vagrant work for Karaf Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/f422015c Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/f422015c Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/f422015c Branch: refs/heads/master Commit: f422015cf70bbe51fb8911f1306982fb4d0e5860 Parents: d22a71e Author: Duncan Godwin <[email protected]> Authored: Fri Sep 15 17:15:31 2017 +0100 Committer: Duncan Godwin <[email protected]> Committed: Mon Sep 18 11:31:44 2017 +0100 ---------------------------------------------------------------------- vagrant/src/main/vagrant/README.md | 6 +++--- vagrant/src/main/vagrant/files/brooklyn.service | 20 +++++++++++++------- .../src/main/vagrant/files/install_brooklyn.sh | 16 ++++++++-------- 3 files changed, 24 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/f422015c/vagrant/src/main/vagrant/README.md ---------------------------------------------------------------------- diff --git a/vagrant/src/main/vagrant/README.md b/vagrant/src/main/vagrant/README.md index fb9e2fe..add8b2a 100644 --- a/vagrant/src/main/vagrant/README.md +++ b/vagrant/src/main/vagrant/README.md @@ -30,12 +30,12 @@ ``` -3. Copy your locally built `-dist.tar.gz` archive to the same directory as the Vagrantfile (this directory is mounted in the Vagrant VM at `/vagrant/`). +3. Copy your locally built `apache-brooklyn-<version>.tar.gz` archive to the same directory as the Vagrantfile (this directory is mounted in the Vagrant VM at `/vagrant/`). - For example to copy a locally built `0.9.0-SNAPSHOT` dist: + For example to copy a locally built `0.12.0-SNAPSHOT` dist: ``` - cp ~/.m2/repository/org/apache/brooklyn/brooklyn-dist/0.9.0-SNAPSHOT/brooklyn-dist-0.9.0-SNAPSHOT-dist.tar.gz . + cp ~/.m2/repository/org/apache/brooklyn/apache-brooklyn/0.12.0-SNAPSHOT/apache-brooklyn-0.12.0-SNAPSHOT.tar.gz . ``` 4. You may proceed to use the `Vagrantfile` as normal; `vagrant up`, `vagrant destroy` etc. http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/f422015c/vagrant/src/main/vagrant/files/brooklyn.service ---------------------------------------------------------------------- diff --git a/vagrant/src/main/vagrant/files/brooklyn.service b/vagrant/src/main/vagrant/files/brooklyn.service index 28b0fea..8a844e6 100644 --- a/vagrant/src/main/vagrant/files/brooklyn.service +++ b/vagrant/src/main/vagrant/files/brooklyn.service @@ -16,17 +16,23 @@ # specific language governing permissions and limitations # under the License. # - [Unit] -Description=Apache Brooklyn service -Documentation=http://brooklyn.apache.org/documentation/index.html +Description=Apache Brooklyn Service +Documentation=https://brooklyn.apache.org/documentation/index.html [Service] -ExecStart=/home/vagrant/apache-brooklyn/bin/brooklyn launch --persist auto --persistenceDir /vagrant/brooklyn-persisted-state --catalogAdd /vagrant/files/vagrant-catalog.bom -WorkingDirectory=/home/vagrant/apache-brooklyn -Restart=on-abort +Type=simple +WorkingDirectory=/home/vagrant/apache-brooklyn/ +Environment="EXTRA_JAVA_OPTS=-Dbrooklyn.location.localhost.address=127.0.0.1 -XX:SoftRefLRUPolicyMSPerMB=1 -Xms256m -Xmx2g" +Environment="KARAF_HOME=/home/vagrant/apache-brooklyn/" +Environment="KARAF_ETC=/home/vagrant/apache-brooklyn/etc/" +Environment="KARAF_REDIRECT=/dev/null" +Environment="BROOKLYN_PERSISTENCE_DIR=/vagrant/brooklyn-persisted-state" +ExecStart=/home/vagrant/apache-brooklyn/bin/karaf server >> "$KARAF_REDIRECT" 2>&1 +Restart=always User=vagrant Group=vagrant +UMask=0066 [Install] -WantedBy=multi-user.target +WantedBy=multi-user.target \ No newline at end of file http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/f422015c/vagrant/src/main/vagrant/files/install_brooklyn.sh ---------------------------------------------------------------------- diff --git a/vagrant/src/main/vagrant/files/install_brooklyn.sh b/vagrant/src/main/vagrant/files/install_brooklyn.sh index b5e4d8b..00d5562 100755 --- a/vagrant/src/main/vagrant/files/install_brooklyn.sh +++ b/vagrant/src/main/vagrant/files/install_brooklyn.sh @@ -49,21 +49,21 @@ if [ ! "${INSTALL_FROM_LOCAL_DIST}" == "true" ]; then if [ ! -z "${BROOKLYN_VERSION##*-SNAPSHOT}" ] ; then # url for official release versions BROOKLYN_URL="https://www.apache.org/dyn/closer.lua?action=download&filename=brooklyn/apache-brooklyn-${BROOKLYN_VERSION}/apache-brooklyn-${BROOKLYN_VERSION}-bin.tar.gz" - BROOKLYN_DIR="apache-brooklyn-${BROOKLYN_VERSION}-bin" + BROOKLYN_DIR="apache-brooklyn-${BROOKLYN_VERSION}" else # url for community-managed snapshots - BROOKLYN_URL="https://repository.apache.org/service/local/artifact/maven/redirect?r=snapshots&g=org.apache.brooklyn&a=brooklyn-dist&v=${BROOKLYN_VERSION}&c=dist&e=tar.gz" - BROOKLYN_DIR="brooklyn-dist-${BROOKLYN_VERSION}" + BROOKLYN_URL="https://repository.apache.org/service/local/artifact/maven/redirect?r=snapshots&g=org.apache.brooklyn&a=apache-brooklyn&v=${BROOKLYN_VERSION}&e=tar.gz" + BROOKLYN_DIR="apache-brooklyn-${BROOKLYN_VERSION}" fi else - echo "Installing from a local -dist archive [ /vagrant/brooklyn-dist-${BROOKLYN_VERSION}-dist.tar.gz]" + echo "Installing from a local -dist archive [ /vagrant/apache-brooklyn-${BROOKLYN_VERSION}.tar.gz]" # url to install from mounted /vagrant dir - BROOKLYN_URL="file:///vagrant/brooklyn-dist-${BROOKLYN_VERSION}-dist.tar.gz" - BROOKLYN_DIR="brooklyn-dist-${BROOKLYN_VERSION}" + BROOKLYN_URL="file:///vagrant/apache-brooklyn-${BROOKLYN_VERSION}.tar.gz" + BROOKLYN_DIR="apache-brooklyn-${BROOKLYN_VERSION}" # ensure local file exists - if [ ! -f /vagrant/brooklyn-dist-${BROOKLYN_VERSION}-dist.tar.gz ]; then - echo "Error: file not found /vagrant/brooklyn-dist-${BROOKLYN_VERSION}-dist.tar.gz" + if [ ! -f /vagrant/apache-brooklyn-${BROOKLYN_VERSION}.tar.gz ]; then + echo "Error: file not found /vagrant/apache-brooklyn-${BROOKLYN_VERSION}.tar.gz" exit 1 fi fi
