From 7b5d187606a301cec239f8a3191b3563046a8607 Mon Sep 17 00:00:00 2001 From: Michael Hwang Date: Tue, 12 Sep 2017 15:12:00 -0400 Subject: Add in a postgres node into inventory blueprint Change-Id: I513ce92fe6ac1db9e29525bcb029f53d1a27ccf2 Issue-Id: DCAEGEN2-101 Signed-off-by: Michael Hwang --- blueprints/inventory.yaml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) 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 -- cgit 1.2.3-korg