# HG changeset patch # User Vincent Tondellier # Date 1483212804 -3600 # Node ID c019ceb604a4322485391c3447ccac6ee4507f4e # Parent 12da024402d2ea99b5a0ced18bb3c4521fda67e8 Refresh install intructions diff -r 12da024402d2 -r c019ceb604a4 INSTALL --- a/INSTALL Sun Dec 18 22:17:10 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -Web interface dependencies: -- perl >= 5.10 -- Mojolicious >= 2.98 -- Mojolicious::Plugin::BootstrapPagination -- perl-UUID -- jquery - -On debian, install libuuid-perl, libmojolicious-perl (from wheezy-backports) and libjs-jquery. - -Mojolicious::Plugin::BootstrapPagination can be installed with cpan, or you -can create a debian package with cpan2deb Mojolicious::Plugin::BootstrapPagination - -Edit CrashTest.conf and change the paths to match your environment. - -If you want to use the SQL backend for a faster index page, see dist.ini for -the additional requirements. Then, you can create the tables with : -$ ./CrashTest.pl db create - -Next, you need to get and build the json minidump-stackwalk from soccoro: -https://github.com/mozilla/socorro/tree/master/minidump-stackwalk/ - -Full compilation instructions: -$ svn co http://google-breakpad.googlecode.com/svn/trunk google-breakpad -$ mkdir obj-breakpad -$ cd obj-breakpad -$ ../google-breakpad/configure && make -$ cd ../ -$ mkdir minidump-stackwalk -$ cd minidump-stackwalk -$ wget https://github.com/mozilla/socorro/raw/master/minidump-stackwalk/{Makefile,stackwalker.cc} -$ make BREAKPAD_SRCDIR=../google-breakpad/src BREAKPAD_LIBS="../obj-breakpad/src/libbreakpad.a ../obj-breakpad/src/third_party/libdisasm/libdisasm.a" OBJS=/usr/lib/libjsoncpp.a JSON_INCLUDEDIR=/usr/include/jsoncpp - -Note: the paths above are for the system-installed libjsoncpp on debian. Get -the jsoncpp from socorro repository, or adjust the paths for you system if you -use another distribution. - -Copy stackwalker to the path configured in CrashTest.conf. - -No, you can test: -$ hypnotoad -f ./CrashTest.pl - -The submit URL is /submit and is compatible with socorro. - diff -r 12da024402d2 -r c019ceb604a4 INSTALL.pod --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/INSTALL.pod Sat Dec 31 20:33:24 2016 +0100 @@ -0,0 +1,190 @@ +=head1 INSTALLATION + +=head2 Compile breakpad and stackwalker from Socorro + +Install system packages: + + apt install build-essential libjsoncpp-dev libcurl4-openssl-dev git wget python pkg-config + +Get and build breakpad: +L + +Get and build the json minidump-stackwalk from soccoro: +L + +Full compilation instructions: + + mkdir breakpad-stackwalker && cd breakpad-stackwalker + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git + export PATH="$PWD/depot_tools:$PATH" + fetch breakpad + mkdir obj-breakpad && cd obj-breakpad + ../src/configure + make + cd ../ + mkdir minidump-stackwalk && cd minidump-stackwalk + wget https://github.com/mozilla/socorro/raw/master/minidump-stackwalk/{Makefile,stackwalker.cc,http_symbol_supplier.cc,http_symbol_supplier.h,common.h} + make stackwalker \ + BREAKPAD_SRCDIR=../src/src \ + BREAKPAD_LIBS="../obj-breakpad/src/libbreakpad.a ../obj-breakpad/src/third_party/libdisasm/libdisasm.a" \ + JSON_INCLUDEDIR=/usr/include/jsoncpp \ + stackwalker_OBJS="/usr/lib/libjsoncpp.so" + + +Note: the paths above are for the system-installed libjsoncpp on debian. Get +jsoncpp from socorro repository, or adjust the paths for you system if you +use another distribution. + +=head2 Web Interface installation + +=head3 Install system packages (Debian) + +Install direct dependencies: + + apt install libjs-jquery libuuid-perl libdata-page-perl libdatetime-format-pg-perl \ + libsearch-queryparser-perl libdbi-perl libdbd-pg-perl libpq-dev + +and indirect dependencies: + + apt install cpanminus libextutils-installpaths-perl libfile-sharedir-perl libfile-sharedir-install-perl \ + libextutils-helpers-perl libmodule-build-cleaninstall-perl \ + libmojolicious-plugin-i18n-perl libdata-dump-perl + +If your system is recent enough (Debian jessie is too old), also install: + + apt install libmojolicious-perl libminion-perl libmojo-pg-perl + +Or use carton (Bundler for perl), if you prefer to bundle dependencies: + + apt install carton uuid-dev + +=head3 Install the web interface + + tar -xf CrashTest-$VERSION.tar.gz + cd CrashTest-$VERSION + +use cpanm to install missing perl dependencies: + + cpanm Minion@4.0 . + +or carton to vendorize half of CPAN: + + carton install + +=head3 Database + +Install PostgreSQL (PostgreSQL E= 9.4 is required): + + apt install postgresql postgresql-contrib postgresql-9.4-debversion + +Create the user and database: + + su postgres + psql + CREATE USER crashtest LOGIN; + CREATE DATABASE crashtest OWNER crashtest; + +Add PostgreSQL extensions to the database: + + \c crashtest + CREATE EXTENSION pg_trgm; + CREATE EXTENSION debversion; + +debversion is not required, but is really useful to sort and filter on product versions + +=head2 Configuration + +Copy the example crash_test.conf from F and edit: + + cp extras/crash_test.conf . + vim crash_test.conf + +It's a perl file, so you can check the syntax with: + + perl -c crash_test.conf + +Some things to change: + +=over + +=item Database + +Adjust your database connection string in C and C. +The database can be shared by the JobQueue and Storage. + +=item stackwalker path + +If you did not install stackwalker in your $PATH, adjust C + +=item Breakpad symbols directories + +Set the paths where you store you breakpad symbols in C. + +SECURITY WARNING: this will be shell-expanded using C, don't use wildcards if you do not trust +the users that have write permissions on these directories. + +=item Storage directory + +Adjust C or comment the section if you don't want to store the raw minidumps. +Processed crashs are also stored in the database. + +=item Web links + +You can link to your source code browser (this require post-processing of the symbol files), +see C. + +It's a C with the 3 variables C<$scmpath>, C<$rev> and C<$line> defined. + +You can also add links to your bugtracker (C), but there is no interface +to edit them yet. + +=back + +=head2 Create database structure + +Run: + + CrashTest db create + +or with carton: + + carton exec CrashTest db create + +If you have installed the debversion PostgreSQL extension, use it: + + psql + ALTER TABLE products ALTER version TYPE debversion; + + +=head1 RUNNING + +=head2 Manually (for testing) + +Start the background workers + + CrashTest minion worker + +Start the web interface + + CrashTest daemon + +=head2 Production (services) + +In the F directory, you will find: + +=over + +=item F + +A config file with production settings for hypnotoad. +Copy to the same location as F, F for a system-wide install. + +=item F + +Config file for nginx. Usually in F. + +=item F + +Systemd services for the workers and the web interface. Usually in F. + +=back