Commit Graph

21 Commits

Author SHA1 Message Date
Valentin Rothberg 34d42514f1 compose docs: fix typo
Fix the typo s/provider/providers/ and give a concrete example to avoid
pitfalls such as the on in #25023.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2025-01-17 08:30:45 +01:00
Petter Mikkelsen cfac059d14 Disable compose-warning-logs if PODMAN_COMPOSE_WARNING_LOGS=false
Fixes: e62c928642 ("Make podman-compose refer to podman-compose(1) when using an external provider")

- test: add coverage for PODMAN_COMPOSE_WARNING_LOGS

Signed-off-by: Petter Mikkelsen <43xhyr9m@anonaddy.me>
2024-07-30 12:06:11 +00:00
marinmo 02af4f8bd6 Update warning message when using external compose provider
Change the warning message at runtime to refer to the man page of podman-compose instead of "the documentation"

Add instructions in the man page on how to disable the warning emitted by podman-compose when using an external compose provider

Signed-off-by: marinmo <bugzilla@marinmo.org>
2024-07-12 07:12:32 +02:00
Paul Holzinger d9aff9b41e
podman compose: only trim path suffix when ssh protocol
For a unix socket we should not trim this at all. The problem exists for
ssh only so make sure we only do this when a ssh URL is given.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:44:26 +01:00
Paul Holzinger 3cada04099
podman compose: correctly accept --connection/--url
Make the logic here much simpler, we already pass all the conection info
before so just use the parsed URL here.

Fixes #20943

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:40:41 +01:00
Paul Holzinger 6d3571dcf5
podman compose: build for all arches
Machine only works on amd64 and arm64 but the compose command can still
be used without machine so split out the machine only logic to make it
build for all arches.

[NO NEW TESTS NEEDED]

Fixes #21757

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:40:41 +01:00
Matt Heon 72f1617fac Bump Go module to v5
Moving from Go module v4 to v5 prepares us for public releases.

Move done using gomove [1] as with the v3 and v4 moves.

[1] https://github.com/KSubedi/gomove

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-08 09:35:39 -05:00
Brent Baude 9bb191df51 [CI:MACHINE]Podman5 QEMU refactor
The following PR is the leading PR for refactoring podman machine with
the following goals:

* less duplication/more re-use
* common configuration file between providers
* more consistentency in how machines are handled by providers

The goal of this PR is the rough refactor.  There are still rough spots
for sure, specifically around the podman socket and pipe.  This
implemention is only for Linux. All other providers are still present
but will not compile or work.  This is why tests for them have been
temporarily suspended.

The ready socket code is another area that needs to be smoothed over.
Right now, the ready socket code is still in QEMU.  Preferably it would
be moved to a generic spot where all three approaches to readiness
socket use can be defined.

It should also be noted:

* all machine related tests pass.
* make validate for Linux passes
* Apple QEMU was largely removed
* More code pruning is possible; will become clearer when other
  providers are complete.

the dir pkg/machine/p5 is not permanent.  i had to seperate this from
machine initially due to circular import problems.  i think when all
providers are done (or nearly done), it can be placed and named
properly.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-02-07 09:18:36 -06:00
Paul Holzinger 74454bf59c
rework system connection and farm storage
We now no longer write containers.conf, instead system connections and
farms are written to a new file called podman-connections.conf.

This is a major rework and I had to change a lot of things to get this
to compile again with my c/common changes.

It is a breaking change for users as connections/farms added before this
commit can now no longer be removed or modified directly. However because
the logic keeps reading from containers.conf the old connections can
still be used to connect to a remote host.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-01-31 15:08:41 +01:00
Ashley Cui e3f167f770 Add API forwarding support for HyperV
Provides Docker API client access, allowing compose to work by default
for HyperV. Basically the HyperV equiv of the work done here by #12916.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-01-05 11:45:28 -05:00
Jake Correnti c728eeb39e Create `pkg/machine/ignition` package
Moves all of the ignitionfiles out of the `machine` package and into
its own called `ignition`. This required `VMType` to get moved out of
the `machine` package and into the `define` package in order to prevent
a circular dependency.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2024-01-04 08:51:35 -05:00
Oleksandr Redko 2a2d0b0e18 chore: delete obsolete // +build lines
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-04 11:53:38 +02:00
Brent Baude e5a4f00b7d Podman 5 machine config file - Step 1
The following PR is the very first step in what will a series of steps
to apply a "common" machine configuration file to all providers.
Function names, method names, struct names, and field names are all up
for debate.  The purpose of this PR is to offer a glimpse at the
direction we intend to take.

This PR also contains temporary structs (i.e. aThing) that are not
exported.  These are merely placeholders.

The configuration work in this PR is also unused of yet.  But the code
is compiled.  Once merged, we can begin the next step of development.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-12-11 16:26:15 -06:00
Cedric Staniewski 0b6abfe1e2 compose: fix compose provider debug message
[NO NEW TESTS NEEDED]

Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
2023-11-02 14:45:53 +01:00
openshift-ci[bot] 4f6a8f0d50
Merge pull request #20483 from vrothberg/RUN-1934
container.conf: support attributed string slices
2023-10-27 17:49:13 +00:00
Valentin Rothberg 3743955d6d compose: try all possible providers before throwing an error
Do not error out immediately but collect all errors and report them if
no candidate succeeded.  That'll fix #20502 and improve the quality of
reported errors.

[NO NEW TESTS NEEDED]

Fixes: #20502
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-27 13:46:13 +02:00
Valentin Rothberg e966c86d98 container.conf: support attributed string slices
All `[]string`s in containers.conf have now been migrated to attributed
string slices which require some adjustments in Buildah and Podman.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-27 12:44:33 +02:00
lstocchi 15969a60bc
chore: remove npipe const and use vmtype const for checking
Signed-off-by: lstocchi <lstocchi@redhat.com>
2023-10-26 09:43:04 +02:00
lstocchi c21f28813e
fix: check wsl npipe when executing podman compose
Signed-off-by: lstocchi <lstocchi@redhat.com>
2023-10-25 13:28:10 +02:00
Brent Baude 919dce1315 Plumbing to run machine tests with hyperv
this pr has the basic plumbing that allows the e2e machine tests to run
with the hyperv provider.

it requires a special fcos image right now because gvforwarder was not
in the upstream fcos images for hyperv.

changed the way "provider" is set; moved GetProvider functions to
pkg/machine/provider.  provider is now set at the machine level.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-09-14 15:57:35 -05:00
Valentin Rothberg e596b17fbe add a podman-compose command
**podman compose** is a thin wrapper around an external compose provider
such as docker-compose or podman-compose.  This means that `podman
compose` is executing another tool that implements the compose
functionality but sets up the environment in a way to let the compose
provider communicate transparently with the local Podman socket.  The
specified options as well the command and argument are passed directly
to the compose provider.

The default compose providers are `docker-compose` and `podman-compose`.
If installed, `docker-compose` takes precedence since it is the original
implementation of the Compose specification and is widely used on the
supported platforms (i.e., Linux, Mac OS, Windows).

If you want to change the default behavior or have a custom installation
path for your provider of choice, please change the `compose_provider`
field in `containers.conf(5)`.  You may also set the
`PODMAN_COMPOSE_PROVIDER` environment variable.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-07-24 19:23:04 +02:00