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

16 Коммитов

Автор SHA1 Сообщение Дата
Ed Morley bf4c7c05ff Bug 1151803 - Serve the UI using gunicorn/WhiteNoise instead of Apache
In order that we can serve the UI on Heroku, we wrap the Django wsgi app
with WhiteNoise, so both the UI and API requests are served by gunicorn.

In the Vagrant environment, Apache has been removed and Varnish instead
now proxies all requests to gunicorn/Django runserver directly, without
Apache as a go-between.

The UI on production will not be affected by this commit, since the
Apache config there will still intercept requests for the UI assets
rather than proxying them to gunicorn.

It's worth noting too, that we're not able to make use of WhiteNoise's
automatic Django GZip/caching support since that assumes we are using
Django templates and referring to resources using {% static "foo.css" %}

However, we can sub-class WhiteNoise (or more specifically the
DjangoWhiteNoise class) and override the is_immutable_file() method to
add caching support at a later date:
http://whitenoise.evans.io/en/latest/base.html#caching-headers

Documentation for WhiteNoise can be found at:
http://whitenoise.evans.io/
2015-06-19 15:56:23 +01:00
Ed Morley a4798aa840 Bug 1173409 - Vagrant: Add support for creating a 'scratch' VM
It's sometimes useful to be able to spin up an additional Vagrant
environment without affecting the first. To do this, we create two named
machines, both identical (since they inherit the main Vagrantfile
configuration) - one called default (to match the machine name used up
until now, so we don't force people to recreate their existing VMs when
we land this) and one called scratch.

The former is set to be the primary, so that single-machine commands
(eg `vagrant ssh`) work without having to append the machine name every
time.

The scratch machine has autostart set to false, so that it does not spin
up without explicitly using: `vagrant up scratch`

The name `scratch` is entirely arbitrary, and we can add additional
temporary machine names later, if people wish to have more than two
environments saved simultaneously.

For more information, see:
http://docs.vagrantup.com/v2/multi-machine/
2015-06-11 11:52:42 +01:00
Ed Morley b137b9148b Bug 1144804 - Vagrant: Update base image from Ubuntu 12.04 to 14.04
This uses the newer image from:
https://vagrantcloud.com/ubuntu/boxes/trusty32

This also updates us from apache 2.2 to apache 2.4, which means the
apache config must be changed to be compatible with apache 2.4:
http://httpd.apache.org/docs/2.4/upgrading.html
(The syntax for "Allow from all" has changed, plus the default config
now specifies a "Require all denied" which we have to override for the
UI directory)
2015-06-01 11:37:01 +01:00
Ed Morley a92ab9a96b Bug 1074151 - Vagrant: Remove unused production.pp
The only remaining difference between production.pp and vagrant.pp is
that the former uses a different local settings file
(local.production.py), which also outputs to the syslog. However we
don't need this for the local development environment, and nothing in
production is using the in-repo puppet, so it is no longer required.
2015-05-28 14:06:09 +01:00
Ed Morley 705140707e Bug 1074151 - Vagrant: Add a Vagrantfile pref for serving ui/ vs dist/
One of the few differences between vagrant.pp and production.pp is from
which directory the UI is served. This change adds the ability to toggle
the directory from the Vagantfile directly, thereby bringing
production.pp (and the duplication it brings) closer to being obsolete.
2015-05-28 14:06:09 +01:00
Ed Morley da294ba761 Bug 1056877 - Stop using/referring to the separate treeherder-ui repo
Since it has now been merged into this one.
2015-05-20 16:55:55 +01:00
Ed Morley 8478629ef4 Bug 1056877 - Update links & puppet/Vagrant config for new repo name
The 'treeherder-service' repo has been renamed to 'treeherder', ready
for when the treeherder-ui repo is imported into it. This means the
Github URL, Travis URL and directory name when cloned changes. The Read
The Docs URL cannot be changed, so for now we will leave as-is, and in
the future (once service and UI docs combined) we will create a new
project on RTD with name "treeherder".

This updates doc links and puppet/Vagrant configs, but leaves the
stage/prod deploy script alone, since renaming the directories on our
infra is non-trivial. The dev instance will need some TLC since unlike
stage/prod, it does use the puppet scripts in the repo.
2015-04-20 22:00:04 +01:00
Jonathan French 5a7d59e03a Bug 1089639 - Add treeherder hostname to Vagrantfile for a clean up 2015-04-08 09:53:49 -04:00
Jonathan French dbb4d11e09 Bug 1090689 - Add MPL2.0 headers to the repo 2014-11-03 13:06:03 -05:00
Cameron Dawson 9cf09d8372 bug 1077136 - test passing for ingestion 2014-10-08 12:26:08 -07:00
mdoglio 45637e58ac update Vagrantfile to fully support vagrant api V2 2014-05-16 13:53:12 +02:00
Jonathan Eads 392dc5c8c2 added new manifest that serves the UI from the treeherder-ui/dist directory 2014-04-24 18:35:19 -07:00
mdoglio 278e5b02af add ui integration to Vagrantifile and docs 2014-02-20 14:50:43 +01:00
mdoglio 327ed28648 improve environment setup via puppet 2014-01-07 15:24:35 +00:00
mdoglio 314a6b0ee6 add new line where missing 2013-03-06 17:19:12 +00:00
mdoglio ff8c73668c Add a vagrant setup for dev and a basic django webapp. 2013-03-06 17:08:21 +00:00