Skip to content

Commit

Permalink
Clean up remaining postgres references
Browse files Browse the repository at this point in the history
  • Loading branch information
harishsurf committed May 15, 2024
1 parent 6f2bef1 commit 0f615a7
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 112 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
EE_IMAGE=quay.io/quay/mirror-registry-ee:latest
EE_BASE_IMAGE=registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8:1.0.0-249
EE_BUILDER_IMAGE=registry.redhat.io/ansible-automation-platform-22/ansible-builder-rhel8:1.1.0-103
# POSTGRES_IMAGE=registry.redhat.io/rhel8/postgresql-10:1-203.1669834630
QUAY_IMAGE=quay.io/omr-sqlite/omrrepo:workingsqlite
REDIS_IMAGE=registry.redhat.io/rhel8/redis-6:1-92.1669834635
PAUSE_IMAGE=registry.access.redhat.com/ubi8/pause:8.7-6
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,3 @@
shell:
cmd: podman image import --change 'ENV container=oci' --change 'ENV PATH=/app/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' --change 'ENV PYTHONUNBUFFERED=1' --change 'ENV PYTHONIOENCODING=UTF-8' --change 'ENV LC_ALL=C.UTF-8' --change 'ENV LANG=C.UTF-8' --change 'ENV QUAYDIR=/quay-registry' --change 'ENV QUAYCONF=/quay-registry/conf' --change 'ENV QUAYRUN=/quay-registry/conf' --change 'ENV QUAYPATH=/quay-registry' --change 'ENV PYTHONUSERBASE=/app' --change 'ENV PYTHONPATH=/quay-registry' --change 'ENV TZ=UTC' --change 'ENV RED_HAT_QUAY=true' --change 'ENTRYPOINT=["dumb-init","--","/quay-registry/quay-entrypoint.sh"]' --change 'WORKDIR=/quay-registry' --change 'EXPOSE=7443' --change 'EXPOSE=8080' --change 'EXPOSE=8443' --change 'VOLUME=/conf/stack' --change 'VOLUME=/datastorage' --change 'VOLUME=/sqlite/data' --change 'VOLUME=/tmp' --change 'VOLUME=/var/log' --change 'USER=1001' --change 'CMD ["registry"]' - {{ quay_image }} < {{ quay_root }}/quay.tar
when: p.stat.exists and local_install == "false"

# - name: Loading Postgres if postgres.tar exists
# shell:
# cmd: podman image import --change 'ENV PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' --change 'ENV STI_SCRIPTS_URL=image:///usr/libexec/s2i' --change 'ENV STI_SCRIPTS_PATH=/usr/libexec/s2i' --change 'ENV APP_ROOT=/opt/app-root' --change 'ENV APP_DATA=/opt/app-root' --change 'ENV HOME=/var/lib/pgsql' --change 'ENV PLATFORM=el8' --change 'ENV POSTGRESQL_VERSION=10' --change 'ENV POSTGRESQL_PREV_VERSION=9.6' --change 'ENV PGUSER=postgres' --change 'ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql' --change 'ENTRYPOINT=["container-entrypoint"]' --change 'WORKDIR=/opt/app-root/src' --change 'EXPOSE=5432' --change 'USER=26' --change 'CMD ["run-postgresql"]' - {{ postgres_image }} < {{ quay_root }}/postgres.tar
# when: p.stat.exists and local_install == "false"

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@
state: present
when: "sqlite_storage.startswith('/')"

# - name: Set write permissions for the /tmp/cer directory
# ansible.builtin.acl:
# path: /tmp/cer
# entity: 1001
# etype: user
# permissions: write
# state: present

- name: Create necessary directory for Quay config bundle
ansible.builtin.file:
path: "{{ quay_root }}/quay-config"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
- name: Autodetect Image Archive
include_tasks: autodetect-image-archive.yaml

# - name: Install Postgres Service
# include_tasks: install-postgres-service.yaml

- name: Install Redis Service
include_tasks: install-redis-service.yaml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@
force: yes
scope: "{{ systemd_scope }}"

# - name: Stop Postgres service
# systemd:
# name: quay-postgres.service
# enabled: no
# daemon_reload: yes
# state: stopped
# force: yes
# scope: "{{ systemd_scope }}"

- name: Stop Quay Pod service
systemd:
name: quay-pod.service
Expand All @@ -51,11 +42,6 @@
name: sqlite-storage
when: auto_approve|bool == true and sqlite_storage == "sqlite-storage"

- name: Delete Postgres Password Secret
containers.podman.podman_secret:
state: absent
name: pgdb_pass

- name: Delete Redis Password Secret
containers.podman.podman_secret:
state: absent
Expand Down Expand Up @@ -87,7 +73,6 @@
path: "{{ systemd_unit_dir }}/{{ item }}"
loop:
- quay-pod.service
# - quay-postgres.service
- quay-redis.service
- quay-app.service

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ BUILDLOGS_REDIS:
password: {{ redis_password }}
port: 6379
DATABASE_SECRET_KEY: {{ database_secret_key }}
{# DB_URI: postgresql://user:{{ pgdb_password }}@localhost/quay #}
DB_URI: sqlite:////quay-registry/sqlite/data/quay_sqlite.db
DEFAULT_TAG_EXPIRATION: 2w
DISTRIBUTED_STORAGE_DEFAULT_LOCATIONS: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ ExecStart=/usr/bin/podman run \
--image-volume=ignore \
--secret=redis_pass,type=env,target=REDIS_PASSWORD \
--replace \
--image-volume=ignore \
{{ redis_image }}

ExecStop=-/usr/bin/podman stop --ignore --cidfile %t/%n-cid -t 10
Expand Down
19 changes: 0 additions & 19 deletions cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,25 +223,6 @@ func getImageMetadata(app, imageName, archivePath string) string {
--change 'VOLUME=/var/lib/redis/data' \
--change 'CMD ["run-redis"]' \
- ` + imageName + ` < ` + archivePath
case "postgres":
statement = `/usr/bin/podman image import \
--change 'ENV PATH=/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
--change 'ENV STI_SCRIPTS_URL=image:///usr/libexec/s2i' \
--change 'ENV STI_SCRIPTS_PATH=/usr/libexec/s2i' \
--change 'ENV APP_ROOT=/opt/app-root' \
--change 'ENV APP_DATA=/opt/app-root' \
--change 'ENV HOME=/var/lib/pgsql' \
--change 'ENV PLATFORM=el8' \
--change 'ENV POSTGRESQL_VERSION=10' \
--change 'ENV POSTGRESQL_PREV_VERSION=9.6' \
--change 'ENV PGUSER=postgres' \
--change 'ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/postgresql' \
--change 'ENTRYPOINT=["container-entrypoint"]' \
--change 'WORKDIR=/opt/app-root/src' \
--change 'EXPOSE=5432' \
--change 'USER=26' \
--change 'CMD ["run-postgresql"]' \
- ` + imageName + ` < ` + archivePath
case "quay":
// quay.io
statement = `/usr/bin/podman image import \
Expand Down

0 comments on commit 0f615a7

Please sign in to comment.