From 55259b4445c1a45d620aa692ece154f0fcde0087 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Thu, 21 Sep 2017 22:18:32 -0400 Subject: [PATCH] Update minishift documentation relative to postgresql Also bump the default claim value to 5G --- INSTALL.md | 6 ++++-- installer/openshift/tasks/main.yml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index bdadf164f7..97f61751cc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -123,9 +123,11 @@ Before starting the build process, review the [inventory](./installer/inventory) #### PostgreSQL -AWX requires access to a PostgreSQL database, and by default, one will be created and deployed in a container. In this scenario, the database is ephemeral, and all data persisted to it will be lost when the container stops running. +AWX requires access to a PostgreSQL database, and by default, one will be created and deployed in a pod. The database is configured for persistence and will create a persistent volume claim named `postgresql`. By default it will claim 5GB from the available persistent volume pool. This can be tuned by setting a variable in the inventory file or on the command line during the `ansible-playbook` run. -If you wish to use an external database, in the inventory file, set the value of `pg_hostname`, and update `pg_username`, `pg_password`, `pg_database`, and `pg_port` with the connection information. + ansible-playbook ... -e pg_volume_capacity=n + +If you wish to use an external database, in the inventory file, set the value of `pg_hostname`, and update `pg_username`, `pg_password`, `pg_database`, and `pg_port` with the connection information. When setting `pg_hostname` the installer will assume you have configured the database in that location and will not launch the postgresql pod. ### Start the build diff --git a/installer/openshift/tasks/main.yml b/installer/openshift/tasks/main.yml index e7b063f8c9..7d59d6a949 100644 --- a/installer/openshift/tasks/main.yml +++ b/installer/openshift/tasks/main.yml @@ -67,7 +67,7 @@ delegate_to: localhost - name: Deploy and Activate Postgres - shell: "oc new-app --template=postgresql-persistent -e MEMORY_LIMIT={{ pg_memory_limit|default('512') }}Mi -e NAMESPACE=openshift -e DATABASE_SERVICE_NAME=postgresql -e POSTGRESQL_USER={{ pg_username }} -e POSTGRESQL_PASSWORD={{ pg_password }} -e POSTGRESQL_DATABASE={{ pg_database }} -e VOLUME_CAPACITY={{ pg_volume_capacity|default('1')}}Gi -e POSTGRESQL_VERSION=9.5 -n {{ awx_openshift_project }}" + shell: "oc new-app --template=postgresql-persistent -e MEMORY_LIMIT={{ pg_memory_limit|default('512') }}Mi -e NAMESPACE=openshift -e DATABASE_SERVICE_NAME=postgresql -e POSTGRESQL_USER={{ pg_username }} -e POSTGRESQL_PASSWORD={{ pg_password }} -e POSTGRESQL_DATABASE={{ pg_database }} -e VOLUME_CAPACITY={{ pg_volume_capacity|default('5')}}Gi -e POSTGRESQL_VERSION=9.5 -n {{ awx_openshift_project }}" when: (pg_hostname is not defined or pg_hostname == '') and (postgres_svc_details is defined and postgres_svc_details.rc != 0) register: openshift_pg_activate