Skip to content
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

Remove podman from experimental mode #6628

Merged
1 change: 0 additions & 1 deletion docs/website/blog/2022-11-29-odo-v3.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ https://www.youtube.com/playlist?list=PLGMB2PY4SNOr5pjbPTdcWsIrOezCPXWdX
<iframe width="560" height="315" src="https://www.youtube.com/embed/SkrkvQew2X0" title="Experimental Mode" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

There is now an Experimental Mode in `odo` that can be enabled by exporting `ODO_EXPERIMENTAL_MODE=true` to your environment. All the new features will be generally available under this mode, giving you an opportunity to try them out sooner.
Learn more about the experimental mode in [this doc](../docs/user-guides/advanced/experimental-mode).

#### `odo dev` using Podman ([#6151](https://github.com/redhat-developer/odo/pull/6151))
<iframe width="560" height="315" src="https://www.youtube.com/embed/EmN_hGkOHX4?list=PLGMB2PY4SNOr5pjbPTdcWsIrOezCPXWdX" title="odo dev using podman" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Expand Down
2 changes: 1 addition & 1 deletion docs/website/blog/2022-12-13-odo-v3.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Example:
#### Using `odo` with Podman

Based on your valuable feedback, we have worked on improving the experience of using `odo` with Podman.
Note that this is still [experimental](../docs/user-guides/advanced/experimental-mode) and requires you to [opt in](../docs/user-guides/advanced/experimental-mode#enabling-the-experimental-mode) if you want to try it out.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's fine to keep this as it is (by removing link to the experimental mode doc) since at the time of v3.4.0 Podman was still in the experimental mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm reverting it, and only removing links

Note that this is still experimental and requires you to opt in if you want to try it out.

- In [#6329](https://github.com/redhat-developer/odo/pull/6329), we have added labels to resources created by `odo` on Podman, so we can easily identify and use them. This adds the same labels depicted in [How odo works](../docs/development/architecture/how-odo-works#resource-labels).
- With [#6366](https://github.com/redhat-developer/odo/pull/6366), `odo list component` is now able to list components running on Podman.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ If you skipped Step 0 and selected "starter project", your output will be slight
### Step 2. Enabling the experimental mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this section entirely now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer not to, by changing only the strict minimum the blog posts (here, we need to remove the links to the removed experimental-mode page, to make the website build)


Because the support for Podman is still experimental at the time of writing, we first need to explicitly opt-in.
Find more details about the experimental mode on this [dedicated page](../../docs/user-guides/advanced/experimental-mode).

[Enabling the experimental mode](../../docs/user-guides/advanced/experimental-mode#enabling-the-experimental-mode) can be done by setting the `ODO_EXPERIMENTAL_MODE` environment variable to `true` in the terminal session, like so:
Enabling the experimental mode can be done by setting the `ODO_EXPERIMENTAL_MODE` environment variable to `true` in the terminal session, like so:

```console
export ODO_EXPERIMENTAL_MODE=true
Expand Down
2 changes: 1 addition & 1 deletion docs/website/blog/2023-02-15-odo-v3.7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Similarly to how `odo dev` requires specifying the target platform (using the `-
ODO_EXPERIMENTAL_MODE=t odo logs --platform podman
```

As a reminder, Podman support in `odo` is still [experimental](../docs/user-guides/advanced/experimental-mode) and requires you to [opt in](../docs/user-guides/advanced/experimental-mode#enabling-the-experimental-mode) if you want to try it out.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep this as is since at the time of v3.7.0 podman was still in experimental mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm reverting it, and only removing links

As a reminder, Podman support in `odo` is still experimental and requires you to opt in if you want to try it out.

<iframe width="560" height="315" src="https://www.youtube.com/embed/K5GsDFEgCW0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

Expand Down
17 changes: 12 additions & 5 deletions docs/website/docs/command-reference/delete-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ toc_max_heading_level: 4
---

`odo delete component` command is useful for deleting resources that are managed by `odo`.
By default, it deletes the component and its related inner-loop, and outer-loop resources from the cluster.
But the `running-in` flag allows to be more specific about which resources (either inner-loop or outer-loop) to delete.
By default, it deletes the component and its related inner-loop, and outer-loop resources from the cluster and from podman.

The `running-in` flag allows to be more specific about which resources (either inner-loop or outer-loop) to delete.

The `platform` flag allows to restrict the deletion from a specific platform only, either cluster or podman.

## Running the command
There are 2 ways to delete a component:
Expand All @@ -31,14 +34,16 @@ If these resources have been deployed on the cluster, then `odo` will delete the
Otherwise, `odo` will exit with a message stating that it could not find the resources on the cluster.

:::note
If some resources attached to the component are present on the cluster, but not in the Devfile, then they will not be deleted.
If some resources attached to the component are present on the cluster or on podman, but not in the Devfile, then they will not be deleted.
You can delete these resources by running the command in the [next section](#delete-without-access-to-devfile).
:::

#### Filtering resources to delete
You can specify the type of resources candidate for deletion via the `--running-in` flag.
Acceptable values are `dev` (for inner-loop resources) or `deploy` (for outer-loop resources).

You can target a specific platform from which delete the resources, with the `--platform` flag. Acceptable values are `cluster` and `podman`.

<details>
<summary>Example</summary>

Expand Down Expand Up @@ -91,16 +96,18 @@ import DeleteNamedComponentOutput from './docs-mdx/delete-component/delete_named
</details>


`odo` searches for resources attached to the given component in the given namespace on the cluster.
`odo` searches for resources attached to the given component in the given namespace on the cluster and on Podman.
If `odo` finds the resources, it will delete them after user confirmation.
Otherwise, `odo` will exit with a message stating that it could not find the resources on the cluster.
Otherwise, `odo` will exit with a message stating that it could not find the resources on the cluster or on Podman.

`--namespace` is optional, if not provided, `odo` will use the current active namespace.

#### Filtering resources to delete
You can specify the type of resources candidate for deletion via the `--running-in` flag.
Acceptable values are `dev` (for inner-loop resources) or `deploy` (for outer-loop resources).

You can target a specific platform from which to delete the resources, with the `--platform` flag. Acceptable values are `cluster` and `podman`.

<details>
<summary>Example</summary>

Expand Down
10 changes: 7 additions & 3 deletions docs/website/docs/command-reference/describe-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: odo describe component
---

`odo describe component` command is useful for getting information about a component managed by `odo`.
`odo describe component` command is useful for getting information about a component.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still true, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it isn't anymore since #6615


## Running the command
There are 2 ways to describe a component:
Expand Down Expand Up @@ -59,7 +59,7 @@ This command returns information extracted from the Devfile:
- the list of Kubernetes components.
- the list of forwarded ports if the component is running in Dev mode.

The command also displays if the component is currently running in the cluster on Dev and/or Deploy mode.
The command also displays if the component is currently running in the cluster or in Podman on Dev and/or Deploy mode.

### Describe without access to Devfile

Expand Down Expand Up @@ -98,4 +98,8 @@ Kubernetes Routes:

The command extracts information from the labels and annotations attached to the deployed component to display the known metadata of the Devfile used to deploy the component.

The command also displays if the component is currently running in the cluster on Dev and/or Deploy mode.
The command also displays if the component is currently running in the cluster or in Podman on Dev and/or Deploy mode.

### Targeting a specific platform

By default, `odo describe component` will search components in both the current namespace of the cluster and podman. You can restrict the search to one of the platforms only, using the `--platform` flag, giving a value `cluster` or `podman`.
37 changes: 37 additions & 0 deletions docs/website/docs/command-reference/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,43 @@ The following command will override the `USER` Devfile variable with the `john`
odo dev --var USER=john --var-file config.vars
```

### Running on Podman

Instead of deploying the container into a Kubernetes cluster, `odo dev` can leverage the podman installation on your system to deploy the container.

You need to use the `--platform podman` flags to run the component using podman instead of a Kubernetes cluster.

```console
odo dev --platform podman
```
<details>
<summary>Example</summary>

```console

$ odo dev --platform podman
__
/ \__ Developing using the "my-nodejs-app" Devfile
\__/ \ Platform: podman
/ \__/ odo version: v3.7.0
\__/

↪ Running on podman in Dev mode
✓ Deploying pod [4s]
✓ Building your application in container (command: install) [3s]
• Executing the application (command: run) ...
- Forwarding from 127.0.0.1:20001 -> 3000

↪ Dev mode
Status:
Watching for changes in the current directory /path/to/project/nodejs

Keyboard Commands:
[Ctrl+c] - Exit and delete resources from podman
[p] - Manually apply local changes to the application on podman
```
</details>

## Devfile (Advanced Usage)

### Devfile Overview
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```shell
$ odo delete component --name my-nodejs --running-in deploy
$ odo delete component --name my-nodejs --running-in deploy --platform cluster
Searching resources to delete, please wait...
This will delete "my-nodejs" from the namespace "my-project".
• The following resources will get deleted from cluster:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```shell
$ odo delete component --running-in dev
$ odo delete component --running-in dev --platform cluster
Searching resources to delete, please wait...
This will delete "my-nodejs" from the namespace "my-project".
• The following resources will get deleted from cluster:
Expand Down
16 changes: 10 additions & 6 deletions docs/website/docs/command-reference/list-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: odo list component
---

`odo list component` command is useful for getting information about components running on a specific namespace.
`odo list component` command is useful for getting information about components running on a specific namespace of a cluster or on Podman.

If the command is executed from a directory containing a Devfile, it also displays the component
defined in the Devfile as part of the list, prefixed with a star(*).
Expand All @@ -12,7 +12,8 @@ For each component, the command displays:
- its project type,
- on which mode it is running (None, Dev, Deploy, or both), note that None is only applicable to the component
defined in the local Devfile,
- by which application the component has been deployed.
- by which application the component has been deployed,
- the platform on which the component is running (cluster or podman).

### Running the command
```shell
Expand All @@ -24,13 +25,16 @@ odo list component
```shell
$ odo list component
✓ Listing components from namespace 'my-percona-server-mongodb-operator' [292ms]
NAME PROJECT TYPE RUNNING IN MANAGED
* my-nodejs nodejs Deploy odo (v3.0.0-rc1)
my-go-app go Dev odo (v3.0.0-rc1)
mongodb-instance Unknown None percona-server-mongodb-operator
NAME PROJECT TYPE RUNNING IN MANAGED PLATFORM
* my-nodejs nodejs Deploy odo (v3.7) cluster
my-go-app go Dev odo (v3.7) podman
mongodb-instance Unknown None percona-server-mongodb-operator cluster
```
</details>

### Targeting a specific platform

By default, `odo list component` will search components in both the current namespace of the cluster and podman. You can restrict the search to one of the platforms only, using the `--platform` flag, giving a value `cluster` or `podman`.

:::tip use of cache

Expand Down
10 changes: 5 additions & 5 deletions docs/website/docs/command-reference/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ odo list

```shell
$ odo list
✓ Listing resources from the namespace "my-percona-server-mongodb-operator" [302ms]
NAME PROJECT TYPE RUNNING IN MANAGED
my-nodejs nodejs Deploy odo (v3.0.0-rc1)
my-go-app go Dev odo (v3.0.0-rc1)
mongodb-instance Unknown None percona-server-mongodb-operator
✓ Listing components from namespace 'my-percona-server-mongodb-operator' [292ms]
NAME PROJECT TYPE RUNNING IN MANAGED PLATFORM
* my-nodejs nodejs Deploy odo (v3.7) cluster
my-go-app go Dev odo (v3.7) podman
mongodb-instance Unknown None percona-server-mongodb-operator cluster

Bindings:
NAME APPLICATION SERVICES RUNNING IN
Expand Down
5 changes: 3 additions & 2 deletions docs/website/docs/command-reference/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: odo logs
---

`odo logs` is used to display the logs for all the containers odo created for the component under current working
`odo logs` is used to display the logs for all the containers odo created on cluster or on Podman for the component under current working
directory.

## Running the command
Expand All @@ -11,7 +11,7 @@ If you haven't already done so, you must [initialize](../command-reference/init)
init` command.

```shell
odo logs [--follow] [--dev | --deploy]
odo logs [--follow] [--dev | --deploy] [--platform {cluster|podman}]
```
<details>
<summary>Example</summary>
Expand Down Expand Up @@ -47,6 +47,7 @@ main: Wed Sep 21 08:27:22 UTC 2022 - this is infinite while loop
* Use `odo logs --dev` to see the logs for the containers created by `odo dev` command.
* Use `odo logs --deploy` to see the logs for the containers created by `odo deploy` command.
* Use `odo logs` (without any flag) to see the logs of all the containers created by both `odo dev` and `odo deploy`.
* Use `odo logs --platform podman` to target the Podman platform instead of the cluster

Note that if multiple containers are named the same (for example, `main`), the `odo logs` output appends a number to
container name to help differentiate between the containers. In the output, you will see containers named as `main`,
Expand Down
1 change: 0 additions & 1 deletion docs/website/docs/overview/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ Options here are mostly used for debugging and testing `odo` behavior.
| `DEVFILE_PROXY` | Integration tests will use this address as Devfile registry instead of `registry.stage.devfile.io` | v3.0.0-beta3 | `my-registry.example.com` |
| `TELEMETRY_CALLER` | Caller identifier passed to [telemetry](https://github.com/redhat-developer/odo/blob/main/USAGE_DATA.md). Case-insensitive. Acceptable values: `vscode`, `intellij`, `jboss`. | v3.1.0 | `intellij` |
| `ODO_TRACKING_CONSENT` | Useful for controlling [telemetry](https://github.com/redhat-developer/odo/blob/main/USAGE_DATA.md). Acceptable values: `yes` ([enables telemetry](https://github.com/redhat-developer/odo/blob/main/USAGE_DATA.md) and skips consent prompt), `no` (disables telemetry and consent prompt). Takes precedence over the [`ConsentTelemetry`](#preference-key-table) preference. | v3.2.0 | `yes` |
| `ODO_EXPERIMENTAL_MODE` | Whether to enable experimental features. See [Experimental Mode](../user-guides/advanced/experimental-mode) for more details. Acceptable values: boolean values<sup>(1)</sup> | v3.3.0 | `true` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you comment this instead of completely removing it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice that this makes the build fail, even when the link is into a comment (https://app.netlify.com/sites/odo-docusaurus-preview/deploys/6405b74c3f18100008d06cfd):

- On source page path = /docs/overview/configure:
  -> linking to ../user-guides/advanced/experimental-mode (resolved as: /docs/user-guides/advanced/experimental-mode)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be because you renamed the experimental-mode.md file. I would remove the link like you've done at other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is not recognized as expected:
comment-odo-exp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm reverting to remove completely the line. The commit is accessible if we want to revert the deletion

| `ODO_PUSH_IMAGES` | Whether to push the images once built; this is used only when applying Devfile image components as part of a Dev Session running on Podman; this is useful for integration tests running on Podman. `true` by default | v3.7.0 | `false` |

(1) Accepted boolean values are: `1`, `t`, `T`, `TRUE`, `true`, `True`, `0`, `f`, `F`, `FALSE`, `false`, `False`.
2 changes: 1 addition & 1 deletion pkg/component/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func ListAllComponents(client kclient.ClientInterface, podmanClient podman.Clien
allComponents = append(allComponents, clusterComponents...)
}

// PdomanClient can be nil if experimental mode is not active
// PdomanClient can be nil if podman platform is not accessible
if podmanClient != nil {
podmanComponents, err := podmanClient.ListAllComponents()
if err != nil {
Expand Down
4 changes: 0 additions & 4 deletions pkg/odo/cli/dev/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,8 @@ It forwards endpoints with any exposure values ('public', 'internal' or 'none')
"Alternative run command to execute. The default one will be used if this flag is not set.")
devCmd.Flags().BoolVar(&o.ignoreLocalhostFlag, "ignore-localhost", false,
"Whether to ignore errors related to port-forwarding apps listening on the container loopback interface. Applicable only if platform is podman.")
// TODO Unhide when moving Podman out of the experimental mode : https://github.com/redhat-developer/odo/issues/6592
_ = devCmd.Flags().MarkHidden("ignore-localhost")
devCmd.Flags().BoolVar(&o.forwardLocalhostFlag, "forward-localhost", false,
"Whether to enable port-forwarding if app is listening on the container loopback interface. Applicable only if platform is podman.")
// TODO Unhide when moving Podman out of the experimental mode : https://github.com/redhat-developer/odo/issues/6592
_ = devCmd.Flags().MarkHidden("forward-localhost")

clientset.Add(devCmd,
clientset.BINDING,
Expand Down
2 changes: 1 addition & 1 deletion pkg/odo/cli/feature/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type OdoFeature struct {
var (
// GenericPlatformFlag is the feature supporting the `--platform` generic CLI flag.
GenericPlatformFlag = OdoFeature{
isExperimental: true,
isExperimental: false,
}
)

Expand Down
5 changes: 1 addition & 4 deletions pkg/odo/commonflags/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ import (
)

func TestMain(m *testing.M) {
// --platform is considered experimental for now. As such, to exist, it requires the ODO_EXPERIMENTAL_MODE env var to be set.
ctx := context.Background()
cfg := config.Configuration{
OdoExperimentalMode: true,
}
cfg := config.Configuration{}
ctx = envcontext.WithEnvConfig(ctx, cfg)
klog.InitFlags(nil)
AddOutputFlag()
Expand Down
4 changes: 2 additions & 2 deletions pkg/odo/commonflags/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func UsePlatformFlag(cmd *cobra.Command) {
// package
func AddPlatformFlag(ctx context.Context) {
if feature.IsEnabled(ctx, feature.GenericPlatformFlag) {
flag.CommandLine.String(PlatformFlagName, "", `Specify target platform, supported platforms: "cluster" (default), "podman" (experimental)`)
flag.CommandLine.String(PlatformFlagName, "", `Specify target platform, supported platforms: "cluster" (default), "podman"`)
_ = pflag.CommandLine.MarkHidden(PlatformFlagName)
}
}
Expand All @@ -50,7 +50,7 @@ func CheckPlatformCommand(cmd *cobra.Command) error {

// Check the valid output
if hasFlagChanged && platformFlag.Value.String() != PlatformPodman && platformFlag.Value.String() != PlatformCluster {
return fmt.Errorf(`%s is not a valid target platform for --platform, please select either "cluster" (default) or "podman" (experimental)`, platformFlag.Value.String())
return fmt.Errorf(`%s is not a valid target platform for --platform, please select either "cluster" (default) or "podman"`, platformFlag.Value.String())
}

// Check that if -o json has been passed, that the command actually USES json.. if not, error out.
Expand Down
2 changes: 1 addition & 1 deletion pkg/odo/commonflags/platform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestUsePlatformFlagWrongValue(t *testing.T) {
t.Errorf("Set error should be nil but is %v", err)
}
err = CheckPlatformCommand(cmd)
if err.Error() != `wrong-value is not a valid target platform for --platform, please select either "cluster" (default) or "podman" (experimental)` {
if err.Error() != `wrong-value is not a valid target platform for --platform, please select either "cluster" (default) or "podman"` {
t.Errorf("Check error is %v", err)
}
}
Loading