Skip to content

Commit

Permalink
OSDOCS-5243 Adding CLI Manager docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cbippley committed Oct 15, 2024
1 parent 8a6f077 commit 4fee63d
Show file tree
Hide file tree
Showing 22 changed files with 433 additions and 0 deletions.
1 change: 1 addition & 0 deletions _attributes/common-attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,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: Openshift CLI Manager
// Backup and restore
:velero-domain: velero.io
:velero-version: 1.14
Expand Down
13 changes: 13 additions & 0 deletions _topic_maps/_topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,19 @@ Topics:
- 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
Expand Down
1 change: 1 addition & 0 deletions cli_reference/cli_manager/_attributes
22 changes: 22 additions & 0 deletions cli_reference/cli_manager/cli-manager-install.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:_content-type: ASSEMBLY
[id="cli-manager-install_{context}"]
= Installing the {cli-manager}
include::_attributes/common-attributes.adoc[]
:context: cli-manager-install

toc::[]

//Brief explanation of what the cli manager is.
In disconnected environments it is difficult to install and manage CLI plugins. The CLI Manager was created to make installing and managing CLI plugins in disconnected environments easier.

// About the CLI Manager
include::modules/cli-manager-about.adoc[leveloffset=+1]

// 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]

// Configuring the CLI Manager
include::modules/cli-manager-configuring.adoc[leveloffset=+1]
33 changes: 33 additions & 0 deletions cli_reference/cli_manager/cli-manager-release-notes.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
:_content-type: ASSEMBLY
[id="cli-manager-release-notes_{context}"]
= {cli-manager} release notes
include::_attributes/common-attributes.adoc[]
:context: cli-manager-release-notes

toc::[]

//Add release notes overview

These release notes track the development of the {cli-manager} for {product-title}.

//For an overview of the {run-once-operator}, see xref :../../../nodes/pods/run_once_duration_override/index.adoc#run-once-about_run-once-duration-override-about[About the {run-once-operator}].

[id="cli-manager-release-notes-1-0-0_{context}"]
== {cli-manager} 1.0.0

Issued: 5 November 2024

The following advisory is available for the {cli-manager} 1.0.0:
//add correct link
* link:https://access.redhat.com/errata/RHEA-2023:2035[RHEA-2023:2035]

[id="cli-manager-1-0-0-new-features-and-enhancements_{context}"]
=== New features and enhancements

//* This is the initial, generally available release of the {cli-manager}. For installation information, see xref :../../../getting_started/cli_manager/cli-manager-install.adoc#run-once-duration-override-install[Installing the {run-once-operator}].

// No bug fixes or known issues to list

//To update to the latest version of plugin;

//$ oc krew update
15 changes: 15 additions & 0 deletions cli_reference/cli_manager/cli-manager-uninstall.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:_content-type: ASSEMBLY
[id="cli-manager-uninstall_{context}"]
= 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.

// 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]
21 changes: 21 additions & 0 deletions cli_reference/cli_manager/cli-manager-using.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
:_content-type: ASSEMBLY
[id="cli-manager-install_{context}"]
= Using the {cli-manager}
include::_attributes/common-attributes.adoc[]
:context: cli-manager-using

toc::[]

//Brief explanation of what the cli manager is.

// Available plugins table
include::modules/cli-manager-plugin-list.adoc[leveloffset=+1]

// Adding a CLI plugin with the CLI Manager
include::modules/cli-manager-adding-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]
1 change: 1 addition & 0 deletions cli_reference/cli_manager/images
Empty file.
1 change: 1 addition & 0 deletions cli_reference/cli_manager/modules
1 change: 1 addition & 0 deletions cli_reference/cli_manager/snippets
9 changes: 9 additions & 0 deletions modules/cli-manager-about.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Module included in the following assemblies:
//
// * cli_reference/cli_manager/cli-manager-install.adoc

:_mod-docs-content-type: CONCEPT
[id="cli-manager-about_{context}"]
= About the CLI Manager

The CLI Manager
44 changes: 44 additions & 0 deletions modules/cli-manager-adding-plugins.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Module included in the following assemblies:
//
// * cli_reference/cli_manager/cli-manager-using.adoc

:_mod-docs-content-type: PROCEDURE
[id="cli-manager-adding-plugins_{context}"]
= Adding CLI plugins 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.
* 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

. To list all available plugins, run the following command:
+
[source,terminal]
----
$ oc krew search
----

. To get information about a plugin, run the following command:
+
[source,terminal]
----
$ oc krew info <plugin_name>
----

. To install a plugin, run the following command:
+
[source,terminal]
----
$ oc krew install <plugin_name>
----

. To list all plugins that were installed by Krew, run the following command:
+
[source,terminal]
----
$ oc krew list
----
19 changes: 19 additions & 0 deletions modules/cli-manager-configuring.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Module included in the following assemblies:
//
// * cli_reference/cli_manager/cli-manager-install.adoc

:_mod-docs-content-type: PROCEDURE
[id="cli-manager-overview_{context}"]
= Configuring the {cli-manager}

In order to use the {cli-manager} to add plugins you will need to configure the

.Prerequisites

* You have
* link:https://krew.sigs.k8s.io/docs/user-guide/setup/install[Krew is installed]
* Custom index provided by OpenShift CLI Manager is defined in Krew
.Procedure

.
60 changes: 60 additions & 0 deletions modules/cli-manager-custom-index-krew.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// 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

Use the terminal to add the CLI manager custom index to Krew.

.Prerequisites

* link:https://krew.sigs.k8s.io/docs/user-guide/setup/install[Krew is installed].
* The CLI Manager is installed.
* You are logged in to {product-title} as a user with the `cluster-admin` role.
* You are using {product-title} 4.17 or later.
.Procedure

. Execute the following command:

[source,terminal]
----
oc get route/openshift-cli-manager -n openshift-cli-manager-operator -o=jsonpath='{.spec.host}'
----

. Name the custom index.

[source,terminal]
----
# <custom_index_name>=ocp
----

. Add the custom index to Krew.

[source,terminal]
----
# oc krew index add $<custom_index_name> https://$ROUTE/cli-manager
----

.. If you see certificate authority errors use the following command to get the certificate authority data and write it to your local machine.

[source,terminal]
----
# echo "$(oc config view --minify --flatten -o jsonpath='{.clusters[0].cluster.certificate-authority-data}' | base64 --decode)" | sudo tee /etc/pki/ca-trust/source/anchors/cli.crt > /dev/null
----

.. Update the certificate authority for it to be trusted.

[source,terminal]
----
# sudo update-ca-trust
----

.. Update Krew.

[source,terminal]
----
# oc krew update
----
38 changes: 38 additions & 0 deletions modules/cli-manager-installing.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// 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}

.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.
* The CLI Manager is installed.
* You are using {product-title} 4.17 or later.
.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*.
.. Enter `openshift-cli-manager-operator` in the *Name* field and click *Create*.
+

. Install the {cli-manager}.
.. Navigate to *Operators* -> *OperatorHub*.
.. Enter *{cli-manager}* into the filter box.
.. Select the *{cli-manager}* and click *Install*.
.. On the *Install Operator* page:
... The *Update channel* is set to *stable*, which installs the latest stable release of the {cli-manager}.
... Select *A specific namespace on the cluster* and select *openshift-cli-manager-operator* from the drop-down menu.
... Click *Install*.

.Verification

. Navigate to *Operators* -> *Installed Operators*.
. Verify that *{cli-manager}* is listed with a *Status* of *Succeeded*.
7 changes: 7 additions & 0 deletions modules/cli-manager-overview.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Module included in the following assemblies:
//
// *

:_mod-docs-content-type: CONCEPT
[id="cli-manager-overview_{context}"]
= CLI Manager overview
44 changes: 44 additions & 0 deletions modules/cli-manager-plugin-list.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Module included in the following assemblies:
//
// * cli_reference/cli_manager/cli-manager-using.adoc

:_mod-docs-content-type: REFERENCE
[id="cli-manager-overview_{context}"]
= Available plugins for the {cli-manager}

//What other information should be included here?
// What do (kn) and (tkn) mean?
// These commands are guesses on my part. What are they actually?

.{product-title} flags for `oc adm must-gather`
[cols="1,1",options="header"]
|====
|CLI |Install command

|oc
|`oc krew install ocp/oc-mirror`

|Knative CLI (kn)
|`oc krew install knative`

|Pipelines CLI (tkn)
|`oc krew install pipelines`

|opm CLI
|`oc krew install opm`

|ROSA
|`oc krew install rosa`

|ccocli
|`oc krew install ccocli`

|Red Hat OpenShift GitOps CLI
|`oc krew install gitops cli`

|Virtualization (virtctl)
|`oc krew install virtctl`

|Hypershift CLI
|`oc krew install hypershift cli`
|====
24 changes: 24 additions & 0 deletions modules/cli-manager-remove-resources.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// 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 uninstalling 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 are logged in to {product-title} as a user with the `dedicated-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* and select *Delete Namespace*.
.. In the confirmation dialog, enter `openshift-cli-manager-operator` in the field and click *Delete*.
Loading

0 comments on commit 4fee63d

Please sign in to comment.