Everyone is welcome, everyone can contribute, everyone is unique and these are your strengths too!

20. Kaeffchen: GitLab with Gitpod

General

Highlights

We explored the new GitPod environment embedded into the GitLab repository view next to the Web IDE.

Gitpod Integration in GitLab

Gitpod runs as a container workspace where you can:

  • Access Theia which is Gitpod’s IDE. VS Code uses the same.
  • Install extensions from the VS Code marketplace
  • Use cmd+shift+p to acces the configuration prompt
  • Access the shell to run CLI commands or inspect the environment.
  • Use Chrome’s More Tools > Create Shortcut and tick Open as window. This creates a new Chrome app on macOS.

Gitpod IDE

We’ve installed the GitLab Workflow. This needs a personal access token, which can be added with accessing the prompt (cmd+shift+p) and typing gitlab setup. This adds a menu item on the left side, and shows the CI status at the bottom. You can also inspect issues, MRs, etc.

Gitpod IDE GitLab Extension

Later on, David suggested to try Puppet’s PDK. We then installed the Puppet extension and figured that the PDK need to be installed into the workspace. At this point, we learned that Gitpod runs as container in a Kubernetes cluster and there’s no sudo here.

The documentation unveils that you can build your own workspace with providing a custom Docker image which gets defined in the same Git repository. Challenge accepted! The first attempt included using the default Gitpod Docker image for Ubuntu, and installing the PDK.

Gitpod stores all settings in a file called .gitpod.yml. Since the workspace is using the GitLab repository as clone, you can navigate in the IDE to git add, commit and push. Or you use the terminal CLI commands, or vim even.

.gitpod.yml

image:
  file: Dockerfile.gitpod

The Dockerfile may need to override USER, WORKDIR and ENTRYPOINT.

Dockerfile.gitpod

FROM puppet/pdk

USER root
WORKDIR /

ENTRYPOINT []

You can follow the progress and final result in this MR. We ended up with some path problems when creating a new Puppet class, a thing for another session.

Next week, we’ll explore more programming languages together with Gitpod. Rust is the top vote currently :)

Recording

Enjoy the session!

Bookmarks

Date published: September 30, 2020