summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hwang <mhwang@research.att.com>2017-09-12 15:12:00 -0400
committerMichael Hwang <mhwang@research.att.com>2017-09-12 15:12:24 -0400
commit7b5d187606a301cec239f8a3191b3563046a8607 (patch)
treebf30f5a51332c4268d8f758c20be5232e9fc7fe1
parentc74aad5faefcc5b7e7474c7dc74d9ab2cbc8fb72 (diff)
Add in a postgres node into inventory blueprint
Change-Id: I513ce92fe6ac1db9e29525bcb029f53d1a27ccf2 Issue-Id: DCAEGEN2-101 Signed-off-by: Michael Hwang <mhwang@research.att.com>
-rw-r--r--blueprints/inventory.yaml30
1 files changed, 29 insertions, 1 deletions
diff --git a/blueprints/inventory.yaml b/blueprints/inventory.yaml
index 67f3d74..1daea75 100644
--- a/blueprints/inventory.yaml
+++ b/blueprints/inventory.yaml
@@ -81,7 +81,9 @@ node_templates:
driverClass: org.postgresql.Driver
user: { get_input: postgres_user_inventory }
password: { get_input: postgres_password_inventory }
- url: jdbc:postgresql://pstg-write:5432/dcae_inv
+ # NOTE: The database name here has been changed to the default "postgres" database
+ # to use the private postgres instance and not the central postgres database.
+ url: jdbc:postgresql://pstg-write:5432/postgres
properties:
charSet: UTF-8
maxWaitForConnection: 1s
@@ -127,6 +129,32 @@ node_templates:
relationships:
- type: dcae.relationships.component_contained_in
target: docker_host
+ - type: cloudify.relationships.depends_on
+ target: postgres
+
+ postgres:
+ type: dcae.nodes.DockerContainer
+ properties:
+ name:
+ "pstg-write"
+ image:
+ "postgres:9.5.2"
+ relationships:
+ - type: dcae.relationships.component_contained_in
+ target: docker_host
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ PGDATA:
+ "/var/lib/postgresql/data/pgdata"
+ POSTGRES_PASSWORD:
+ { get_input: postgres_password_inventory }
+ SERVICE_NAME:
+ "pstg-write"
+ ports:
+ - "5432:5432"
docker_host:
type: dcae.nodes.SelectedDockerHost