{"action":"created","comment":{"url":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments/62669208","id":62669208,"diff_hunk":"@@ -0,0 +1,126 @@\n+Following steps will let you install, configure postgreSQL server and create a\n+`haas` database for development or production version of HaaS on a \n+Centos - 7 server\n+\n+\n+\n+## Part 1: \n+Install PostgreSQL server. Initialize the system. Configure PostgreSQL to allow password authentication.\n+\n+**1. Install the requisite packages on your server.**\n+\n+```\n+sudo sudo yum install postgresql-server postgresql-contrib -y\n+```\n+\n+**2. Initialize postgresql:**\n+\n+```\n+sudo postgresql-setup initdb\n+```\n+\n+**3. Replace the term `ident` from following lines**\n+in file `/var/lib/pgsql/data/pg_hba.conf` with `md5`\n+\n+**Before:**\n+\n+```\n+# \"krb5\", \"ident\", \"peer\", \"pam\", \"ldap\", \"radius\" or \"cert\".  Note that\n+host    all             all             127.0.0.1/32            ident\n+host    all             all             ::1/128                 ident\n+#host    replication     postgres        127.0.0.1/32            ident\n+#host    replication     postgres        ::1/128                 ident\n+```\n+\n+**After:**\n+\n+```\n+# \"krb5\", \"ident\", \"peer\", \"pam\", \"ldap\", \"radius\" or \"cert\".  Note that\n+host    all             all             127.0.0.1/32            md5\n+host    all             all             ::1/128                 md5\n+#host    replication     postgres        127.0.0.1/32            ident\n+#host    replication     postgres        ::1/128                 ident\n+```\n+\n+**4. Start postgresql service**\n+\n+```\n+$ sudo systemctl start postgresql\n+$ sudo systemctl enable postgresql\n+```\n+\n+##Part 2: \n+Setup system user and database role for HaaS.Create database `haas` owned by user `haas`.\n+\n+**5. Create a system user haas:**\n+\n+```\n+useradd haas -d /var/lib/test1 -m -r\n+```\n+\n+**6. Create a database role named `haas` with priviledges to:**\n+ `-r` create roles\n+ `-d` create databases and \n+ `-P` will prompt for the password of the new user. \n+This is necessary since we have configured postgreSQL to use password authentication.\n+\n+```\n+sudo -i -u postgres\n+\n+-bash-4.2$ createuser -r -d -P haas\n+Enter password for new role:  <Input password for database role haas>\n+Enter it again: <Retype password for role haas>\n+```\n+\n+Confirm that the role with requisite privileges is created **as postgres user**:\n+\n+```\n+-bash-4.2$ psql -c '\\dg'\n+                             List of roles\n+ Role name |                   Attributes                   | Member of \n+-----------+------------------------------------------------+-----------\n+ haas      | Create role, Create DB                         | {}\n+ postgres  | Superuser, Create role, Create DB, Replication | {}\n+```\n+\n+for some reason if you wish to delete the user. do the following **as postgres user**:\n+\n+```\n+dropuser haas\n+```\n+@@Note@@: Make sure that the database role you create corresponds to an existing system user. ","path":"INSTALL/Install_configure_postgreSQL_CENTOS7.md","position":91,"original_position":91,"commit_id":"98fc6f31d1429b0e69342c6b429cb221285904c6","original_commit_id":"98fc6f31d1429b0e69342c6b429cb221285904c6","user":{"login":"kylehogan","id":4662845,"avatar_url":"https://avatars.githubusercontent.com/u/4662845?v=3","gravatar_id":"","url":"https://api.github.com/users/kylehogan","html_url":"https://github.com/kylehogan","followers_url":"https://api.github.com/users/kylehogan/followers","following_url":"https://api.github.com/users/kylehogan/following{/other_user}","gists_url":"https://api.github.com/users/kylehogan/gists{/gist_id}","starred_url":"https://api.github.com/users/kylehogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylehogan/subscriptions","organizations_url":"https://api.github.com/users/kylehogan/orgs","repos_url":"https://api.github.com/users/kylehogan/repos","events_url":"https://api.github.com/users/kylehogan/events{/privacy}","received_events_url":"https://api.github.com/users/kylehogan/received_events","type":"User","site_admin":false},"body":"this is incorrect, as long as the config files for haas and the database ownership are setup correctly it is possible to have a database user whose name does not match the haas user\r\n\r\nI would prefer this be replaced with something like 99-110 from #591 (though I agree that the information belongs in this document rather than in HACKING) so that it is clear that the database, database user, and system user can all have different names.","created_at":"2016-05-10T13:19:48Z","updated_at":"2016-05-10T13:19:48Z","html_url":"https://github.com/CCI-MOC/haas/pull/592#discussion_r62669208","pull_request_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/592","_links":{"self":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments/62669208"},"html":{"href":"https://github.com/CCI-MOC/haas/pull/592#discussion_r62669208"},"pull_request":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/592"}}},"pull_request":{"url":"https://api.github.com/repos/CCI-MOC/haas/pulls/592","id":69448631,"html_url":"https://github.com/CCI-MOC/haas/pull/592","diff_url":"https://github.com/CCI-MOC/haas/pull/592.diff","patch_url":"https://github.com/CCI-MOC/haas/pull/592.patch","issue_url":"https://api.github.com/repos/CCI-MOC/haas/issues/592","number":592,"state":"open","locked":false,"title":"DOC | Configure install postgresql for haas","user":{"login":"SahilTikale","id":2398718,"avatar_url":"https://avatars.githubusercontent.com/u/2398718?v=3","gravatar_id":"","url":"https://api.github.com/users/SahilTikale","html_url":"https://github.com/SahilTikale","followers_url":"https://api.github.com/users/SahilTikale/followers","following_url":"https://api.github.com/users/SahilTikale/following{/other_user}","gists_url":"https://api.github.com/users/SahilTikale/gists{/gist_id}","starred_url":"https://api.github.com/users/SahilTikale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SahilTikale/subscriptions","organizations_url":"https://api.github.com/users/SahilTikale/orgs","repos_url":"https://api.github.com/users/SahilTikale/repos","events_url":"https://api.github.com/users/SahilTikale/events{/privacy}","received_events_url":"https://api.github.com/users/SahilTikale/received_events","type":"User","site_admin":false},"body":"Provides series of steps for installation and configuration of postgreSQL server to work with HaaS. \r\nRestructures docs related to Installation of HaaS to reduce ambiguity. ","created_at":"2016-05-10T04:50:31Z","updated_at":"2016-05-10T13:19:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a36ff80a30f4bf8214c9578e27aab09d1782cf2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/592/commits","review_comments_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/592/comments","review_comment_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CCI-MOC/haas/issues/592/comments","statuses_url":"https://api.github.com/repos/CCI-MOC/haas/statuses/98fc6f31d1429b0e69342c6b429cb221285904c6","head":{"label":"SahilTikale:DOC-configure_install_postgresql_for_haas","ref":"DOC-configure_install_postgresql_for_haas","sha":"98fc6f31d1429b0e69342c6b429cb221285904c6","user":{"login":"SahilTikale","id":2398718,"avatar_url":"https://avatars.githubusercontent.com/u/2398718?v=3","gravatar_id":"","url":"https://api.github.com/users/SahilTikale","html_url":"https://github.com/SahilTikale","followers_url":"https://api.github.com/users/SahilTikale/followers","following_url":"https://api.github.com/users/SahilTikale/following{/other_user}","gists_url":"https://api.github.com/users/SahilTikale/gists{/gist_id}","starred_url":"https://api.github.com/users/SahilTikale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SahilTikale/subscriptions","organizations_url":"https://api.github.com/users/SahilTikale/orgs","repos_url":"https://api.github.com/users/SahilTikale/repos","events_url":"https://api.github.com/users/SahilTikale/events{/privacy}","received_events_url":"https://api.github.com/users/SahilTikale/received_events","type":"User","site_admin":false},"repo":{"id":35552937,"name":"haas","full_name":"SahilTikale/haas","owner":{"login":"SahilTikale","id":2398718,"avatar_url":"https://avatars.githubusercontent.com/u/2398718?v=3","gravatar_id":"","url":"https://api.github.com/users/SahilTikale","html_url":"https://github.com/SahilTikale","followers_url":"https://api.github.com/users/SahilTikale/followers","following_url":"https://api.github.com/users/SahilTikale/following{/other_user}","gists_url":"https://api.github.com/users/SahilTikale/gists{/gist_id}","starred_url":"https://api.github.com/users/SahilTikale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SahilTikale/subscriptions","organizations_url":"https://api.github.com/users/SahilTikale/orgs","repos_url":"https://api.github.com/users/SahilTikale/repos","events_url":"https://api.github.com/users/SahilTikale/events{/privacy}","received_events_url":"https://api.github.com/users/SahilTikale/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SahilTikale/haas","description":"","fork":true,"url":"https://api.github.com/repos/SahilTikale/haas","forks_url":"https://api.github.com/repos/SahilTikale/haas/forks","keys_url":"https://api.github.com/repos/SahilTikale/haas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SahilTikale/haas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SahilTikale/haas/teams","hooks_url":"https://api.github.com/repos/SahilTikale/haas/hooks","issue_events_url":"https://api.github.com/repos/SahilTikale/haas/issues/events{/number}","events_url":"https://api.github.com/repos/SahilTikale/haas/events","assignees_url":"https://api.github.com/repos/SahilTikale/haas/assignees{/user}","branches_url":"https://api.github.com/repos/SahilTikale/haas/branches{/branch}","tags_url":"https://api.github.com/repos/SahilTikale/haas/tags","blobs_url":"https://api.github.com/repos/SahilTikale/haas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SahilTikale/haas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SahilTikale/haas/git/refs{/sha}","trees_url":"https://api.github.com/repos/SahilTikale/haas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SahilTikale/haas/statuses/{sha}","languages_url":"https://api.github.com/repos/SahilTikale/haas/languages","stargazers_url":"https://api.github.com/repos/SahilTikale/haas/stargazers","contributors_url":"https://api.github.com/repos/SahilTikale/haas/contributors","subscribers_url":"https://api.github.com/repos/SahilTikale/haas/subscribers","subscription_url":"https://api.github.com/repos/SahilTikale/haas/subscription","commits_url":"https://api.github.com/repos/SahilTikale/haas/commits{/sha}","git_commits_url":"https://api.github.com/repos/SahilTikale/haas/git/commits{/sha}","comments_url":"https://api.github.com/repos/SahilTikale/haas/comments{/number}","issue_comment_url":"https://api.github.com/repos/SahilTikale/haas/issues/comments{/number}","contents_url":"https://api.github.com/repos/SahilTikale/haas/contents/{+path}","compare_url":"https://api.github.com/repos/SahilTikale/haas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SahilTikale/haas/merges","archive_url":"https://api.github.com/repos/SahilTikale/haas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SahilTikale/haas/downloads","issues_url":"https://api.github.com/repos/SahilTikale/haas/issues{/number}","pulls_url":"https://api.github.com/repos/SahilTikale/haas/pulls{/number}","milestones_url":"https://api.github.com/repos/SahilTikale/haas/milestones{/number}","notifications_url":"https://api.github.com/repos/SahilTikale/haas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SahilTikale/haas/labels{/name}","releases_url":"https://api.github.com/repos/SahilTikale/haas/releases{/id}","deployments_url":"https://api.github.com/repos/SahilTikale/haas/deployments","created_at":"2015-05-13T14:11:46Z","updated_at":"2016-02-01T04:21:37Z","pushed_at":"2016-05-10T05:20:32Z","git_url":"git://github.com/SahilTikale/haas.git","ssh_url":"git@github.com:SahilTikale/haas.git","clone_url":"https://github.com/SahilTikale/haas.git","svn_url":"https://github.com/SahilTikale/haas","homepage":null,"size":2476,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"CCI-MOC:master","ref":"master","sha":"9385a60387153e30fea714e96b07c226b5b41b79","user":{"login":"CCI-MOC","id":3578683,"avatar_url":"https://avatars.githubusercontent.com/u/3578683?v=3","gravatar_id":"","url":"https://api.github.com/users/CCI-MOC","html_url":"https://github.com/CCI-MOC","followers_url":"https://api.github.com/users/CCI-MOC/followers","following_url":"https://api.github.com/users/CCI-MOC/following{/other_user}","gists_url":"https://api.github.com/users/CCI-MOC/gists{/gist_id}","starred_url":"https://api.github.com/users/CCI-MOC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCI-MOC/subscriptions","organizations_url":"https://api.github.com/users/CCI-MOC/orgs","repos_url":"https://api.github.com/users/CCI-MOC/repos","events_url":"https://api.github.com/users/CCI-MOC/events{/privacy}","received_events_url":"https://api.github.com/users/CCI-MOC/received_events","type":"Organization","site_admin":false},"repo":{"id":16487339,"name":"haas","full_name":"CCI-MOC/haas","owner":{"login":"CCI-MOC","id":3578683,"avatar_url":"https://avatars.githubusercontent.com/u/3578683?v=3","gravatar_id":"","url":"https://api.github.com/users/CCI-MOC","html_url":"https://github.com/CCI-MOC","followers_url":"https://api.github.com/users/CCI-MOC/followers","following_url":"https://api.github.com/users/CCI-MOC/following{/other_user}","gists_url":"https://api.github.com/users/CCI-MOC/gists{/gist_id}","starred_url":"https://api.github.com/users/CCI-MOC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCI-MOC/subscriptions","organizations_url":"https://api.github.com/users/CCI-MOC/orgs","repos_url":"https://api.github.com/users/CCI-MOC/repos","events_url":"https://api.github.com/users/CCI-MOC/events{/privacy}","received_events_url":"https://api.github.com/users/CCI-MOC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CCI-MOC/haas","description":"Hardware as a Service","fork":false,"url":"https://api.github.com/repos/CCI-MOC/haas","forks_url":"https://api.github.com/repos/CCI-MOC/haas/forks","keys_url":"https://api.github.com/repos/CCI-MOC/haas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CCI-MOC/haas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CCI-MOC/haas/teams","hooks_url":"https://api.github.com/repos/CCI-MOC/haas/hooks","issue_events_url":"https://api.github.com/repos/CCI-MOC/haas/issues/events{/number}","events_url":"https://api.github.com/repos/CCI-MOC/haas/events","assignees_url":"https://api.github.com/repos/CCI-MOC/haas/assignees{/user}","branches_url":"https://api.github.com/repos/CCI-MOC/haas/branches{/branch}","tags_url":"https://api.github.com/repos/CCI-MOC/haas/tags","blobs_url":"https://api.github.com/repos/CCI-MOC/haas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CCI-MOC/haas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CCI-MOC/haas/git/refs{/sha}","trees_url":"https://api.github.com/repos/CCI-MOC/haas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CCI-MOC/haas/statuses/{sha}","languages_url":"https://api.github.com/repos/CCI-MOC/haas/languages","stargazers_url":"https://api.github.com/repos/CCI-MOC/haas/stargazers","contributors_url":"https://api.github.com/repos/CCI-MOC/haas/contributors","subscribers_url":"https://api.github.com/repos/CCI-MOC/haas/subscribers","subscription_url":"https://api.github.com/repos/CCI-MOC/haas/subscription","commits_url":"https://api.github.com/repos/CCI-MOC/haas/commits{/sha}","git_commits_url":"https://api.github.com/repos/CCI-MOC/haas/git/commits{/sha}","comments_url":"https://api.github.com/repos/CCI-MOC/haas/comments{/number}","issue_comment_url":"https://api.github.com/repos/CCI-MOC/haas/issues/comments{/number}","contents_url":"https://api.github.com/repos/CCI-MOC/haas/contents/{+path}","compare_url":"https://api.github.com/repos/CCI-MOC/haas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CCI-MOC/haas/merges","archive_url":"https://api.github.com/repos/CCI-MOC/haas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CCI-MOC/haas/downloads","issues_url":"https://api.github.com/repos/CCI-MOC/haas/issues{/number}","pulls_url":"https://api.github.com/repos/CCI-MOC/haas/pulls{/number}","milestones_url":"https://api.github.com/repos/CCI-MOC/haas/milestones{/number}","notifications_url":"https://api.github.com/repos/CCI-MOC/haas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CCI-MOC/haas/labels{/name}","releases_url":"https://api.github.com/repos/CCI-MOC/haas/releases{/id}","deployments_url":"https://api.github.com/repos/CCI-MOC/haas/deployments","created_at":"2014-02-03T17:48:01Z","updated_at":"2016-04-07T15:30:55Z","pushed_at":"2016-05-10T05:20:33Z","git_url":"git://github.com/CCI-MOC/haas.git","ssh_url":"git@github.com:CCI-MOC/haas.git","clone_url":"https://github.com/CCI-MOC/haas.git","svn_url":"https://github.com/CCI-MOC/haas","homepage":"","size":2441,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":131,"forks":28,"open_issues":131,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/592"},"html":{"href":"https://github.com/CCI-MOC/haas/pull/592"},"issue":{"href":"https://api.github.com/repos/CCI-MOC/haas/issues/592"},"comments":{"href":"https://api.github.com/repos/CCI-MOC/haas/issues/592/comments"},"review_comments":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/592/comments"},"review_comment":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/592/commits"},"statuses":{"href":"https://api.github.com/repos/CCI-MOC/haas/statuses/98fc6f31d1429b0e69342c6b429cb221285904c6"}}}}