-
Notifications
You must be signed in to change notification settings - Fork 14
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
1 parent
48b28a9
commit b50ce36
Showing
10 changed files
with
103 additions
and
115 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,7 @@ | ||
- name: "Install Mirror Appliance" | ||
gather_facts: no | ||
hosts: mirror | ||
tags: | ||
- quay | ||
roles: | ||
- quay_installer |
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
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,11 +1,7 @@ | ||
- name: Autodetecting Image Archive | ||
hosts: all | ||
become: yes | ||
tasks: | ||
- name: Ansible check file exists. | ||
stat: | ||
path: "{{ image-archive-path }}" | ||
register: p | ||
- name: Image Archive Found. Loading Images. | ||
command: "podman load -i {{ image-archive-path }}" | ||
when: p.stat.exists | ||
- name: Ansible check file exists. | ||
stat: | ||
path: "{{ image_archive_path }}" | ||
register: p | ||
- name: Image Archive Found. Loading Images. | ||
command: "podman load -i {{ image_archive_path }}" | ||
when: p.stat.exists |
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,11 +1,7 @@ | ||
- name: Create podman pod | ||
hosts: all | ||
become: yes | ||
tasks: | ||
- name: Create podman pod for shared network namespace | ||
containers.podman.podman_pod: | ||
name: quay-pod | ||
state: started | ||
ports: | ||
- 80:8080 | ||
- 443:8443 | ||
- name: Create podman pod for shared network namespace | ||
containers.podman.podman_pod: | ||
name: quay-pod | ||
state: started | ||
ports: | ||
- 80:8080 | ||
- 443:8443 |
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,36 +1,32 @@ | ||
- name: Install Postgres Service | ||
hosts: postgres | ||
become: yes | ||
tasks: | ||
- name: Create necessary directory for Postgres persistent data | ||
ansible.builtin.file: | ||
path: /etc/quay-install/pg-data | ||
state: directory | ||
recurse: yes | ||
- name: Create necessary directory for Postgres persistent data | ||
ansible.builtin.file: | ||
path: /etc/quay-install/pg-data | ||
state: directory | ||
recurse: yes | ||
|
||
- name: Set permissions on data directory | ||
ansible.posix.acl: | ||
path: /etc/quay-install/pg-data | ||
entry: u:26:-wx | ||
state: present | ||
- name: Set permissions on data directory | ||
ansible.posix.acl: | ||
path: /etc/quay-install/pg-data | ||
entry: u:26:-wx | ||
state: present | ||
|
||
- name: Copy Postgres systemd service file | ||
template: src=../files/systemd/postgres.service dest=/etc/systemd/system/quay-postgres.service | ||
- name: Copy Postgres systemd service file | ||
template: src=../files/systemd/postgres.service dest=/etc/systemd/system/quay-postgres.service | ||
|
||
- name: Pull Postgres image | ||
containers.podman.podman_image: | ||
name: "{{ postgres_image }}" | ||
- name: Pull Postgres image | ||
containers.podman.podman_image: | ||
name: "{{ postgres_image }}" | ||
|
||
- name: Start Postgres service | ||
systemd: | ||
name: quay-postgres.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: started | ||
- name: Start Postgres service | ||
systemd: | ||
name: quay-postgres.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: started | ||
|
||
- name: Wait for pg_trgm to be installed | ||
command: podman exec -it quay-postgresql-service /bin/bash -c "echo 'CREATE EXTENSION IF NOT EXISTS pg_trgm' | psql -d quay -U postgres" | ||
register: result | ||
until: result.rc == 0 | ||
retries: 20 | ||
delay: 5 | ||
- name: Wait for pg_trgm to be installed | ||
command: podman exec -it quay-postgresql-service /bin/bash -c "echo 'CREATE EXTENSION IF NOT EXISTS pg_trgm' | psql -d quay -U postgres" | ||
register: result | ||
until: result.rc == 0 | ||
retries: 20 | ||
delay: 5 |
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,38 +1,34 @@ | ||
- name: Install Quay Service | ||
hosts: quay | ||
become: yes | ||
tasks: | ||
- name: Create necessary directory for Quay local storage | ||
ansible.builtin.file: | ||
path: /etc/quay-install/quay-storage | ||
state: directory | ||
recurse: yes | ||
- name: Create necessary directory for Quay local storage | ||
ansible.builtin.file: | ||
path: /etc/quay-install/quay-storage | ||
state: directory | ||
recurse: yes | ||
|
||
- name: Create necessary directory for Quay config bundle | ||
ansible.builtin.file: | ||
path: /etc/quay-install/quay-config | ||
state: directory | ||
recurse: yes | ||
- name: Create necessary directory for Quay config bundle | ||
ansible.builtin.file: | ||
path: /etc/quay-install/quay-config | ||
state: directory | ||
recurse: yes | ||
|
||
- name: Set permissions on local storage directory | ||
ansible.posix.acl: | ||
path: /etc/quay-install/quay-storage | ||
entry: u:1001:-wx | ||
state: present | ||
- name: Set permissions on local storage directory | ||
ansible.posix.acl: | ||
path: /etc/quay-install/quay-storage | ||
entry: u:1001:-wx | ||
state: present | ||
|
||
- name: Copy Quay config.yaml file | ||
template: src=../files/quay-config/config.yaml dest=/etc/quay-install/quay-config | ||
- name: Copy Quay config.yaml file | ||
template: src=../files/quay-config/config.yaml dest=/etc/quay-install/quay-config | ||
|
||
- name: Copy Quay systemd service file | ||
template: src=../files/systemd/quay.service dest=/etc/systemd/system/quay-app.service | ||
- name: Copy Quay systemd service file | ||
template: src=../files/systemd/quay.service dest=/etc/systemd/system/quay-app.service | ||
|
||
- name: Pull Quay image | ||
containers.podman.podman_image: | ||
name: "{{ quay_image }}" | ||
- name: Pull Quay image | ||
containers.podman.podman_image: | ||
name: "{{ quay_image }}" | ||
|
||
- name: Start Quay service | ||
systemd: | ||
name: quay-app.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: started | ||
- name: Start Quay service | ||
systemd: | ||
name: quay-app.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: started |
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,17 +1,13 @@ | ||
- name: Install Redis Service | ||
hosts: redis | ||
become: yes | ||
tasks: | ||
- name: Copy Redis systemd service file | ||
template: src=../files/systemd/redis.service dest=/etc/systemd/system/quay-redis.service | ||
- name: Copy Redis systemd service file | ||
template: src=../files/systemd/redis.service dest=/etc/systemd/system/quay-redis.service | ||
|
||
- name: Pull Redis image | ||
containers.podman.podman_image: | ||
name: "{{ redis_image }}" | ||
- name: Pull Redis image | ||
containers.podman.podman_image: | ||
name: "{{ redis_image }}" | ||
|
||
- name: Start Redis service | ||
systemd: | ||
name: quay-redis.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: started | ||
- name: Start Redis service | ||
systemd: | ||
name: quay-redis.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: started |
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,17 +1,17 @@ | ||
- name: Set SELinux Rules | ||
import_task: set-selinux-rules.yaml | ||
include_tasks: set-selinux-rules.yaml | ||
|
||
- name: Create Podman Pod | ||
import_task: create-podman-pod.yaml | ||
include_tasks: create-podman-pod.yaml | ||
|
||
- name: Autodetect Image Archive | ||
import_task: autodetect-image-archive.yaml | ||
include_tasks: autodetect-image-archive.yaml | ||
|
||
- name: Install Postgres Service | ||
import_task: install-postgres-service.yaml | ||
include_tasks: install-postgres-service.yaml | ||
|
||
- name: Install Redis Service | ||
import_task: install-redis-service.yaml | ||
include_tasks: install-redis-service.yaml | ||
|
||
- name: Install Quay Service | ||
import_task: install-quay-service.yaml | ||
include_tasks: install-quay-service.yaml |
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,9 +1,5 @@ | ||
- name: Set SELinux Rules | ||
hosts: all | ||
become: yes | ||
tasks: | ||
- name: Set container_manage_cgroup flag on and keep it persistent across reboots | ||
ansible.posix.seboolean: | ||
name: container_manage_cgroup | ||
state: yes | ||
persistent: yes | ||
- name: Set container_manage_cgroup flag on and keep it persistent across reboots | ||
ansible.posix.seboolean: | ||
name: container_manage_cgroup | ||
state: yes | ||
persistent: yes |