{"action":"created","comment":{"url":"https://api.github.com/repos/open-craft/opencraft/pulls/comments/40494489","id":40494489,"diff_hunk":"@@ -0,0 +1,61 @@\n+# -*- mode: ruby -*-\n+# vi: set ft=ruby :\n+\n+# This script provisions a vagrant development environment with local\n+# postgres and redis servers for development and testing.\n+PROVISION = <<SCRIPT\n+set -e\n+\n+# cd to /vagrant on login\n+cd /vagrant\n+grep -q 'cd /vagrant' ~/.bashrc || echo 'cd /vagrant' >> ~/.bashrc\n+\n+# Install system packages\n+sudo apt-get update --quiet\n+sudo apt-get install -y $(cat debian_packages.lst) postgresql\n+\n+# Upgrade pip\n+sudo pip3 install --upgrade pip\n+\n+# By default, pip will install editable packages in ./src/ which is inside\n+# the virtualbox share. This can slow things like prospector down a lot, so\n+# configure pip to install them at the usual dist-packages location instead.\n+cat << EOF | sudo tee /etc/pip.conf\n+[install]\n+src = /usr/local/lib/python3.4/dist-packages\n+EOF\n+\n+# Install python dependencies\n+sudo pip install -r requirements.txt\n+\n+# Create postgres user\n+sudo -u postgres createuser -d vagrant\n+\n+# Allow access to postgres from localhost without password\n+cat << EOF | sudo tee /etc/postgresql/9.3/main/pg_hba.conf\n+local   all             postgres                                peer\n+local   all             all                                     trust\n+host    all             all             127.0.0.1/32            trust\n+host    all             all             ::1/128                 trust\n+EOF\n+sudo service postgresql restart\n+\n+# Create postgres database\n+createdb --encoding utf-8 --template template0 vagrant\n+\n+# Copy configuration for local development\n+cp .env.vagrant .env","path":"Vagrantfile","position":null,"original_position":47,"commit_id":"beb54b9ee8c498bdfdfa00dd80c860f595fc3c01","original_commit_id":"c1aab27918a5206a9237f2de0115951fa5a03f4a","user":{"login":"antoviaque","id":514483,"avatar_url":"https://avatars.githubusercontent.com/u/514483?v=3","gravatar_id":"","url":"https://api.github.com/users/antoviaque","html_url":"https://github.com/antoviaque","followers_url":"https://api.github.com/users/antoviaque/followers","following_url":"https://api.github.com/users/antoviaque/following{/other_user}","gists_url":"https://api.github.com/users/antoviaque/gists{/gist_id}","starred_url":"https://api.github.com/users/antoviaque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoviaque/subscriptions","organizations_url":"https://api.github.com/users/antoviaque/orgs","repos_url":"https://api.github.com/users/antoviaque/repos","events_url":"https://api.github.com/users/antoviaque/events{/privacy}","received_events_url":"https://api.github.com/users/antoviaque/received_events","type":"User","site_admin":false},"body":"@omarkhan Thanks! And good catch for the loggers from the test env.","created_at":"2015-09-26T15:23:21Z","updated_at":"2015-09-26T15:23:21Z","html_url":"https://github.com/open-craft/opencraft/pull/9#discussion_r40494489","pull_request_url":"https://api.github.com/repos/open-craft/opencraft/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/open-craft/opencraft/pulls/comments/40494489"},"html":{"href":"https://github.com/open-craft/opencraft/pull/9#discussion_r40494489"},"pull_request":{"href":"https://api.github.com/repos/open-craft/opencraft/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/open-craft/opencraft/pulls/9","id":45980952,"html_url":"https://github.com/open-craft/opencraft/pull/9","diff_url":"https://github.com/open-craft/opencraft/pull/9.diff","patch_url":"https://github.com/open-craft/opencraft/pull/9.patch","issue_url":"https://api.github.com/repos/open-craft/opencraft/issues/9","number":9,"state":"open","locked":false,"title":"Provision local development environment with vagrant","user":{"login":"omarkhan","id":793379,"avatar_url":"https://avatars.githubusercontent.com/u/793379?v=3","gravatar_id":"","url":"https://api.github.com/users/omarkhan","html_url":"https://github.com/omarkhan","followers_url":"https://api.github.com/users/omarkhan/followers","following_url":"https://api.github.com/users/omarkhan/following{/other_user}","gists_url":"https://api.github.com/users/omarkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/omarkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarkhan/subscriptions","organizations_url":"https://api.github.com/users/omarkhan/orgs","repos_url":"https://api.github.com/users/omarkhan/repos","events_url":"https://api.github.com/users/omarkhan/events{/privacy}","received_events_url":"https://api.github.com/users/omarkhan/received_events","type":"User","site_admin":false},"body":"This pull request is similar to https://github.com/open-craft/opencraft/pull/3, with the following differences:\r\n\r\n- Uses postgresql instead of sqlite\r\n- Does not change the Makefile\r\n- Does not require any manual changes to `~/.bashrc`","created_at":"2015-09-25T06:31:12Z","updated_at":"2015-09-26T15:23:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49b35a0bc5c409d35b6f1513009f49c8293c74b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/open-craft/opencraft/pulls/9/commits","review_comments_url":"https://api.github.com/repos/open-craft/opencraft/pulls/9/comments","review_comment_url":"https://api.github.com/repos/open-craft/opencraft/pulls/comments{/number}","comments_url":"https://api.github.com/repos/open-craft/opencraft/issues/9/comments","statuses_url":"https://api.github.com/repos/open-craft/opencraft/statuses/beb54b9ee8c498bdfdfa00dd80c860f595fc3c01","head":{"label":"omarkhan:vagrant","ref":"vagrant","sha":"beb54b9ee8c498bdfdfa00dd80c860f595fc3c01","user":{"login":"omarkhan","id":793379,"avatar_url":"https://avatars.githubusercontent.com/u/793379?v=3","gravatar_id":"","url":"https://api.github.com/users/omarkhan","html_url":"https://github.com/omarkhan","followers_url":"https://api.github.com/users/omarkhan/followers","following_url":"https://api.github.com/users/omarkhan/following{/other_user}","gists_url":"https://api.github.com/users/omarkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/omarkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarkhan/subscriptions","organizations_url":"https://api.github.com/users/omarkhan/orgs","repos_url":"https://api.github.com/users/omarkhan/repos","events_url":"https://api.github.com/users/omarkhan/events{/privacy}","received_events_url":"https://api.github.com/users/omarkhan/received_events","type":"User","site_admin":false},"repo":{"id":42999785,"name":"opencraft","full_name":"omarkhan/opencraft","owner":{"login":"omarkhan","id":793379,"avatar_url":"https://avatars.githubusercontent.com/u/793379?v=3","gravatar_id":"","url":"https://api.github.com/users/omarkhan","html_url":"https://github.com/omarkhan","followers_url":"https://api.github.com/users/omarkhan/followers","following_url":"https://api.github.com/users/omarkhan/following{/other_user}","gists_url":"https://api.github.com/users/omarkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/omarkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarkhan/subscriptions","organizations_url":"https://api.github.com/users/omarkhan/orgs","repos_url":"https://api.github.com/users/omarkhan/repos","events_url":"https://api.github.com/users/omarkhan/events{/privacy}","received_events_url":"https://api.github.com/users/omarkhan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/omarkhan/opencraft","description":"OpenCraft - Instance Manager","fork":true,"url":"https://api.github.com/repos/omarkhan/opencraft","forks_url":"https://api.github.com/repos/omarkhan/opencraft/forks","keys_url":"https://api.github.com/repos/omarkhan/opencraft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omarkhan/opencraft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omarkhan/opencraft/teams","hooks_url":"https://api.github.com/repos/omarkhan/opencraft/hooks","issue_events_url":"https://api.github.com/repos/omarkhan/opencraft/issues/events{/number}","events_url":"https://api.github.com/repos/omarkhan/opencraft/events","assignees_url":"https://api.github.com/repos/omarkhan/opencraft/assignees{/user}","branches_url":"https://api.github.com/repos/omarkhan/opencraft/branches{/branch}","tags_url":"https://api.github.com/repos/omarkhan/opencraft/tags","blobs_url":"https://api.github.com/repos/omarkhan/opencraft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omarkhan/opencraft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omarkhan/opencraft/git/refs{/sha}","trees_url":"https://api.github.com/repos/omarkhan/opencraft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omarkhan/opencraft/statuses/{sha}","languages_url":"https://api.github.com/repos/omarkhan/opencraft/languages","stargazers_url":"https://api.github.com/repos/omarkhan/opencraft/stargazers","contributors_url":"https://api.github.com/repos/omarkhan/opencraft/contributors","subscribers_url":"https://api.github.com/repos/omarkhan/opencraft/subscribers","subscription_url":"https://api.github.com/repos/omarkhan/opencraft/subscription","commits_url":"https://api.github.com/repos/omarkhan/opencraft/commits{/sha}","git_commits_url":"https://api.github.com/repos/omarkhan/opencraft/git/commits{/sha}","comments_url":"https://api.github.com/repos/omarkhan/opencraft/comments{/number}","issue_comment_url":"https://api.github.com/repos/omarkhan/opencraft/issues/comments{/number}","contents_url":"https://api.github.com/repos/omarkhan/opencraft/contents/{+path}","compare_url":"https://api.github.com/repos/omarkhan/opencraft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omarkhan/opencraft/merges","archive_url":"https://api.github.com/repos/omarkhan/opencraft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omarkhan/opencraft/downloads","issues_url":"https://api.github.com/repos/omarkhan/opencraft/issues{/number}","pulls_url":"https://api.github.com/repos/omarkhan/opencraft/pulls{/number}","milestones_url":"https://api.github.com/repos/omarkhan/opencraft/milestones{/number}","notifications_url":"https://api.github.com/repos/omarkhan/opencraft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omarkhan/opencraft/labels{/name}","releases_url":"https://api.github.com/repos/omarkhan/opencraft/releases{/id}","created_at":"2015-09-23T12:35:28Z","updated_at":"2015-09-23T12:35:29Z","pushed_at":"2015-09-26T10:18:52Z","git_url":"git://github.com/omarkhan/opencraft.git","ssh_url":"git@github.com:omarkhan/opencraft.git","clone_url":"https://github.com/omarkhan/opencraft.git","svn_url":"https://github.com/omarkhan/opencraft","homepage":null,"size":1506,"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":"open-craft:master","ref":"master","sha":"8a4ce6f5ac23f05ba668991c7b2885f5c5550d3c","user":{"login":"open-craft","id":7414786,"avatar_url":"https://avatars.githubusercontent.com/u/7414786?v=3","gravatar_id":"","url":"https://api.github.com/users/open-craft","html_url":"https://github.com/open-craft","followers_url":"https://api.github.com/users/open-craft/followers","following_url":"https://api.github.com/users/open-craft/following{/other_user}","gists_url":"https://api.github.com/users/open-craft/gists{/gist_id}","starred_url":"https://api.github.com/users/open-craft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-craft/subscriptions","organizations_url":"https://api.github.com/users/open-craft/orgs","repos_url":"https://api.github.com/users/open-craft/repos","events_url":"https://api.github.com/users/open-craft/events{/privacy}","received_events_url":"https://api.github.com/users/open-craft/received_events","type":"Organization","site_admin":false},"repo":{"id":40447973,"name":"opencraft","full_name":"open-craft/opencraft","owner":{"login":"open-craft","id":7414786,"avatar_url":"https://avatars.githubusercontent.com/u/7414786?v=3","gravatar_id":"","url":"https://api.github.com/users/open-craft","html_url":"https://github.com/open-craft","followers_url":"https://api.github.com/users/open-craft/followers","following_url":"https://api.github.com/users/open-craft/following{/other_user}","gists_url":"https://api.github.com/users/open-craft/gists{/gist_id}","starred_url":"https://api.github.com/users/open-craft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-craft/subscriptions","organizations_url":"https://api.github.com/users/open-craft/orgs","repos_url":"https://api.github.com/users/open-craft/repos","events_url":"https://api.github.com/users/open-craft/events{/privacy}","received_events_url":"https://api.github.com/users/open-craft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/open-craft/opencraft","description":"OpenCraft - Instance Manager","fork":false,"url":"https://api.github.com/repos/open-craft/opencraft","forks_url":"https://api.github.com/repos/open-craft/opencraft/forks","keys_url":"https://api.github.com/repos/open-craft/opencraft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/open-craft/opencraft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/open-craft/opencraft/teams","hooks_url":"https://api.github.com/repos/open-craft/opencraft/hooks","issue_events_url":"https://api.github.com/repos/open-craft/opencraft/issues/events{/number}","events_url":"https://api.github.com/repos/open-craft/opencraft/events","assignees_url":"https://api.github.com/repos/open-craft/opencraft/assignees{/user}","branches_url":"https://api.github.com/repos/open-craft/opencraft/branches{/branch}","tags_url":"https://api.github.com/repos/open-craft/opencraft/tags","blobs_url":"https://api.github.com/repos/open-craft/opencraft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/open-craft/opencraft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/open-craft/opencraft/git/refs{/sha}","trees_url":"https://api.github.com/repos/open-craft/opencraft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/open-craft/opencraft/statuses/{sha}","languages_url":"https://api.github.com/repos/open-craft/opencraft/languages","stargazers_url":"https://api.github.com/repos/open-craft/opencraft/stargazers","contributors_url":"https://api.github.com/repos/open-craft/opencraft/contributors","subscribers_url":"https://api.github.com/repos/open-craft/opencraft/subscribers","subscription_url":"https://api.github.com/repos/open-craft/opencraft/subscription","commits_url":"https://api.github.com/repos/open-craft/opencraft/commits{/sha}","git_commits_url":"https://api.github.com/repos/open-craft/opencraft/git/commits{/sha}","comments_url":"https://api.github.com/repos/open-craft/opencraft/comments{/number}","issue_comment_url":"https://api.github.com/repos/open-craft/opencraft/issues/comments{/number}","contents_url":"https://api.github.com/repos/open-craft/opencraft/contents/{+path}","compare_url":"https://api.github.com/repos/open-craft/opencraft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/open-craft/opencraft/merges","archive_url":"https://api.github.com/repos/open-craft/opencraft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/open-craft/opencraft/downloads","issues_url":"https://api.github.com/repos/open-craft/opencraft/issues{/number}","pulls_url":"https://api.github.com/repos/open-craft/opencraft/pulls{/number}","milestones_url":"https://api.github.com/repos/open-craft/opencraft/milestones{/number}","notifications_url":"https://api.github.com/repos/open-craft/opencraft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/open-craft/opencraft/labels{/name}","releases_url":"https://api.github.com/repos/open-craft/opencraft/releases{/id}","created_at":"2015-08-09T19:35:05Z","updated_at":"2015-09-13T14:59:29Z","pushed_at":"2015-09-26T15:03:47Z","git_url":"git://github.com/open-craft/opencraft.git","ssh_url":"git@github.com:open-craft/opencraft.git","clone_url":"https://github.com/open-craft/opencraft.git","svn_url":"https://github.com/open-craft/opencraft","homepage":null,"size":1506,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/open-craft/opencraft/pulls/9"},"html":{"href":"https://github.com/open-craft/opencraft/pull/9"},"issue":{"href":"https://api.github.com/repos/open-craft/opencraft/issues/9"},"comments":{"href":"https://api.github.com/repos/open-craft/opencraft/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/open-craft/opencraft/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/open-craft/opencraft/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/open-craft/opencraft/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/open-craft/opencraft/statuses/beb54b9ee8c498bdfdfa00dd80c860f595fc3c01"}}}}