Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7CE11200C73 for ; Wed, 10 May 2017 11:52:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7AA49160BC6; Wed, 10 May 2017 09:52:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C8A04160BA8 for ; Wed, 10 May 2017 11:52:01 +0200 (CEST) Received: (qmail 29560 invoked by uid 500); 10 May 2017 09:52:01 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 29538 invoked by uid 99); 10 May 2017 09:52:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 May 2017 09:52:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 98ABDDFD70; Wed, 10 May 2017 09:52:00 +0000 (UTC) From: nakomis To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-docs pull request #180: Update bundle upload Content-Type: text/plain Message-Id: <20170510095200.98ABDDFD70@git1-us-west.apache.org> Date: Wed, 10 May 2017 09:52:00 +0000 (UTC) archived-at: Wed, 10 May 2017 09:52:02 -0000 Github user nakomis commented on a diff in the pull request: https://github.com/apache/brooklyn-docs/pull/180#discussion_r115697661 --- Diff: guide/blueprints/catalog/index.md --- @@ -375,153 +375,120 @@ the latest non-snapshot version will be loaded when an entity is instantiated. ### Bundling Catalog Resources -When deploying a blueprint, it is possible to deploy it as an OSGI bundle with additional resources scoped -to this bundle. This is particularly useful when, for example, deploying a Tomcat server with a `.war` file -which is deployed using a classpath path such as `classpath://mywar.war`. +It is possible to add an OSGi bundle to AMP. This is useful when you have a blueprint that needs to reference external scripts/resources or when you have multiple blueprints that you want to keep in sync. Brooklyn will persist any uploaded bundles so that they are available after a restart, or a HA failover. -In this example, we will create a simple `server` catalog item, bundled with a simple text file. +In this example, we will create a simple `my-server` catalog item, bundled with a simple script. The script will be run when launching the server. -First, create the text file with some sample contents: +First, create a folder called bundleFolder, then add a file called myfile.sh to it. +The contents of myfile.sh should be as follows: ~~~ bash -echo Hello, World! > myfile.txt +echo Hello, World! ~~~ -Now create a file called `catalog.bom` with the following contents: +Now create a file in bundleFolder called `catalog.bom` with the following contents: ~~~ yaml brooklyn.catalog: - bundle: script-server + bundle: MyServerBundle version: 1.0.0 - items: - - id: script-server - itemType: entity - item: - type: server - brooklyn.config: - files.runtime: - classpath://myfile.txt: files/myfile.txt + item: --- End diff -- The [catalog docs](http://brooklyn.apache.org/v/latest/ops/catalog/index.html) use the following format rather than the shortcut format which excludes `items:` ``` items: id: foo item: type: bar ``` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---