brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbou...@apache.org
Subject [06/10] brooklyn-docs git commit: Extract Entity Config example to YAML file
Date Thu, 30 Aug 2018 12:19:51 GMT
Extract Entity Config example to YAML file

Added a name for the deployed application.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/46fc3814
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/46fc3814
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/46fc3814

Branch: refs/heads/master
Commit: 46fc3814dcb634ebd34afd298554feae33c15309
Parents: 845339d
Author: Paul Campbell <paul.campbell@cloudsoft.io>
Authored: Fri Aug 24 13:59:40 2018 +0100
Committer: Paul Campbell <paul.campbell@cloudsoft.io>
Committed: Fri Aug 24 14:30:38 2018 +0100

----------------------------------------------------------------------
 guide/blueprints/entity-configuration.md        | 28 ++------------------
 .../example_yaml/entity-config-app.yaml         |  4 +++
 .../example_yaml/entity-config-catalog.yaml     | 19 +++++++++++++
 3 files changed, 25 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/46fc3814/guide/blueprints/entity-configuration.md
----------------------------------------------------------------------
diff --git a/guide/blueprints/entity-configuration.md b/guide/blueprints/entity-configuration.md
index 9b5dd2a..cefea27 100644
--- a/guide/blueprints/entity-configuration.md
+++ b/guide/blueprints/entity-configuration.md
@@ -41,37 +41,13 @@ blueprint (i.e. inside the `brooklyn.config` block).
 It can also explicitly declare config keys, using the `brooklyn.parameters` block. The example

 below illustrates the principle:
 
-```yaml
-brooklyn.catalog:
-  items:
-  - id: entity-config-example
-    itemType: entity
-    name: Entity Config Example
-    item:
-      type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
-      brooklyn.parameters:
-      - name: custom.message
-        type: string
-        description: Message to be displayed
-        default: Hello
-      brooklyn.config:
-        shell.env:
-          MESSAGE: $brooklyn:config("custom.message")
-        launch.command: |
-          echo "My example launch command: $MESSAGE"
-        checkRunning.command: |
-          echo "My example checkRunning command: $MESSAGE"
-```
+!CODEFILE "example_yaml/entity-config-catalog.yaml"
 
 Once added to the catalog, it can be used with the simple blueprint below (substituting the
location
 of your choice). Because no configuration has been overridden, this will use the default
value
 for `custom.message`, and will use the given values for `launch.command` and `checkRunning.command`:
 
-```yaml
-location: aws-ec2:us-east-1
-services:
-- type: entity-config-example
-```
+!CODEFILE "example_yaml/entity-config-app.yaml"
 
 For details of how to write and add catalog items, see [Catalog]({{book.path.docs}}/blueprints/catalog/index.md).

 

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/46fc3814/guide/blueprints/example_yaml/entity-config-app.yaml
----------------------------------------------------------------------
diff --git a/guide/blueprints/example_yaml/entity-config-app.yaml b/guide/blueprints/example_yaml/entity-config-app.yaml
new file mode 100644
index 0000000..526b3d3
--- /dev/null
+++ b/guide/blueprints/example_yaml/entity-config-app.yaml
@@ -0,0 +1,4 @@
+location: aws-ec2:us-east-1
+name: entity-config-example
+services:
+- type: entity-config-example

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/46fc3814/guide/blueprints/example_yaml/entity-config-catalog.yaml
----------------------------------------------------------------------
diff --git a/guide/blueprints/example_yaml/entity-config-catalog.yaml b/guide/blueprints/example_yaml/entity-config-catalog.yaml
new file mode 100644
index 0000000..fe726c2
--- /dev/null
+++ b/guide/blueprints/example_yaml/entity-config-catalog.yaml
@@ -0,0 +1,19 @@
+brooklyn.catalog:
+  items:
+  - id: entity-config-example
+    itemType: entity
+    name: Entity Config Example
+    item:
+      type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
+      brooklyn.parameters:
+      - name: custom.message
+        type: string
+        description: Message to be displayed
+        default: Hello
+      brooklyn.config:
+        shell.env:
+          MESSAGE: $brooklyn:config("custom.message")
+        launch.command: |
+          echo "My example launch command: $MESSAGE"
+        checkRunning.command: |
+          echo "My example checkRunning command: $MESSAGE"


Mime
View raw message