diff --git a/_attributes/common-attributes.adoc b/_attributes/common-attributes.adoc index c554027aa30f..9cddcf231ace 100644 --- a/_attributes/common-attributes.adoc +++ b/_attributes/common-attributes.adoc @@ -56,6 +56,7 @@ endif::[] :secondary-scheduler-operator-full: Secondary Scheduler Operator for Red Hat OpenShift :secondary-scheduler-operator: Secondary Scheduler Operator :descheduler-operator: Kube Descheduler Operator +:cli-manager: CLI Manager Operator // Backup and restore :velero-domain: velero.io :velero-version: 1.14 diff --git a/_topic_maps/_topic_map.yml b/_topic_maps/_topic_map.yml index 5716ed0822e6..21eb165da5e3 100644 --- a/_topic_maps/_topic_map.yml +++ b/_topic_maps/_topic_map.yml @@ -927,14 +927,24 @@ Topics: File: managing-cli-profiles - Name: Extending the OpenShift CLI with plugins File: extending-cli-plugins - - Name: Managing CLI plugins with Krew - File: managing-cli-plugins-krew - Distros: openshift-enterprise,openshift-origin - Name: OpenShift CLI developer command reference File: developer-cli-commands - Name: OpenShift CLI administrator command reference File: administrator-cli-commands Distros: openshift-enterprise,openshift-origin +- Name: OpenShift CLI Manager + Dir: cli_manager + Topics: + - Name: OpenShift CLI Manager overview + File: index + - Name: OpenShift CLI Manager release notes + File: cli-manager-release-notes + - Name: Installing the Openshift CLI Manager + File: cli-manager-install + - Name: Using the OpenShift CLI Manager + File: cli-manager-using + - Name: Uninstalling the OpenShift CLI Manager + File: cli-manager-uninstall - Name: Developer CLI (odo) File: odo-important-update # Dir: developer_cli_odo diff --git a/cli_reference/cli_manager/_attributes b/cli_reference/cli_manager/_attributes new file mode 120000 index 000000000000..5b32de1e01e7 --- /dev/null +++ b/cli_reference/cli_manager/_attributes @@ -0,0 +1 @@ +../../_attributes \ No newline at end of file diff --git a/cli_reference/cli_manager/cli-manager-install.adoc b/cli_reference/cli_manager/cli-manager-install.adoc new file mode 100644 index 000000000000..24deaef44812 --- /dev/null +++ b/cli_reference/cli_manager/cli-manager-install.adoc @@ -0,0 +1,22 @@ +:_mod-docs-content-type: ASSEMBLY +[id="cli-manager-install"] += Installing the {cli-manager} +include::_attributes/common-attributes.adoc[] +:context: cli-manager-install + +toc::[] + +//Brief explanation of what the cli manager is. +You can run the {cli-manager} in both connected and disconnected environments. In particular, it eases the installation and management of CLI plugins in disconnected environments. The {cli-manager} makes Krew compatible with the `oc` CLI. Cluster administrators can use the {cli-manager} to add CLI plugin custom resources that can then be accessed in both connected and disconnected environments. Cluster administrators install and configure the {cli-manager}, and users then add the custom index to Krew and add CLI plugins to the {cli-manager}. + +:FeatureName: Using the {cli-manager} to install and manage plugins for the OpenShift CLI +include::snippets/technology-preview.adoc[] + +// Installing the {cli-manager} +include::modules/cli-manager-installing.adoc[leveloffset=+1] + +// Adding CLI Manager custom index to krew +include::modules/cli-manager-custom-index-krew.adoc[leveloffset=+1] + +// Adding CLI plugins with YAML files +include::modules/cli-manager-adding-plugin-yaml.adoc[leveloffset=+1] \ No newline at end of file diff --git a/cli_reference/cli_manager/cli-manager-release-notes.adoc b/cli_reference/cli_manager/cli-manager-release-notes.adoc new file mode 100644 index 000000000000..8d9186a42932 --- /dev/null +++ b/cli_reference/cli_manager/cli-manager-release-notes.adoc @@ -0,0 +1,32 @@ +:_mod-docs-content-type: ASSEMBLY +[id="cli-manager-release-notes"] += {cli-manager} release notes +include::_attributes/common-attributes.adoc[] +:context: cli-manager-release-notes + +toc::[] + +With the {cli-manager}, you can install CLI plugins in both connected and disconnected environments. + +:FeatureName: Using the {cli-manager} to install and manage plugins for the OpenShift CLI +include::snippets/technology-preview.adoc[] + +These release notes track the development of the {cli-manager} for {product-title}. + +For more information about the {cli-manager}, see xref:../../cli_reference/cli_manager/index.adoc#cli-manager-overview[About the {cli-manager}]. + +[id="cli-manager-release-notes-0-1-0_{context}"] +== {cli-manager} 0.1.0 (Technology Preview) + +Issued: 19 November 2024 + +The following advisory is available for the {cli-manager} 0.1.0: + +* link:https://access.redhat.com/errata/RHEA-2024:8303[RHEA-2024:8303] + +[id="cli-manager-0-1-0-new-features-and-enhancements_{context}"] +=== New features and enhancements + +* This version is the initial Technology Preview release of the {cli-manager}. For installation information, see xref:../../cli_reference/cli_manager/cli-manager-install.adoc#cli-manager-install[Installing the {cli-manager}]. + +//* No bug fixes or known issues to list \ No newline at end of file diff --git a/cli_reference/cli_manager/cli-manager-uninstall.adoc b/cli_reference/cli_manager/cli-manager-uninstall.adoc new file mode 100644 index 000000000000..939b9564e341 --- /dev/null +++ b/cli_reference/cli_manager/cli-manager-uninstall.adoc @@ -0,0 +1,18 @@ +:_content-type: ASSEMBLY +[id="cli-manager-uninstall"] += Uninstalling the {cli-manager} +include::_attributes/common-attributes.adoc[] +:context: cli-manager-uninstall + +toc::[] + +You can remove the {cli-manager} from {product-title} by uninstalling the {cli-manager} and removing its related resources. + +:FeatureName: Using the {cli-manager} to install and manage plugins for the OpenShift CLI +include::snippets/technology-preview.adoc[] + +// Uninstalling the {cli-manager} +include::modules/cli-manager-uninstalling.adoc[leveloffset=+1] + +// Uninstalling the related resources +include::modules/cli-manager-remove-resources.adoc[leveloffset=+1] \ No newline at end of file diff --git a/cli_reference/cli_manager/cli-manager-using.adoc b/cli_reference/cli_manager/cli-manager-using.adoc new file mode 100644 index 000000000000..7c7036f152ab --- /dev/null +++ b/cli_reference/cli_manager/cli-manager-using.adoc @@ -0,0 +1,21 @@ +:_mod-docs-content-type: ASSEMBLY +[id="cli-manager-using"] += Using the {cli-manager} +include::_attributes/common-attributes.adoc[] +:context: cli-manager-using + +toc::[] + +After the cluster administrator sets up and configures the {cli-manager}, users can use it to install, update, and uninstall CLI plugins. + +:FeatureName: Using the {cli-manager} to install and manage plugins for the OpenShift CLI +include::snippets/technology-preview.adoc[] + +// Installing a CLI plugin with the CLI Manager +include::modules/cli-manager-installing-plugins.adoc[leveloffset=+1] + +// Updating a cli plugin with the CLI Manager +include::modules/cli-manager-updating-plugin.adoc[leveloffset=+1] + +// Uninstalling a CLI plugin with the CLI Manager +include::modules/cli-manager-uninstall-plugin.adoc[leveloffset=+1] \ No newline at end of file diff --git a/cli_reference/cli_manager/images b/cli_reference/cli_manager/images new file mode 120000 index 000000000000..5fa6987088da --- /dev/null +++ b/cli_reference/cli_manager/images @@ -0,0 +1 @@ +../../images \ No newline at end of file diff --git a/cli_reference/cli_manager/index.adoc b/cli_reference/cli_manager/index.adoc new file mode 100644 index 000000000000..8c8d57f05d4f --- /dev/null +++ b/cli_reference/cli_manager/index.adoc @@ -0,0 +1,13 @@ +:_mod-docs-content-type: ASSEMBLY +[id="cli-manager-overview"] += {cli-manager} overview +include::_attributes/common-attributes.adoc[] +:context: cli-manager-overview + +toc::[] + +:FeatureName: Using the {cli-manager} to install and manage plugins for the OpenShift CLI +include::snippets/technology-preview.adoc[] + +// About the CLI Manager +include::modules/cli-manager-about.adoc[leveloffset=+1] \ No newline at end of file diff --git a/cli_reference/cli_manager/modules b/cli_reference/cli_manager/modules new file mode 120000 index 000000000000..8b0e8540076d --- /dev/null +++ b/cli_reference/cli_manager/modules @@ -0,0 +1 @@ +../../modules \ No newline at end of file diff --git a/cli_reference/cli_manager/snippets b/cli_reference/cli_manager/snippets new file mode 120000 index 000000000000..7bf6da9a51d0 --- /dev/null +++ b/cli_reference/cli_manager/snippets @@ -0,0 +1 @@ +../../snippets \ No newline at end of file diff --git a/cli_reference/openshift_cli/managing-cli-plugins-krew.adoc b/cli_reference/openshift_cli/managing-cli-plugins-krew.adoc deleted file mode 100644 index e5effd419063..000000000000 --- a/cli_reference/openshift_cli/managing-cli-plugins-krew.adoc +++ /dev/null @@ -1,28 +0,0 @@ -:_mod-docs-content-type: ASSEMBLY -[id="managing-cli-plugin-krew"] -= Managing CLI plugins with Krew -include::_attributes/common-attributes.adoc[] -:context: managing-cli-plugins-krew - -toc::[] - -You can use Krew to install and manage plugins for the OpenShift CLI (`oc`). - -:FeatureName: Using Krew to install and manage plugins for the OpenShift CLI -include::snippets/technology-preview.adoc[] - -// Installing a CLI plugin with Krew -include::modules/cli-krew-install-plugin.adoc[leveloffset=+1] - -// Updating a CLI plugin with Krew -include::modules/cli-krew-update-plugin.adoc[leveloffset=+1] - -// Removing a CLI plugin with Krew -include::modules/cli-krew-remove-plugin.adoc[leveloffset=+1] - -[role="_additional-resources"] -[id="additional-resources_managing-cli-plugins-krew"] -== Additional resources - -* link:https://krew.sigs.k8s.io/[Krew] -* xref:../../cli_reference/openshift_cli/extending-cli-plugins.adoc#cli-extend-plugins[Extending the OpenShift CLI with plugins] diff --git a/modules/cli-manager-about.adoc b/modules/cli-manager-about.adoc new file mode 100644 index 000000000000..16354c36919d --- /dev/null +++ b/modules/cli-manager-about.adoc @@ -0,0 +1,9 @@ +// Module included in the following assemblies: +// +// * cli_reference/cli_manager/index.adoc + +:_mod-docs-content-type: CONCEPT +[id="cli-manager-about_{context}"] += About the {cli-manager} + +The {cli-manager} makes it easier to install and update CLI plugins. It runs in both connected and disconnected environments, and it is particularly useful in disconnected environments. Cluster administrators can add CLI plugins and plugin updates to the {cli-manager}, and users can then install and update CLI plugins when needed regardless of whether or not the environment is disconnected. \ No newline at end of file diff --git a/modules/cli-manager-adding-plugin-yaml.adoc b/modules/cli-manager-adding-plugin-yaml.adoc new file mode 100644 index 000000000000..603c74bf96bb --- /dev/null +++ b/modules/cli-manager-adding-plugin-yaml.adoc @@ -0,0 +1,73 @@ +// Module included in the following assemblies: +// +// * cli_reference/cli_manager/cli-manager-install.adoc + +:_mod-docs-content-type: PROCEDURE +[id="cli-manager-adding-plugin-yamls_{context}"] += Adding a plugin to the {cli-manager} + +You can add a CLI plugin to the {cli-manager} by using the YAML View. + +.Prerequisites + +* You are logged in to {product-title} as a user with the `cluster-admin` role. +* The {cli-manager} is installed. + +.Procedure + +. Log in to the {product-title} web console. + +. Navigate to *Operators* -> *Installed Operators*. + +. From the list, select *{cli-manager}*. + +. Select the *CLI Plugin* tab. + +. Click *Create Plugin*. + +. In the text box, enter the information for the plugin you are installing. See the following example YAML file. ++ +.Example YAML file to add a plugin + +[source,yaml] +---- +apiVersion: config.openshift.io/v1alpha1 +kind: Plugin +metadata: + name: <1> +spec: + description: + homepage: + platforms: + - bin: <2> + files: + - from: + to: . + image: + imagePullSecret: <3> + platform: <4> + shortDescription: + version: <5> +---- +<1> The name of the plugin you plan to use in commands. +<2> `Bin` specifies the path to the plugin executable. +<3> Optional: If the registry is not public, add a pull secret to access your plugin image. +<4> Add the architecture for your system; for example, `linux/amd64`, `darwin/arm64`, `windows/amd64`, or another architecture. +<5> Version must be in v0.0.0 format. + +. Click *Save*. + +.Verification + +* Enter the following command to see if the plugin is listed and has been added successfully: + +[source,terminal] +---- +$ oc get plugin/ -o yaml +---- + +.Example output +[source,terminal] +---- + ready to be served. +---- \ No newline at end of file diff --git a/modules/cli-manager-custom-index-krew.adoc b/modules/cli-manager-custom-index-krew.adoc new file mode 100644 index 000000000000..ffbb91100618 --- /dev/null +++ b/modules/cli-manager-custom-index-krew.adoc @@ -0,0 +1,53 @@ +// Module included in the following assemblies: +// +// * cli_reference/cli_manager/cli-manager-install.adoc + +:_mod-docs-content-type: PROCEDURE +[id="cli-manager-custom-index_{context}"] += Adding the {cli-manager} custom index to Krew + +You can use the terminal to add the CLI manager custom index to Krew. This procedure is required for the {cli-manager} to function correctly and needs to be done only once. + +The custom index connects Krew to the {cli-manager} binaries and enables the {cli-manager} to work in disconnected environments. + +[NOTE] +==== +If you use self-signed certificates, mark the certificate as trusted on your local operating system to use Krew. +==== + +.Prerequisites + +* link:https://krew.sigs.k8s.io/docs/user-guide/setup/install[Krew is installed]. +* The {cli-manager} is installed. + +.Procedure + +. To establish the `ROUTE` variable, enter the following command: ++ +[source,terminal] +---- +$ ROUTE=$(oc get route/openshift-cli-manager -n openshift-cli-manager-operator -o=jsonpath='{.spec.host}') +---- + +. To add the custom index to Krew, enter the following command: ++ +[source,terminal] +---- +$ oc krew index add https://$ROUTE/cli-manager +---- + +. To update Krew, enter the following command and check for any errors: ++ +[source,terminal] +---- +$ oc krew update +---- + +.Example output +[source,terminal] +---- +Updated the local copy of plugin index. +Updated the local copy of plugin index . +New plugins available: +* ocp/ +---- \ No newline at end of file diff --git a/modules/cli-krew-install-plugin.adoc b/modules/cli-manager-installing-plugins.adoc similarity index 68% rename from modules/cli-krew-install-plugin.adoc rename to modules/cli-manager-installing-plugins.adoc index c3ddf5c48f8e..b335ba4a4b5b 100644 --- a/modules/cli-krew-install-plugin.adoc +++ b/modules/cli-manager-installing-plugins.adoc @@ -1,16 +1,19 @@ // Module included in the following assemblies: // -// * cli_reference/openshift_cli/installing-cli-plugins-krew.adoc +// * cli_reference/cli_manager/cli-manager-using.adoc :_mod-docs-content-type: PROCEDURE -[id="cli-krew-install-plugin_{context}"] -= Installing a CLI plugin with Krew +[id="cli-manager-adding-plugins_{context}"] += Installing CLI plugins with the {cli-manager} -You can install a plugin for the OpenShift CLI (`oc`) with Krew. +You can install CLI plugins using the {cli-manager}. .Prerequisites * You have installed Krew by following the link:https://krew.sigs.k8s.io/docs/user-guide/setup/install/[installation procedure] in the Krew documentation. +* The CLI Manager is installed. +* The CLI Manager custom index has been added to Krew. +* You are using {product-title} 4.17 or later. .Procedure diff --git a/modules/cli-manager-installing.adoc b/modules/cli-manager-installing.adoc new file mode 100644 index 000000000000..b8366633e87e --- /dev/null +++ b/modules/cli-manager-installing.adoc @@ -0,0 +1,46 @@ +// Module included in the following assemblies: +// +// * cli_reference/cli_manager/cli-manager-install.adoc + +:_mod-docs-content-type: PROCEDURE +[id="cli-manager-installing_{context}"] += Installing the {cli-manager} + +Install the {cli-manager} to facilitate adding CLI plugins in both connected and disconnected environments. + +.Prerequisites + +* link:https://krew.sigs.k8s.io/docs/user-guide/setup/install[Krew is installed]. +* You are logged in to {product-title} as a user with the `cluster-admin` role. +* You have access to the {product-title} web console. + +.Procedure + +. Log in to the {product-title} web console. + +. Create the required namespace for the {cli-manager}: +.. Navigate to *Administration* -> *Namespaces* and click *Create Namespace*. +.. In the *Name* field, enter `openshift-cli-manager-operator` and click *Create*. + +. Install the {cli-manager}: +.. Navigate to *Operators* -> *OperatorHub*. +.. In the filter box, enter *{cli-manager}*. +.. Select the *{cli-manager}* and click *Install*. +.. On the *Install Operator* page, complete the following steps: +... Ensure that the *Update channel* is set to *tech preview*, which installs the latest Technology Preview release of the {cli-manager}. +... From the drop-down menu, select *A specific namespace on the cluster* and select *openshift-cli-manager-operator*. +... Click *Install*. + +. Create the `CliManager` resource by completing the following steps: +.. Navigate to *Installed Operators*. +.. Select *{cli-manager}*. +.. Select the *CLI Manager* tab. +.. Click *Create CliManager*. +.. Use the default *Name*. +.. Click *Create*. +... The new `CliManager` resource is listed in the *CLI Manager* tab. + +.Verification + +. Navigate to *Operators* -> *Installed Operators*. +. Verify that *{cli-manager}* is listed with a *Status* of *Succeeded*. \ No newline at end of file diff --git a/modules/cli-manager-remove-resources.adoc b/modules/cli-manager-remove-resources.adoc new file mode 100644 index 000000000000..e7ad668566cb --- /dev/null +++ b/modules/cli-manager-remove-resources.adoc @@ -0,0 +1,23 @@ +// Module included in the following assemblies: +// +// * cli_reference/cli_manager/cli-manager-uninstall.adoc + +:_mod-docs-content-type: PROCEDURE +[id="cli-manager-remove-resources_{context}"] += Removing {cli-manager} resources + +Optionally, after you uninstall the {cli-manager}, you can remove its related resources from your cluster. + +.Prerequisites + +* You are logged in to {product-title} as a user with the `cluster-admin` role. +* You have access to the {product-title} web console. + +.Procedure + +. Log in to the {product-title} web console. + +. Remove the `openshift-cli-manager-operator` namespace: +.. Navigate to *Administration* -> *Namespaces*. +.. Click the Options menu {kebab} next to the *openshift-cli-manager-operator* entry and select *Delete Namespace*. +.. In the confirmation dialog, enter `openshift-cli-manager-operator` in the field and click *Delete*. diff --git a/modules/cli-krew-remove-plugin.adoc b/modules/cli-manager-uninstall-plugin.adoc similarity index 63% rename from modules/cli-krew-remove-plugin.adoc rename to modules/cli-manager-uninstall-plugin.adoc index 7db9e9ebd6a4..4006e1453cc4 100644 --- a/modules/cli-krew-remove-plugin.adoc +++ b/modules/cli-manager-uninstall-plugin.adoc @@ -1,17 +1,17 @@ // Module included in the following assemblies: // -// * cli_reference/openshift_cli/installing-cli-plugins-krew.adoc +// * cli_reference/cli_manager/cli-manager-using.adoc :_mod-docs-content-type: PROCEDURE -[id="cli-krew-remove-plugin_{context}"] -= Uninstalling a CLI plugin with Krew +[id="cli-manager-remove-plugin_{context}"] += Uninstalling a CLI plugin with the {cli-manager} -You can uninstall a plugin that was installed for the OpenShift CLI (`oc`) with Krew. +You can uninstall a plugin that was installed for the OpenShift CLI (`oc`) with the {cli-manager}. .Prerequisites * You have installed Krew by following the link:https://krew.sigs.k8s.io/docs/user-guide/setup/install/[installation procedure] in the Krew documentation. -* You have installed a plugin for the OpenShift CLI with Krew. +* You have installed a plugin for the OpenShift CLI with the {cli-manager}. .Procedure diff --git a/modules/cli-manager-uninstalling.adoc b/modules/cli-manager-uninstalling.adoc new file mode 100644 index 000000000000..9bda51ce4398 --- /dev/null +++ b/modules/cli-manager-uninstalling.adoc @@ -0,0 +1,23 @@ +// Module included in the following assemblies: +// +// * cli_reference/cli_manager/cli-manager-uninstall.adoc + +:_mod-docs-content-type: PROCEDURE +[id="cli-manager-uninstalling_{context}"] += Uninstalling the {cli-manager} + +You can uninstall the {cli-manager} by using the web console. + +.Prerequisites + +* You are logged in to {product-title} as a user with the `cluster-admin` role. +* You have access to the {product-title} web console. +* The {cli-manager} is installed. + +.Procedure + +. Log in to the {product-title} web console. +. Uninstall the {cli-manager} by completing the following steps: +.. Navigate to *Operators* -> *Installed Operators*. +.. Click the Options menu {kebab} next to the *{cli-manager}* entry and click *Uninstall Operator*. +.. In the confirmation dialog, click *Uninstall*. diff --git a/modules/cli-krew-update-plugin.adoc b/modules/cli-manager-updating-plugin.adoc similarity index 57% rename from modules/cli-krew-update-plugin.adoc rename to modules/cli-manager-updating-plugin.adoc index a53a747ef20f..a7e39ddd03cf 100644 --- a/modules/cli-krew-update-plugin.adoc +++ b/modules/cli-manager-updating-plugin.adoc @@ -1,17 +1,20 @@ // Module included in the following assemblies: // -// * cli_reference/openshift_cli/installing-cli-plugins-krew.adoc +// * cli_reference/cli_manager/cli-manager-using.adoc :_mod-docs-content-type: PROCEDURE -[id="cli-krew-update-plugin_{context}"] -= Updating a CLI plugin with Krew +[id="cli-manager-updating-plugin_{context}"] += Updating CLI plugins with the {cli-manager} -You can update a plugin that was installed for the OpenShift CLI (`oc`) with Krew. +You can update a plugin that was installed for the OpenShift CLI (`oc`) with the {cli-manager}. .Prerequisites * You have installed Krew by following the link:https://krew.sigs.k8s.io/docs/user-guide/setup/install/[installation procedure] in the Krew documentation. -* You have installed a plugin for the OpenShift CLI with Krew. +* The {cli-manager} is installed. +* The custom index has been added to Krew by the cluster administrator. +* The plugin updates have been added to the {cli-manager} by the cluster administrator. +* The plugin you are updating is already installed. .Procedure diff --git a/observability/network_observability/netobserv_cli/netobserv-cli-install.adoc b/observability/network_observability/netobserv_cli/netobserv-cli-install.adoc index 04b94f4bde4e..b07938eda389 100644 --- a/observability/network_observability/netobserv_cli/netobserv-cli-install.adoc +++ b/observability/network_observability/netobserv_cli/netobserv-cli-install.adoc @@ -14,4 +14,4 @@ include::modules/network-observability-netobserv-cli-install.adoc[leveloffset=+1 [role="_additional-resources"] .Additional resources * xref:../../../cli_reference/openshift_cli/extending-cli-plugins.adoc#cli-installing-plugins_cli-extend-plugins[Installing and using CLI plugins] -* xref:../../../cli_reference/openshift_cli/managing-cli-plugins-krew.adoc#cli-krew-install-plugin_managing-cli-plugins-krew[Installing a CLI plugin with Krew] \ No newline at end of file +* xref:../../../cli_reference/cli_manager/cli-manager-install.adoc#installing-cli-manager[Installing the {cli-manager}] \ No newline at end of file