Alex Lourie has uploaded a new change for review. Change subject: packaging: setup: save configuration immediately as available ......................................................................
packaging: setup: save configuration immediately as available Change-Id: Iaf40ddc7885f7d59a779601fb57d9556c30062be Bug-Url: https://bugzilla.redhat.com/1006950 Signed-off-by: Alex Lourie <alou...@redhat.com> --- M packaging/ovirt-engine-dwh-setup.py 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-dwh refs/changes/51/19751/1 diff --git a/packaging/ovirt-engine-dwh-setup.py b/packaging/ovirt-engine-dwh-setup.py index 4b64078..dfcfbad 100755 --- a/packaging/ovirt-engine-dwh-setup.py +++ b/packaging/ovirt-engine-dwh-setup.py @@ -375,6 +375,25 @@ ) ) + # Save configuration to the conf.d file + with open(FILE_DATABASE_DWH_CONFIG, 'w') as fdwh: + content = ( + 'DWH_USER={user}\n' + 'DWH_PASSWORD={password}\n' + 'DWH_DATABASE={database}\n' + ).format( + user=db_dict['username'], + password=db_dict['password'], + database=db_dict['dbname'], + ) + if db_dict['readonly'] is not None: + content += ( + 'DWH_READONLY_USER={readonly}\n' + ).format( + readonly=db_dict['readonly'], + ) + fdwh.write(content) + if dbExists(db_dict): try: @@ -409,9 +428,11 @@ password=db_dict['password'], option='createdb', ) + utils.createDB(db_dict['dbname'], db_dict['username']) utils.updatePgHba(db_dict['dbname'], db_dict['username']) utils.restartPostgres() + else: print 'Remote installation is selected.\n' ( -- To view, visit http://gerrit.ovirt.org/19751 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf40ddc7885f7d59a779601fb57d9556c30062be Gerrit-PatchSet: 1 Gerrit-Project: ovirt-dwh Gerrit-Branch: master Gerrit-Owner: Alex Lourie <alou...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches