brooklyn-dev mailing list archives

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

    https://github.com/apache/incubator-brooklyn/pull/399#discussion_r21932043
  
    --- 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 --
    
    Yes, it will. But note the `@SetFromFlag` stuff for short-form config won't work in inherited
config; it's got to be the long form full name of the config key.


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