Repository navigation
build-with-container: fixes and enhancements - #61939
Conversation
39490ef to
7f996cd
Compare
Thingee
left a comment
There was a problem hiding this comment.
LGTM, but I'll defer to the rest of the team for merge approval.
|
@zdover23 or @anthonyeleven any "Doc writers" opinions on these README changes? |
There was a problem hiding this comment.
Suggest double vs single backticks. Single backticks may be rendered in italics where literals are usually best in monospace.
There was a problem hiding this comment.
I had to ignore your suggestions wrt backticks because this is a MarkDown (MD) formatted file rather than a reStructuredText (reST) formatted file. I followed the pattern of other MD formatted files in the root of the ceph source tree ( like README.md and SECURITY.md).
And so I followed the MD convention for preformatted text (single backtick in markdown does what double backticks in reST does). When I looked quick I saw README.md was markdown and jumped on that but didn't notice other docs in the root were .rst. FWIW I didn't plan for this doc to be included in the formal Ceph documentation as it's still under active development and this felt less official.
I'm open to converting the formatting if there's a strong desire for that but I'd ask to do that in a different PR.
There was a problem hiding this comment.
Ah, understood. Make sense.
There was a problem hiding this comment.
I think you may have already wrapped lines? I try to keep lines <80 chars, that makes editing and commenting easier.
There was a problem hiding this comment.
I think you may have already wrapped lines? I try to keep lines <80 chars, that makes editing and commenting easier.
a59352c to
9aa81da
Compare
|
@anthonyeleven thanks for the feedback, I resolved most items but did want to highlight the formatting item (see the reply). I left the update in a separate patch for maximum clarity about what I changed, but I will squash that once I know things are generally ok on the docs front. Thanks. I have kind of a pet peeve about "distro", it brings to mind https://en.wikipedia.org/wiki/Frankenstein:_The_True_Story . |
After the last set of fixes and enhancements I forgot to reformat the file. This applies standard `black` formatting to the file. Signed-off-by: John Mulligan <[email protected]>
Add a system to define distro name aliases and use that to define some additional aliases, primarily to match ubuntu codenames rather than version numbers. Requested by Zack. Signed-off-by: John Mulligan <[email protected]>
Add a new --current-branch argument that lets the user supply a name for the current branch. This allows the automatic tag generation to avoid calling git - something useful if the tree is not using a git checkout (like a tarball). It also allows you to pull a temporary branch in git but ignore it and act like the temporary branch is the base branch. Signed-off-by: John Mulligan <[email protected]>
Previously, we were passing build argument of CEPH_BRANCH, but that was
a bit misleading as we expect the current branch to vary a bit (as users
will be using branches to develop and test the code). What we actually
care about is the base branch ('main', 'squid', etc) as that is fed into
our bootstrap script and we want the option to simple variations based
on the name of said base branch.
Rename CEPH_BRANCH to CEPH_BASE_BRANCH for clarity.
Signed-off-by: John Mulligan <[email protected]>
Add a command line option --base-branch that allows the user to supply a custom base branch name. git doesn't make determining this easy so we always assume a base branch of 'main' by default - but this option lets one change that. Signed-off-by: John Mulligan <[email protected]>
Previously, one could use the `--tag` option to completely override the container tag generated by the script. However, there are cases where one may want to add information to the tag rather than override it. Allow the tag value to start with a plus (+) character that indicates that the remainder of the string is to be suffixed to the generated tag. Signed-off-by: John Mulligan <[email protected]>
Add a `packages` target to build-with-container.py that requests a build of packages, whatever package type is native to the distro selected. For example `./src/script/build-with-container.py -d ubuntu22.04 -e packages` will automatically select a deb packages build where `./src/script/build-with-container.py -d centos9 -e packages` will trigger rpm packages to be built. The underlying package-type specific targets remain unchanged. Signed-off-by: John Mulligan <[email protected]>
Construct the builder image using the --pull=always flag to initiate a pull of the base image (centos, ubuntu, etc) in order to avoid using a stale base image. Since the script automatically (by default) avoids building if a matching tag is in local container storage it is handy to use a fresh base when it *is* time to build something. Otherwise, you end up in a situation like I sometimes do - using a months old base unintentionally. 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]>
When using docker the --volume option is not available during build (docker [buildx] build), unlike podman. Since passing these volumes must be conditional on them being set up I see no way to handle this short of just disabling the option on docker. Log the fact that it's being skipped - the only other issue is that we pointlessly set up some dirs and the build may be a bit slower. Signed-off-by: John Mulligan <[email protected]>
The source dir (aka homedir, default /ceph) is mounted in the container read-write. This is needed as the various ceph build scripts expect to write things into the tree - often this is in the build directory - but not always. This can lead to small messes and/or situations that are confusing to debug, especially if one is jumping between distros often. Add an option to use an overlay volume for the homedir - by default we enable a persistent overlay with a supplied "upper dir" where files that were written will appear. One can also enable a temporary overlay that forgets the writes when the container exits - maybe useful when doing experiments in 'interactive' mode. To use this option run the command with the `--overlay=<dir>` option. For example: `./src/script/build-with-container.py -b build.inner --overlay-dir build.ovr`. This will create a directory `build.ovr/content` automatically and all new files will appear there. For example the build directory will appear at `build.ovr/content/build.inner`. To use the temporary overlay use a `-` as the directory name. For example: `./src/script/build-with-container.py -b build.inner --overlay-dir -` Signed-off-by: John Mulligan <[email protected]>
Add a new markdown file in the root of the tree, ContainerBuild.md, that can serve as a basic introduction to the new container build tools recently merged to ceph. Add a small 'breadcrumb' section to the project README.md to help find this new document. Signed-off-by: John Mulligan <[email protected]>
9aa81da to
3135461
Compare
|
I have pushed the doc updates squashed into the previous doc patch, thanks. I am unclear why you edited my comment to put your note. Maybe clicked the wrong button? I don't see the connection between that film and 'distro' but rather than distract others with that side conversation, feel free to message me on slack if you want to explain it. :-D |
|
Wasn't my intent, must have hit the wrong button |
|
jenkins test make check |
|
jenkins test api |
|
jenkins test make check |
Fixes: https://tracker.ceph.com/issues/70103
A set of features and enhancements for the build-with-container.py tool (and related).
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