Merge "Disable namespacing"
This commit is contained in:
commit
bd64aa2631
@ -20,9 +20,9 @@
|
|||||||
register: docker_restart
|
register: docker_restart
|
||||||
failed_when: docker_restart is failed and not 'Could not find the requested service' in docker_restart.msg
|
failed_when: docker_restart is failed and not 'Could not find the requested service' in docker_restart.msg
|
||||||
|
|
||||||
- name: Start the standard registry
|
- name: Start the registry
|
||||||
shell:
|
shell:
|
||||||
cmd: docker-compose -f standard-compose.yaml up -d
|
cmd: docker-compose up -d
|
||||||
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
||||||
|
|
||||||
- name: Wait for registry to come up
|
- name: Wait for registry to come up
|
||||||
@ -84,9 +84,9 @@
|
|||||||
- name: Remove the test image from the local cache
|
- name: Remove the test image from the local cache
|
||||||
command: docker rmi alpine
|
command: docker rmi alpine
|
||||||
|
|
||||||
- name: Stop the standard registry
|
- name: Stop the registry
|
||||||
shell:
|
shell:
|
||||||
cmd: docker-compose -f standard-compose.yaml down
|
cmd: docker-compose down
|
||||||
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
||||||
|
|
||||||
- name: Clean up docker volumes
|
- name: Clean up docker volumes
|
||||||
|
@ -6,7 +6,7 @@ services:
|
|||||||
registry:
|
registry:
|
||||||
image: zuul/zuul-registry
|
image: zuul/zuul-registry
|
||||||
volumes:
|
volumes:
|
||||||
- "./standard-conf/:/conf/:z"
|
- "./conf/:/conf/:z"
|
||||||
- "/tmp/registry-test/tls/:/tls:z"
|
- "/tmp/registry-test/tls/:/tls:z"
|
||||||
ports:
|
ports:
|
||||||
- "9000:9000"
|
- "9000:9000"
|
@ -1,8 +1,8 @@
|
|||||||
# Test push and pull from the standard registry
|
# Test push and pull from the standard registry
|
||||||
|
|
||||||
- name: Start the standard registry
|
- name: Start the registry
|
||||||
shell:
|
shell:
|
||||||
cmd: docker-compose -f standard-compose.yaml up -d
|
cmd: docker-compose up -d
|
||||||
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
||||||
|
|
||||||
- name: Print list of images
|
- name: Print list of images
|
||||||
@ -19,7 +19,7 @@
|
|||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
command: docker login localhost:9000 -u testuser -p testpass
|
command: docker login localhost:9000 -u testuser -p testpass
|
||||||
|
|
||||||
- name: Push the test image to the standard registry
|
- name: Push the test image to the registry
|
||||||
command: docker push localhost:9000/test/image
|
command: docker push localhost:9000/test/image
|
||||||
|
|
||||||
- name: Remove the test image from the local cache
|
- name: Remove the test image from the local cache
|
||||||
@ -30,7 +30,7 @@
|
|||||||
register: image_list
|
register: image_list
|
||||||
failed_when: "'test/image' in image_list.stdout"
|
failed_when: "'test/image' in image_list.stdout"
|
||||||
|
|
||||||
- name: Pull the image from the standard registry
|
- name: Pull the image from the registry
|
||||||
command: docker pull localhost:9000/test/image
|
command: docker pull localhost:9000/test/image
|
||||||
|
|
||||||
- name: Print list of images
|
- name: Print list of images
|
||||||
@ -46,9 +46,9 @@
|
|||||||
- name: Remove the test image from the local cache
|
- name: Remove the test image from the local cache
|
||||||
command: docker rmi localhost:9000/test/image
|
command: docker rmi localhost:9000/test/image
|
||||||
|
|
||||||
- name: Stop the standard registry
|
- name: Stop the registry
|
||||||
shell:
|
shell:
|
||||||
cmd: docker-compose -f standard-compose.yaml down
|
cmd: docker-compose down
|
||||||
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
||||||
|
|
||||||
- name: Clean up docker volumes
|
- name: Clean up docker volumes
|
||||||
|
@ -5,7 +5,7 @@ prefix = "docker.io"
|
|||||||
location = "docker.io"
|
location = "docker.io"
|
||||||
|
|
||||||
[[registry.mirror]]
|
[[registry.mirror]]
|
||||||
location = "localhost:9000/docker.io"
|
location = "localhost:9000"
|
||||||
|
|
||||||
[[registry.mirror]]
|
[[registry.mirror]]
|
||||||
location = "docker.io"
|
location = "docker.io"
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
# Version 2 is the latest that is supported by docker-compose in
|
|
||||||
# Ubuntu Xenial.
|
|
||||||
version: '2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
registry:
|
|
||||||
image: zuul/zuul-registry
|
|
||||||
volumes:
|
|
||||||
- "./namespaced-conf/:/conf/:z"
|
|
||||||
- "/tmp/registry-test/storage/:/storage:z"
|
|
||||||
- "/tmp/registry-test/tls/:/tls:z"
|
|
||||||
ports:
|
|
||||||
- "9000:9000"
|
|
@ -6,9 +6,9 @@
|
|||||||
src: files/registries.conf
|
src: files/registries.conf
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Start the namespaced registry
|
- name: Start the registry
|
||||||
shell:
|
shell:
|
||||||
cmd: docker-compose -f namespaced-compose.yaml up -d
|
cmd: docker-compose up -d
|
||||||
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
||||||
|
|
||||||
- name: Wait for registry to come up
|
- name: Wait for registry to come up
|
||||||
@ -35,13 +35,13 @@
|
|||||||
content: "{{ new_user_config | to_nice_json }}"
|
content: "{{ new_user_config | to_nice_json }}"
|
||||||
dest: "/run/user/{{ ansible_user_uid }}/auth.json"
|
dest: "/run/user/{{ ansible_user_uid }}/auth.json"
|
||||||
|
|
||||||
- name: Copy the test image into the buildset registry
|
- name: Copy the test image into the registry
|
||||||
command: >
|
command: >
|
||||||
skopeo copy --dest-creds testuser:testpass
|
skopeo copy --dest-creds testuser:testpass
|
||||||
docker-archive:{{ workspace }}/test.img
|
docker-archive:{{ workspace }}/test.img
|
||||||
docker://localhost:9000/docker.io/test/image:latest
|
docker://localhost:9000/test/image:latest
|
||||||
|
|
||||||
- name: Copy the test image into the buildset registry
|
- name: Copy the test image into the registry
|
||||||
command: >
|
command: >
|
||||||
skopeo copy --dest-creds testuser:testpass
|
skopeo copy --dest-creds testuser:testpass
|
||||||
docker-archive:{{ workspace }}/test.img
|
docker-archive:{{ workspace }}/test.img
|
||||||
@ -55,7 +55,7 @@
|
|||||||
- "'test/quay-image' in image_list.stdout"
|
- "'test/quay-image' in image_list.stdout"
|
||||||
- "'alpine' in image_list.stdout"
|
- "'alpine' in image_list.stdout"
|
||||||
|
|
||||||
- name: Pull the shadowed docker image from the buildset registry
|
- name: Pull the shadowed docker image from the registry
|
||||||
command: podman pull test/image
|
command: podman pull test/image
|
||||||
|
|
||||||
- name: Print list of images
|
- name: Print list of images
|
||||||
@ -66,7 +66,7 @@
|
|||||||
- name: Remove the test image from the local cache
|
- name: Remove the test image from the local cache
|
||||||
command: podman rmi docker.io/test/image
|
command: podman rmi docker.io/test/image
|
||||||
|
|
||||||
- name: Pull the shadowed quay image from the buildset registry
|
- name: Pull the shadowed quay image from the registry
|
||||||
command: podman pull quay.io/test/quay-image
|
command: podman pull quay.io/test/quay-image
|
||||||
|
|
||||||
- name: Print list of images
|
- name: Print list of images
|
||||||
@ -104,9 +104,9 @@
|
|||||||
- name: Remove the test image from the local cache
|
- name: Remove the test image from the local cache
|
||||||
command: podman rmi quay.io/0xff/alpine-sshd
|
command: podman rmi quay.io/0xff/alpine-sshd
|
||||||
|
|
||||||
- name: Stop the namespaced registry
|
- name: Stop the registry
|
||||||
shell:
|
shell:
|
||||||
cmd: docker-compose -f namespaced-compose.yaml down
|
cmd: docker-compose down
|
||||||
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
||||||
|
|
||||||
- name: Clean up docker volumes
|
- name: Clean up docker volumes
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Test push and pull from the standard registry
|
# Test push and pull from the standard registry
|
||||||
|
|
||||||
- name: Start the standard registry
|
- name: Start the registry
|
||||||
shell:
|
shell:
|
||||||
cmd: docker-compose -f standard-compose.yaml up -d
|
cmd: docker-compose up -d
|
||||||
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
||||||
|
|
||||||
- name: Print list of images
|
- name: Print list of images
|
||||||
@ -19,7 +19,7 @@
|
|||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
command: podman login localhost:9000 -u testuser -p testpass
|
command: podman login localhost:9000 -u testuser -p testpass
|
||||||
|
|
||||||
- name: Push the test image to the standard registry
|
- name: Push the test image to the registry
|
||||||
command: podman push localhost:9000/test/image
|
command: podman push localhost:9000/test/image
|
||||||
|
|
||||||
- name: Remove the test image from the local cache
|
- name: Remove the test image from the local cache
|
||||||
@ -33,7 +33,7 @@
|
|||||||
register: image_list
|
register: image_list
|
||||||
failed_when: "'test/image' in image_list.stdout"
|
failed_when: "'test/image' in image_list.stdout"
|
||||||
|
|
||||||
- name: Pull the image from the standard registry
|
- name: Pull the image from the registry
|
||||||
command: podman pull localhost:9000/test/image
|
command: podman pull localhost:9000/test/image
|
||||||
|
|
||||||
- name: Print list of images
|
- name: Print list of images
|
||||||
@ -46,9 +46,9 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.rc != 125
|
failed_when: result.rc != 125
|
||||||
|
|
||||||
- name: Stop the standard registry
|
- name: Stop the registry
|
||||||
shell:
|
shell:
|
||||||
cmd: docker-compose -f standard-compose.yaml down
|
cmd: docker-compose down
|
||||||
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
chdir: "{{ ansible_user_dir }}/src/opendev.org/zuul/zuul-registry/playbooks/functional-test"
|
||||||
|
|
||||||
- name: Clean up podman volumes
|
- name: Clean up podman volumes
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
registry:
|
|
||||||
address: '0.0.0.0'
|
|
||||||
port: 9000
|
|
||||||
public-url: https://localhost:9000
|
|
||||||
tls-cert: /tls/cert.pem
|
|
||||||
tls-key: /tls/cert.key
|
|
||||||
secret: test_token_secret
|
|
||||||
users:
|
|
||||||
- name: testuser
|
|
||||||
pass: testpass
|
|
||||||
access: write
|
|
||||||
storage:
|
|
||||||
driver: filesystem
|
|
||||||
root: /storage
|
|
@ -320,7 +320,7 @@ class RegistryServer:
|
|||||||
|
|
||||||
route_map = cherrypy.dispatch.RoutesDispatcher()
|
route_map = cherrypy.dispatch.RoutesDispatcher()
|
||||||
api = RegistryAPI(self.store,
|
api = RegistryAPI(self.store,
|
||||||
self.conf.get('namespaced', False),
|
False,
|
||||||
authz)
|
authz)
|
||||||
cherrypy.tools.check_auth = authz
|
cherrypy.tools.check_auth = authz
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user