Prepare DevSpaces

This chapter only applies if you choose DevSpaces as the IDE to use throughout this guide.

Red Hat Dev Spaces workspaces are by definition already logged in, this means that if you run oc whoami in a terminal window you will get %USERNAME%.

But if for whatever reason the security token expires then running the same command would give us something like:

$ oc whoami
system:serviceaccount:%USERNAME%-devspaces:workspace2e2d939ada0d4cec-sa

Should this happened to you, please restart the workspace, the token will be there once it is up and running.

Create Workspace

If you’re running the guide in a laptop, you don’t need to do this.

Please copy and paste the following link and open it in a browser. It will take you to a Red Hat DevSpaces deployment in the OpenShift cluster you’re interacting with in this lab. Use this credentials to log in and click on Allow selected permissions.

  • Username: %USERNAME%

  • Password: %PASSWORD%

https://devspaces.apps.%BASE_SUBDOMAIN%/#/https://repository-gitea-system.apps.%BASE_SUBDOMAIN%/%USERNAME%/kitchensink/raw/main/devfile.yaml

After some seconds you will see that the devfile has been loaded and that your workspace is been created.

Creation

After a minute or two you’ll have the workspaces prepared and you’ll be prompted to answer this question: Do you trust the authors of the files in this folder?. Click on Yes, I trust the authors…​.

Question

Opening a Terminal Window

Go to the hamburger menu on the left, hover on Terminal then on New Terminal and click. As in this picture.

New Terminal

Allow Paste From Clipboard

Should you be prompted to give/deny the paste permission as in the next picture while trying to paste commands in a DevSpaces terminal window, please allow it.

Allow Paste Permission