brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Adds basic instructions for addin...
Date Tue, 16 Dec 2014 16:50:44 GMT
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/399#discussion_r21912517
  
    --- Diff: docs/use/guide/defining-applications/catalog-maintenance.md ---
    @@ -0,0 +1,97 @@
    +---
    +title: Catalog Maintenance
    +layout: page
    +toc: ../guide_toc.json
    +categories: [use, guide, catalog-maintenance]
    +---
    +
    +In addition to deploying [YAML blueprints](creating-yaml.md) directly through the web
console, it is possible
    +to add YAML blueprints to the catalog, which can then be deployed by selecting them from
the 'Catalog' section of
    +the 'Create Application' dialog.
    +
    +In order to add a YAML blueprint to the catalog, the root entity must ultimately extend
`brooklyn.entity.Application`,
    +and the blueprint must contain a `brooklyn.catalog` section. Once this has been done,
we can add the blueprint to the
    +catalog via Brooklyn's REST API.
    +
    +Let's take the following YAML as a starting point:
    +
    +```
    +name: MySQL Database
    +
    +location: localhost
    +
    +services:
    +- type: brooklyn.entity.database.mysql.MySqlNode
    +  brooklyn.config:
    +    datastore.creation.script.url: classpath://visitors-creation-script.sql
    +```
    +
    +The first thing we need to do is add a root element that extends `brooklyn.entity.Application`.
As we don't require any
    +custom application-specific logic, we can use the `brooklyn.entity.basic.BasicApplication`
class. We can then add our
    +MySqlNode as a child of the BasicApplication. When deploying a YAML blueprint via the
YAML page of the 'Add Application'
    +modal, Brooklyn will do this automatically, however, in order to add our blueprint to
the catalog, we will need to this
    +manually as follows:
    +
    +```
    +name: MySQL Database
    +
    +location: localhost
    +
    +services:
    +- type: brooklyn.entity.basic.BasicApplication
    --- End diff --
    
    This is the correct workaround to show a non-app entity in the Create App wizard, but
note that it will not allow the node to be configured. The configuration will be applied to
the BasicApplication entity. Or thinking about it further the config inheritance will kick
in and the MySqlNode will be configured correctly?


---
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.
---

Mime
View raw message