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
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
12f89b9
Initial commit for CLI command reference documentation
anandf Jan 31, 2024
f36bae9
Added note about core mode of execution for MicroShift installations
anandf Jan 31, 2024
120c9a3
Updated the version output for verification
anandf Jan 31, 2024
95d31ff
Converted args to table entries
anandf Feb 11, 2024
b96e4b0
Added configuration section and changed global commands to utility co…
anandf Feb 11, 2024
2569942
Formatted basic syntax commands
anandf Feb 11, 2024
18665b2
Added the parent argocd command reference
anandf Feb 11, 2024
8527333
Updated the app creation and app sync commands
anandf Feb 13, 2024
2994db7
Added a short description for Global options
anandf Feb 13, 2024
e69581c
Added tips warning and notes for commands and description for user guide
anandf Feb 13, 2024
ed2086f
Removed accidental commit of unresolved conflicts
anandf Feb 13, 2024
b1f376e
Addressed review comments related to core mode and options with kubec…
anandf Feb 20, 2024
965062a
Corrected some formatting errors and typos
anandf Feb 26, 2024
370df4e
Made some minor corrections
anandf Feb 26, 2024
6cde0d4
Added RHEL8 or later and corrected the repo name
anandf Feb 27, 2024
7dd2cbf
Updated repos for RHEL 8 and RHEL 9 separately
anandf Feb 28, 2024
a400287
Corrected command for getting the secret and fixed the build info output
anandf Mar 6, 2024
edf7cc7
Corrected the server url option
anandf Mar 6, 2024
0e288ea
Added note about passwords containing shell variables
anandf Mar 6, 2024
70713d3
Removed hardcoded password
anandf Mar 6, 2024
30f5f08
Corrected core mode commands after testing
anandf Mar 7, 2024
0cc95da
Removed sync section when automated sync policy is used
anandf Mar 7, 2024
75cf183
Fixed review comments from Kevin and Varsha
anandf Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added note about passwords containing shell variables
Signed-off-by: Anand Francis Joseph <[email protected]>
anandf committed Apr 15, 2024
commit 0e288eab667efbda0ea0685c66f58985162bb252
28 changes: 22 additions & 6 deletions docs/OpenShift GitOps CLI User Guide.md
Original file line number Diff line number Diff line change
@@ -198,8 +198,11 @@ In the normal mode (default mode), the `argocd` CLI client makes API requests to
```
eg:
```
# argocd login --username admin --password ${ADMIN_PASSWD} openshift-gitops.openshift-gitops.apps-crc.testing
# get the admin password and use it by enclosing in single quotes.
# echo ${ADMIN_PASSWD}
# argocd login --username admin --password '<password>' openshift-gitops.openshift-gitops.apps-crc.testing
```
**IMPORTANT** passwords can contain special characters like `$` which would be interpreted as shell variables. This can cause the command to fail as a wrong value (shell interpreted) of password would be sent to the server. Always use single quotes '' to enclose the actual value of the password to avoid such errors.
3. Execute the argocd commands
```
# argocd [command or options] [arguments…​]
@@ -519,8 +522,11 @@ $ compinit
```
eg:
```
# argocd login --username admin --password ${ADMIN_PASSWD} openshift-gitops.openshift-gitops.apps-crc.testing
# get the admin password and use it by enclosing in single quotes.
# echo ${ADMIN_PASSWD}
# argocd login --username admin --password '<password>' openshift-gitops.openshift-gitops.apps-crc.testing
```
**IMPORTANT** passwords can contain special characters like `$` which would be interpreted as shell variables. This can cause the command to fail as a wrong value (shell interpreted) of password would be sent to the server. Always use single quotes '' to enclose the actual value of the password to avoid such errors.
3. Validate that you are able to run `argocd` commands in normal mode by executing the following command to list all Applications.
```
# argocd app list
@@ -626,8 +632,12 @@ $ compinit
```
eg:
```
# argocd login --username admin --password ${ADMIN_PASSWD} openshift-gitops.openshift-gitops.apps-crc.testing
# get the admin password and use it by enclosing in single quotes.
# echo ${ADMIN_PASSWD}
# argocd login --username admin --password '<password>' openshift-gitops.openshift-gitops.apps-crc.testing
```
**IMPORTANT** passwords can contain special characters like `$` which would be interpreted as shell variables. This can cause the command to fail as a wrong value (shell interpreted) of password would be sent to the server. Always use single quotes '' to enclose the actual value of the password to avoid such errors.
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

@Srivaralakshmi Srivaralakshmi Mar 5, 2024

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.

```
# argocd app sync openshift-gitops/app-spring-petclinic
@@ -646,7 +656,7 @@ $ compinit
```
eg:
```
# oc login -u kubeadmin -p ${ADMIN_PASSWD} https://api.crc.testing:6443
# oc login -u kubeadmin -p 'Qlr1Mq9y6bDHhB3F0JdCSXNAgjiTtG$X' https://api.crc.testing:6443
```
2. Check if the context is set correctly in the kubeconfig file
```
@@ -686,8 +696,11 @@ $ compinit
```
eg:
```
# argocd login --username admin --password ${ADMIN_PASSWD} openshift-gitops.openshift-gitops.apps-crc.testing
# get the admin password and use it by enclosing in single quotes.
# echo ${ADMIN_PASSWD}
# argocd login --username admin --password '<password>' openshift-gitops.openshift-gitops.apps-crc.testing
```
**IMPORTANT** passwords can contain special characters like `$` which would be interpreted as shell variables. This can cause the command to fail as a wrong value (shell interpreted) of password would be sent to the server. Always use single quotes '' to enclose the actual value of the password to avoid such errors.
3. Validate that you are able to run `argocd` commands in normal mode by executing the following command to list all Applications.
```
# argocd app list
@@ -791,8 +804,11 @@ $ compinit
```
eg:
```
# argocd login --username admin --password ${ADMIN_PASSWD} openshift-gitops.openshift-gitops.apps-crc.testing
# get the admin password and use it by enclosing in single quotes.
# echo ${ADMIN_PASSWD}
# argocd login --username admin --password '<password>' openshift-gitops.openshift-gitops.apps-crc.testing
```
**IMPORTANT** passwords can contain special characters like `$` which would be interpreted as shell variables. This can cause the command to fail as a wrong value (shell interpreted) of password would be sent to the server. Always use single quotes '' to enclose the actual value of the password to avoid such errors.
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
```
# argocd app sync openshift-gitops/cluster-configs