treeherder/vagrant/env.sh

18 строки
606 B
Bash
Исходник Обычный вид История

#!/usr/bin/env bash
export PATH="${HOME}/firefox:${HOME}/python/bin:${PATH}"
export BROKER_URL='amqp://guest:guest@localhost//'
export DATABASE_URL='mysql://root@localhost/treeherder'
export ELASTICSEARCH_URL='http://localhost:9200'
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-17 21:09:44 +03:00
export REDIS_URL='redis://localhost:6379'
export TREEHERDER_DEBUG='True'
export ENABLE_DEBUG_TOOLBAR='True'
export TREEHERDER_DJANGO_SECRET_KEY='secret-key-of-at-least-50-characters-to-pass-check-deploy'
export NEW_RELIC_CONFIG_FILE='newrelic.ini'
export NEW_RELIC_DEVELOPER_MODE='True'
# Enable Firefox headless mode, avoiding the need for xvfb.
export MOZ_HEADLESS=1