Get your Developer Workspace
20 MINUTE EXERCISE
In this lab you will learn about getting your Red hat Developer Sandbox with a Kubernetes-native development platform and getting familiar with the OpenShift CLI, OpenShift Web Console and Dev Spaces.
Getting your Developer Sandbox for OpenShift
The Red Hat Developer Sandbox is a great way to access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new sandbox environments for Red Hat OpenShift and Dev Spaces IDE. Try your hand at the technologies with our library of activities as well.
The Developer Sandbox for OpenShift is a Kubernetes-native environment for developing software for OpenShift. You need to follow the Get Started process on the Sandbox web site first, before attempting any of the workshop steps below.
After verifying your email or mobile number you should you get access to your sandbox and be given a link to a login page to access the OpenShift Web Console, which looks like this:-
Then login with DevSandbox
Using the OpenShift Developer Console
OpenShift ships with a web-based console that will allow users to perform various tasks via a browser.
After you have authenticated to the web console, you will be presented with a list of projects that your user has permission to work with.
Select the 'Developer View' then your "-dev" project
to be taken to the project overview page
which will list all of the routes, services, deployments, and pods that you have
running as part of your project. There’s maybe nothing much there now, but that’s about to
change.
Getting your Developer Workspace
OpenShift Dev Spaces will provide you an out-of-the-box Developer Workspace with all the tools and the dependencies we need to do the job.
Devfile
OpenShift Dev Spaces uses Devfiles to automate the provisioning of a specific workspace by defining:
Providing a devfile.yaml file inside a Git source repository signals to OpenShift Dev Spaces to configure the project and runtime according to this file. |
OpenShift Dev Spaces is integrated into the Developer Sandbox and is available from the OpenShift Web Console using the apps button in the header bar.
Then Click 'Log in with OpenShift'
Then login with DevSandbox
When Dev Spaces starts, enter the following URL into the Git Repo URL field to load the devfile and click Create & Open
https://raw.githubusercontent.com/RedHat-EMEA-SSA-Team/end-to-end-developer-workshop/rhds/devfile.yaml
Now there are a couple of steps before we can get started. Firstly you need to Trust
the Git source you need to import for this workshop
Then you need to accept or select the Visual Studio Code UI Settings. You can just click Mark Done
to skip these.
Once completed, you will have a fully functional Browser-based IDE within the source code already imported.
Now you are ready to get started with the labs!
Sandbox Workshop Trouble Shooting Tips
We hope you have a good workshop, but here are a few tips and tricks that may make it run better.
What browser should I be using for this workshop?
The whole workshop runs in your browser environment which allows us to support a variety of developer platforms from Windows, Mac and Linux. We find the best browser for this workshop is Firefox, Chrome or Edge browser.
Workshop stops or freezes
Everything here is browser based so might have the odd glitch. The easiest resoltuion to a number of problems is just to refresh the browser, or worse case restart the browser. All you work is stored centrally on our servers so you should juts be able to re-attach to your workspace and continue.
Having problems seeing OpenShift Dev Spaces
Dev Spaces use secure web sockets for its UI. If you are having problems try this test web site https://websocketstest.com. All results should be green to proceed. If this test fails please check that you a direct access to the internet, i.e disable any VPNs web proxies etc. If you are using a corporate device you may need to switch to a personal computer.
I’ve been timed out or need to restart the workspace
The workshop will take a few hours to complete all the way through, if you use the system continuosly throughout that period you will not see this issue.
Timed-out and wont reconnect Workspaces idle after about 20 to minutes of non-use. Sometimes the workspace can be started with the in browser buttons, but if not close your Dev Spaces browser session and use the instruction on this page to Get Your Developer Workspace. Then Open your existing workspace rather than Creating a new one.
Re-login to the Red Hat Your authentication token will need to refresh for security so expect to have to login again. You will need you Sandbox credentials daily but they should be cached.
Re-login from Dev Spaces Dev Spaces can perform local tasks like builds, but usually needs to connect to your OpenShift project to deploy. If your deployment tasks fail chances are you need to re-login to Dev Spaces. Shutdown your Dev Spaces browser session and use the instruction on this page to Get Your Developer Workspace
My OpenShift pods have all gone to idle
If the Developer Sandbox is left for a long period (like overnight) your OpenShift project will idle down all its running pods. On the Topology display they will show up with white rings. Normally these rings would be dark blue if the pod is active. You need to select each Deployment or DeploymentConfig that you have created in turn by clicking on the circle, then on the pop-out, select the blue (D) or (DC) text. Then using the circle marked as Scaled to 0 increase the Pod count up to 1. The ring should turn blue after about 30 seconds.