[COE-56] COE Container builds automated on DockerHub Created: 18/Jan/19  Updated: 24/Jan/19  Resolved: 24/Jan/19

Status: Resolved
Project: coe
Component/s: None
Affects Version/s: None
Fix Version/s: Neon

Type: Improvement Priority: Medium
Reporter: Michael Vorburger Assignee: Michael Vorburger
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks COE-10 COE Deployment and Packaging for Kube... Open
is blocked by COE-30 Make CNI container image available on... Resolved
Epic Link: COE Deployment and Packaging

 Description   

COE-30 laid the technical ground work to make CNI container image available on the Quay.io container registry, and that is now done and "works" - but here is what is left to "productise" it for real use:

1. https://quay.io/repository/opendaylight/ organization access should be granted to the other CoE committers and the Linux Foundation? I'm happy to add anyone who would like to be added - just email me your ID on Quay.io ...

2. Some... Jenkins Job needs to trigger the webhook on Quay ... see comment in COE-30. An easier alternative do this could be if instead of pointing it to https://git.opendaylight.org/gerrit/coe.git we pointed it to https://github.com/opendaylight/coe and https://github.com/orgs/opendaylight/people would accept the built-in one-click Web Hook that it can set up which just works out of the box. Do note https://docs.quay.io/guides/github-read-only.html

3. I'm not yet crystal clear how we'll publish different versions. Probably just tags matching ODL major release branches?



 Comments   
Comment by Michael Vorburger [ 18/Jan/19 ]

Dunno who can do this work... not me, but may be .. ecelgp or dfarrell07 or zxiiro or agrimberg ? I'll raise an "official" ticket..

FYI shague k.faseela prem.sankar.g@ericsson.com fkautz ...

Comment by Michael Vorburger [ 18/Jan/19 ]

helpdesk@opendaylight.org ticket opendaylight.org #67339

Comment by Thanh Ha (zxiiro) [ 23/Jan/19 ]

vorburger I'm not familiar with quay.io how is it different than Docker Hub?

ODL currently pushes some things to Docker Hub if I recall. Is it possible to integrate with that rather than adding yet another platform?

Comment by Michael Vorburger [ 24/Jan/19 ]

zxiiro Quay.io is just another container registry. Contrary to Docker Hub, it (the registry itself, not just the container runtime itself) is also open source! Quay.io is the public instance of Quay, which Red Hat also bundles in FLOSS OKD and supported OpenShift. All hail Quay! We prefer it.

But if this really blocks progress on this issue, I'm happy if you can instead set up a build in the same way as what I descirbed in COE-30 on DockerHub...I don't think I can myself, unless you want to add me to the https://hub.docker.com/u/opendaylight org? Looks dead BTW, all last updated a year ago.

Comment by Thanh Ha (zxiiro) [ 24/Jan/19 ]

What's your docker hub ID? I can look into adding you tomorrow.

The reason I'm more inclined to use Docker Hub is because several projects at LF are already using Docker Hub. From a support perspective we'd rather have a smaller list of registries being managed as otherwise there is an unlimited amount of services out there that LF will be expected to manage and maintain which at some point just gets out of hand if every project wants to use a different registry service. If we can make it work with Docker Hub let's try that route. If Docker Hub really doesn't work for us then we can discuss quay.io further.

My understanding of container registries though are they should work similarly so I hope it doesn't matter which one is used.

Comment by Thanh Ha (zxiiro) [ 24/Jan/19 ]

I pinged vorburger on IRC and granted him full administrative permissions on the new Docker Hub COE repo (https://cloud.docker.com/u/opendaylight/repository/docker/opendaylight/coe).

Next step is to figure out the best way to hook CI into the repo. We could probably use the GitHub mirror to trigger builds as vorburger mentioned similarly for quay.io. This assumes COE doesn't need to run a Jenkins job to trigger the COE build. Is this a good assumption? Is it sufficient that Docker Hub does all the build work based on a Dockerfile in the project repo or is there more to this that we need to consider?

Comment by Michael Vorburger [ 24/Jan/19 ]

> What's your docker hub ID? I can look into adding you tomorrow.

I'm https://hub.docker.com/u/vorburger

Thanks for having created and given me access to https://cloud.docker.com/u/opendaylight/repository/docker/opendaylight/coe. But the COE project will be publishing several different containers (probably 3), could you therefore instead create coe-cni/ and coe-watcher/ and coe-odl/ ?

Comment by Michael Vorburger [ 24/Jan/19 ]

> This assumes COE doesn't need to run a Jenkins job to trigger the COE build. Is this a good assumption? Is it sufficient that Docker Hub does all the build work based on a Dockerfile in the project repo or is there more to this that we need to consider?

Yup, that seems simplest and best to me as well, and is how I had managed to set it up for COE-30, see the last comment, that should tell you how to... note coe.git/odlCNIPlugin/odlovs-cni/Dockerfile! I'm guessing that you can set up something very similar on Docker Hub? Coming to think of it, if you set up Docker Hub Linked Accounts on cloud.docker.com/u/opendaylight for github.com/opendaylight then we probably/perhaps don't even need to do anything else, as Docker Hub's set up wizard will probably magically install a Web Hook on GitHub!

Though one thing to consider is how it will work for master vs stable branches - in an ideal world, hopefully Docker Hub can build per branch and tag the container images accordingly correctly all by itself.

Comment by Michael Vorburger [ 24/Jan/19 ]

zxiiro gave me the required permissions to help set this up, and we now have https://hub.docker.com/r/opendaylight/coe-cni (public) and https://cloud.docker.com/u/opendaylight/repository/docker/opendaylight/coe-cni (private to configure the aforementioned).

Done.

Generated at Wed Feb 07 19:15:31 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.