-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add podman farm build command #20050
Conversation
While I finalize the tests, opened the PR to get reviews started on it. Added Docs changes are quite a bit so opened another PR for it here: #20051 Demo of farm build: https://asciinema.org/a/V6WufoZX0Kglvlgq2YfmqZhH7 Adding hold label |
5af332c
to
3ab2a5c
Compare
3ab2a5c
to
75ed9b7
Compare
75ed9b7
to
ff65f3b
Compare
Just happened to see this scroll by, but one thing I wanted to mention here is in the coreos pipeline we basically implement a version of this, see e.g. this code. However, one recent pain point is that we actually want to orchestrate this process inside an OCP cluster, and the container-in-container flow needed STORAGE_DRIVER=vfs which is a well known thing. However, IMO there's no reason to actually use containers-storage for this, we should basically support using an |
I'm slightly surprised to see podman ship this FWIW, I would have said that multi-system orchestration is something we should defer to a higher level tool. |
The goal is multi-arch builds. Assembling multi-arch images is a pain in the butt, we are attempting to make that easier. Especially on a MAC, where you could have two podman machines running one ARM and one x86. |
Thanks for checking, @cgwalters ! As Dan mentioned, |
@umohnani8 I think the main problem is that you try to recreate a local engine for the local build instead of using the already existing engine interface in the client. I.e it should be possible to pass down |
On the cli it should look something like this: diff --git a/cmd/podman/farm/build.go b/cmd/podman/farm/build.go
index 6acf998fb..7ecb75baf 100644
--- a/cmd/podman/farm/build.go
+++ b/cmd/podman/farm/build.go
@@ -9,8 +9,8 @@ import (
"github.com/containers/podman/v4/cmd/podman/common"
"github.com/containers/podman/v4/cmd/podman/registry"
"github.com/containers/podman/v4/cmd/podman/utils"
+ "github.com/containers/podman/v4/pkg/domain/entities"
"github.com/containers/podman/v4/pkg/farm"
- "github.com/containers/storage"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
@@ -106,17 +106,13 @@ func build(cmd *cobra.Command, args []string) error {
defaultFarm = f
}
- var storeOptions *storage.StoreOptions
+ var localEngine entities.ImageEngine
if buildOpts.local {
- opts, err := storage.DefaultStoreOptionsAutoDetectUID()
- if err != nil {
- return err
- }
- storeOptions = &opts
+ localEngine = registry.ImageEngine()
}
ctx := registry.Context()
- farm, err := farm.NewFarm(ctx, defaultFarm, storeOptions, buildOpts.local)
+ farm, err := farm.NewFarm(ctx, defaultFarm, localEngine)
if err != nil {
return fmt.Errorf("initializing: %w", err)
} Then you need to make pkg/farm just pass around this interface instead of passing around c/storage options. |
Add emulation pkg to be used with farm build when determining emulated platforms for the farm nodes. Signed-off-by: Urvashi Mohnani <[email protected]>
0673110
to
70f38a4
Compare
Add podman farm build command that sends out builds to nodes defined in the farm, builds the images on the farm nodes, and pulls them back to the local machine to create a manifest list. Signed-off-by: Urvashi Mohnani <[email protected]>
70f38a4
to
aecb230
Compare
Signed-off-by: Urvashi Mohnani <[email protected]>
aecb230
to
ebe01ca
Compare
This is ready to be merge, can we please merge @rhatdan @nalind @vrothberg Added remote test and the bloat for both podman and podman-remote is significantly less now. |
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.
Test logs are disturbingly noisy. And it still bothers me that this can only be tested in CI, not by any developer in a local environment.
But enough already. It is impossible to keep reviewing this. I will take on the task of fixing the test bugs. I'm OK with merging this and then making smaller fix PRs in the future.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago, umohnani8 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
/lgtm |
Please wait with advertising farm build. We had a meeting earlier this week and decided to merge the PR as is but there will be follow ups changing quite a bit how it's working. In other words, it's not yet ready for tech preview. |
There were some questions about the new
|
@vrothberg I'm mostly concerned with putting the Tech Preview on Build Farm for the Podman 4.8/4.9 that lands in RHEL 8.10/9.4 in early February. Does that work for you? I'm fine with not marking it Tech Preview for Fedora at the moment while pieces/parts are worked on further. |
Followup from containers#20050. Lots of tiny problems in tests, all of them adding up to significant maintainability problems. These tests are currently impossible to run in a dev environment, and super-painful to set up in 1mt, so I've just done a few hours of cleanup and am giving up for the week. This is ready for merge, in the sense that it's much better than what exists now, but it still needs boatloads more work. Signed-off-by: Ed Santiago <[email protected]>
It is not going to be ready so the commands should be hidden. We do not document it and will not ship this until podman 5.* |
I think it would be better to wait until 5.0 |
Respectfully, I'm going to disagree. I think this is an important feature that distinguishes podman. I could understand delaying if it's incomplete/not working in some way (is it?). Otherwise, is there really some important reason to delay getting it into the hands of users? Could we do a v4.10 for this? |
It is now included in "The podman farm suite of commands for multi-architecture builds is now fully enabled and documented." https://docs.podman.io/en/v4.9.0/markdown/podman-farm.1.html Especially the need to upgrade all the servers to 4.9 or above. But also the need to deploy a registry, or configure an existing one. |
Add podman farm build command that sends out builds to
nodes defined in the farm, builds the images on the farm
nodes, and pulls them back to the local machine to create
a manifest list.
Signed-off-by: Urvashi Mohnani [email protected]
Does this PR introduce a user-facing change?