-
Notifications
You must be signed in to change notification settings - Fork 42
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
740ec65
commit b7f8aca
Showing
20 changed files
with
403 additions
and
33 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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
EE_IMAGE=quay.io/quay/mirror-registry-ee:latest | ||
POSTGRES_IMAGE=registry.redhat.io/rhel8/postgresql-10:1-161 as postgres | ||
QUAY_IMAGE=registry.redhat.io/quay/quay-rhel8:v3.6.1 | ||
EE_BASE_IMAGE=registry.redhat.io/ansible-automation-platform-20-early-access/ee-minimal-rhel8 | ||
EE_BUILDER_IMAGE=registry.redhat.io/ansible-automation-platform-20-early-access/ansible-builder-rhel8:2.0.0-15 | ||
POSTGRES_IMAGE=registry.redhat.io/rhel8/postgresql-10:1-161 | ||
QUAY_IMAGE=registry.redhat.io/quay/quay-rhel8:v3.6.4 | ||
REDIS_IMAGE=registry.redhat.io/rhel8/redis-6:1-25 | ||
RELEASE_VERSION=v1.0.0 | ||
RELEASE_VERSION=v1.1.0 | ||
PAUSE_IMAGE=registry.access.redhat.com/ubi8/pause:latest |
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
4 changes: 0 additions & 4 deletions
4
ansible-runner/context/app/project/roles/mirror_appliance/defaults/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 |
---|---|---|
@@ -1,8 +1,4 @@ | ||
--- | ||
redis_image: "registry.redhat.io/rhel8/redis-6:1-25" | ||
postgres_image: "registry.redhat.io/rhel8/postgresql-10:1-161" | ||
quay_image: "registry.redhat.io/quay/quay-rhel8:v3.6.1" | ||
pause_image: "registry.access.redhat.com/ubi8/pause:latest" | ||
quay_hostname: "quay:8443" | ||
quay_root: "/etc/quay-install" | ||
auto_approve: "false" |
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 |
---|---|---|
|
@@ -20,4 +20,4 @@ | |
name: quay-pod.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: started | ||
state: restarted |
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 |
---|---|---|
|
@@ -119,4 +119,4 @@ | |
name: quay-app.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: started | ||
state: restarted |
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 |
---|---|---|
|
@@ -20,4 +20,4 @@ | |
name: quay-redis.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: started | ||
state: restarted |
23 changes: 23 additions & 0 deletions
23
ansible-runner/context/app/project/roles/mirror_appliance/tasks/upgrade-pod-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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
- name: Copy Quay Pod systemd service file | ||
template: | ||
src: ../templates/pod.service.j2 | ||
dest: /etc/systemd/system/quay-pod.service | ||
|
||
- name: Check if pod pause image is loaded | ||
command: podman inspect --type=image {{ pause_image }} | ||
register: r | ||
ignore_errors: yes | ||
|
||
- name: Pull Infra image | ||
containers.podman.podman_image: | ||
name: "{{ pause_image }}" | ||
when: r.rc != 0 | ||
retries: 5 | ||
delay: 5 | ||
|
||
- name: Start Quay Pod service | ||
systemd: | ||
name: quay-pod.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: restarted |
23 changes: 23 additions & 0 deletions
23
...ble-runner/context/app/project/roles/mirror_appliance/tasks/upgrade-postgres-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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
- name: Copy Postgres systemd service file | ||
template: | ||
src: ../templates/postgres.service.j2 | ||
dest: /etc/systemd/system/quay-postgres.service | ||
|
||
- name: Check if Postgres image is loaded | ||
command: podman inspect --type=image {{ postgres_image }} | ||
register: pg | ||
ignore_errors: yes | ||
|
||
- name: Pull Postgres image | ||
containers.podman.podman_image: | ||
name: "{{ postgres_image }}" | ||
when: pg.rc != 0 | ||
retries: 5 | ||
delay: 5 | ||
|
||
- name: Start Postgres service | ||
systemd: | ||
name: quay-postgres.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: restarted |
23 changes: 23 additions & 0 deletions
23
ansible-runner/context/app/project/roles/mirror_appliance/tasks/upgrade-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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
- name: Copy Quay systemd service file | ||
template: | ||
src: ../templates/quay.service.j2 | ||
dest: /etc/systemd/system/quay-app.service | ||
|
||
- name: Check if Quay image is loaded | ||
command: podman inspect --type=image {{ quay_image }} | ||
register: q | ||
ignore_errors: yes | ||
|
||
- name: Pull Quay image | ||
containers.podman.podman_image: | ||
name: "{{ quay_image }}" | ||
when: q.rc != 0 | ||
retries: 5 | ||
delay: 5 | ||
|
||
- name: Start Quay service | ||
systemd: | ||
name: quay-app.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: restarted |
23 changes: 23 additions & 0 deletions
23
ansible-runner/context/app/project/roles/mirror_appliance/tasks/upgrade-redis-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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
- name: Copy Redis systemd service file | ||
template: | ||
src: ../templates/redis.service.j2 | ||
dest: /etc/systemd/system/quay-redis.service | ||
|
||
- name: Check if Redis image is loaded | ||
command: podman inspect --type=image {{ redis_image }} | ||
register: r | ||
ignore_errors: yes | ||
|
||
- name: Pull Redis image | ||
containers.podman.podman_image: | ||
name: "{{ redis_image }}" | ||
when: r.rc != 0 | ||
retries: 5 | ||
delay: 5 | ||
|
||
- name: Start Redis service | ||
systemd: | ||
name: quay-redis.service | ||
enabled: yes | ||
daemon_reload: yes | ||
state: restarted |
17 changes: 17 additions & 0 deletions
17
ansible-runner/context/app/project/roles/mirror_appliance/tasks/upgrade.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- name: Autodetect Image Archive | ||
include_tasks: autodetect-image-archive.yaml | ||
|
||
- name: Upgrade Quay Pod Service | ||
include_tasks: upgrade-pod-service.yaml | ||
|
||
- name: Upgrade Postgres Service | ||
include_tasks: upgrade-postgres-service.yaml | ||
|
||
- name: Upgrade Redis Service | ||
include_tasks: upgrade-redis-service.yaml | ||
|
||
- name: Upgrade Quay Service | ||
include_tasks: upgrade-quay-service.yaml | ||
|
||
- name: Wait for Quay | ||
include_tasks: wait-for-quay.yaml |
11 changes: 11 additions & 0 deletions
11
ansible-runner/context/app/project/upgrade_mirror_appliance.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,11 @@ | ||
- name: "Upgrade Mirror Appliance" | ||
gather_facts: yes | ||
become: true | ||
hosts: all | ||
tags: | ||
- quay | ||
tasks: | ||
- name: upgrade_mirror_appliance | ||
import_role: | ||
name: mirror_appliance | ||
tasks_from: upgrade |
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
Oops, something went wrong.