From 9312defe0fe1335ee21eebe19dafe813ccdd2137 Mon Sep 17 00:00:00 2001 From: Magnus Eklund Date: Mon, 4 Nov 2024 10:01:01 +0100 Subject: [PATCH] Fixing navbar for guide and changes on module2 --- documentation/modules/ROOT/pages/deploy.adoc | 2 +- .../modules/ROOT/pages/extensions.adoc | 77 +++++++++++-------- supplemental-ui/partials/header-content.hbs | 7 +- 3 files changed, 51 insertions(+), 35 deletions(-) diff --git a/documentation/modules/ROOT/pages/deploy.adoc b/documentation/modules/ROOT/pages/deploy.adoc index 450b113..1b1a6bb 100644 --- a/documentation/modules/ROOT/pages/deploy.adoc +++ b/documentation/modules/ROOT/pages/deploy.adoc @@ -27,7 +27,7 @@ NAME DISPLAY NAME STATUS ---- -Congratulations, you are now authenticated to the OpenShift server via the CLI. We'll use the prettier web console later on in this lab. +You can interact and manage resources on the OpenShift cluster via this CLI. We'll use the prettier web console later on in this lab. [WARNING] ==== diff --git a/documentation/modules/ROOT/pages/extensions.adoc b/documentation/modules/ROOT/pages/extensions.adoc index 689b425..a1f947e 100644 --- a/documentation/modules/ROOT/pages/extensions.adoc +++ b/documentation/modules/ROOT/pages/extensions.adoc @@ -49,18 +49,45 @@ echo "This is a bash shell command that you can copy/paste by selecting" ## Access Your Development Environment -You will be using VS Code server based on https://developers.redhat.com/products/openshift-dev-spaces/overview[Red Hat OpenShift Dev Spaces^] **Changes to files are auto-saved every few seconds**, so you don't need to explicitly save changes. +### First Step: Connect to your Developer Sandbox environment! -To get started, {{ DS_URL }}[access the Red Hat OpenShift Dev Spaces instance^] and select *Log in with OpenShift* button: +To run this workshop you need to provision your own Developer Sandbox environment. If you have already provisioned an environment just reconnect to it through the same flow as below: -image::login_with_openshift.png[login,800] +Go to https://developers.redhat.com/developer-sandbox + +Click the Start your sandbox for free and log in. + +image::devSandboxrequest.png[Request environment, 800] + +In the console now click *Launch* to access your Red Hat OpenShift environment. + +image::launchSandbox.png[login,800] + +This will lead you to the OpenShift console. + +Select *Log in with DevSandbox* if the choice opens up. + +image::loginDevSandbox.png[login,800] + +Take note of the cluster details in the url of the browser. It will be something like this: https://console-openshift-console.apps.sandbox-m2.ll9k.p1.openshiftapps.com/add/ns/yourusername-dev + +### Now let's start the developer IDE. + +You will be using Visual Studio Code (VS Code) based on https://developers.redhat.com/products/openshift-dev-spaces/overview[Red Hat OpenShift Dev Spaces^]. **Changes to files are auto-saved every few seconds**, so you don't need to explicitly save changes. + +To get started, access the Dev Spaces instance through the application picker in the top menu of the OpenShift console. -Type in the following credentail: +image::openDevSpaces.png[Open DevSpaces via app picker, 700] -* *Username*: `{{ USER_ID }}` -* *Password*: `{{ DS_USER_PASSWORD }}` +Or click *Launch* on the Red Hat Dev Spaces card where you accessed the OpenShift console. -image::che-login.png[login,800] +Select *Log in with OpenShift* button if needed: + +image::login_with_openshift.png[login,800] + +Select *Log in with DevSandbox* + +image::loginDevSandbox.png[login,800] [NOTE] ==== @@ -71,7 +98,7 @@ image::auth-access.png[auth-access, 800] Once you log in, you’ll be placed on the *Create Workspace* dashboard. Copy the following `Git Repo URL` and select `Create & Open`. -* *Git Repo URL*: `https://github.com/RedHat-Middleware-Workshops/quarkus-workshop-m1m2-labs/tree/ocp-4.15` +* *Git Repo URL*: `https://github.com/bmeklund/quarkus-workshop-m1m2-labs/tree/ocp-4.15` image::ds-landing.png[ds, 800] @@ -92,7 +119,7 @@ image::ds-workspace.png[ds, 800] [NOTE] ==== -In case you see this infomation page, check on `Trust the authors of all files in the parent folder 'projects'`. Then, select `Yes, I trust the authors. +In case you see this information page, click on `Yes, I trust the authors`. image::ds-trust-popup.png[ds, 800] ==== @@ -245,50 +272,38 @@ This will also listen for a debugger on port `5005`. If you want to wait for the If you are only doing the *Advanced* lab today, or you didn’t quite complete the Basic Lab, you'll need to login to OpenShift, then build and deploy the application needed for the exercises using a utility script provided. Follow the steps below to do this. -==== Login to OpenShift +== Change to correct project + +Your VS Code is running on the Kubernetes cluster but we will make sure we are in the correct project. -Although your VS Code is running on the Kubernetes cluster, it's running with a default restricted _Service Account_ that prevents you from creating most resource types. So we'll log in with your workshop user. Execute the following command in the VS Code terminal: +Execute the following command in the VS Code terminal: [source,sh,role="copypaste"] ---- -oc login -u {{ USER_ID }} -p {{ OPENSHIFT_USER_PASSWORD }} https://openshift.default.svc:443 +oc get project %USER_ID%-dev ---- You should see: [source, none] ---- -Login successful. - -You have access to the following projects and can switch between them with 'oc project ': +NAME DISPLAY NAME STATUS +{{USER_ID}}-dev {{USER_ID}}-dev Active - * {{ USER_ID }}-devspaces - {{ USER_ID }}-project - -Using project "user1-devspaces". -Welcome! See 'oc help' to get started. ---- -Congratulations, you are now authenticated to the OpenShift server via the CLI. We'll use the prettier web console later on in this lab. - === Deploy app -Deploy the `people` microservice by executing the following shell script in a CodeReady Workspaces Terminal: +Deploy the `people` microservice by executing the following shell script in a Dev Spaces terminal: [source, shell, role="copypaste"] ---- -sh scripts/deploy-people.sh {{ USER_ID }} +sh scripts/deploy-people.sh %USER_ID%-dev ---- Wait for the script to complete before continuing. -When the script completes, the app is deployed to OpenShift. You can see it in the {{ CONSOLE_URL}}[OpenShift Console^]. Login with your assigned username and password (e.g. `{{ USER_ID }}/{{ OPENSHIFT_USER_PASSWORD }}`): - -image::ocplogin.png[login,700] - -Once logged in, select the name of your project (`{{ USER_ID }}-project`): - -image::ocpproj.png[project,700] +When the script completes, the app is deployed to OpenShift. You can see it in the OpenShift Console. From the console make sure to switch to the developer perspective: Switch to the _Developer Perspective_ using the upper-left drop-down: diff --git a/supplemental-ui/partials/header-content.hbs b/supplemental-ui/partials/header-content.hbs index 38f250f..93691b3 100644 --- a/supplemental-ui/partials/header-content.hbs +++ b/supplemental-ui/partials/header-content.hbs @@ -69,7 +69,7 @@