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 18, 2024
1 parent 649d896 commit 61cb345
Show file tree
Hide file tree
Showing 22 changed files with 454 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 @@ -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: 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 @@ -925,6 +925,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.

// Adding a plugin to the CLI Manager
include::modules/cli-manager-adding-plugin-yaml.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
65 changes: 65 additions & 0 deletions modules/cli-manager-adding-plugin-yaml.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Module included in the following assemblies:
//
// * cli_reference/cli_manager/cli-manager-using.adoc

:_mod-docs-content-type: PROCEDURE
[id="cli-manager-adding-plugin-yamls_{context}"]
= Adding plugins to the {cli-manager} with YAML files

.Prerequisites

* The {cli-manager} is installed.
* You are using {product-title} 4.17 or later.
* You are logged in to {product-title} as a user with the `cluster-admin` role.
.Procedure

. Log in to the {product-title} web console.

. Navigate to *Operators* -> *Installed Operators*.

. Select the *{cli-manager}* from the list.

. Select the *CLI Plugin* tab.

. Click *Create Plugin*.

. Fill in the yaml file with the information for the plugin you are installing. See the example YAML file below.
+
.Example YAML file to add a plugin
[source,yaml]
----
apiVersion: config.openshift.io/v1alpha1
kind: Plugin
metadata:
name: <plugin_name>
spec:
shortDescription: short description of the <plugin_name>
description: long description of the <plugin_name>
version: <version> <1>
caveats: <2>
homepage: <plugin_homepage>
platforms:
- platform: <platform> <3>
image: <plugin_image>
imagePullSecret: <4>
files:
- from: <plugin_file_path>
----
<1> Version must be in v0.0.0 format.
<2> This field is optional.
<3> linux/amd64 # linux/arm64, darwin/arm64, windows/amd64, or another.
<4> Optional field for a pull secret to access your plugin image.

. Click *save*.

.Verification
//is this the right command?
. Use the command `oc get logs` to see if the plugin has been added successfully.

. Example output
+
[source,terminal]
----
plugin <plugin_name> is ready to serve.
----
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
Loading

0 comments on commit 61cb345

Please sign in to comment.