GitHub PullRequestReviewCommentEvent at 2014-12-10 23:56:45
Repository: chef-bach
Actor: cbaenziger
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/bloomberg/chef-bach/pulls/comments/21648940","id":21648940,"diff_hunk":"@@ -0,0 +1,160 @@\n+# Download, configure and start hannibal\n+\n+hbase_version = \"#{node[:hannibal][:hbase_version]}\"\n+src_filename = \"hannibal-hbase#{hbase_version}.tgz\"\n+src_filepath = \"#{Chef::Config['file_cache_path']}/#{src_filename}\"\n+install_dir = \"#{node[:hannibal][:install_dir]}\"\n+log_dir = \"#{node[:hannibal][:log_dir]}\"\n+data_dir = \"#{node[:hannibal][:data_dir]}\"\n+service_dir = \"#{node[:hannibal][:service_dir]}\"\n+owner = \"#{node[:hannibal][:owner]}\"\n+group = \"#{node[:hannibal][:group]}\"\n+user = \"#{node[:hannibal][:user]}\"\n+file_mode = \"#{node[:hannibal][:file_mode]}\"\n+exec_mode = \"#{node[:hannibal][:exec_mode]}\"\n+endpoint = \"#{node[:hannibal][:service_endpoint]}\"\n+timeout = node[:hannibal][:service_timeout]\n+\n+make_config('hannibal-app-secret-key', secure_password(64))\n+make_config('hannibal-db-user', \"hannibal\")\n+make_config('hannibal-db-password', secure_password)\n+\n+if(node[:hannibal][:local_tarball]) then\n+   tarball_location = \"#{get_binary_server_url}#{src_filename}\"\n+else\n+   tarball_location = \"#{node[:hannibal][:download_url]}/#{src_filename}\"\n+end\n+\n+# Only download if not already extracted in /usr/lib/hannibal\n+remote_file src_filepath do\n+   source tarball_location\n+   if(!node[:hannibal][:local_tarball]) then\n+      checksum \"#{node[:hannibal][:checksum][\"#{hbase_version}\"]}\"\n+   end\n+   notifies :run, \"bash[unzip_hannibal]\", :immediately\n+   not_if { ::File.exists?(\"#{install_dir}/hannibal\") }\n+end\n+\n+# Only download if not already extracted in /usr/lib/hannibal\n+# Could have remote_file notify this script, but this is to handle manual deletion of\n+# hannibal install dir\n+bash \"unzip_hannibal\" do\n+   cwd ::File.dirname(src_filepath)\n+   code %Q{\n+      tar -xf #{src_filename} -C #{install_dir}/\n+      chown -R #{owner}:#{group} #{install_dir}/hannibal\n+   }\n+   not_if { ::File.exists?(\"#{install_dir}/hannibal\") }\n+end\n+\n+[\"#{log_dir}\", \"#{data_dir}\"].each do |d|\n+   directory d do\n+      recursive true   \n+      owner user\n+      action :create\n+   end\n+end\n+\n+file \"#{log_dir}/service.log\" do\n+   owner user\n+   action :create_if_missing \n+end\n+\n+template \"hbase_site\" do\n+   path \"#{install_dir}/hannibal/conf/hbase-site.xml\"\n+   source \"hannibal_hbase-site.xml.erb\"\n+   owner owner\n+   group group\n+   mode file_mode\n+   variables(:zk_hosts => node[:bcpc][:hadoop][:zookeeper][:servers])\n+end\n+\n+template \"logger\" do\n+   path \"#{install_dir}/hannibal/conf/logger.xml\"\n+   source \"hannibal_logger.xml.erb\"\n+   owner owner\n+   group group\n+   mode file_mode\n+end\n+\n+template \"application_conf\" do\n+   path \"#{install_dir}/hannibal/conf/application.conf\"\n+   source \"hannibal_application.conf.erb\"\n+   owner owner\n+   group group\n+   mode file_mode\n+end\n+\n+template \"start_script\" do\n+   path \"#{install_dir}/hannibal/start\"\n+   source \"hannibal_start.erb\"\n+   owner owner\n+   group group\n+   mode exec_mode\n+end\n+\n+template \"hannibal_service\" do\n+   path \"#{service_dir}/hannibal.conf\"\n+   source \"hannibal.upstart.conf.erb\"\n+   owner owner\n+   group group\n+   mode file_mode\n+end\n+\n+%w{ 1 2 3 4 5\n+}.each do |n|\n+   template \"hannibal_#{n}.sql\" do\n+      path \"#{install_dir}/hannibal/conf/evolutions/default/#{n}.sql\"\n+      source \"hannibal_#{n}.sql.erb\"\n+      owner owner\n+      group group\n+   end\n+end\n+\n+if (\"mysql\" == \"#{node[:hannibal][:db]}\") then","path":"cookbooks/hannibal/recipes/hannibal_hbase.rb","position":114,"original_position":114,"commit_id":"3198dc26a207d6a6e2844511995a99d6ab2e429b","original_commit_id":"3198dc26a207d6a6e2844511995a99d6ab2e429b","user":{"login":"cbaenziger","id":4192761,"avatar_url":"https://avatars.githubusercontent.com/u/4192761?v=3","gravatar_id":"","url":"https://api.github.com/users/cbaenziger","html_url":"https://github.com/cbaenziger","followers_url":"https://api.github.com/users/cbaenziger/followers","following_url":"https://api.github.com/users/cbaenziger/following{/other_user}","gists_url":"https://api.github.com/users/cbaenziger/gists{/gist_id}","starred_url":"https://api.github.com/users/cbaenziger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbaenziger/subscriptions","organizations_url":"https://api.github.com/users/cbaenziger/orgs","repos_url":"https://api.github.com/users/cbaenziger/repos","events_url":"https://api.github.com/users/cbaenziger/events{/privacy}","received_events_url":"https://api.github.com/users/cbaenziger/received_events","type":"User","site_admin":false},"body":"Since Hannibal can do its own schema work, for now let's have a requirement that some process out-of-band of the Hannibal cookbook should create the cookbook. Here it should be in a `bcpc-hadoop` wrapper cookbook.","created_at":"2014-12-10T23:56:45Z","updated_at":"2014-12-10T23:56:45Z","html_url":"https://github.com/bloomberg/chef-bach/pull/7#discussion_r21648940","pull_request_url":"https://api.github.com/repos/bloomberg/chef-bach/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/bloomberg/chef-bach/pulls/comments/21648940"},"html":{"href":"https://github.com/bloomberg/chef-bach/pull/7#discussion_r21648940"},"pull_request":{"href":"https://api.github.com/repos/bloomberg/chef-bach/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/bloomberg/chef-bach/pulls/7","id":23495566,"html_url":"https://github.com/bloomberg/chef-bach/pull/7","diff_url":"https://github.com/bloomberg/chef-bach/pull/7.diff","patch_url":"https://github.com/bloomberg/chef-bach/pull/7.patch","issue_url":"https://api.github.com/repos/bloomberg/chef-bach/issues/7","number":7,"state":"open","locked":false,"title":"Provide Hannibal region monitoring service for hadoop cluster","user":{"login":"kiiranh","id":4454094,"avatar_url":"https://avatars.githubusercontent.com/u/4454094?v=3","gravatar_id":"","url":"https://api.github.com/users/kiiranh","html_url":"https://github.com/kiiranh","followers_url":"https://api.github.com/users/kiiranh/followers","following_url":"https://api.github.com/users/kiiranh/following{/other_user}","gists_url":"https://api.github.com/users/kiiranh/gists{/gist_id}","starred_url":"https://api.github.com/users/kiiranh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiiranh/subscriptions","organizations_url":"https://api.github.com/users/kiiranh/orgs","repos_url":"https://api.github.com/users/kiiranh/repos","events_url":"https://api.github.com/users/kiiranh/events{/privacy}","received_events_url":"https://api.github.com/users/kiiranh/received_events","type":"User","site_admin":false},"body":"1. This pull request provides hannibal cookbook.\r\n2. There are two recipes: one to build hannibal tarball from source(hannibal_build) and other to configure,install and start hannibal as an upstart service (hannibal_hbase).\r\n3. Mysql db, if selected, is configured for hannibal.","created_at":"2014-10-28T22:26:19Z","updated_at":"2014-12-10T23:56:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f00296a0ba65143d5630dc7a854d014367805b23","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bloomberg/chef-bach/pulls/7/commits","review_comments_url":"https://api.github.com/repos/bloomberg/chef-bach/pulls/7/comments","review_comment_url":"https://api.github.com/repos/bloomberg/chef-bach/pulls/comments/{number}","comments_url":"https://api.github.com/repos/bloomberg/chef-bach/issues/7/comments","statuses_url":"https://api.github.com/repos/bloomberg/chef-bach/statuses/3198dc26a207d6a6e2844511995a99d6ab2e429b","head":{"label":"kiiranh:hannibal","ref":"hannibal","sha":"3198dc26a207d6a6e2844511995a99d6ab2e429b","user":{"login":"kiiranh","id":4454094,"avatar_url":"https://avatars.githubusercontent.com/u/4454094?v=3","gravatar_id":"","url":"https://api.github.com/users/kiiranh","html_url":"https://github.com/kiiranh","followers_url":"https://api.github.com/users/kiiranh/followers","following_url":"https://api.github.com/users/kiiranh/following{/other_user}","gists_url":"https://api.github.com/users/kiiranh/gists{/gist_id}","starred_url":"https://api.github.com/users/kiiranh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiiranh/subscriptions","organizations_url":"https://api.github.com/users/kiiranh/orgs","repos_url":"https://api.github.com/users/kiiranh/repos","events_url":"https://api.github.com/users/kiiranh/events{/privacy}","received_events_url":"https://api.github.com/users/kiiranh/received_events","type":"User","site_admin":false},"repo":{"id":25661154,"name":"chef-bach","full_name":"kiiranh/chef-bach","owner":{"login":"kiiranh","id":4454094,"avatar_url":"https://avatars.githubusercontent.com/u/4454094?v=3","gravatar_id":"","url":"https://api.github.com/users/kiiranh","html_url":"https://github.com/kiiranh","followers_url":"https://api.github.com/users/kiiranh/followers","following_url":"https://api.github.com/users/kiiranh/following{/other_user}","gists_url":"https://api.github.com/users/kiiranh/gists{/gist_id}","starred_url":"https://api.github.com/users/kiiranh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiiranh/subscriptions","organizations_url":"https://api.github.com/users/kiiranh/orgs","repos_url":"https://api.github.com/users/kiiranh/repos","events_url":"https://api.github.com/users/kiiranh/events{/privacy}","received_events_url":"https://api.github.com/users/kiiranh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kiiranh/chef-bach","description":"Chef recipes for Bloomberg's deployment of Hadoop and related components","fork":true,"url":"https://api.github.com/repos/kiiranh/chef-bach","forks_url":"https://api.github.com/repos/kiiranh/chef-bach/forks","keys_url":"https://api.github.com/repos/kiiranh/chef-bach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kiiranh/chef-bach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kiiranh/chef-bach/teams","hooks_url":"https://api.github.com/repos/kiiranh/chef-bach/hooks","issue_events_url":"https://api.github.com/repos/kiiranh/chef-bach/issues/events{/number}","events_url":"https://api.github.com/repos/kiiranh/chef-bach/events","assignees_url":"https://api.github.com/repos/kiiranh/chef-bach/assignees{/user}","branches_url":"https://api.github.com/repos/kiiranh/chef-bach/branches{/branch}","tags_url":"https://api.github.com/repos/kiiranh/chef-bach/tags","blobs_url":"https://api.github.com/repos/kiiranh/chef-bach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kiiranh/chef-bach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kiiranh/chef-bach/git/refs{/sha}","trees_url":"https://api.github.com/repos/kiiranh/chef-bach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kiiranh/chef-bach/statuses/{sha}","languages_url":"https://api.github.com/repos/kiiranh/chef-bach/languages","stargazers_url":"https://api.github.com/repos/kiiranh/chef-bach/stargazers","contributors_url":"https://api.github.com/repos/kiiranh/chef-bach/contributors","subscribers_url":"https://api.github.com/repos/kiiranh/chef-bach/subscribers","subscription_url":"https://api.github.com/repos/kiiranh/chef-bach/subscription","commits_url":"https://api.github.com/repos/kiiranh/chef-bach/commits{/sha}","git_commits_url":"https://api.github.com/repos/kiiranh/chef-bach/git/commits{/sha}","comments_url":"https://api.github.com/repos/kiiranh/chef-bach/comments{/number}","issue_comment_url":"https://api.github.com/repos/kiiranh/chef-bach/issues/comments/{number}","contents_url":"https://api.github.com/repos/kiiranh/chef-bach/contents/{+path}","compare_url":"https://api.github.com/repos/kiiranh/chef-bach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kiiranh/chef-bach/merges","archive_url":"https://api.github.com/repos/kiiranh/chef-bach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kiiranh/chef-bach/downloads","issues_url":"https://api.github.com/repos/kiiranh/chef-bach/issues{/number}","pulls_url":"https://api.github.com/repos/kiiranh/chef-bach/pulls{/number}","milestones_url":"https://api.github.com/repos/kiiranh/chef-bach/milestones{/number}","notifications_url":"https://api.github.com/repos/kiiranh/chef-bach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kiiranh/chef-bach/labels{/name}","releases_url":"https://api.github.com/repos/kiiranh/chef-bach/releases{/id}","created_at":"2014-10-23T22:44:35Z","updated_at":"2014-12-04T19:03:49Z","pushed_at":"2014-12-10T21:52:03Z","git_url":"git://github.com/kiiranh/chef-bach.git","ssh_url":"git@github.com:kiiranh/chef-bach.git","clone_url":"https://github.com/kiiranh/chef-bach.git","svn_url":"https://github.com/kiiranh/chef-bach","homepage":null,"size":2093,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"bloomberg:master","ref":"master","sha":"7889282f7e018c8ecce2a11979afc9272b1527f7","user":{"login":"bloomberg","id":1416818,"avatar_url":"https://avatars.githubusercontent.com/u/1416818?v=3","gravatar_id":"","url":"https://api.github.com/users/bloomberg","html_url":"https://github.com/bloomberg","followers_url":"https://api.github.com/users/bloomberg/followers","following_url":"https://api.github.com/users/bloomberg/following{/other_user}","gists_url":"https://api.github.com/users/bloomberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bloomberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bloomberg/subscriptions","organizations_url":"https://api.github.com/users/bloomberg/orgs","repos_url":"https://api.github.com/users/bloomberg/repos","events_url":"https://api.github.com/users/bloomberg/events{/privacy}","received_events_url":"https://api.github.com/users/bloomberg/received_events","type":"Organization","site_admin":false},"repo":{"id":24933148,"name":"chef-bach","full_name":"bloomberg/chef-bach","owner":{"login":"bloomberg","id":1416818,"avatar_url":"https://avatars.githubusercontent.com/u/1416818?v=3","gravatar_id":"","url":"https://api.github.com/users/bloomberg","html_url":"https://github.com/bloomberg","followers_url":"https://api.github.com/users/bloomberg/followers","following_url":"https://api.github.com/users/bloomberg/following{/other_user}","gists_url":"https://api.github.com/users/bloomberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bloomberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bloomberg/subscriptions","organizations_url":"https://api.github.com/users/bloomberg/orgs","repos_url":"https://api.github.com/users/bloomberg/repos","events_url":"https://api.github.com/users/bloomberg/events{/privacy}","received_events_url":"https://api.github.com/users/bloomberg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bloomberg/chef-bach","description":"Chef recipes for Bloomberg's deployment of Hadoop and related components","fork":false,"url":"https://api.github.com/repos/bloomberg/chef-bach","forks_url":"https://api.github.com/repos/bloomberg/chef-bach/forks","keys_url":"https://api.github.com/repos/bloomberg/chef-bach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bloomberg/chef-bach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bloomberg/chef-bach/teams","hooks_url":"https://api.github.com/repos/bloomberg/chef-bach/hooks","issue_events_url":"https://api.github.com/repos/bloomberg/chef-bach/issues/events{/number}","events_url":"https://api.github.com/repos/bloomberg/chef-bach/events","assignees_url":"https://api.github.com/repos/bloomberg/chef-bach/assignees{/user}","branches_url":"https://api.github.com/repos/bloomberg/chef-bach/branches{/branch}","tags_url":"https://api.github.com/repos/bloomberg/chef-bach/tags","blobs_url":"https://api.github.com/repos/bloomberg/chef-bach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bloomberg/chef-bach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bloomberg/chef-bach/git/refs{/sha}","trees_url":"https://api.github.com/repos/bloomberg/chef-bach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bloomberg/chef-bach/statuses/{sha}","languages_url":"https://api.github.com/repos/bloomberg/chef-bach/languages","stargazers_url":"https://api.github.com/repos/bloomberg/chef-bach/stargazers","contributors_url":"https://api.github.com/repos/bloomberg/chef-bach/contributors","subscribers_url":"https://api.github.com/repos/bloomberg/chef-bach/subscribers","subscription_url":"https://api.github.com/repos/bloomberg/chef-bach/subscription","commits_url":"https://api.github.com/repos/bloomberg/chef-bach/commits{/sha}","git_commits_url":"https://api.github.com/repos/bloomberg/chef-bach/git/commits{/sha}","comments_url":"https://api.github.com/repos/bloomberg/chef-bach/comments{/number}","issue_comment_url":"https://api.github.com/repos/bloomberg/chef-bach/issues/comments/{number}","contents_url":"https://api.github.com/repos/bloomberg/chef-bach/contents/{+path}","compare_url":"https://api.github.com/repos/bloomberg/chef-bach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bloomberg/chef-bach/merges","archive_url":"https://api.github.com/repos/bloomberg/chef-bach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bloomberg/chef-bach/downloads","issues_url":"https://api.github.com/repos/bloomberg/chef-bach/issues{/number}","pulls_url":"https://api.github.com/repos/bloomberg/chef-bach/pulls{/number}","milestones_url":"https://api.github.com/repos/bloomberg/chef-bach/milestones{/number}","notifications_url":"https://api.github.com/repos/bloomberg/chef-bach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bloomberg/chef-bach/labels{/name}","releases_url":"https://api.github.com/repos/bloomberg/chef-bach/releases{/id}","created_at":"2014-10-08T09:16:26Z","updated_at":"2014-12-10T23:34:34Z","pushed_at":"2014-12-10T23:34:34Z","git_url":"git://github.com/bloomberg/chef-bach.git","ssh_url":"git@github.com:bloomberg/chef-bach.git","clone_url":"https://github.com/bloomberg/chef-bach.git","svn_url":"https://github.com/bloomberg/chef-bach","homepage":null,"size":2252,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":11,"forks":5,"open_issues":11,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bloomberg/chef-bach/pulls/7"},"html":{"href":"https://github.com/bloomberg/chef-bach/pull/7"},"issue":{"href":"https://api.github.com/repos/bloomberg/chef-bach/issues/7"},"comments":{"href":"https://api.github.com/repos/bloomberg/chef-bach/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/bloomberg/chef-bach/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/bloomberg/chef-bach/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/bloomberg/chef-bach/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/bloomberg/chef-bach/statuses/3198dc26a207d6a6e2844511995a99d6ab2e429b"}}}}