Unify database configuration

This commit standardizes on PostGIS for all environments and moves the
database configuration into base.py, making use of the fact that we can
use environment variables to change connection information rather than
maintaining separate configuration files.
Set up CRLF handling for Windows clients
Create Django apps with models, URLs, and view stubs

* Keep `core` app small (with no UI, and just the ubiquitous User and Group models)
* Create topic-specific apps for handling groups of models and the URLs that service them
* Name all URLs (usually the view name)
* Use a `urls` module where an app handles URLs with more than one prefix
* Create view stubs for all URLs and import where referenced
* Create stubs for decorators and import where referenced
* Add apps to `settings.LOCAL_APPS`
* Distribute all models from `doc/draft-models.py` and all URLs from `doc/draft-urls.py`

Note that it all loads in our `app` VM using this command:
     envdir /etc/nyc-trees.d/env ./manage.py shell
Include Pillow in Django requirements
Silence warning about test runner

It generates false positives and is being removed (https://code.djangoproject.com/ticket/23469)
Merge pull request #43 from RickMohr/make-apps-and-urls

Create Django apps with models, URLs, and view stubs
Merge pull request #44 from jwalgran/topic/unify-db-config

Unify database configuration
Add missing import to settings/base.py

In 791faa94 I moved the database config to base.py but did not import
the required ``environ`` function.
Merge pull request #50 from jwalgran/fix/add-missing-settings-import

Add missing import to settings/base.py
Add CloudFormation support via Troposphere

This changeset adds support for Amazon Web Services CloudFormation via
Troposphere, a Python library for describing CloudFormation stacks.

There are currently 4 stacks:

- VPC

The VPC consists of 4 subnets, 2 public and 2 private. The subnets are
spread across 2 availability zones. There is a NAT instance for each
availability zone, and one bastion instance for the entire VPC.

- Data store (contains database and cache)

The data stores consist of a PostgreSQL RDS instance setup across
multiple availability zones and a Redis ElastiCache instance. The RDS
instance creates a default database (`nyc_trees`) automatically. The
ElastiCache Redis instance has AOF enabled. Both live inside the private
subnets.

- App servers

The application servers live within a vanilla Auto Scaling Group (ASG)
that is associated with an Elastic Load Balancer (ELB). Health checks
run by the ELB trigger changes in the ASG. All application servers live
inside the private subnets, but are fronted by their own ELB.

- Tile servers

The tile servers live within a vanilla Auto Scaling Group (ASG) that is
associated with an Elastic Load Balancer (ELB) as well. Health checks
run by the ELB trigger changes in the ASG. All tile servers live inside
the public private, but are fronted by their own ELB.

Additional AWS deployment details are housed in the `README`.

Resolves #24.
Add test provisioning path

This changeset introduces an alternate provisioning path for testing
environments. The majority of the differences in a test provisioning
path are associated with the omission of monitoring (Collectd, RELP,
Logstash). There is a new `nyc-trees.monitoring` role that attempts to
encapsulate monitoring tasks associated with a metrics/logs producer.

The environmental variable `VAGRANT_ENV` is used to determine which
provisioning path is taken. Inside of Jenkins, `VAGRANT_ENV` will be set
to `TEST`, which will adjust the Ansible inventory used.
Update data store backup and maintenance windows

After applying the CloudFormation template, I encountered the following
errors with the previous backup and maintenance windows:

- Backup and maintenance window for RDS cannot overlap
- Maintenance window for RDS and ElastiCache must be at least 60 minutes

This changeset includes adjustments to repair those errors, along with
Eastern Time Zone translation comments.
Remove SNS topic from VPC CloudFormation stack

Instead of creating the SNS topic used for global stack notifications
inside of the VPC stack, it seems better to create it outside of
CloudFormation so that we can associate it with all other CloudFormation
stacks. This will allow us to get notifications more easily when stacks
are modified.
Grow bastion root volume

The default root volume for instances is 8GB. This change ensures that
the root volume for the bastion instance (plays a dual role as a
monitoring server) is 128GB.
Remove use of collectd_hostname

`collectd_hostname` was being used to populate the Collectd
configuration file's `Hostname` setting. If omitted, Collectd uses the
`gethostname(2)` system call to automatically set `Hostname`. This
behavior is much more desirable for EC2.

See also: https://github.com/azavea/ansible-collectd/pull/1
Merge branch 'feature/remove-collectd-hostname' into develop
Fix Apache and Nginx race condition with /var/www/html

Kibana uses `/var/www/html` as its web root and Nginx attempts to serve
its static assets from there. Later, Apache is installed for the
Graphite Web interface, and the Apache package dumps a test site into
`/var/www/html`. Unfortunately, this overwrites the static assets that
Kibana and Apache's test site have in common (`index.html`).

This changeset makes the Graphite installation go first, followed by
Kibana. In addition, the Apache installation also removes the test site
*if* `apache_delete_default_site` is `True`.

See also: https://github.com/azavea/ansible-apache2/pull/2
Merge branch 'feature/fix-apache-nginx-race' into develop
Use .galaxy_install_info to trigger role installation

The `ansible-galaxy` command is nice enough to leave behind a bit of
metadata associated with role installation
(`role_name/meta/.galaxy_install_info`). The `Vagrantfile` now attempts
to determine the version of an installed role based off of the metadata
in that file. If the versions don't match, an install of all role
dependencies occurs.

I'm not in love with this solution, but I think that it is better than
force reinstalling all role dependencies every time (~10 seconds on
every provision).
Merge branch 'feature/smarter-ansible-role-install' into develop