Commit Graph

74 Commits

Author SHA1 Message Date
Jordan Milne
7ec1bfa057 Add scary comment about g.debug to the default development.update
It's not obvious that `g.debug = True` is bad to do in prod unless you've
read `example.ini` as well.
2015-04-06 09:23:16 -07:00
Chad Birch
0fbea80d45 Integrate AutoModerator into the site 2015-03-31 14:56:19 -06:00
xiongchiamiov
d3919b9357 Install python-mock for tests
We've been using the `mock` module for one of our tests, but seem to have never
added it to any of the installation scripts.
2015-03-16 14:00:43 -07:00
Chris Stephens
3a02bbb882 install-reddit: Add oauth domain default to install script 2015-03-05 11:30:51 -08:00
Jordan Milne
0bceab8a1a Add queue to scrub deleted accounts of potential leaks 2015-03-03 14:25:38 -08:00
Neil Williams
274a8d7008 Overhaul populatedb script.
This new script attempts to generate some subreddits that are more like
production data.  It first pulls down data from reddit.com, then uses
markov chains to generate new data for insertion into the databases.
2015-03-02 14:44:57 -08:00
Keith Mitchell
aa87a4e944 Use unidecode for better slugs 2015-02-26 11:53:26 -08:00
Chris Stephens
301bc90d19 install-reddit: change curl to wget
curl isn't installed by default on minimal linux installs, so removing
the dependency on it
2015-02-25 20:39:06 -08:00
Neil Williams
f94e9cc14e install-reddit: Upgrade Cassandra and use DataStax repos.
This modernizes install-script reddit a bit, as we're already running
1.2 in production.

Note: this upgrades Cassandra from a patched 1.0.7 to vanilla 1.2.19. Please see
http://www.datastax.com/documentation/cassandra/1.2/cassandra/upgrade/upgradeC_c.html
for instructions on upgrading which may require some upgrades of the
data on disk.
2015-02-12 13:27:32 -08:00
Neil Williams
af09fa8dee Update license headers to 2015.
The highlight of each year for me.
2015-01-08 13:35:03 -08:00
Neil Williams
d24a8ebf1d media: Take advantage of HTTP & HTTPS media being on the same domain.
Since we have an HTTPS-capable CDN in front of our S3 static domains
now, it's far faster for clients to use the CDN on HTTPS as well rather
than going straight to (high-latency) S3.

This patch makes it so that we continue to store URLs with explicit HTTP
schemes but instead of conditionally converting to HTTPS, we render
protocol-relative URLs. This should be safe for systems using the
filesystem media provider as we've installed an SSL cert there all
along.
2014-12-01 12:03:44 -08:00
Jordan Milne
9c1ddbbeb8 Warn during installation if total memory is below 2GB 2014-11-14 17:17:19 -04:00
Neil Williams
38e64dbd9e install-reddit: Add some more helper scripts.
The intent is to further provide simple commands for common tasks in a
way consistent with staging and production as well.

reddit-start: start all reddit code
reddit-stop: stop all reddit code
reddit-restart: restart one or all reddit service(s)
reddit-flush: flush all memcached keys
2014-11-12 10:04:15 -08:00
Robert Ditthardt
05d4481109 install-reddit: Fix intermittent haproxy timeouts
Increase max connections for backend reddit in haproxy.cfg. We have not
nailed down the cause of these timeouts yet, but this definitely solves
it in a VM environment.
2014-11-10 15:47:31 -08:00
Miquel Sabaté
ed8a364ad9 It's not needed to invoke bash with the -e option.
This patch is super simple :) Basically, the first command of the
install-reddit.sh file is "set -e". Therefore, we don't have to invoke bash
with "#!/bin/bash -e". We can either remove the -e from the "#!/bin/bash -e" or
we can remove "set -e". I prefer keeping "set -e" because it's more explicit.

Fixes #1033.
2014-11-04 10:27:43 -08:00
Brian Simpson
884deaecfd Add pixel and click redirect server. 2014-10-28 01:22:37 -04:00
Brian Simpson
109a1d311d install-reddit: Add libpcre3-dev for traffic scripts. 2014-10-28 01:22:29 -04:00
umbrae
08cf4984a7 Inbox counts: Add mark all messages as read
Conflicts:

	r2/r2/lib/js.py
2014-10-03 11:46:48 -07:00
Robert Ditthardt
0ad89d1abb install-reddit: Domain configuration for .update
Added automatically updating the domain field in development.update
based on what is specified via environment variable to avoid
inconsistencies.
2014-10-03 11:28:49 -07:00
Robert Ditthardt
b1f89ec653 install-reddit: Make idempotent
These changes make it so the install-reddit script is mostly self
healing and can be run many times in a row on the same machine. This
allows for more rapid iteration on development of the build process and
also easier updates for end users.
2014-10-03 11:28:45 -07:00
Robert Ditthardt
89dc44baf5 install-reddit: Add REDDIT_PLUGINS variable.
This variable is used to tell the build system what plugins to clone and
register with the make process. It also works when the plugins are
already cloned and have local modifications.
2014-10-03 11:28:37 -07:00
Jack Lawson
db9e6e264e fix utf8/en issues in postgres in install script 2014-09-17 14:26:44 -07:00
Neil Williams
adee8347e1 Replace closure compiler with Uglify.
Uglify is 2x faster than Closure Compiler at minifying our JS.  The
resultant output is slightly larger than CC's when ungzipped, but
slightly smaller when gzipped.
2014-07-02 17:46:39 -07:00
ArrestedDevelopment
266eb76a9e Fix 'working-dir' in geoip.conf. 2014-06-02 18:32:06 -04:00
Brian Simpson
20f57a17eb Add GeoIP service. 2014-05-28 12:57:10 -07:00
Neil Williams
90cfcaaecc Update license headers to 2014.
Ok, now I'm getting some angst in my commit messages like my
predecessors had.  I understand now.  It's a terrible burden.  Why must
the calendar progress?  Why must numbers increment?  The world is
forever turning.

The future is here.

It is 2014.
2014-05-02 16:26:31 -04:00
Neil Williams
dce6b6d84f CSS Filter: replace cssutils with tinycss2.
The aim of this patch is to allow a mostly equivalent subset of CSS
through as the cssutils-based parser did.

The subset of valid properties represented in this are the entirety of
CSS2.1 plus a handful of newer ones that are already in active use on
reddit.

Several IE hacks like the "filter" property, "_height", etc. are no
longer allowed.
2014-04-29 11:09:43 -07:00
Neil Williams
9ab04143c8 install-reddit: Install plugins about, liveupdate, meatspace by default. 2014-04-02 10:23:20 -07:00
Neil Williams
38348a27e8 install-reddit: Add some helper scripts to the install env.
These reduce typing to do paster run and paster shell by taking
advantage of the standard location of run.ini.
2014-04-02 10:23:20 -07:00
Neil Williams
11ac60fa60 install-reddit: Focus on dev-environment installs and reorganize.
Production installs should work pretty differently and I have a few
plans for that.  In the meantime, this simplifies away a few of the bits
that were ill advisedly trying to help production installs and changes
the installer to be better suited to the modern environment with plugins
etc. by putting all code in a src/ directory.
2014-04-02 10:23:20 -07:00
Roc King
fe1296a8b5 install-reddit: add the missing s command in the sed invocation which modifies the environment of cassandra. 2014-03-21 07:42:41 +08:00
Neil Williams
204079eca6 install-reddit: Add hacky patch to fix C* stack size issues.
Recent updates to the JVM have caused Cassandra to start failing due to
the stack size being set too low.
2014-03-20 23:21:36 +01:00
Roger Ostrander
89762c93f0 Add TryLater: a system for scheduling events. 2014-02-26 12:45:55 -08:00
Max Goodman
286379e81a install-reddit: Explicitly disallow installing modules from PYPI. 2014-02-20 15:45:21 -08:00
Neil Williams
3511b08110 Combine and generalize the time listing precomputer scripts.
Previously, the subreddit/domain and account precomputers were separate.
This merges the two and improves their portability in the process.
Because of the increased portability, the precomputer can now be added
to the install script by default.
2014-02-13 13:50:52 -08:00
Neil Williams
f78857266b Add integration with websocket server "sutro". 2014-01-23 16:13:06 -08:00
Neil Williams
7cee17a418 install-reddit: Only bind the stunnel-internal port on localhost.
This prevents connections directly on that port from outside.
2014-01-23 16:13:06 -08:00
Neil Williams
5ead01ca50 install-reddit: Move netcat to proper group of packages. 2014-01-23 16:13:06 -08:00
Francesco Frassinelli
f7c2ebb6ef Added missing netcat dependency
netcat is needed (tested on Ubuntu 12.04.3 LTS x86_64)
2013-11-19 12:16:58 -08:00
Brian Simpson
7e14f37921 Remove Google Checkout.
The service is being discontinued.
2013-11-12 15:59:16 -05:00
Neil Williams
f8ec402dba install-reddit: Ensure consumer-count.d is owned by the right user. 2013-10-14 13:55:56 -07:00
Neil Williams
8bdc62314a scraper_q: Gracefully degrade to thumbnail-only when no embedly.
Between the local filesystem media provider and this change, scraper_q
is workable after a default install now.
2013-10-14 13:55:56 -07:00
Neil Williams
8f7db4f3da Media Provider: Add "filesystem" provider for local nginx.
This media provider is for simple single-server installations where an
HTTP server running on the same machine handles serving of the static
media files.

An appropriate setup with nginx is now the default in the new install
script.
2013-10-14 13:55:56 -07:00
Brian Simpson
ed18fc5b21 Delete g.countries. 2013-09-27 15:20:41 -04:00
Neil Williams
6badac60b1 install-reddit: Add HTTPS to the default install.
This is primarily to show how to set up reddit with HTTPS as well as to
make it possible to test HTTPS content. The default installation uses
the snakeoil cert and is therefore unauthenticated. A properly signed
certificate must be used for actual security.
2013-09-24 14:37:39 -07:00
Neil Williams
e535646372 Switch to a packaged version of LESS.
Assuming the package from our PPA is used, this upgrades to LESS
v1.4.2.1 in the process.
2013-09-20 10:49:02 -07:00
Neil Williams
b87d87f9a5 Determine c.secure status based on X-Forwarded-Proto header.
Previously, c.secure status was determined based on the domain used.
This allows for the status to vary independently of domain for greater
flexibility.

Note: it is critical that the load balancer strips any X-Forwarded-Proto
headers that may've been sent by the client.
2013-09-12 13:35:17 -07:00
Neil Williams
e70813aba7 Revert "Added check for UTF-8 to make sure postgres creates db"
This reverts commit d841be78be.
2013-07-16 16:05:46 -07:00
Chris Lexmond
d841be78be Added check for UTF-8 to make sure postgres creates db 2013-07-16 10:54:12 -07:00
Chris Lexmond
83d27251c2 Added an additional apt-get to ensure repo records for dependencies are present 2013-07-16 10:54:12 -07:00