{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/socorro/pulls/comments/29324187","id":29324187,"diff_hunk":"@@ -0,0 +1,310 @@\n+.. index:: configuring-crashstats\n+\n+.. _configuring-crashstats-chapter:\n+\n+Configuring Crash-Stats and PostgreSQL\n+======================================\n+\n+Install PostgreSQL\n+------------------\n+\n+Install the PostgreSQL repository.\n+::\n+  sudo rpm -ivh http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm\n+\n+Now you can actually install the packages:\n+::\n+  sudo yum install postgresql93-server postgresql93-contrib\n+\n+Initialize and enable PostgreSQL on startup:\n+::\n+  sudo service postgresql-9.3 initdb\n+  sudo systemctl enable postgresql-9.3\n+\n+Modify postgresql config\n+::\n+  sudo vi /var/lib/pgsql/9.3/data/postgresql.conf\n+\n+Ensure that timezone is set to UTC\n+::\n+  timezone = 'UTC'\n+\n+Allow local connections for PostgreSQL\n+::\n+  sudo vi /var/lib/pgsql/9.3/data/pg_hba.conf\n+\n+Ensure that local connections are allowed:\n+::\n+\n+  # IPv4 local connections:\n+  host    all             all             127.0.0.1/32            trust\n+  # IPv6 local connections:\n+  host    all             all             ::1/128                 trust\n+\n+See http://www.postgresql.org/docs/9.3/static/auth-pg-hba-conf.html\n+for more information on this file.\n+\n+You'll need to restart postgresql if the configuration was updated:\n+::\n+  sudo systemctl restart postgresql-9.3\n+\n+Create database, set up schema\n+------------------------------\n+\n+Socorro provides a setup script which attempts to initialize PostgreSQL::\n+\n+    sudo setup-socorro.sh postgresql\n+\n+This creates a new database named \"breakpad\" and sets up the schema\n+that Socorro and crash-stats expect.\n+\n+Configure Socorro Processor\n+---------------------------\n+\n+::\n+  socorro processor \\\n+    --destination.crashstorage_class='\n+      socorro.external.crashstorage_base.PolyCrashStorage' \\\n+    --destination.storage_classes='\n+      socorro.external.fs.crashstorage.FSLegacyDatedRadixTreeStorage,       \n+      socorro.external.postgresql.crashstorage.PostgreSQLCrashStorage'\n+\n+\n+Start services\n+--------------\n+\n+Both the Django socorro-webapp and the socorro-middleware REST service\n+must be running::\n+\n+    sudo systemctl enable socorro-middleware socorro-webapp\n+\n+Configure Nginx\n+---------------\n+\n+Both socorro-webapp and socorro-middleware should be fronted by a\n+webserver like Nginx.\n+\n+You can find a working configs in\n+/etc/nginx/conf.d/socorro-{webapp,middleware}.conf.sample\n+\n+You should change server_name in socorro-webapp.conf at minimum, the default is\n+\"crash-stats\".\n+\n+You can leave the default \"socorro-middleware\" in socorro-middleware.conf\n+\n+Copy these .sample files to .conf and restart Nginx to activate::\n+\n+  sudo systemctl restart nginx\n+\n+Cron jobs\n+---------\n+\n+Socorro uses a crontab manager called Crontabber. This needs\n+to be in /etc/cron.d/socorro on a single host (generally referred to\n+as the \"admin host\")::\n+\n+    */5 * * * * socorro /data/socorro/application/scripts/crons/crontabber.sh\n+\n+Set up crash-stats web site\n+---------------------------\n+\n+Socorro produces graphs and reports, most are updated once per day.\n+\n+You must enter information about your releases into Socorro in order\n+for this to work, and this information must match the incoming crashes.\n+\n+Becoming a superuser\n+--------------------\n+\n+If you're starting a fresh new Socorro instance without any users at\n+all, you need to bootstrap at least one superuser so the paragraph\n+above starts to make sense. To do that, you first need to **sign in at\n+least once** using the email address you want to identify as a\n+superuser. Once you've done that, run the following command::\n+\n+    cd /data/socorro\n+    export SECRET_KEY=\"...\"\n+    ./socorro-virtualenv/bin/python webapp-django/manage.py makesuperuser theemail@address.com\n+\n+Now the user with this email address should see a link to \"Admin\" in\n+the footer.\n+\n+From this point on, you no longer need the command line to add other\n+superusers - you can do this from http://crash-stats/admin/users/\n+\n+Adding new products and releases\n+--------------------------------\n+\n+Each product you wish to have reports on must be added via the Socorro\n+admin UI:\n+\n+http://crash-stats/admin/products/\n+\n+All products must have one or more releases:\n+\n+http://crash-stats/admin/releases/\n+\n+The new releases should be \"featured\" so they are\n+used as defaults and show up in all reports:\n+\n+http://crash-stats/admin/featured-versions/\n+\n+Make sure to restart memcached so you see your changes right away:\n+::\n+  sudo systemctl restart memcached\n+\n+Now go to the front page for your application. For example, if your application\n+was named \"KillerApp\" then it will appear at:\n+\n+http://crash-stats/home/products/KillerApp\n+\n+You should also change the DEFAULT_PRODUCT in local.py (/etc/socorro/local.py\n+in a packaged install, ./webapp-django/crashstats/settings/local.py otherwise).\n+\n+Active Daily Install (ADI)\n+--------------------------\n+","path":"docs/configuring-crash-stats.rst","position":166,"original_position":166,"commit_id":"a666c0d1c37d723c8a9985204a1a8896b454d024","original_commit_id":"a666c0d1c37d723c8a9985204a1a8896b454d024","user":{"login":"phrawzty","id":625232,"avatar_url":"https://avatars.githubusercontent.com/u/625232?v=3","gravatar_id":"","url":"https://api.github.com/users/phrawzty","html_url":"https://github.com/phrawzty","followers_url":"https://api.github.com/users/phrawzty/followers","following_url":"https://api.github.com/users/phrawzty/following{/other_user}","gists_url":"https://api.github.com/users/phrawzty/gists{/gist_id}","starred_url":"https://api.github.com/users/phrawzty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phrawzty/subscriptions","organizations_url":"https://api.github.com/users/phrawzty/orgs","repos_url":"https://api.github.com/users/phrawzty/repos","events_url":"https://api.github.com/users/phrawzty/events{/privacy}","received_events_url":"https://api.github.com/users/phrawzty/received_events","type":"User","site_admin":false},"body":"This, for example, is highly Moz-specific.","created_at":"2015-04-29T10:22:19Z","updated_at":"2015-04-29T10:22:19Z","html_url":"https://github.com/mozilla/socorro/pull/2754#discussion_r29324187","pull_request_url":"https://api.github.com/repos/mozilla/socorro/pulls/2754","_links":{"self":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/comments/29324187"},"html":{"href":"https://github.com/mozilla/socorro/pull/2754#discussion_r29324187"},"pull_request":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/2754"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/socorro/pulls/2754","id":34327860,"html_url":"https://github.com/mozilla/socorro/pull/2754","diff_url":"https://github.com/mozilla/socorro/pull/2754.diff","patch_url":"https://github.com/mozilla/socorro/pull/2754.patch","issue_url":"https://api.github.com/repos/mozilla/socorro/issues/2754","number":2754,"state":"open","locked":false,"title":"Bug1159450 more explicit config optional webapp pg","user":{"login":"rhelmer","id":61412,"avatar_url":"https://avatars.githubusercontent.com/u/61412?v=3","gravatar_id":"","url":"https://api.github.com/users/rhelmer","html_url":"https://github.com/rhelmer","followers_url":"https://api.github.com/users/rhelmer/followers","following_url":"https://api.github.com/users/rhelmer/following{/other_user}","gists_url":"https://api.github.com/users/rhelmer/gists{/gist_id}","starred_url":"https://api.github.com/users/rhelmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhelmer/subscriptions","organizations_url":"https://api.github.com/users/rhelmer/orgs","repos_url":"https://api.github.com/users/rhelmer/repos","events_url":"https://api.github.com/users/rhelmer/events{/privacy}","received_events_url":"https://api.github.com/users/rhelmer/received_events","type":"User","site_admin":false},"body":"r? @twobraids @phrawzty @peterbe - this patch makes it clear in the docs that PostgreSQL and the Django webapp are both optional components. I think we should warn external installers away from them, and suggest using ES+Kibana instead.\r\n\r\nI find doc changes like this hard to read as diffs, I suggest doing `make html` in the `socorro/docs/` dir if you want to check out what recommended install looks like now.","created_at":"2015-04-29T01:42:30Z","updated_at":"2015-04-29T10:22:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3e559b156314fa013bbd011ca718087bf06bcdd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/socorro/pulls/2754/commits","review_comments_url":"https://api.github.com/repos/mozilla/socorro/pulls/2754/comments","review_comment_url":"https://api.github.com/repos/mozilla/socorro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/socorro/issues/2754/comments","statuses_url":"https://api.github.com/repos/mozilla/socorro/statuses/a666c0d1c37d723c8a9985204a1a8896b454d024","head":{"label":"rhelmer:bug1159450-more-explicit-config-optional-webapp-pg","ref":"bug1159450-more-explicit-config-optional-webapp-pg","sha":"a666c0d1c37d723c8a9985204a1a8896b454d024","user":{"login":"rhelmer","id":61412,"avatar_url":"https://avatars.githubusercontent.com/u/61412?v=3","gravatar_id":"","url":"https://api.github.com/users/rhelmer","html_url":"https://github.com/rhelmer","followers_url":"https://api.github.com/users/rhelmer/followers","following_url":"https://api.github.com/users/rhelmer/following{/other_user}","gists_url":"https://api.github.com/users/rhelmer/gists{/gist_id}","starred_url":"https://api.github.com/users/rhelmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhelmer/subscriptions","organizations_url":"https://api.github.com/users/rhelmer/orgs","repos_url":"https://api.github.com/users/rhelmer/repos","events_url":"https://api.github.com/users/rhelmer/events{/privacy}","received_events_url":"https://api.github.com/users/rhelmer/received_events","type":"User","site_admin":false},"repo":{"id":4216256,"name":"socorro","full_name":"rhelmer/socorro","owner":{"login":"rhelmer","id":61412,"avatar_url":"https://avatars.githubusercontent.com/u/61412?v=3","gravatar_id":"","url":"https://api.github.com/users/rhelmer","html_url":"https://github.com/rhelmer","followers_url":"https://api.github.com/users/rhelmer/followers","following_url":"https://api.github.com/users/rhelmer/following{/other_user}","gists_url":"https://api.github.com/users/rhelmer/gists{/gist_id}","starred_url":"https://api.github.com/users/rhelmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhelmer/subscriptions","organizations_url":"https://api.github.com/users/rhelmer/orgs","repos_url":"https://api.github.com/users/rhelmer/repos","events_url":"https://api.github.com/users/rhelmer/events{/privacy}","received_events_url":"https://api.github.com/users/rhelmer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhelmer/socorro","description":"Socorro is a server to accept and process Breakpad crash reports. ","fork":true,"url":"https://api.github.com/repos/rhelmer/socorro","forks_url":"https://api.github.com/repos/rhelmer/socorro/forks","keys_url":"https://api.github.com/repos/rhelmer/socorro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhelmer/socorro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhelmer/socorro/teams","hooks_url":"https://api.github.com/repos/rhelmer/socorro/hooks","issue_events_url":"https://api.github.com/repos/rhelmer/socorro/issues/events{/number}","events_url":"https://api.github.com/repos/rhelmer/socorro/events","assignees_url":"https://api.github.com/repos/rhelmer/socorro/assignees{/user}","branches_url":"https://api.github.com/repos/rhelmer/socorro/branches{/branch}","tags_url":"https://api.github.com/repos/rhelmer/socorro/tags","blobs_url":"https://api.github.com/repos/rhelmer/socorro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhelmer/socorro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhelmer/socorro/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhelmer/socorro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhelmer/socorro/statuses/{sha}","languages_url":"https://api.github.com/repos/rhelmer/socorro/languages","stargazers_url":"https://api.github.com/repos/rhelmer/socorro/stargazers","contributors_url":"https://api.github.com/repos/rhelmer/socorro/contributors","subscribers_url":"https://api.github.com/repos/rhelmer/socorro/subscribers","subscription_url":"https://api.github.com/repos/rhelmer/socorro/subscription","commits_url":"https://api.github.com/repos/rhelmer/socorro/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhelmer/socorro/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhelmer/socorro/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhelmer/socorro/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhelmer/socorro/contents/{+path}","compare_url":"https://api.github.com/repos/rhelmer/socorro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhelmer/socorro/merges","archive_url":"https://api.github.com/repos/rhelmer/socorro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhelmer/socorro/downloads","issues_url":"https://api.github.com/repos/rhelmer/socorro/issues{/number}","pulls_url":"https://api.github.com/repos/rhelmer/socorro/pulls{/number}","milestones_url":"https://api.github.com/repos/rhelmer/socorro/milestones{/number}","notifications_url":"https://api.github.com/repos/rhelmer/socorro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhelmer/socorro/labels{/name}","releases_url":"https://api.github.com/repos/rhelmer/socorro/releases{/id}","created_at":"2012-05-03T16:46:07Z","updated_at":"2015-04-28T16:23:14Z","pushed_at":"2015-04-29T04:07:18Z","git_url":"git://github.com/rhelmer/socorro.git","ssh_url":"git@github.com:rhelmer/socorro.git","clone_url":"https://github.com/rhelmer/socorro.git","svn_url":"https://github.com/rhelmer/socorro","homepage":"https://wiki.mozilla.org/Socorro","size":237371,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"2a2584bac3cdc951c276568d4d54f988f0e9ffb2","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":2263742,"name":"socorro","full_name":"mozilla/socorro","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/socorro","description":"Socorro is a server to accept and process Breakpad crash reports. ","fork":false,"url":"https://api.github.com/repos/mozilla/socorro","forks_url":"https://api.github.com/repos/mozilla/socorro/forks","keys_url":"https://api.github.com/repos/mozilla/socorro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/socorro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/socorro/teams","hooks_url":"https://api.github.com/repos/mozilla/socorro/hooks","issue_events_url":"https://api.github.com/repos/mozilla/socorro/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/socorro/events","assignees_url":"https://api.github.com/repos/mozilla/socorro/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/socorro/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/socorro/tags","blobs_url":"https://api.github.com/repos/mozilla/socorro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/socorro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/socorro/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/socorro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/socorro/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/socorro/languages","stargazers_url":"https://api.github.com/repos/mozilla/socorro/stargazers","contributors_url":"https://api.github.com/repos/mozilla/socorro/contributors","subscribers_url":"https://api.github.com/repos/mozilla/socorro/subscribers","subscription_url":"https://api.github.com/repos/mozilla/socorro/subscription","commits_url":"https://api.github.com/repos/mozilla/socorro/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/socorro/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/socorro/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/socorro/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/socorro/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/socorro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/socorro/merges","archive_url":"https://api.github.com/repos/mozilla/socorro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/socorro/downloads","issues_url":"https://api.github.com/repos/mozilla/socorro/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/socorro/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/socorro/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/socorro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/socorro/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/socorro/releases{/id}","created_at":"2011-08-24T19:21:49Z","updated_at":"2015-04-29T09:08:31Z","pushed_at":"2015-04-29T09:08:31Z","git_url":"git://github.com/mozilla/socorro.git","ssh_url":"git@github.com:mozilla/socorro.git","clone_url":"https://github.com/mozilla/socorro.git","svn_url":"https://github.com/mozilla/socorro","homepage":"https://wiki.mozilla.org/Socorro","size":191736,"stargazers_count":222,"watchers_count":222,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":118,"mirror_url":null,"open_issues_count":13,"forks":118,"open_issues":13,"watchers":222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/2754"},"html":{"href":"https://github.com/mozilla/socorro/pull/2754"},"issue":{"href":"https://api.github.com/repos/mozilla/socorro/issues/2754"},"comments":{"href":"https://api.github.com/repos/mozilla/socorro/issues/2754/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/2754/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/socorro/pulls/2754/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/socorro/statuses/a666c0d1c37d723c8a9985204a1a8896b454d024"}}}}