summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2016-03-29 14:29:16 -0500
committerAndy Doan <andy.doan+gerrit@linaro.org>2016-04-01 16:04:19 +0000
commitce4302291c129586a082a6cbdb14c724e07ebf95 (patch)
tree8aebf42b98578553e62fdea9ab16a4c212879d03
parent9ad14365bd1117d04cc7c3f2f8b58d2b60cf11ac (diff)
patchwork: move to common
Its mostly just moving/renaming files and then updating a few corresponding references to variable names. Change-Id: Ic5e2538a377a430ea5cc0a570ee8f6436be8bf1e Reviewed-on: https://review.linaro.org/11107 Reviewed-by: Andy Doan <andy.doan+gerrit@linaro.org>
-rw-r--r--files/patchwork/apache.conf (renamed from per-service/patchwork/files/apache.conf)0
-rw-r--r--files/patchwork/wsgi.py (renamed from per-service/patchwork/files/wsgi.py)0
-rw-r--r--group_vars/patchwork (renamed from per-service/patchwork/group_vars/all)2
-rw-r--r--hosts2
-rw-r--r--patchwork.yml (renamed from per-service/patchwork/site.yml)10
-rw-r--r--per-service/patchwork/hosts3
l---------per-service/patchwork/roles/apache-site1
l---------per-service/patchwork/roles/django1
l---------per-service/patchwork/roles/postgres1
l---------per-service/patchwork/secrets1
-rw-r--r--roles/patchwork-deps/tasks/main.yml (renamed from per-service/patchwork/roles/patchwork-pre-django/tasks/main.yml)4
-rw-r--r--templates/patchwork/patches.cron.d (renamed from per-service/patchwork/templates/patches.cron.d)0
-rw-r--r--templates/patchwork/patches.linaro.org_local_settings.py (renamed from per-service/patchwork/templates/patches.linaro.org_local_settings.py)0
-rw-r--r--templates/patchwork/patches.opendataplane.org_local_settings.py (renamed from per-service/patchwork/templates/patches.opendataplane.org_local_settings.py)0
-rw-r--r--templates/patchwork/patchwork.cron.d (renamed from per-service/patchwork/templates/patchwork.cron.d)0
15 files changed, 9 insertions, 16 deletions
diff --git a/per-service/patchwork/files/apache.conf b/files/patchwork/apache.conf
index 4352ce5a..4352ce5a 100644
--- a/per-service/patchwork/files/apache.conf
+++ b/files/patchwork/apache.conf
diff --git a/per-service/patchwork/files/wsgi.py b/files/patchwork/wsgi.py
index 05eab27e..05eab27e 100644
--- a/per-service/patchwork/files/wsgi.py
+++ b/files/patchwork/wsgi.py
diff --git a/per-service/patchwork/group_vars/all b/group_vars/patchwork
index 1668705c..7860aac7 100644
--- a/per-service/patchwork/group_vars/all
+++ b/group_vars/patchwork
@@ -10,7 +10,7 @@ apache_modules:
django_project_repo: "https://github.com/getpatchwork/patchwork.git"
django_project_version: 7591971245aa8d43b21f1f429a223fc0792f2274
django_settings: local_settings
-django_local_settings: templates/{{inventory_hostname}}_local_settings.py
+django_local_settings: patchwork/{{inventory_hostname}}_local_settings.py
install_base: /srv
ssl_cert: /etc/ssl/certs/{{hostname}}.crt
ssl_key: /etc/ssl/private/{{hostname}}.key
diff --git a/hosts b/hosts
index 7784693c..56be9053 100644
--- a/hosts
+++ b/hosts
@@ -30,6 +30,6 @@ android-git-ie.linaro.org
dev-private-git.linaro.org
projectara-git.linaro.org
-[patches]
+[patchwork]
patches.opendataplane.org
patches.linaro.org
diff --git a/per-service/patchwork/site.yml b/patchwork.yml
index bca365da..ae8697e6 100644
--- a/per-service/patchwork/site.yml
+++ b/patchwork.yml
@@ -1,18 +1,18 @@
---
- name: Configure patchwork servers
- hosts: all
+ hosts: patchwork
become: yes
vars_files:
- - "secrets/{{inventory_hostname}}"
+ - "{{secrets_dir}}/host_vars/{{inventory_hostname}}"
roles:
- postgres
- - patchwork-pre-django
+ - patchwork-deps
- {role: django, tags: [django]}
- - {role: apache-site, src: apache.conf, config: "{{inventory_hostname}}", tags: [apache] }
+ - {role: apache-site, src: patchwork/apache.conf, config: "{{inventory_hostname}}", tags: [apache] }
- name: Configure extra syncing for patches.linaro.org
hosts: patches.linaro.org
become: yes
tasks:
- - template: src=templates/patches.cron.d dest=/etc/cron.d/patches
+ - template: src=patchwork/patches.cron.d dest=/etc/cron.d/patches
owner=root group=root mode=0644
diff --git a/per-service/patchwork/hosts b/per-service/patchwork/hosts
deleted file mode 100644
index 5c983800..00000000
--- a/per-service/patchwork/hosts
+++ /dev/null
@@ -1,3 +0,0 @@
-[production]
-patches.opendataplane.org
-patches.linaro.org
diff --git a/per-service/patchwork/roles/apache-site b/per-service/patchwork/roles/apache-site
deleted file mode 120000
index 0e4340b9..00000000
--- a/per-service/patchwork/roles/apache-site
+++ /dev/null
@@ -1 +0,0 @@
-../../../roles/apache-site/ \ No newline at end of file
diff --git a/per-service/patchwork/roles/django b/per-service/patchwork/roles/django
deleted file mode 120000
index 655d5cd4..00000000
--- a/per-service/patchwork/roles/django
+++ /dev/null
@@ -1 +0,0 @@
-../../../roles/django \ No newline at end of file
diff --git a/per-service/patchwork/roles/postgres b/per-service/patchwork/roles/postgres
deleted file mode 120000
index 2ed7da57..00000000
--- a/per-service/patchwork/roles/postgres
+++ /dev/null
@@ -1 +0,0 @@
-../../../roles/postgres \ No newline at end of file
diff --git a/per-service/patchwork/secrets b/per-service/patchwork/secrets
deleted file mode 120000
index b3b56aa9..00000000
--- a/per-service/patchwork/secrets
+++ /dev/null
@@ -1 +0,0 @@
-../../../shared-credentials/ansible/patchwork-servers \ No newline at end of file
diff --git a/per-service/patchwork/roles/patchwork-pre-django/tasks/main.yml b/roles/patchwork-deps/tasks/main.yml
index a7333010..13e421e1 100644
--- a/per-service/patchwork/roles/patchwork-pre-django/tasks/main.yml
+++ b/roles/patchwork-deps/tasks/main.yml
@@ -22,7 +22,7 @@
- update
- name: Copy apache wsgi script
- copy: src=files/wsgi.py
+ copy: src=files/patchwork/wsgi.py
dest={{install_base}}/{{hostname}}/wsgi.py
owner={{apache_user}} group={{apache_user}} mode=0755
notify: restart-apache
@@ -30,7 +30,7 @@
- update
- name: Install cron for patchwork
- template: src=templates/patchwork.cron.d dest=/etc/cron.d/patchwork
+ template: src=patchwork/patchwork.cron.d dest=/etc/cron.d/patchwork
owner=root group=root mode=0644
- name: Clone django-crowd-rest-backend repository
diff --git a/per-service/patchwork/templates/patches.cron.d b/templates/patchwork/patches.cron.d
index c740ea8e..c740ea8e 100644
--- a/per-service/patchwork/templates/patches.cron.d
+++ b/templates/patchwork/patches.cron.d
diff --git a/per-service/patchwork/templates/patches.linaro.org_local_settings.py b/templates/patchwork/patches.linaro.org_local_settings.py
index e30b6256..e30b6256 100644
--- a/per-service/patchwork/templates/patches.linaro.org_local_settings.py
+++ b/templates/patchwork/patches.linaro.org_local_settings.py
diff --git a/per-service/patchwork/templates/patches.opendataplane.org_local_settings.py b/templates/patchwork/patches.opendataplane.org_local_settings.py
index 8a08ecfc..8a08ecfc 100644
--- a/per-service/patchwork/templates/patches.opendataplane.org_local_settings.py
+++ b/templates/patchwork/patches.opendataplane.org_local_settings.py
diff --git a/per-service/patchwork/templates/patchwork.cron.d b/templates/patchwork/patchwork.cron.d
index 0e3c02ab..0e3c02ab 100644
--- a/per-service/patchwork/templates/patchwork.cron.d
+++ b/templates/patchwork/patchwork.cron.d