Repository navigation
containerized build tools [V2] - #59841
Conversation
be3b8af to
ccdda2e
Compare
6e8086f to
4801522
Compare
c04a52e to
3edeefa
Compare
There was a problem hiding this comment.
can we just use the steps at https://docs.ceph.com/en/squid/start/beginners-guide/ to setup the environment?
as in use install-deps.sh so that we can keep all the dependencies per OS etc are all in the same place?
There was a problem hiding this comment.
There's a maze of twisty passages throughout these build scripts. This eventually does end up calling install-deps.sh. Without doing a deep check the flow is "include run-make.sh" -> prepare -> install-deps.sh.
I'd love to simplify some of this but this script was added to (a) match more closely what the jenkins builds are doing (b) add extra packages needed to "fix" the container environment where install-deps either misses or doesn't need something but the containerized env does.
There was a problem hiding this comment.
gotcha.
so is the goal - to deprecate install-deps.sh once we get this simplified version done? so that how folks build it locally and how its build in jenkins is consistent(?)
As for the "additional" dependencies needed just for container builds - would it make sense to keep that as a separate list/script so that we can dig into why that difference exists and document it out?
There was a problem hiding this comment.
While I'm not a fan of install-deps.sh, I think it is correct that we use this to install all the dependency packages needed for building ceph. I'm not sure about the extra couple of packages that are being installed for the different distro's below - I think these are really missing dependencies and that we should be fixing install-deps.sh so that it installs these packages as well.
There was a problem hiding this comment.
unsure why we need this - can/should we make this a separate PR (assuming this fixes some problem you ran into)
Also - i would think it makes sense to check the return code instead of removing it?
There was a problem hiding this comment.
Yes, thanks for the reminder. I have also created a PR for this.
There was a problem hiding this comment.
gotcha.
so is the goal - to deprecate install-deps.sh once we get this simplified version done? so that how folks build it locally and how its build in jenkins is consistent(?)
As for the "additional" dependencies needed just for container builds - would it make sense to keep that as a separate list/script so that we can dig into why that difference exists and document it out?
|
general question - do we want to add some non blocking (while we are flushing out the details) PR checks to make sure the containerized builds wont break on a code/dependency change? |
5ace380 to
152a070
Compare
I'm open to the idea, but I'm not sure where to begin. What are you thinking of in particular? |
|
I've cleaned up the content of this branch a lot. I've removed a lot of the WIP patches that existed to get certain builds passing - you can still run them, but failures are expected. This should make the current PR easier to try out and to review, but if you do want to experiment with it in practice you may still end up need patches from that other branch. |
9d93790 to
08fa675
Compare
There was a problem hiding this comment.
Is this line accurate? COPY from /usr/local/src/ceph to /usr/local/src/ceph?
There was a problem hiding this comment.
Yes, the --from=bootstrap part means copy said path from the build container named boostrap. This container (layer) was already created in previous steps and populated /usr/local/src/ceph. (Maybe think of it more like scp'ing from host1's /usr/local/src/ceph to host2 of the same dir?)
There was a problem hiding this comment.
If you're curious why I did it this way:
- it produces fewer layers in the final image - the COPY statements in the bootstrap build container each produce a layer - but this single COPY statement produces one layer in the resulting image
- it felt nice to organize the "minimal" set of files taken from the ceph tree needed to create the build image all together in one logical block
668cd3b to
68f0355
Compare
|
@phlogistonjohn - can we also add some instruction on how to build/test this? (i am hoping to play with it and also help fix some of the open trackers linked here) |
|
new instructions have been added to the PR description under |
0174947 to
571b196
Compare
|
I like this initiative @phlogistonjohn. This PR made me recall making use of Rook for testing my NFS related patches last year. It was as simple as having a Dockerfile with custom built binaries, add it to my quay account and use it in config YAML to spin up a cluster. So, having something like this within Ceph repo is really helpful. I'll plan to use this in some of my upcoming testings. |
|
one feedback item
|
571b196 to
cdf9bdc
Compare
|
@phlogistonjohn hi, John. Two question:
_> [2/2] COMMIT ceph-build:ctr1.centos9
And - 2- how to create the build environment for Reef? Thanks! |
|
Thanks for trying it out!
Interesting. I have not seen that before. Are you able to build container images successfully with podman normally? If yes let's try to execute the build command (seen in the output - minus the comma separators) without the script involved. If no, we will probably need to debug your podman/system setup a bit.
We would need to backport PR #48697 and these patches to reef. I tried to do a quick and dirty backport here. I was able to build a ubuntu 22.04 builder image but then ceph failed to configure due to some dpdk error. Unfortunately , I don't have time to debug that today. Maybe later this week. [EDIT] Actually, because I was in a rush I wasn't paying attention and notice /remember that my |
|
@ronen-fr we use podman quite a bit and have also had issues with /var/ filling up (and $HOME when not running as root). Other than increasing the size of /var and $HOME there are a couple of solutions:
|
Thanks a lot! |
ee0762f to
da6856a
Compare
This function returns successfully if $BUILD_DIR exists and is valid. This is a useful building block for automation around the build and can be used to avoid re-running commands that fail is the build dir exists already. Signed-off-by: John Mulligan <[email protected]>
Move the mkdir line to allow for other builds dir naming schemes outside of what appears in the .gitignore file. A tiny bit of added flexibility at little cost. Signed-off-by: John Mulligan <[email protected]>
A build container contains all the tools and dependencies needed to build ceph. It provides a Container file and small script that helps bootstrap the container setup. This script installs a few extra things we need before farming most of the work out to install-deps.sh. Signed-off-by: John Mulligan <[email protected]>
The build-with-container script tries to encapsulate nearly all major build tasks using docker/podman containers. If there's no build image locally it will create one for your. It provides targets for building (make), testing (make check), building rpm packages or deb packages and is designed to be fairly easily extended. View the comment at the top of the source file for usage details. Signed-off-by: John Mulligan <[email protected]>
da6856a to
f276cc5
Compare
|
Moving out of draft as per discussion on 02/05. |
|
@phlogistonjohn @ronen-fr @bill-scales To free up space, I personally use |
|
I think this is ready to merge and iterate on. I am going to start work on integrating it with the new build pipeline, which should also be ready to merge: ceph/ceph-build#2310 |
|
Hello @phlogistonjohn ! I can see that the |
|
It is supposed to work, but I never test it with docker. I rely on others to try it with docker. Since docker apparently doesn't support passing the --volume option to build, you can try commenting out the section: in the Otherwise please file a tracker issue on ceph: https://tracker.ceph.com - use the |
On the original github pr ceph#59841 user fayak kindly informed us that the --volume option was not supported by docker build. Since this section was a leftover from a previous way of constructing the builder image and was no longer needed we simply removed it. Signed-off-by: John Mulligan <[email protected]>
On the original github pr ceph#59841 user fayak kindly informed us that the --volume option was not supported by docker build. Since this section was a leftover from a previous way of constructing the builder image and was no longer needed we simply removed it. Signed-off-by: John Mulligan <[email protected]>
On the original github pr ceph#59841 user fayak kindly informed us that the --volume option was not supported by docker build. Since this section was a leftover from a previous way of constructing the builder image and was no longer needed we simply removed it. Signed-off-by: John Mulligan <[email protected]> (cherry picked from commit 612a9d6)
On the original github pr ceph#59841 user fayak kindly informed us that the --volume option was not supported by docker build. Since this section was a leftover from a previous way of constructing the builder image and was no longer needed we simply removed it. Signed-off-by: John Mulligan <[email protected]> (cherry picked from commit 612a9d6)
On the original github pr ceph#59841 user fayak kindly informed us that the --volume option was not supported by docker build. Since this section was a leftover from a previous way of constructing the builder image and was no longer needed we simply removed it. Signed-off-by: John Mulligan <[email protected]> (cherry picked from commit 612a9d6) (cherry picked from commit e56df19)
On the original github pr ceph#59841 user fayak kindly informed us that the --volume option was not supported by docker build. Since this section was a leftover from a previous way of constructing the builder image and was no longer needed we simply removed it. Signed-off-by: John Mulligan <[email protected]> (cherry picked from commit 99d1b71)
After a series of discussions, particularly with Zack C and Dan Mick, I've created a new patch series to replace those in #56711.
This version simplifies the (Container|Docker)file and and replaces the harder to maintain shell script wrapper with a more logical and well constructed python script. Right now there are also a couple of patches present in the branch that I needed to make it compile the unit tests. I plan on moving these out eventually as separate PRs.
PRs and issues related to building in containers:
test/cls_log: remove unused variable #61030test/fio: remove assign-only variable #61031https://tracker.ceph.com/issues/69241fixed on main in rgw/posix: std::ignore return value of write() #61107How to test & try
Assuming you have a git checkout of ceph/ceph already:
git remote add -t jjm-containerized-build-pyalt phlogistonjohn [email protected]:phlogistonjohn/ceph.gitgit fetch phlogistonjohngit switch jjm-containerized-build-pyaltgit switch -c mybranch jjm-containerized-build-pyaltContribution 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