Tired of starting online tutorials only to realize they don't work on your machine? We've integrated Gitpod into our Confluent Developer courses to streamline your learning experience. See how it works in this short introduction video.
Staff Software Practice Lead
Tired of starting online tutorials only to realize they don't work on your machine? We've integrated Gitpod into our Confluent Developer courses to streamline your learning experience. See how it works in this short introduction video.
Gitpod is a platform for automatically provisioning ready to code environments.
At Confluent, we've started to introduce Gitpod into our educational materials to
take the guesswork out of getting ready to code.
Under normal circumstances, we can't know what your environment looks like.
Do you have the right tools installed?
Are they the right versions of those tools?
Is there other software installed that might create conflicts?
All of these variables can result in a development environment that
is unique to your machine and may be incompatible with our instructions.
I'm sure you've heard the works on my machine excuse before. Let
me know in the comments if you have and what the situation was.
Well, by providing a gitpod environment, we hope to eliminate that problem.
Every gitpod machine should be identical based on the configuration we provide.
This means that when you boot up a gitpod environment,
you can assume that it will be the same as what the instructor used when preparing the course.
It also means that you can keep your local environment
pristine rather than having to install additional software you may not need.
However, you are always welcome to use a local environment if you prefer.
Think of Gitpod as an alternative to local development if you want to use it.
It's worth mentioning that Gitpod places limitations on free users.
For our educational materials, the basic free usage should be more than enough,
but if you plan to use Gitpod for other purposes or if you are consuming a lot of our content,
you may need to pay for additional usage or wait for your free usage to reset.
And of course, you can always fall back to
local development If you find yourself unable to use Gitpod.
Creating a Gitpod Account
So let's take a quick look at Gitpod and how to use it with our materials.
The first step is to create an account with Gitpod.
If we navigate to gitpod.io, we're presented with a login screen.
Gitpod can use your credentials for Github,
GitLab and Bitbucket to log in, so select whichever one you prefer.
I'm going to select GitHub and log in with my GitHub credentials.
Confluent generally hosts content on GitHub so it makes sense to start there.
The first time you log in you will be asked some questions.
Answer those as you see fit.
Now that I'm logged in, I'm presented with an option to create a new workspace.
Creating a Gitpod Workspace
Feel free to try this out if you want, but I'm going to come at this from a different direction.
Let's visit one of the courses on Confluent Developer.
I've chosen a Flink course, but you are welcome to try out other materials.
For the most part, the process will be similar,
although the content that you see will be different.
Check out the links in the video description for content that uses Gitpod.
The Flink course I've chosen has an exercise where the user is asked to set up an environment.
There are two options: Local Development and Gitpod Development.
Since we are looking at gitpod,
I will skip the Local Development and hit the Open in Gitpod button.
This launches a new tab with the option to configure an environment.
We probably don't need to change anything here.
We want to use the specified URL with a VS code editor and a standard machine.
Once we are happy with the settings, we can continue.
If this is your first time setting up a gitpod environment,
you may be prompted for some additional information, including security validation.
This helps Gitpod prevent misuse of their platform.
Inside the Gitpod Workspace
Eventually, we're taken into a web based version of VS Code where we
can explore the repo, write code and interact with the environment.
So let's take a look.
In the center of the page is a welcome screen and potentially
some other notifications that can be dismissed.
For this project, there is also a simple web browser that currently shows an error.
We'll keep that one.
It will be updated later.
Exploring and Editing Files in Gitpod
On the left, we can see the file Explorer.
Here, we can explore any of the files that exist
in the git repository that was used to create the environment.
We can also use the interface to create new files.
If we click on a file, it opens to the right where we
will be able to view and modify it as necessary.
For many file types, we'll be able to benefit from features such as code highlighting and completion.
Below that, in the center, is a terminal window where we can enter commands and
Running Terminal Commands in Gitpod
to the right of the terminal window is a list of additional terminals.
Some courses like this one require executing multiple commands at the same time.
We can select the different terminals from the list and enter the commands as required.
Notice there is one terminal named Gitpod Task 1: bash.
This terminal is currently executing some commands.
When we enter the gitpod environment, it may
continue to execute installation commands in the background.
This means that the environment may not be fully configured just yet and we may need to wait.
In this case, those commands are installing Flink and setting it up on the virtual machine.
Once they finish, the web browser above will update to show the running Flink console.
The other thing we should take a look at is the gitpod.yml file.
The gitpod.yml File
All Gitpod enabled repositories will have a YAML file that is used to configure the environment.
It describes what image to use when setting up the
environment as well as any special commands that need to be executed.
We won't go into detail on how this file works because for the most part you won't need to care.
You should be able to interact with the
educational material without ever looking at this file.
However, if you want to dig into how the environment is being configured,
this is where you would start.
Closing
I hope you enjoyed this very quick introduction to Gitpod.
If you want to try it out for real, check out the links in the video
description for access to Confluent Developer materials that use Gitpod.
Don't forget to clean up your environments once you're done with them.
If you enjoyed this video, don't forget to like, share and subscribe.
And thanks for watching.