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

doc: OpenShift argocd CLI client command reference documentation #650

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

anandf
Copy link
Member

@anandf anandf commented Jan 31, 2024

What type of PR is this?
/kind documentation

What does this PR do / why we need it:

Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:

Fixes #?

Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

@openshift-ci openshift-ci bot added the kind/documentation Improvements or additions to documentation label Jan 31, 2024
Copy link

openshift-ci bot commented Jan 31, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from anandf. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

@Srivaralakshmi Srivaralakshmi left a comment

Choose a reason for hiding this comment

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

@anandf Thanks for the doc inputs! Left some suggestions for you to consider. PTAL. Thank you!

docs/OpenShift GitOps CLI User Guide.md Show resolved Hide resolved
docs/OpenShift GitOps CLI User Guide.md Outdated Show resolved Hide resolved
docs/cli/argocd_account.md Show resolved Hide resolved
docs/OpenShift GitOps CLI User Guide.md Outdated Show resolved Hide resolved
docs/OpenShift GitOps CLI User Guide.md Show resolved Hide resolved
@Srivaralakshmi
Copy link

@anandf Can we add some content for these sections, if they are relevant at all?

  • About the OpenShift argo cd CLI (I think this is a nice to have section)
  • Logging in to the OpenShift argo cd CLI using a web browser
  • usage instructions - information that must go as admonitions such as Note, Important, Tip, caution, or warning.

@anandf
Copy link
Member Author

anandf commented Feb 13, 2024

@anandf Can we add some content for these sections, if they are relevant at all?

  • Logging in to the OpenShift argo cd CLI using a web browser

This is not applicable. One has to login via the CLI itself. Its not possible to login via web browser like its possible for oc login


#### Core mode

In the `core` mode (`--core` argument specified), the CLI talks directly to the Kubernetes API server set as per the `KUBECONFIG` environment variable or the default file `$HOME/.kube/config`. There is no need for users to login into the ArgoCD server for executing commands. The commands would be run as user configured in the kubeconfig file.

Choose a reason for hiding this comment

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

@anandf The commands would be run as user configured in the kubeconfig file.

By this, do you mean that the commands are pre-configured in the kubeconfig file to be automatically run by default for the user from the CLI for executing commands?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have reworded the sentences to clarify.
In summary, the credentials are available in the kubeconfig file and that would be used for executing the commands in the core mode.


In the `core` mode (`--core` argument specified), the CLI talks directly to the Kubernetes API server set as per the `KUBECONFIG` environment variable or the default file `$HOME/.kube/config`. There is no need for users to login into the ArgoCD server for executing commands. The commands would be run as user configured in the kubeconfig file.

1. With the default context in kubeconfig file

Choose a reason for hiding this comment

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

@anandf I guess what you mean is .. for step 1 -- Use this default context in kubeconfig file

and then step 2 is optional if users want to customize the context in case they are using multiple ArgoCD instances. If so, then they must have to use the step 2 option to set the context to interact with the appropriate ArgoCD instance of their choice. Right?

My only confusion is, do they have to edit this [context] parameter? Can we have a quick call tomorrow when you are available to understand this better?

Can we give an example here? I think that will help. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Instead of numbered steps, I have put them as Options so users can choose one of the available options to run the commands. Yes [context] is a placeholder which users have to fill in. I have provided detailed examples for each option.

Copy link

Choose a reason for hiding this comment

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

Thanks @anandf for the clarifications and additional inputs.
The rest LGTM.

Use the CLI tool to manage Red Hat OpenShift GitOps from a terminal. You can install the CLI tool on different platforms.

### Installing the Red Hat OpenShift GitOps CLI on Linux using an RPM
For Red Hat Enterprise Linux (RHEL) version 8, you can install the Red Hat OpenShift GitOps CLI as an RPM.

Choose a reason for hiding this comment

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

@anandf what about Red Hat Enterprise Linux (RHEL) version 9? is it not applicable?

Should we update this to RHEL 9?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think its better not to mention the version at all. Customers can be either in RHEL 8/9 version.

Choose a reason for hiding this comment

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

@anandf version must be mentioned. something like, For Red Hat Enterprise Linux (RHEL) version 8 and later ?

No mentioning is not a good practice.

Comment on lines 39 to 52
# subscription-manager repos --enable="gitops-1.12-for-rhel-8-x86_64-rpms"
```
- Linux on IBM zSystems and IBM® LinuxONE (s390x)
```
# subscription-manager repos --enable="gitops-1.12-for-rhel-8-s390x-rpms"
```
- Linux on IBM Power (ppc64le)
```
# subscription-manager repos --enable="gitops-1.12-for-rhel-8-ppc64le-rpms"
```
- Linux on ARM (aarch64, arm64)
```
# subscription-manager repos --enable="gitops-1.12-for-rhel-8-aarch64-rpms"
```
Copy link

Choose a reason for hiding this comment

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

@anandf FOr RHEL 9, would the repo inputs be the following ones?

  • "gitops-1.12-for-rhel-9-x86_64-rpms"
  • "gitops-1.12-for-rhel-9-s390x-rpms"
  • "gitops-1.12-for-rhel-9-ppc64le-rpms"
  • "gitops-1.12-for-rhel-9-aarch64-rpms"

Copy link

Choose a reason for hiding this comment

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

@anandf Please provide clarifications for these queries:

  • For ROSA, OSD, and ARO distros, will all these steps, commands, and procedures hold good as is?
  • Is there any difference between what GitOps offers OCP v/s what we do for OSD, ROSA, and ARO distros?
  • Can you please confirm that there are no changes or special configurations needed to use GitOps argocd CLI on OSD, ROSA, and ARO distros out of the box?

Thank you!

You have an active OpenShift Container Platform subscription on your Red Hat account.
You have root or sudo privileges on your local system.
#### Procedure
- Register with Red Hat Subscription Manager:
Copy link

Choose a reason for hiding this comment

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

@anandf Steps should be in an ordered/numbered list as they are a sequence of steps. This comment applies to all the CLI installation procedures on different operating systems.

```
# argocd login --username admin --password ${ADMIN_PASSWD} openshift-gitops.openshift-gitops.apps-crc.testing
```
3. If the argo application is created with manual sync policy, then the user has to trigger the sync operation manually. This can be done by using the `argocd` CLI in normal mode as below
Copy link

Choose a reason for hiding this comment

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

@anandf The 3rd step of sync procedure in normal mode here must be this right:
argocd app sync openshift-gitops/app-spring-petclinic

For cluster:
argocd app sync openshift-gitops/app-cluster-configs

There is no --core here. Correct?

Choose a reason for hiding this comment

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

@anandf In CEE confluence content, we have this 3rd step as extra:

Validate that you are able to run argocd commands in normal mode by executing the following command to list all Applications.
$ argocd app list

Do we need it here too in the downstream docs? Please confirm.

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
…mmands

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
…onfig file

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Copy link

openshift-ci bot commented Apr 15, 2024

@anandf: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v4.14-ci-index-gitops-operator-bundle 75cf183 link true /test v4.14-ci-index-gitops-operator-bundle
ci/prow/v4.14-images 75cf183 link true /test v4.14-images

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants