On Friday, June 12, 2026 7:49:18 AM Eastern Daylight Time Adam Prycki via 
ceph-users wrote:
> I have a newbie question.
> 
> How does one build ceph container which can be tested in cephadm cluster?
> 
> I've had success compiling ceph with this command from the documentation
> ./src/script/build-with-container.py -d ubuntu22.04 -b build.u2204 -e build
> 
> but container it leaves behind has no ceph binaries in $PATH or /usr/bin.
> 

That's intentional. The container that script produces is meant purely to 
build ceph. 

To produce a container for running ceph - one first needs to build the (rpm) 
packages. You can use the build-with-container.py script and the -e packages 
with a distro base of rocky10 (`-d rocky10 -e packages`) or centos 9 (`-d 
centos9 -e packages`), depending on what ceph branch you are targeting.

Once you have packages you need to host them in a yum/dnf repo. Then you can 
use the script ./container/build.sh with the special env var 
CUSTOM_CEPH_REPO_URL set to your new repo.

It's been a few months since I last tried it myself, but that's the process I 
used.

We've batted around the idea of teaching build-with-container.py how to help 
automate some of the steps after package build (like creating the repo and 
running a local webserver to host it) - but nothing concrete has really come 
of that so far.

> I was testing on ubunut 22.04 with podman and v19.2.4 git tag.
> 


As of today, we regularly build packages for centos 9, rocky 10, Ubuntu 22.04 
(jammy), and Ubuntu 24.04 (noble) on main.  The container/Containerfile builds 
the images based on EL distro base - centos9 and rocky 10. The default was 
recently updated to rocky 10.

To use something other than those two - you'd probably be better off creating 
your own {Contatainerfile,Dockerfile}.
 

> Second question, how distro specific are these container build scripts?
> My colleague couldn't build any images on ubuntu 26.04.
> I can build only ubnutu 22.04 images, centos9 and centos10 builds fail
> on v19.2.4 and v20.2.1
> 

Ubuntu 26.04 (resolute) support exists in build-with-container.py but it is 
not being tested in the CI. It's being discussed as a target for a future ceph 
release so I expect some more activity on that front soon. I don't expect 
either the basic build or the package build to work at the moment but I have 
not tried it myself recently.

Each branch will have it's own "supported build matrix" so I am unsure how to 
help with the 2nd sentence there. Maybe more specific, "I used branch X on host 
os Y and saw Z failure" would help.


> Third question, is there a reliable way to set number of jobs used
> during compilation? BUILD_MAKEOPTS=-j32 seems to work for some build
> targets but not for all. By default build system chooses -j16 on 32 core VM.
> 

 Some of the build targets have different behaviors because they're driven by 
different scripts internally. The stuff that drives the basic build and 'make 
check' is a bit different from the package builds for instance. You should be 
able to pass any env var you want via an environment file.  Take a look at this 
example from the ceph CI : https://github.com/ceph/ceph-build/blob/
b8a350545b563843fc96a7e0f0fb2c1fbeb98246/ceph-pull-requests/build/build#L13-
L20
But what vars will be honored is dependent on what you run.

Also, feel free to file tracker.ceph.com issues for specific problems you may 
encounter while trying these tools.  You can also reach us on Ceph community 
slack in the #ceph-build-sig channel if you prefer chat over email. We also 
hold weekly meetings on 4:30PM Eastern on Wednesdays. Check the ceph community 
calendar for details. Although, I realize that's pretty late for folks in 
Europe.


_______________________________________________
ceph-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to