-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to use SUSE and add isimip-data, isimip-files-api, and isimi…
…p-publisher roles
- Loading branch information
1 parent
2c25c9c
commit aabc2f2
Showing
19 changed files
with
160 additions
and
65 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
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,3 @@ | ||
d /var/log/django/dev 750 isimip-data isimip | ||
d /var/log/gunicorn/dev 750 isimip-data isimip | ||
d /run/gunicorn/dev 750 isimip-data isimip |
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,3 @@ | ||
d /var/log/django/prod 750 isimip-data isimip | ||
d /var/log/gunicorn/prod 750 isimip-data isimip | ||
d /run/gunicorn/prod 750 isimip-data isimip |
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,58 @@ | ||
- name: Add the isimip group | ||
group: | ||
name: isimip | ||
gid: 2000 | ||
state: present | ||
|
||
- name: Add the isimip-data user | ||
user: | ||
name: isimip-data | ||
comment: isimip-data user | ||
uid: 2000 | ||
group: isimip | ||
shell: /bin/bash | ||
|
||
- name: Install PostgreSQL 10 | ||
zypper: | ||
name: | ||
- postgresql10 | ||
- postgresql10-server | ||
- postgresql10-devel | ||
state: present | ||
|
||
- name: Create /srv/www/prod and /srv/www/dev for isimip-data | ||
file: | ||
path: /srv/www/{{ item }} | ||
state: directory | ||
owner: isimip-data | ||
group: isimip | ||
with_items: | ||
- prod | ||
- dev | ||
|
||
- name: Clone the isimip-data repo | ||
git: | ||
repo: 'https://github.com/ISI-MIP/isimip-data' | ||
dest: /srv/www/{{ item }} | ||
update: no | ||
become: yes | ||
become_user: isimip-data | ||
with_items: | ||
- prod | ||
- dev | ||
|
||
- name: Copy systemd service files | ||
copy: | ||
src: "{{ item }}.service" | ||
dest: "/etc/systemd/system/{{ item }}.service" | ||
with_items: | ||
- prod | ||
- dev | ||
|
||
- name: Copy tmpfiles.d files | ||
copy: | ||
src: "{{ item }}.conf" | ||
dest: "/etc/tmpfiles.d/{{ item }}.conf" | ||
with_items: | ||
- prod | ||
- dev |
File renamed without changes.
File renamed without changes.
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,2 @@ | ||
d /var/log/gunicorn/api 750 isimip-files-api isimip | ||
d /run/gunicorn/api 750 isimip-files-api isimip |
File renamed without changes.
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,43 @@ | ||
- name: Add the isimip group | ||
group: | ||
name: isimip | ||
gid: 2000 | ||
state: present | ||
|
||
- name: Add the isimip-files-api user | ||
user: | ||
name: isimip-files-api | ||
comment: isimip-files-api user | ||
uid: 2001 | ||
group: isimip | ||
shell: /bin/bash | ||
|
||
- name: Create /srv/www/api for isimip-data | ||
file: | ||
path: /srv/www/api | ||
state: directory | ||
owner: isimip-files-api | ||
group: isimip | ||
|
||
- name: Clone the isimip-files-api repo | ||
git: | ||
repo: 'https://github.com/ISI-MIP/isimip-files-api' | ||
dest: /srv/www/api | ||
update: no | ||
become_user: isimip-files-api | ||
|
||
- name: tmpfiles.d conf is present | ||
copy: | ||
src: "{{ item }}" | ||
dest: "/etc/systemd/system/{{ item }}" | ||
when: ansible_host == "files.isimip.org" | ||
with_items: | ||
- api.service | ||
- api-app.service | ||
- api-worker.service | ||
|
||
- name: systemd services are present | ||
copy: | ||
src: "api.conf" | ||
dest: "/etc/tmpfiles.d/api.conf" | ||
when: ansible_host == "files.isimip.org" |
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,32 @@ | ||
- name: Add the isimip group | ||
group: | ||
name: isimip | ||
gid: 2000 | ||
state: present | ||
|
||
- name: Add the isimip user | ||
user: | ||
name: isimip | ||
comment: isimip user | ||
uid: 2000 | ||
group: isimip | ||
shell: /bin/bash | ||
|
||
- name: Clone the isimip-publisher repo | ||
git: | ||
repo: 'https://github.com/ISI-MIP/isimip-publisher' | ||
dest: /home/isimip/isimip-publisher | ||
update: no | ||
become_user: isimip-files-api | ||
|
||
- name: /data is present on files.isimip.org | ||
file: | ||
path: "{{ item }}" | ||
state: directory | ||
owner: isimip | ||
group: isimip | ||
mode: '0755' | ||
with_items: | ||
- /data | ||
- /data/public | ||
- /data/archive |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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