From: Michael Hwang Date: Tue, 12 Sep 2017 19:12:00 +0000 (-0400) Subject: Add in a postgres node into inventory blueprint X-Git-Tag: 1.0.0-Amsterdam~58 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=7b5d187606a301cec239f8a3191b3563046a8607;p=dcaegen2%2Fplatform%2Fblueprints.git Add in a postgres node into inventory blueprint Change-Id: I513ce92fe6ac1db9e29525bcb029f53d1a27ccf2 Issue-Id: DCAEGEN2-101 Signed-off-by: Michael Hwang --- 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