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

Edits suggested by Rutuja #3

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions modules/ROOT/pages/che-cluster.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ In this short lab, you will restrict the number of Workspaces that an authentica
$ oc edit checluster/devspaces -n openshift-devspaces
```
+
Although you can directly edit the YAML configuration using this approach, it is not recommended. A better approach is to maintain the YAML configuration in a version controlled Git repository and then use GitOps techniques, or use the `oc replace -f <filename.yaml>` command.
Although you can directly edit the YAML configuration using this approach, it is not recommended. A better approach is to maintain the YAML configuration in a version-controlled Git repository and then use GitOps techniques, or use the `oc replace -f <filename.yaml>` command.
+
WARNING: If you have used the GitOps approach outlined previously, then ArgoCD is responsible for ensuring that the cluster state matches the configuration defined in the Git repository `main` branch. If you overwrite the `CheCluster` CR YAML using `oc` CLI or some other tool, then ArgoCD will reconcile the configuration and overwrite your changes!

Expand Down Expand Up @@ -127,5 +127,5 @@ image::one-workspace-error.png[Only one Workspace allowed to launch by default]
You can increase this value by editing an attribute in the `CheCluster` CR. See https://docs.redhat.com/en/documentation/red_hat_openshift_dev_spaces/3.15/html-single/administration_guide/index#enabling-users-to-run-multiple-workspaces-simultaneously.

. Make the necessary changes to the `CheCluster` CR YAML file.
. Log in as `user1` to the Dev Spaces dashboard and launch any of the example workspaces listed in the home page
. Use a different browser, and log in as `user1` and launch one more example workspace to verify that you can launch more than one workspace.
. Log in as `user1` to the Dev Spaces dashboard and launch any of the example workspaces listed on the home page.
. Use a different browser, log in as `user1`, and launch one more example workspace to verify that you can launch more than one workspace.
22 changes: 11 additions & 11 deletions modules/ROOT/pages/cli.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Installation of Dev Spaces using CLI Tools
= Installation of Dev Spaces Using CLI Tools
:navtitle: CLI

There are two ways you can install Dev Spaces using CLI tools. The first approach, using the `oc` CLI and YAML configuration files is for scenarios where you need fine-grained control over specific versions, and fine-tuning other related YAML configuration for your Dev Spaces deployment.
Expand All @@ -11,13 +11,13 @@ In scenarios where you need to install Dev Spaces using automated scripts, you c

=== Pre-requisites

* You should have provisioned an OpenShift 4.16+ cluster as outlined the `Classroom Environment` section of the course home page.
* Download the OpenShift client `oc` for your platform from from the OpenShift web console by clicking the "?" icon on the top right navigation bar. Uncompress the archive file, and then copy the `oc` binary for your platform to the system path (usually `/usr/local/bin` on UNIX systems).
* You should have provisioned an OpenShift 4.16+ cluster as outlined in the `Classroom Environment` section of the course home page.
* Download the OpenShift client `oc` for your platform from the OpenShift web console by clicking the "?" icon on the top right navigation bar. Uncompress the archive file, and then copy the `oc` binary for your platform to the system path (usually `/usr/local/bin` on UNIX systems).
* Cluster administrator access to OpenShift (both CLI and web console). Verify that you can log in to the OpenShift web console and CLI as a cluster administrator.

=== Lab: Using oc CLI to install Dev Spaces

Using the `oc` CLI with YAML configuration files gives you more control and flexibility over how to install Dev Spaces. Whereas the web console and the `dsc` CLI is used to usually install the latest stable version of Dev Spaces, with this approach, you can install older versions, or specific product versions, and customize the OpenShift environment to fit your needs using the `oc` CLI approach.
Using the `oc` CLI with YAML configuration files gives you more control and flexibility over how to install Dev Spaces. Whereas the web console and the `dsc` CLI are used to usually install the latest stable version of Dev Spaces, with this approach, you can install older versions, or specific product versions, and customize the OpenShift environment to fit your needs using the `oc` CLI approach.

WARNING: If you have previously installed Dev Spaces using a different method, then run *dsc server:delete --delete-all --delete-namespace -n openshift-devspaces* as the `admin` user to completely remove the existing instance before you proceed with the installation.

Expand All @@ -30,7 +30,7 @@ $ oc login -u admin _<OpenShift API URL>_

. Operators can be installed in two modes - `Automatic` and `Manual`. `Automatic` is the simplest mode, where you do not need any manual intervention required and the operator is automatically installed. Inspect the configuration file at https://github.com/RedHatQuickCourses/devspaces-apps/blob/main/operator-cli/automatic-approval-operator.yaml. This file can be used to install Dev Spaces in `Automatic` mode. If you choose this option, skip the next steps for manual mode and jump directly to the step where you instantiate a new `CheCluster` instance. The https://github.com/RedHatQuickCourses/devspaces-apps/blob/main/operator-cli/checluster-cr.yaml file is used to create a new `CheCluster` resource.

. For manual installation mode, inspect and download the two YAML configuration files below. The first file defines a new namespace for installing Dev Spaces, along with the operator subscription, operator group and related configuration to install a specific version (v3.14) of Dev Spaces. The second file defines a basic configuration for the `CheCluster` resource and creates an instance named `devspaces`.
. For manual installation mode, inspect and download the two YAML configuration files below. The first file defines a new namespace for installing Dev Spaces, along with the operator subscription, operator group, and related configuration to install a specific version (v3.14) of Dev Spaces. The second file defines a basic configuration for the `CheCluster` resource and creates an instance named `devspaces`.
+
* https://github.com/RedHatQuickCourses/devspaces-apps/blob/main/operator-cli/manual-approval-operator.yaml
* https://github.com/RedHatQuickCourses/devspaces-apps/blob/main/operator-cli/checluster-cr.yaml
Expand All @@ -46,11 +46,11 @@ subscription.operators.coreos.com/devworkspace-operator created
subscription.operators.coreos.com/openshift-devspaces created
----

. You chose `Manual` approval for the operator installation, which means you need to log in to the OpenShift web console and `approve` the installation. You do not need to do this if you chose `Automatic` approval. Since we chose the manual approach, log in to the OpenShift web console as the `admin` user and click `Operators > Installed Operators`. Select `openshift-devspaces` in the `Project` drop-down. Click `Upgrade Available` link for the `devspaces` operator.
. You chose `Manual` approval for the operator installation, which means you need to log in to the OpenShift web console and `approve` the installation. You do not need to do this if you choose `Automatic` approval. Since we chose the manual approach, log in to the OpenShift web console as the `admin` user and click `Operators > Installed Operators`. Select `openshift-devspaces` in the `Project` drop-down. Click the `Upgrade Available` link for the `devspaces` operator.
+
image::op-manual-upgrade.png[title=Approval Required for Manual Install Mode]

. In the `InstallPlan Details` page, click `Preview InstallPlan`. You should see a list of resource that will be created. Click `Approve` to proceed with the installation.
. In the `InstallPlan Details` page, click `Preview InstallPlan`. You should see a list of resources that will be created. Click `Approve` to proceed with the installation.
+
image::install-plan-approve.png[title=Approve Install Plan]

Expand Down Expand Up @@ -96,8 +96,8 @@ While you can install Dev Spaces using the OpenShift `oc` CLI tool and YAML conf

=== Pre-requisites

* You should have provisioned an OpenShift 4.16+ cluster as outlined the `Classroom Environment` section of the course home page.
* Download the OpenShift client `oc` for your platform from from the OpenShift web console by clicking the "?" icon on the top right navigation bar. Uncompress the archive file, and then copy the `oc` binary for your platform to the system path (usually `/usr/local/bin` on UNIX systems).
* You should have provisioned an OpenShift 4.16+ cluster as outlined in the `Classroom Environment` section of the course home page.
* Download the OpenShift client `oc` for your platform from the OpenShift web console by clicking the "?" icon on the top right navigation bar. Uncompress the archive file, and then copy the `oc` binary for your platform to the system path (usually `/usr/local/bin` on UNIX systems).
* Cluster administrator access to OpenShift (both CLI and web console). Verify that you can log in to the OpenShift web console and CLI as a cluster administrator.
* Download the latest `dsc` tool for your operating system from https://developers.redhat.com/products/openshift-dev-spaces/download.
** Extract the archive file and copy the `dsc` directory to a suitable location in your workstation (`/usr/local` is a good choice).
Expand All @@ -107,7 +107,7 @@ While you can install Dev Spaces using the OpenShift `oc` CLI tool and YAML conf

WARNING: If you have previously installed Dev Spaces using a different method, then run *dsc server:delete --delete-all --delete-namespace -n openshift-devspaces* as the `admin` user to completely remove the existing instance before you proceed with the installation.

. The `dsc` tool uses the log in context provided by the `oc` CLI tool to manage Dev Spaces instances. Log in as the `admin` user with the `oc` CLI before running `dsc`. Verify that you can execute the `dsc` binary file on your operating system.
. The `dsc` tool uses the login context provided by the `oc` CLI tool to manage Dev Spaces instances. Log in as the `admin` user with the `oc` CLI before running `dsc`. Verify that you can execute the `dsc` binary file on your operating system.
+
[subs=+quotes]
----
Expand Down Expand Up @@ -179,7 +179,7 @@ Command server:deploy has completed successfully in 02:51.
+
TIP: Use the `dsc server:deploy --help` command to list the full options to control the installation. In this course, we will configure a basic instance and then customize it using YAML configuration files.

. The previous command should print a lot of details about your Dev Spaces instance if installation was successful. You can also run the `dsc server:status` command to get the URL of the Dev Spaces dashboard
. The previous command should print a lot of details about your Dev Spaces instance if the installation was successful. You can also run the `dsc server:status` command to get the URL of the Dev Spaces dashboard
+
[subs=+quotes]
----
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/config.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Red Hat OpenShift Dev Spaces Configuration
:navtitle: Configuration

Configuration involves controlling multiple aspects Red Hat OpenShift Dev Spaces around security, resource management, storage management, networking and customizing workspaces tailored to the kinds of applications being developed.
Configuration involves controlling multiple aspects of Red Hat OpenShift Dev Spaces around security, resource management, storage management, networking, and customizing workspaces tailored to the kinds of applications being developed.

In this section, we focus on tasks that are typically managed by Dev Spaces administrators and OpenShift administrators:

Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/fuse-overlay.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ spec:
io.kubernetes.cri-o.Devices: /dev/fuse*
----

. Log in as the `user1` user and launch an empty workspace from the dashboard. Launch a new terminal in the web IDE and first verify that the `/dev/fuse` device exists
. Log in as the `user1` user and launch an empty workspace from the dashboard. Launch a new terminal in the web IDE and first verify that the `/dev/fuse` device exists.
+
[source,bash,subs=+quotes]
----
Expand Down
18 changes: 9 additions & 9 deletions modules/ROOT/pages/gitops.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Installing Dev Spaces using OpenShift GitOps
= Installing Dev Spaces Using OpenShift GitOps
:navtitle: GitOps

For managing multiple operators with complex customization and configuration, the *GitOps* approach is recommended to simplify configuration management, and provide traceability and auditing. You maintain the operator configuration, along with other cluster resources needed for the operator to work in a Git repository, and a product like *OpenShift GitOps* (based on the open source ArgoCD project) keeps track of the Git repository and applies the changes automatically to the cluster without manual intervention.
Expand All @@ -7,12 +7,12 @@ In this section, you will install OpenShift GitOps, and then store the Dev Space

== Pre-requisites

* You should have provisioned an OpenShift 4.16+ cluster as outlined the `Classroom Environment` section of the course home page.
* Download the OpenShift client `oc` for your platform from from the OpenShift web console by clicking the "?" icon on the top right navigation bar. Uncompress the archive file, and then copy the `oc` binary for your platform to the system path (usually `/usr/local/bin` on UNIX systems).
* You should have provisioned an OpenShift 4.16+ cluster as outlined in the `Classroom Environment` section of the course home page.
* Download the OpenShift client `oc` for your platform from the OpenShift web console by clicking the "?" icon on the top right navigation bar. Uncompress the archive file, and then copy the `oc` binary for your platform to the system path (usually `/usr/local/bin` on UNIX systems).
* Cluster administrator access to OpenShift (both CLI and web console). Verify that you can log in to the OpenShift web console and CLI as a cluster administrator.
* Download the latest `dsc` tool for your operating system from https://developers.redhat.com/products/openshift-dev-spaces/download.
** Extract the archive file and copy the `dsc` directory to a suitable location in your workstation (`/usr/local` is a good choice).
** Add the `/usr/local/dsc/bin` folder to your operating system `PATH` environment variable
** Add the `/usr/local/dsc/bin` folder to your operating system `PATH` environment variable.

== Lab: Installing Dev Spaces using OpenShift GitOps

Expand All @@ -22,7 +22,7 @@ WARNING: If you have previously installed Dev Spaces using a different method, t

. Fork the Git repository https://github.com/RedHatQuickCourses/devspaces-apps.git to your own Git account (GitHub or GitLab should work fine).
+
WARNING: You will point the OpenShift GitOps configuration to fetch the operator configuration from this forked Git repository. If you fail to point the GitOps configuration to the your forked repository, then the configuration from the upstream `RedHatQuickCourses` repository will be applied and may break your Dev Spaces instance!
WARNING: You will point to the OpenShift GitOps configuration to fetch the operator configuration from this forked Git repository. If you fail to point the GitOps configuration to your forked repository, then the configuration from the upstream `RedHatQuickCourses` repository will be applied and may break your Dev Spaces instance!

. Log in to the OpenShift cluster as the `admin` user (user with cluster administrator permissions) using the `oc` CLI.
+
Expand All @@ -31,7 +31,7 @@ WARNING: You will point the OpenShift GitOps configuration to fetch the operator
$ oc login -u admin _<OpenShift API URL>_
----

. Download and inspect the https://github.com/RedHatQuickCourses/devspaces-apps/blob/main/gitops-install/gitops-operator.yaml file from your forked repository. This configuration is used to install the OpenShift GitOps operator (For simplicity sake, we install it in `Automatic` approval mode).
. Download and inspect the https://github.com/RedHatQuickCourses/devspaces-apps/blob/main/gitops-install/gitops-operator.yaml file from your forked repository. This configuration is used to install the OpenShift GitOps operator (For simplicity's sake, we install it in `Automatic` approval mode).

. Apply the configuration to install OpenShift GitOps
+
Expand All @@ -44,11 +44,11 @@ Wait for a few minutes while the GitOps operator is installed. Click on `Operato
+
image::gitops-op-success.png[title=GitOps operator installed]

. After the installation finishes, the OpenShift web console will inform you that you need to refresh the web console. Do so, and you will now see a new application shortcut to the OpenShift GitOps dashboard
. After the installation finishes, the OpenShift web console will inform you that you need to refresh the web console. Do so, and you will now see a new application shortcut to the OpenShift GitOps dashboard.
+
image::new-argocd-link.png[title=New ArgoCD Dashboard Link]

. Click the `Cluster ArgoCD` link. You will be shown the ArgoCD log in page. A random password has been automatically generated for you by the operator. To get the password, run the following `oc` command:
. Click the `Cluster ArgoCD` link. You will be shown the ArgoCD login page. A random password has been automatically generated for you by the operator. To get the password, run the following `oc` command:
+
[subs=+quotes]
----
Expand All @@ -60,7 +60,7 @@ Copy the password for the next step.

. Log in to ArgoCD as the user `admin` with the password extracted from the previous step.
+
image::argocd-login.png[title=ArgoCD Log in Page]
image::argocd-login.png[title=ArgoCD Login Page]

. After you log in you should see the ArgoCD dashboard page with no ArgoCD applications installed. Before you create a new ArgoCD application, you need to provide permissions to the ArgoCD controller running in the `openshift-gitops` namespace to create resources in the `openshift-devspaces` namespace. The easiest way to do this is to provide `cluster-admin` role to the service account running the controller. Run the following command as a cluster administrator user:
+
Expand Down
Loading
Loading