-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snippet for setting up APT repos based on if the distro is EOL or not #67
Conversation
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
add the snapshot repo is the distro is EOL use the snippet in templates needing it Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
ab34e66
to
2339d0d
Compare
I believe this is ready for a first round of feedback. What's this does:Update the templates to handle the snapshots repository and automatically switch images from packages.ros.org to snapshots.ros.org (with key updates as well) when new distros are added to the EOL lists defined in This allows to update the following images automatically:
What it doesn't do:
It would superseed/fix:
What it does poorly:
Resulting dockerfilesResulting Dockerfiles can be found at: https://github.com/osrf/docker_images/compare/use_docker_templates_67 |
Do we need to make sure the old ubuntu distros like zesty include the apt change for using archive? RUN find /etc/apt/ -name *.list -exec sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' {} \; I was thinking it was missing from this file: |
I suppose that make everything a little more straight forward. Sounds ok.
Currently, there's just
As long as both stages are operating upon the same input/context ( |
You're absolutely right I was planning on adding it everywhere and totally forgot when implementing it
Sorry I should have updated osrf/docker_images#281 before submitting this.
Yeah it occurred to me that groovy and later had variants like more recent distros ( |
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Sounds useful. Some folks may pin/archive a docker image for some time (all prior to a distro getting a final snapshot). Some of our images can have a long tail/chain of child images propagating through downstream projects (think caffe or openpose). Pinning the version of a package installed is one thing, but constantly revolving the apt repository URL seem more invasive. Could we just pin the snapshot package version without changing the URL until @nuclearsandwich am I correctly understanding the intended repo structure/lifecycle for snapshots? |
I guess this would leave us with the same as the current state as images will go out of date and pinning exact versions would require different package version per architecture as they embed the build timestamp. From https://answers.ros.org/question/328801/will-the-snapshot-repo-provide-debian-stretch-packages-for-melodic/ it looks like when a sync happens only the targeted Ubuntu LTS packages get synced to the snapshots repos so this rules out using the "SYNC_DATE" snapshots to ensure up-to-date images (at least for the non Ubuntu LTS base images) |
Tracking a
Almost. In an ideal world with infinite storage resources, I would keep every snapshot forever. When we launched the snapshots project we didn't have a good estimate for the bandwidth and storage costs that would be associated with it so we could not, and have not, committed to keeping snapshots indefinitely. But did commit to providing them for at least six months. The first snapshots would have "expired" in May of this year but they're still up. We don't want to have to take them down, we just don't have resources Providing an atomically updateable repository for the Docker images to use was one of the initial use-cases I had in mind for the snapshots repositories. If I remember correctly the attempts to use the full package versions from the buildfarm to version releases stalled because the build timestamps in the full version numbers are platform dependent. The SYNC_DATE provides a single value capable of busting a docker build cache that atomically switches from one consistent state of all packages to another. It would further complicate our template logic with combinatoric explosions but is it worth using the snapshot repositories for the LTS releases on Ubuntu LTS even if we can't use them elsewhere? We've identified a few of the shortcomings with the current approach (that snapshots are not available for all platforms we want to provide docker images for) but before we can justify the extra effort in resolving that shortcoming I think we need to determine that the snapshots will work for this purpose. |
For clarification, all dockerfiles here expressly wipe the apt cache before finalizing any images layer. Thus downstream child images must invoke apt-update to apt-install further debian packages anyhow. As for apt-upgrades, that of course depends upon to what extent the difference syncs bump ros.org package versions, no? Users may of course use But I think understand your point as users could still install accupaning packages from the same sync for as long as the snapshot URL is archived, which I think is worthwhile if its in perpetuity.
Is there an example of how other official library repos have similarly handled this issue. Other debian packaging project must have to deal with shallow archive issues, thus the snapshot.debian.org , but I’ve not seen its use in other official library repos yet.
What purpose do we currently append the build timestamps to the package version string. Is there cause to release the same package with a newer build date, yet not yank the previous package with the same version number? Omitting the dates would help avoid the issue of all platforms not being built simultaneously.
Then again, I suppose the larger issue was that not all platforms are synced simultaneously and would not have the same point version number available that we could use to break the build cache. I think if we wanted to provide SYNC_DATE tags for the official library images, we’d have to bite the bullet and refactor to allow for separate tags per platform architecture, e.g.: Tags: dashing-ros-core, dashing-ros-core-bionic
Architectures: amd64, arm32v7, arm64v8
amd64-GitCommit: 1...
amd64-Directory: ros/dashing/ubuntu/bionic/amd64/ros-core
arm32v7-GitCommit: 2...
arm32v7-Directory: ros/dashing/ubuntu/bionic/arm32v7/ros-core
arm64v8-GitCommit: 3...
arm64v8-Directory: ros/dashing/ubuntu/bionic/arm64v8/ros-core
Tags: dashing-ros-core-bionic-20190613 #<--
Architectures: amd64
amd64-GitCommit: 1...
amd64-Directory: ros/dashing/ubuntu/bionic/amd64/ros-core
Tags: dashing-ros-core-bionic-20190702 #<--
Architectures: arm32v7, arm64v8
arm32v7-GitCommit: 2...
arm32v7-Directory: ros/dashing/ubuntu/bionic/arm32v7/ros-core
arm64v8-GitCommit: 3...
arm64v8-Directory: ros/dashing/ubuntu/bionic/arm64v8/ros-core I suppose were in a sort of limbo; attempting to facilitate reproducibility for a meta level ecosystem on top of a moving target OS. So I’d like to ask what degree of reproducibility we are attempting to achieve here?
I guess I see the official library images as being more of a rolling release of a configured environment of binaries, and if you want to freeze the image at a given time, then you should pin down that environment in a self contained archive with all its necessary packages, e.g. using its tag or SHA256 digest. If your dependencies change or expand, then it's a lot to ask that same setup to retroactively retrieve packages you did not archive and that could have an ephemeral existence. |
I don't think it would be worth doing as consistency across images and maintainability of the templates would be impacted. So IMO it would be worthwhile iif all distros getting debs generated by the ROS buildfarm have snapshots as well. Otherwise it may be better to use the snapshots repository for EOL images only and pursue another approach to keep the live images up to date. Looking at all active ROS distros, all non-LTS base images are not targeted or already EOL so no problem there. The only remaining issue would be for Debian LTS (Stretch) that is targeted by Melodic but doesnt have snapshots (similarly best guess is the same question will come up for Noetic if it targets Debian Buster).
My understanding is that the ROS buildfarm rebuilds downstream packages when a package is released (to work around ABI incompatibility). By adding the build timestamp it ensures that users doing an apt-upgrade will get the new packages and their newly built dependants.
Hmm this is surprising are you sure this is accurate? While the individual debs are built at different times, Based on what I understood from the snapshots structure, the Originally I was hoping of solving the "docker images outdated" issue with this but you're right that pinning snapshot images has been a requested feature as well. I do believe that the distributed images should always reflect the state of the last sync. I'm not sure we should go all the way to pinning down the OS base image as well but dont feel very strongly about it. Regarding providing tagged versions of the image, we could indeed add a custom tag everytime we switch to a newer # latest dashing sync
Tags: dashing-ros-base, dashing-ros-base-bionic, dashing
Architectures: amd64, arm64v8
GitCommit: 2....
Directory: ros/dashing/ubuntu/bionic/ros-base
# dashing sync on 2019-06-14
Tags: dashing-ros-base-bionic-20190614
Architectures: amd64, arm64v8
GitCommit: 1....
Directory: ros/dashing/ubuntu/bionic/ros-base
# dashing sync on 2019-05-31
Tags: dashing-ros-base-bionic-20190531
Architectures: amd64, arm64v8
GitCommit: f....
Directory: ros/dashing/ubuntu/bionic/ros-base It does imply tracking different commit hashes for each entry, but if my understanding of the |
👍
This isn't the case. The relevant portions of the sync process are:
If ever we got to a point where we have full build farm support for on debian-based distros we would need to expand the above process to include those platforms but for the sake of maintainability we would almost certainly keep syncs as monolithic as possible. |
@nuclearsandwich @ruffsl It seems that we agree to move forward for using the snapshots repository for the EOL images. And don't tackle the images for active distros as its unclear the more suitable approach is for those. If you get a chance, could you 👀 the current patch ? thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, from looking at the diff this can generate, this LGTM.
https://github.com/osrf/docker_images/compare/use_docker_templates_67
After some thought, I've come around and thinking the benefits in using snapshot repo with Perhaps we could consolidate the proposal for switching to snapshots into a briefe ticket on docker_images, and cc/ping the official docker hub librarians so they know what up. |
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
another effect of the template change I forgot to mention is the name of the source list files. before it was
|
Yeah my main concern is the fact that we need to segregate Ubuntu LTS (to use
👍 |
Follow-up issues opened at osrf/docker_images#297 and osrf/docker_images#298 |
This is WIP, based on #66 and a partial implementation to address the migration of EOL distros to the snapshots repository (osrf/docker_images#281).
WIll update this description as work progresses