This repository has been archived by the owner on Sep 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
91 changed files
with
13,062 additions
and
1,117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.git/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
*.pyc | ||
*.mo | ||
*.swp | ||
|
||
deployment/ansible/roles/azavea.* | ||
.vagrant* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.require_version ">= 1.8" | ||
|
||
Vagrant.configure(2) do |config| | ||
config.vm.box = "ubuntu/trusty64" | ||
|
||
config.vm.synced_folder "~/.aws", "/home/vagrant/.aws" | ||
|
||
# Need to use rsync in order to prevent a vboxfs/docker/gunicorn-related | ||
# file corruption issue. | ||
config.vm.synced_folder ".", "/vagrant", | ||
type: "rsync", | ||
rsync__exclude: ".git/", | ||
rsync__args: ["--verbose", "--archive", "--delete", "-z", "--links"] | ||
|
||
config.vm.provider :virtualbox do |vb| | ||
vb.memory = 2048 | ||
vb.cpus = 2 | ||
end | ||
|
||
# Gunicorn | ||
config.vm.network :forwarded_port, guest: 8080, host: 8080 | ||
|
||
# Django debug server | ||
config.vm.network :forwarded_port, guest: 8081, host: 8081 | ||
|
||
# Change working directory to /vagrant upon session start. | ||
config.vm.provision "shell", inline: <<SCRIPT | ||
if ! grep -q "cd /vagrant" "/home/vagrant/.bashrc"; then | ||
echo "cd /vagrant" >> "/home/vagrant/.bashrc" | ||
fi | ||
SCRIPT | ||
|
||
config.vm.provision "ansible" do |ansible| | ||
ansible.playbook = "deployment/ansible/district-builder.yml" | ||
ansible.galaxy_role_file = "deployment/ansible/roles.yml" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
- hosts: all | ||
become: True | ||
|
||
pre_tasks: | ||
- name: Update APT cache | ||
apt: update_cache=yes cache_valid_time=3600 | ||
|
||
roles: | ||
- { role: "azavea.ntp" } | ||
- { role: "district-builder.environment" } | ||
- { role: "azavea.python-security" } | ||
- { role: "district-builder.docker" } | ||
- { role: "district-builder.shellcheck" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
|
||
shellcheck_version: "0.3.*" | ||
docker_compose_version: "1.16.*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
- src: azavea.pip | ||
version: 1.0.0 | ||
|
||
- src: azavea.docker | ||
version: 4.0.0 | ||
|
||
- src: azavea.unzip | ||
version: 0.1.2 | ||
|
||
- src: azavea.ntp | ||
version: 0.1.1 | ||
|
||
- src: azavea.python-security | ||
version: 0.1.0 |
4 changes: 4 additions & 0 deletions
4
deployment/ansible/roles/district-builder.docker/meta/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
dependencies: | ||
- { role: azavea.pip } | ||
- { role: azavea.docker } |
8 changes: 8 additions & 0 deletions
8
deployment/ansible/roles/district-builder.docker/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- name: Install docker-compose | ||
pip: name=docker-compose version={{ docker_compose_version }} | ||
|
||
- name: Add Ansible user to Docker group | ||
user: name="{{ ansible_user }}" | ||
groups=docker | ||
append=yes |
4 changes: 4 additions & 0 deletions
4
deployment/ansible/roles/district-builder.shellcheck/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
- name: Install ShellCheck | ||
apt: pkg="shellcheck={{ shellcheck_version }}" | ||
state=present |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
settings.py | ||
static-media | ||
|
||
static/admin/ | ||
static/jqGrid/ | ||
static/openlayers/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM quay.io/azavea/django:1.11-python2.7-slim | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
COPY requirements.txt /usr/src/app/ | ||
RUN apt-get update && apt-get install -y git gcc | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . /usr/src/app | ||
|
||
WORKDIR /usr/src/app | ||
|
||
RUN cp config/config.dist.xml config/config.xml \ | ||
&& python setup.py ./config/config.xsd ./config/config.xml -v2 -d | ||
|
||
ENTRYPOINT ["/usr/local/bin/gunicorn"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.