Ver Fonte

copy images to internal registry

Grega Bremec há 3 semanas atrás
pai
commit
51080d83d0
1 ficheiros alterados com 16 adições e 4 exclusões
  1. 16 4
      playbooks/roles/setup-for-ad482/tasks/main.yml

+ 16 - 4
playbooks/roles/setup-for-ad482/tasks/main.yml

@@ -2,10 +2,6 @@
 #
 # TODO: fix .m2/settings.xml
 #
-# TODO: copy connect images from quay.io to registry.ocp4.example.com:8443 with --format=v2s2 and then patch
-#       ad482/connect_connectors.py ad482/connect_debezium.py ad482/connect_transformation.py
-#       to use the new images
-#
 - name: Ensure Java is versioned correctly for AD482
   become: yes
   ansible.builtin.command:
@@ -31,4 +27,20 @@
   ansible.builtin.command:
     cmd: /usr/sbin/alternatives --set python /usr/bin/python3.9
 
+- name: Ensure credentials for internal registry are active
+  containers.podman.podman_login:
+    registry: registry.ocp4.example.com:8443
+    username: developer
+    password: developer
+
+- name: Mirror the quay.io images to internal registry, fixing format along the way
+  ansible.builtin.command:
+    cmd: /usr/bin/skopeo copy --format=v2s2 docker://quay.io/redhattraining/{{ image }} registry.ocp4.example.com:8443/redhattraining/{{ image }}
+  loop:
+    - ad482-ch05s04-connect-cluster:latest
+    - ad482-ch05s06-connect-cluster:latest
+    - ad482-ch05s08-connect-cluster:latest
+    - ad482-postgresql:latest
+
+# patch scripts ad482/connect_connectors.py ad482/connect_debezium.py ad482/connect_transformation.py
 ...