Skip to content

Commit

Permalink
Add ansible task for unpacking pause.tar for remote install (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
harishsurf authored Aug 14, 2024
1 parent 5bde046 commit 0f6e8ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@
command: "tar -xvf {{ quay_root }}/image-archive.tar -C {{ quay_root }}/"
when: p.stat.exists and local_install == "false"

- name: Loading Pause if pause.tar exists
shell:
cmd: podman image import --change 'ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' --change 'ENV container=oci' --change 'ENTRYPOINT=["sleep"]' --change 'CMD ["infinity"]' - {{ pause_image }} < {{ quay_root }}/pause.tar
when: p.stat.exists and local_install == "false"

- name: Loading Redis if redis.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 container=oci' --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 HOME=/var/lib/redis' --change 'ENV PLATFORM=el8' --change 'ENV REDIS_VERSION=6' --change 'ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/redis' --change 'ENV REDIS_PREFIX=/usr' --change 'ENV REDIS_CONF=/etc/redis.conf' --change 'ENTRYPOINT=["container-entrypoint"]' --change 'USER=1001' --change 'WORKDIR=/opt/app-root/src' --change 'EXPOSE=6379' --change 'VOLUME=/var/lib/redis/data' --change 'CMD ["run-redis"]' - {{ redis_image }} < {{ quay_root }}/redis.tar
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 container=oci' --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 HOME=/var/lib/redis' --change 'ENV PLATFORM=el8' --change 'ENV REDIS_VERSION=6' --change 'ENV CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/redis' --change 'ENV REDIS_PREFIX=/usr' --change 'ENV REDIS_CONF=/etc/redis.conf' --change 'ENTRYPOINT=["container-entrypoint"]' --change 'USER=1001' --change 'WORKDIR=/opt/app-root/src' --change 'EXPOSE=6379' --change 'VOLUME=/var/lib/redis/data' --change 'CMD ["run-redis"]' - {{ redis_image }} < {{ quay_root }}/redis.tar
when: p.stat.exists and local_install == "false"

- name: Loading Quay if quay.tar exists
shell:
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' --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"
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
- name: Set SELinux Rules
include_tasks: set-selinux-rules.yaml

- name: Install Quay Pod Service
include_tasks: install-pod-service.yaml

- name: Autodetect Image Archive
include_tasks: autodetect-image-archive.yaml

- name: Install Quay Pod Service
include_tasks: install-pod-service.yaml

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

Expand Down

0 comments on commit 0f6e8ef

Please sign in to comment.