{"action":"created","comment":{"url":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/comments/73888380","id":73888380,"diff_hunk":"@@ -1747,6 +1750,46 @@ EOF\n     return 0\n }\n \n+function install_crowbar_init()\n+{\n+    local apacheconfdir=/etc/apache2/conf.d\n+\n+    # FIXME: this is temporary until the package is doing that\n+    # it is currently disabled by default not to break Crowbar\n+    ln -sf $apacheconfdir/crowbar-sinatra.conf.partial $apacheconfdir/crowbar.conf.partial\n+    systemctl start crowbar-init\n+    wait_for 100 3 \"onadmin_is_crowbar_init_api_available\" \"crowbar init service to start\"\n+}\n+\n+function onadmin_bootstrapcrowbar()\n+{\n+    # temporarily make it possible to not use postgres until we switched to the new upgrade process\n+    # otherwise we would break the upgrade gating\n+    [[ $want_postgres = 0 ]] && return\n+    if iscloudver 7plus ; then\n+        local http_code\n+        install_crowbar_init\n+        if $want_external_postgres ; then\n+            # TODO: setup_external_postgres\n+            # curl -X POST --data \"username=crowbar&password=crowbar&host=$postgres_ip&port=$postgres_port&database=$postgres_dbname\" $crowbar_init_api/database/connect\n+            :\n+        else\n+            # FIXME: when https://github.com/SUSE-Cloud/automation/pull/1105 is merged\n+            http_code=`curl -s -X POST --data \"username=crowbar&password=crowbar\" -o setup-database.txt -w '%{http_code}' $crowbar_init_api/database/new`\n+            if ! [[ $http_code =~ [23].. ]] ; then\n+                cat setup-database.txt\n+                complain 36 \"Could not setup PostgreSQL database\"\n+            fi","path":"scripts/qa_crowbarsetup.sh","position":50,"original_position":50,"commit_id":"faec2568b38c0bff3f3a6d35173bb76beecf4694","original_commit_id":"faec2568b38c0bff3f3a6d35173bb76beecf4694","user":{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars.githubusercontent.com/u/5364817?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"body":"look at the comment above which refers to https://github.com/SUSE-Cloud/automation/pull/1105\r\nI just wanted to wait for @jdsn coming back to continue on that","created_at":"2016-08-08T14:47:06Z","updated_at":"2016-08-08T14:47:06Z","html_url":"https://github.com/SUSE-Cloud/automation/pull/1115#discussion_r73888380","pull_request_url":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/1115","_links":{"self":{"href":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/comments/73888380"},"html":{"href":"https://github.com/SUSE-Cloud/automation/pull/1115#discussion_r73888380"},"pull_request":{"href":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/1115"}}},"pull_request":{"url":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/1115","id":79198824,"html_url":"https://github.com/SUSE-Cloud/automation/pull/1115","diff_url":"https://github.com/SUSE-Cloud/automation/pull/1115.diff","patch_url":"https://github.com/SUSE-Cloud/automation/pull/1115.patch","issue_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/1115","number":1115,"state":"open","locked":false,"title":"add bootstrapcrowbar function to set up the postgres db","user":{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars.githubusercontent.com/u/5364817?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-28T13:48:50Z","updated_at":"2016-08-08T14:47:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"877ea612ad542d3f1062bace6ddc88233b41f2b7","assignee":{"login":"aplanas","id":645701,"avatar_url":"https://avatars.githubusercontent.com/u/645701?v=3","gravatar_id":"","url":"https://api.github.com/users/aplanas","html_url":"https://github.com/aplanas","followers_url":"https://api.github.com/users/aplanas/followers","following_url":"https://api.github.com/users/aplanas/following{/other_user}","gists_url":"https://api.github.com/users/aplanas/gists{/gist_id}","starred_url":"https://api.github.com/users/aplanas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aplanas/subscriptions","organizations_url":"https://api.github.com/users/aplanas/orgs","repos_url":"https://api.github.com/users/aplanas/repos","events_url":"https://api.github.com/users/aplanas/events{/privacy}","received_events_url":"https://api.github.com/users/aplanas/received_events","type":"User","site_admin":false},"assignees":[{"login":"aplanas","id":645701,"avatar_url":"https://avatars.githubusercontent.com/u/645701?v=3","gravatar_id":"","url":"https://api.github.com/users/aplanas","html_url":"https://github.com/aplanas","followers_url":"https://api.github.com/users/aplanas/followers","following_url":"https://api.github.com/users/aplanas/following{/other_user}","gists_url":"https://api.github.com/users/aplanas/gists{/gist_id}","starred_url":"https://api.github.com/users/aplanas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aplanas/subscriptions","organizations_url":"https://api.github.com/users/aplanas/orgs","repos_url":"https://api.github.com/users/aplanas/repos","events_url":"https://api.github.com/users/aplanas/events{/privacy}","received_events_url":"https://api.github.com/users/aplanas/received_events","type":"User","site_admin":false},{"login":"rsalevsky","id":4128547,"avatar_url":"https://avatars.githubusercontent.com/u/4128547?v=3","gravatar_id":"","url":"https://api.github.com/users/rsalevsky","html_url":"https://github.com/rsalevsky","followers_url":"https://api.github.com/users/rsalevsky/followers","following_url":"https://api.github.com/users/rsalevsky/following{/other_user}","gists_url":"https://api.github.com/users/rsalevsky/gists{/gist_id}","starred_url":"https://api.github.com/users/rsalevsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsalevsky/subscriptions","organizations_url":"https://api.github.com/users/rsalevsky/orgs","repos_url":"https://api.github.com/users/rsalevsky/repos","events_url":"https://api.github.com/users/rsalevsky/events{/privacy}","received_events_url":"https://api.github.com/users/rsalevsky/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/1115/commits","review_comments_url":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/1115/comments","review_comment_url":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/1115/comments","statuses_url":"https://api.github.com/repos/SUSE-Cloud/automation/statuses/faec2568b38c0bff3f3a6d35173bb76beecf4694","head":{"label":"MaximilianMeister:bootstrapcrowbar","ref":"bootstrapcrowbar","sha":"faec2568b38c0bff3f3a6d35173bb76beecf4694","user":{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars.githubusercontent.com/u/5364817?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"repo":{"id":28104947,"name":"automation","full_name":"MaximilianMeister/automation","owner":{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars.githubusercontent.com/u/5364817?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaximilianMeister/automation","description":"Automation scripts for development, testing, and CI","fork":true,"url":"https://api.github.com/repos/MaximilianMeister/automation","forks_url":"https://api.github.com/repos/MaximilianMeister/automation/forks","keys_url":"https://api.github.com/repos/MaximilianMeister/automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaximilianMeister/automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaximilianMeister/automation/teams","hooks_url":"https://api.github.com/repos/MaximilianMeister/automation/hooks","issue_events_url":"https://api.github.com/repos/MaximilianMeister/automation/issues/events{/number}","events_url":"https://api.github.com/repos/MaximilianMeister/automation/events","assignees_url":"https://api.github.com/repos/MaximilianMeister/automation/assignees{/user}","branches_url":"https://api.github.com/repos/MaximilianMeister/automation/branches{/branch}","tags_url":"https://api.github.com/repos/MaximilianMeister/automation/tags","blobs_url":"https://api.github.com/repos/MaximilianMeister/automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaximilianMeister/automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaximilianMeister/automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaximilianMeister/automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaximilianMeister/automation/statuses/{sha}","languages_url":"https://api.github.com/repos/MaximilianMeister/automation/languages","stargazers_url":"https://api.github.com/repos/MaximilianMeister/automation/stargazers","contributors_url":"https://api.github.com/repos/MaximilianMeister/automation/contributors","subscribers_url":"https://api.github.com/repos/MaximilianMeister/automation/subscribers","subscription_url":"https://api.github.com/repos/MaximilianMeister/automation/subscription","commits_url":"https://api.github.com/repos/MaximilianMeister/automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaximilianMeister/automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaximilianMeister/automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaximilianMeister/automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaximilianMeister/automation/contents/{+path}","compare_url":"https://api.github.com/repos/MaximilianMeister/automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaximilianMeister/automation/merges","archive_url":"https://api.github.com/repos/MaximilianMeister/automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaximilianMeister/automation/downloads","issues_url":"https://api.github.com/repos/MaximilianMeister/automation/issues{/number}","pulls_url":"https://api.github.com/repos/MaximilianMeister/automation/pulls{/number}","milestones_url":"https://api.github.com/repos/MaximilianMeister/automation/milestones{/number}","notifications_url":"https://api.github.com/repos/MaximilianMeister/automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaximilianMeister/automation/labels{/name}","releases_url":"https://api.github.com/repos/MaximilianMeister/automation/releases{/id}","deployments_url":"https://api.github.com/repos/MaximilianMeister/automation/deployments","created_at":"2014-12-16T20:22:51Z","updated_at":"2015-05-05T08:33:49Z","pushed_at":"2016-08-04T22:22:15Z","git_url":"git://github.com/MaximilianMeister/automation.git","ssh_url":"git@github.com:MaximilianMeister/automation.git","clone_url":"https://github.com/MaximilianMeister/automation.git","svn_url":"https://github.com/MaximilianMeister/automation","homepage":"","size":5598,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"SUSE-Cloud:master","ref":"master","sha":"3dc47461eb56e53fdb4b700fa58390357cbf7b82","user":{"login":"SUSE-Cloud","id":1553906,"avatar_url":"https://avatars.githubusercontent.com/u/1553906?v=3","gravatar_id":"","url":"https://api.github.com/users/SUSE-Cloud","html_url":"https://github.com/SUSE-Cloud","followers_url":"https://api.github.com/users/SUSE-Cloud/followers","following_url":"https://api.github.com/users/SUSE-Cloud/following{/other_user}","gists_url":"https://api.github.com/users/SUSE-Cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE-Cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE-Cloud/subscriptions","organizations_url":"https://api.github.com/users/SUSE-Cloud/orgs","repos_url":"https://api.github.com/users/SUSE-Cloud/repos","events_url":"https://api.github.com/users/SUSE-Cloud/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE-Cloud/received_events","type":"Organization","site_admin":false},"repo":{"id":6384356,"name":"automation","full_name":"SUSE-Cloud/automation","owner":{"login":"SUSE-Cloud","id":1553906,"avatar_url":"https://avatars.githubusercontent.com/u/1553906?v=3","gravatar_id":"","url":"https://api.github.com/users/SUSE-Cloud","html_url":"https://github.com/SUSE-Cloud","followers_url":"https://api.github.com/users/SUSE-Cloud/followers","following_url":"https://api.github.com/users/SUSE-Cloud/following{/other_user}","gists_url":"https://api.github.com/users/SUSE-Cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE-Cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE-Cloud/subscriptions","organizations_url":"https://api.github.com/users/SUSE-Cloud/orgs","repos_url":"https://api.github.com/users/SUSE-Cloud/repos","events_url":"https://api.github.com/users/SUSE-Cloud/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE-Cloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SUSE-Cloud/automation","description":"Automation scripts for development, testing, and CI","fork":false,"url":"https://api.github.com/repos/SUSE-Cloud/automation","forks_url":"https://api.github.com/repos/SUSE-Cloud/automation/forks","keys_url":"https://api.github.com/repos/SUSE-Cloud/automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SUSE-Cloud/automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SUSE-Cloud/automation/teams","hooks_url":"https://api.github.com/repos/SUSE-Cloud/automation/hooks","issue_events_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/events{/number}","events_url":"https://api.github.com/repos/SUSE-Cloud/automation/events","assignees_url":"https://api.github.com/repos/SUSE-Cloud/automation/assignees{/user}","branches_url":"https://api.github.com/repos/SUSE-Cloud/automation/branches{/branch}","tags_url":"https://api.github.com/repos/SUSE-Cloud/automation/tags","blobs_url":"https://api.github.com/repos/SUSE-Cloud/automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SUSE-Cloud/automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SUSE-Cloud/automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/SUSE-Cloud/automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SUSE-Cloud/automation/statuses/{sha}","languages_url":"https://api.github.com/repos/SUSE-Cloud/automation/languages","stargazers_url":"https://api.github.com/repos/SUSE-Cloud/automation/stargazers","contributors_url":"https://api.github.com/repos/SUSE-Cloud/automation/contributors","subscribers_url":"https://api.github.com/repos/SUSE-Cloud/automation/subscribers","subscription_url":"https://api.github.com/repos/SUSE-Cloud/automation/subscription","commits_url":"https://api.github.com/repos/SUSE-Cloud/automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/SUSE-Cloud/automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/SUSE-Cloud/automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/SUSE-Cloud/automation/contents/{+path}","compare_url":"https://api.github.com/repos/SUSE-Cloud/automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SUSE-Cloud/automation/merges","archive_url":"https://api.github.com/repos/SUSE-Cloud/automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SUSE-Cloud/automation/downloads","issues_url":"https://api.github.com/repos/SUSE-Cloud/automation/issues{/number}","pulls_url":"https://api.github.com/repos/SUSE-Cloud/automation/pulls{/number}","milestones_url":"https://api.github.com/repos/SUSE-Cloud/automation/milestones{/number}","notifications_url":"https://api.github.com/repos/SUSE-Cloud/automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SUSE-Cloud/automation/labels{/name}","releases_url":"https://api.github.com/repos/SUSE-Cloud/automation/releases{/id}","deployments_url":"https://api.github.com/repos/SUSE-Cloud/automation/deployments","created_at":"2012-10-25T08:45:31Z","updated_at":"2016-07-08T19:13:44Z","pushed_at":"2016-08-08T08:17:33Z","git_url":"git://github.com/SUSE-Cloud/automation.git","ssh_url":"git@github.com:SUSE-Cloud/automation.git","clone_url":"https://github.com/SUSE-Cloud/automation.git","svn_url":"https://github.com/SUSE-Cloud/automation","homepage":"","size":7735,"stargazers_count":17,"watchers_count":17,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":33,"forks":51,"open_issues":33,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/1115"},"html":{"href":"https://github.com/SUSE-Cloud/automation/pull/1115"},"issue":{"href":"https://api.github.com/repos/SUSE-Cloud/automation/issues/1115"},"comments":{"href":"https://api.github.com/repos/SUSE-Cloud/automation/issues/1115/comments"},"review_comments":{"href":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/1115/comments"},"review_comment":{"href":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SUSE-Cloud/automation/pulls/1115/commits"},"statuses":{"href":"https://api.github.com/repos/SUSE-Cloud/automation/statuses/faec2568b38c0bff3f3a6d35173bb76beecf4694"}}}}
{"actor":{"display_login":"MaximilianMeister"}}