Skip to content

Commit

Permalink
Merge branch 'release/1.11.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Hector Castro committed Mar 11, 2016
2 parents cf951f1 + e1a86e6 commit e2a9eaa
Show file tree
Hide file tree
Showing 50 changed files with 492 additions and 284 deletions.
2 changes: 2 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[defaults]
callback_whitelist = profile_tasks
2 changes: 1 addition & 1 deletion deployment/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ $ ./mmw_stack.py launch-stacks --aws-profile mmw-prd \
--activate-dns
```

Within 60 seconds, `mmw.azavea.com` should reflect the current release.
Within 60 seconds, `app.wikiwatershed.org` and `mmw.azavea.com` should reflect the current release.

## Repository & Jenkins Cleanup

Expand Down
2 changes: 1 addition & 1 deletion deployment/ansible/app-servers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- hosts: app-servers
sudo: True
become: True

pre_tasks:
- name: Update APT cache
Expand Down
58 changes: 0 additions & 58 deletions deployment/ansible/callback_plugins/profile_tasks.py

This file was deleted.

4 changes: 4 additions & 0 deletions deployment/ansible/group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ nodejs_npm_version: 2.1.17

java_version: "7u95-*"

graphite_carbon_version: "0.9.13-pre1"
graphite_whisper_version: "0.9.13-pre1"
graphite_web_version: "0.9.13-pre1"

docker_version: "1.9.*"
docker_py_version: "1.2.3"
docker_options: "--storage-driver=aufs"
Expand Down
4 changes: 4 additions & 0 deletions deployment/ansible/group_vars/packer
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
django_settings_module: "mmw.settings.production"

itsi_base_url: ""
itsi_secret_key: ""

postgresql_username: "modelmywatershed"
postgresql_database: "modelmywatershed"

Expand All @@ -16,6 +19,7 @@ relp_host: "monitoring.service.mmw.internal"
graphite_host: "monitoring.service.mmw.internal"
statsite_host: "monitoring.service.mmw.internal"

tiler_host: ""
tilecache_bucket_name: ""

stack_type: "Packer"
2 changes: 1 addition & 1 deletion deployment/ansible/inventory/packer-app-server
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mmw-app]
localhost ansible_ssh_user=ubuntu
localhost ansible_user=ubuntu

[app-servers]
mmw-app
Expand Down
2 changes: 1 addition & 1 deletion deployment/ansible/inventory/packer-monitoring-server
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mmw-monitoring]
localhost ansible_ssh_user=ubuntu
localhost ansible_user=ubuntu

[monitoring-servers]
mmw-monitoring
Expand Down
2 changes: 1 addition & 1 deletion deployment/ansible/inventory/packer-tile-server
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mmw-tiler]
localhost ansible_ssh_user=ubuntu
localhost ansible_user=ubuntu

[tile-servers]
mmw-tiler
Expand Down
2 changes: 1 addition & 1 deletion deployment/ansible/inventory/packer-worker-server
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mmw-worker]
localhost ansible_ssh_user=ubuntu
localhost ansible_user=ubuntu

[workers]
mmw-worker
Expand Down
2 changes: 1 addition & 1 deletion deployment/ansible/monitoring-servers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- hosts: monitoring-servers
sudo: True
become: True

pre_tasks:
- name: Update APT cache
Expand Down
25 changes: 0 additions & 25 deletions deployment/ansible/roles.txt

This file was deleted.

50 changes: 50 additions & 0 deletions deployment/ansible/roles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
- src: azavea.ntp
version: 0.1.1
- src: azavea.pip
version: 0.1.1
- src: azavea.nodejs
version: 0.3.0
- src: azavea.git
version: 0.1.0
- src: azavea.nginx
version: 0.2.1
- src: azavea.daemontools
version: 0.1.0
- src: azavea.postgresql-support
version: 0.3.0
- src: azavea.postgresql
version: 0.3.0
- src: azavea.postgis
version: 0.3.0
- src: azavea.pgweb
version: 0.2.0
- src: azavea.redis
version: 0.1.0
- src: azavea.graphite
version: 0.6.1
- src: azavea.statsite
version: 1.1.0
- src: azavea.phantomjs
version: 0.1.0
- src: azavea.relp
version: 0.1.2
- src: azavea.curator
version: 0.1.0
- src: azavea.elasticsearch
version: 0.2.0
- src: azavea.logstash
version: 0.1.0
- src: azavea.kibana
version: 0.3.1
- src: azavea.collectd
version: 0.2.0
- src: azavea.build-essential
version: 0.1.0
- src: azavea.mapnik
version: 0.1.0
- src: azavea.beaver
version: 0.1.3
- src: azavea.java
version: 0.2.1
- src: azavea.docker
version: 1.0.2
6 changes: 3 additions & 3 deletions deployment/ansible/roles/model-my-watershed.app/tasks/app.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Ensure that source directories exist
file: path="{{ item }}"
owner="{{ ansible_ssh_user }}"
owner="{{ ansible_user }}"
group=mmw
mode=0755
state=directory
Expand All @@ -13,7 +13,7 @@
git: repo=https://github.com/WikiWatershed/model-my-watershed.git
dest=/opt/model-my-watershed
version="{{ app_deploy_branch }}"
sudo: False
become: False

- name: Synchronize Django application into app_home
synchronize: archive=no
Expand All @@ -23,4 +23,4 @@
set_remote_user=no
src=/opt/model-my-watershed/src/mmw/
dest="{{ app_home }}/"
sudo: False
become: False
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Install Firefox for UI tests
apt: pkg=firefox="4*" state=present
apt: pkg="firefox=4*" state=present

- name: Install Xvfb for JavaScript tests
apt: pkg=xvfb="2:1.15.1*" state=present
apt: pkg="xvfb=2:1.15.1*" state=present
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
- name: Touch application log file if it does not exist
command: touch {{ app_log }}
creates={{ app_log }}
copy: content="" dest="{{ app_log }}" force=no

- name: Set application log file permissions
file: path={{ app_log }}
Expand All @@ -14,8 +13,7 @@
dest=/etc/logrotate.d/mmw-app

- name: Touch Gunicorn log file if it does not exist
command: touch {{ app_gunicorn_log }}
creates={{ app_gunicorn_log }}
copy: content="" dest="{{ app_gunicorn_log }}" force=no

- name: Set Gunicorn log file permissions
file: path={{ app_gunicorn_log }}
Expand All @@ -26,4 +24,3 @@
- name: Configure Gunicorn log rotation
template: src=logrotate-gunicorn.j2
dest=/etc/logrotate.d/mmw-gunicorn

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Create folders for static files
file: path="{{ item }}"
state=directory
owner="{{ ansible_ssh_user }}"
owner="{{ ansible_user }}"
group=mmw
mode=0775
with_items:
Expand All @@ -14,38 +14,38 @@
command: "npm install --unsafe-perm"
args:
chdir: "{{ app_home }}"
sudo: False
become: False

- name: Check for lint
command: "npm run lint"
args:
chdir: "{{ app_home }}"
sudo: False
become: False
ignore_errors: True

- name: Create JS bundles (staging/production)
command: "./bundle.sh --vendor --tests"
args:
chdir: "{{ app_home }}"
environment: app_config
sudo: False
environment: "{{ app_config }}"
become: False
when: "['development'] | is_not_in(group_names)"

- name: Create JS bundles (development)
command: "./bundle.sh --vendor --tests --debug"
args:
chdir: "{{ app_home }}"
environment: app_config
sudo: False
environment: "{{ app_config }}"
become: False
when: "['development'] | is_in(group_names)"

- name: Run Django collectstatic command
django_manage: command=collectstatic app_path="{{ app_home }}"
environment: "{{ envdir_config | combine(app_config) }}"
sudo: False
become: False

- name: Create JavaScript test harness
template: src=testem-harness.html.j2
dest="{{ app_static_root }}/test.html"
sudo: False
become: False
when: "['development', 'test'] | some_are_in(group_names)"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
state=present

- name: Add Ansible SSH user to the mmw group
user: name="{{ ansible_ssh_user }}"
user: name="{{ ansible_user }}"
append=yes
group=mmw
state=present
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[/var/log/upstart/spark-jobserver.log]
multiline_regex_before = ^\s+
type: spark-jobserver
tags: spark-jobserver,beaver
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Ensure that source directories exist
file: path="{{ item }}"
owner="{{ ansible_ssh_user }}"
owner="{{ ansible_user }}"
group=mmw
mode=0755
state=directory
Expand All @@ -13,7 +13,7 @@
git: repo=https://github.com/WikiWatershed/model-my-watershed.git
dest=/opt/model-my-watershed
version="{{ app_deploy_branch }}"
sudo: False
become: False

- name: Synchronize Django application into app_home
synchronize: archive=no
Expand All @@ -23,4 +23,4 @@
set_remote_user=no
src=/opt/model-my-watershed/src/mmw/
dest="{{ app_home }}/"
sudo: False
become: False
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ filter {
match => [ "timestamp", "E, dd MMM yyyy HH:mm:ss z" ]
}
}

if [type] == "spark-jobserver" {
grok {
match => { "message" => "%{TIMESTAMP_ISO8601:timestamp}" }
}

date {
match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS" ]
}
}
}

output {
Expand Down
Loading

0 comments on commit e2a9eaa

Please sign in to comment.