Repository navigation
[WIP] containerized build tools - #56711
phlogistonjohn wants to merge 12 commits into
Conversation
|
This is really exciting John! Sadly I wasn't able to make the infrastructure meeting today, but I've been doing some work that could potentially complement this. I'm also thinking about reliability and speed, but I'm experimenting with compiler caching and also distributed compilation and shared caching via sccache, a tool that Mozilla created to help with Firefox. I'm hoping to set up a group of build servers that can be used at least by our build system, and making the shared cache available initially as read-only to all Ceph developers; that way, the build servers may be able to keep the shared cache relatively warm in a secure way. sccache does feature robust authentication, and if we wanted to open up read-write access to individuals we could look at that down the road. I'm working on a Dockerfile that uses a multi-stage build, with the aim of building that image nightly and hosting it publicly, hoping it can shave some time off peoples' daily workflow by not having to build it. Its stages are currently:
I'm aiming to enable the same image to be used by our build infrastructure and by individuals on their laptop. Using sccache would be optional. Noting some differences I see between our WIPs:
I'd love to collaborate if any of this looks attractive to you! |
|
Let's keep talking about this for sure. My time on this topic is a bit limited as my priority is smb but I have been tinkering with this well over a year. Using a distributed cache is interesting. I have not seen much of a benifit with ccache in the container and I have not had time to debug why - my suspicion is user id mapping. |
|
Debugging caching can be tricky! I haven't had issues with uid mapping (yet), but another snag with many compiler cachers is that paths have to be identical in order to get cache hits. Building in a container happens to be a great way to ensure identical paths! I have seen rebuilds on main after wiping the build dir take ~8m, using a remote redis cache. |
|
One other thought: I have a tendency to want to re-write complex shell scripts in python. The current shell script is complex enough that it's giving me that itch. However, I don't want to limit the number of users & possible contributors too much. So I'm ok leaving it in bash, but if there's no objection I think I might switch languages. Ceph uses python pretty thoroughly but I figure I would ask anyway. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
3b8daae to
d8e46ed
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Co-authored-by: Ernesto Puerta <[email protected]> Co-authored-by: John Mulligan <[email protected]> Signed-off-by: Ernesto Puerta <[email protected]> Signed-off-by: John Mulligan <[email protected]>
This helper script exists in order to create a build container and execute the ceph build within that container on a system that has bash and podman or docker installed. It is designed to supplement and help test the containerized build jenkins integration. Thanks-to: Xavi Hernandez - for helping me test this script Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: Ernesto Puerta <[email protected]> xxx: include-exclude lib-build.sh Signed-off-by: John Mulligan <[email protected]> xxx: include debian dir for installing debian deps Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
d8e46ed to
c241c7e
Compare
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
Replaced with #59841 |
This is a messy work-in-progress branch that provides tools for building ceph and running the tests within containers. This is NOT a tool to build container images for ceph. It either spits out binaries, packaged binaries, or executes test code.
Ideally, this has two use cases:
The initial effort, started by Ernesto, was focused on use case 1. This was difficult for me to iterate on since I lack experience and access to Jenkins, so I mainly worked on use case 2.
The current state of the branch is a bit of a mess. I have a number of "hacks" and workarounds that have accumulated over time. Due to lack of time and focus on this task I have not been able to properly get real fixes into the project. But it's not a huge, insurmountable amount of changes either.
Finally, a quick mini-tutorial for the script:
Breaking this example command down:
I last tested it on 2024-04-01 using the above command successfully, but it's very raw so YMMV.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e