Skip to content

common: Register local docker.io registry mirror#591

Closed
sebastian-philipp wants to merge 1 commit intoceph:masterfrom
sebastian-philipp:local-docker.io-registry-mirror
Closed

common: Register local docker.io registry mirror#591
sebastian-philipp wants to merge 1 commit intoceph:masterfrom
sebastian-philipp:local-docker.io-registry-mirror

Conversation

@sebastian-philipp
Copy link

Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com

Note that I'm not super familiar with ansible nor ceph-cm-ansible.

Take this as an idea or suggestion, instead of an actual PR.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
@sebastian-philipp
Copy link
Author

cc @tchaikov

name: git+https://github.com/sebastian-philipp/registries-conf-ctl

- name: Add local docker.io registry mirror
command: registries-conf-ctl add-mirror docker.io docker-mirror.front.sepia.ceph.com
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is :5000 required or is that assumed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be super glad, if you could take over this PR. As I said, I have close to no expertise in ansible playbooks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I suggest two tasks?

- name: Add local docker.io registry mirror | docker
  command: registries-conf-ctl --conf=/etc/docker/daemon.json add-mirror docker.io docker-mirror.front.sepia.ceph.com:5000
  when:
    - check_for_docker is success
    - check_for_podman is not success

- name: Add local docker.io registry mirror | podman
  command: registries-conf-ctl --conf=/etc/containers/registries.conf add-mirror docker.io docker-mirror.front.sepia.ceph.com:5000
  when:
    - check_for_docker is not success
    - check_for_podman is success

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

support for docker is not yet implemented in registries-conf-ctl. let me have a look....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

support for docker is not yet implemented in registries-conf-ctl. let me have a look....

If you can handle this portion, I'd be happy to handle the ceph-cm-ansible changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/sebastian-philipp/registries-conf-ctl#registries-conf-ctl now supports also the daemon.json.

registries-conf-ctl add-mirror docker.io docker-mirror.front.sepia.ceph.com:5000

should now work for podman and docker

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does your tool work? I can't read python so I'm going to ask dumb questions...

If docker and podman commands are both detected, will the tool modify both config files? What if neither are detected? Does it care? Will it create the files?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guess it needs some more docs.

If docker and podman commands are both detected, will the tool modify both config files?

yes

What if neither are detected?

It will fail.

Will it create the files?

no

@ideepika
Copy link
Member

ideepika commented Dec 2, 2020

@djgalloway I suppose this will address the rate limiting issue: https://tracker.ceph.com/issues/48157, if do you know a way to add temporary fix for teuthology config, to change registry server?

@djgalloway
Copy link
Contributor

#595

@djgalloway djgalloway closed this Dec 2, 2020
@djgalloway
Copy link
Contributor

djgalloway commented Dec 2, 2020

do you know a way to add temporary fix for teuthology config, to change registry server?

dgalloway@teuthology:~$ cat cm-ansible-branch.yml
overrides:
  ansible.cephlab:
    branch: wip-containers

dgalloway@teuthology:~$ teuthology-suite ... ~/cm-ansible-branch.yml

Sebastian's tool doesn't work on python2 distros yet though. sebastian-philipp/registries-conf-ctl#1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants