Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Ed Morley deb1fc86b7 Bug 1384518 - Switch from Memcached to Redis
Since:
* Redis has additional features we need (eg for bug 1409679)
* the Redis server, python client and Django backend are more
  actively maintained (so have persistent connections/pooling that
  actually works, which gives a big perf win)
* we can use Heroku's own Redis addon rather than relying on a
  third-party's (to hopefully prevent a repeat of the certificate
  expiration downtime)

This commit:
* Switches pylibmc/django-pylibmc to redis-py/django-redis, and
  configures the new backend according to:
  http://niwinz.github.io/django-redis/latest/
  https://github.com/andymccurdy/redis-py
* Uses redis-py's native support for TLS to connect to the Heroku
  Redis server's stunnel port directly, avoiding the complexity of
  using a buildpack to create an stunnel between the dyno and server:
  https://devcenter.heroku.com/articles/securing-heroku-redis#connecting-directly-to-stunnel
* Uses explicit `REDIS_URL` values on Travis/Vagrant rather than
  relying on the django-environ `default` value (for parity with
  how we configure `DATABASE_URL` and others).
* Removes the pylibmc connection-closing workaround from `wsgi.py`.

Note: Whilst the Heroku docs suggest using `django-redis-cache`, it's
not as actively maintained, so we're using `django-redis` instead:
https://devcenter.heroku.com/articles/heroku-redis
https://github.com/niwinz/django-redis
https://github.com/sebleier/django-redis-cache

Before this is merged, Heroku Redis instances will need to be created
for stage/production (prototype done) - likely on plan `premium-3`:
https://elements.heroku.com/addons/heroku-redis

We'll also need to pick an eviction policy:
https://devcenter.heroku.com/articles/heroku-redis#maxmemory-policy

Once deployed, the `memcachier-tls-buildpack` buildpack will no longer
be required and can be removed from prototype/stage/prod, along with
the `TREEHERDER_MEMCACHED` environment variable and Memcachier addon.
2018-01-21 14:41:35 +00:00
Ed Morley 076083373c
Vagrant: Remove redundant environment variables (#3051)
* `ENABLE_LOCAL_SETTINGS_FILE` is no longer references anywhere.
* `GRAPHQL` now defaults to `True`, so doesn't need to be overridden.
2017-12-20 14:04:26 +00:00
Dave Hunt 9fd3c72241
Bug 1340305 - Allow Selenium tests to be run locally 2017-11-09 12:55:25 +00:00
Ed Morley 934c6a2ab9 Bug 1414255 - Enable bash 'strict mode' in all shell scripts
This makes some of the error checking in `runtest.sh` redundant.
The shebangs have also been made more consistent.

See:
http://redsymbol.net/articles/unofficial-bash-strict-mode/
2017-11-05 20:53:29 +00:00
Ed Morley 225c772e38 Bug 1378433 - Stop vendoring libmysqlclient in Vagrant/Travis
Now that we're using MySQL 5.7 server, there is no longer a conflict
between our desired choice of client library (which had to be 5.7 to
avoid security vulnerabilities) and the server version.

The library is still vendored on Heroku for now (in `bin/pre_compile`),
but that can stop too, once we switch to the Heroku-16 stack which is
based on Ubuntu 16.04 (bug 1365567).
2017-07-07 18:56:12 +01:00
Ed Morley d604044192 Bug 1363333 - Vagrant: Switch from Python PPA to Heroku binaries
Since the third-party PPA is no longer maintained, and doesn't have
Python 2.7.13 which is what is being used on Heroku. Instead we copy
the Heroku Python buildpack installation method for greater parity:
18c404f72d/bin/steps/python
2017-05-09 12:56:36 +01:00
Ed Morley f9d1f89a9b Bug 1363333 - Vagrant: Set PATH instead of activating virtualenv
Adds the virtualenv directory to `PATH` in `env.sh`, to save having
to activate the virtualenv (which is about to be removed) or set
`PATH` in each of the wrapper bin scripts.
2017-05-09 12:44:19 +01:00
Ed Morley be123f862b Bug 1318295 - Vagrant: Move profile/env setup to shell provisioner 2017-03-21 22:48:51 +00:00