GDK can be used with Gitpod using the GitLab Gitpod integration.
The main advantage of running the GDK in Gitpod is that you don't have to worry about your local environment, installing dependencies, and keeping them up to date. With Gitpod, you can run a pre-configured GDK instance in the cloud, which also makes it possible to contribute, no matter how powerful your machine is. You could even just use an iPad!
If you are a GitLab team member, either:
- Open this link.
- Click the Gitpod button in the GitLab repository. This might require you to enable the Gitpod integration in your user settings.
If you are a community contributor:
- Fork the GitLab repository,
- Click the Gitpod button in the repository view of your fork.
Hint: If you don't see a "Gitpod" button, open the dropdown of the "Web IDE" split button.
If you have never used Gitpod before, you must:
- Create a new Gitpod account.
- Connect the Gitpod account to your GitLab account.
After that is done, you just wait 7-8 minutes for the entire setup to finish, and you see the GDK UI pop up in the right sidebar. If you see 504 Gateway Time-out error, click the reload button in the right side bar.
Sign in to GitLab using the default username root and password 5iveL!fe. You must
immediately change that password after you log in the first time. Every new Gitpod workspace
requires you to change the password again. Now you are ready to make or review changes.
If you have questions about the UI or if you are curious have a look at:
The following are common tasks for using GDK in Gitpod.
The easiest way to switch to another branch is to use the UI functionality:
-
Click on the current branch name in the blue bottom bar.
-
A context menu appears with a list of other branches where you can type in the name of the branch you want to switch to and select it as soon as it appears in the list.
Alternatively, you can also use the terminal to check out a branch:
git fetch origin
git checkout -b "BRANCH_NAME" "origin/BRANCH_NAME"If you have made changes to any of the files and want to push and commit them:
-
Navigate to the Source Control: Git tab in the left sidebar. There you also see all files that have been changed.
-
In this view, you can then decide which changes you want to add to the commit. Usually that would be all files, so you can just stage all changes by clicking on the "Plus" icon that appears on hover next to the Changes section.
-
When that's done and you have also entered a commit message in the text area above, you can commit by clicking the checkmark icon at the top of the Source Control section.
-
Push your changes by using the Synchronize changes action in the bottom blue toolbar. If the Gitpod UI asks you which way you want to synchronize your changes, you can just choose Push and pull.
With Gitpod, the default configuration of the GDK is ready for you in just a couple of minutes, and we are actively working on making sure that as many features work out of the box. However, right now you still have to complete a couple of steps to enable advanced features.
- On the top bar, select Menu > Admin in the GitLab UI running in GDK.
- On the left sidebar, select Overview > Runners.
- Ensure that you're using the 3000 port and that it's set to public. You can change the port from private to public by going to the Remote Explorer tab in Gitpod UI and selecting the lock icon next to the port name.
- From the Register an instance runner dropdown, select Show runner installation and registration instructions.
- Copy the Command to register runner.
- In the terminal, switch to the GDK directory
cd /workspace/gitlab-development-kit - Run the copied command with the following added to the end
--run-untagged --config /workspace/gitlab-development-kit/gitlab-runner-config.toml --non-interactive --executor shell. - Run
gitlab-runner run --config /workspace/gitlab-development-kit/gitlab-runner-config.toml.
Your runner is ready to pick up jobs for you! If you create a new project, the Pages/Plain HTML template contains a super simple and tiny pipeline that's great to use to verify whether the runner is actually working.
To enable feature flags:
- Run
cd ../gitlab && ./bin/rails console. - Wait about 1 minute until you see the message that the development environment has been loaded.
- Run
Feature.enable(:feature_flag), replacingfeature_flagwith the name of the feature flag you want to enable. - Leave the console by typing
exitand hitting Enter.
- Open a Rails console.
- Run
ApplicationSetting.first.update(check_namespace_plan: true).
The billing page is now accessible at Group > Settings > Billing.
Use the instructions in the customers-gitlab-com project.
To use Advanced Search, you must:
- Have a premium or higher license registered in the GDK.
- Enable Elasticsearch.
To enable Elasticsearch:
-
From the command line, navigate to
/workspace/gitlab-development-kitand opengdk.ymlfor editing by usingcd /workspace/gitlab-development-kit && gp open gdk.yml. The file might be empty. -
Add the following lines and save the file:
elasticsearch: enabled: true
-
Run
gdk reconfigure. -
Run
gdk start elasticsearch.
For information on enabling higher GitLab tiers in GDK to test out features, learn more about how to activate GitLab EE with a license file or key.
By default GDK runs as self-managed, but can be switched to run as the SaaS version. For more information, see Act as SaaS.
In the terminal, switch to the GDK:bash tab and run the following:
gdk stop
export GITLAB_SIMULATE_SAAS=1
gdk startThere are two Gitpod GDK Docker images that can be built:
registry.gitlab.com/gitlab-org/gitlab-development-kit/gitpod-workspace:mainregistry.gitlab.com/gitlab-org/gitlab-development-kit/gitpod-workspace:stable
We automatically build a new Gitpod GDK Docker image every day that's tagged as
registry.gitlab.com/gitlab-org/gitlab-development-kit/gitpod-workspace:main.
The main tag is used because that's the name of the default Git branch for
the GDK.
When running Gitpod for GitLab, it uses the
registry.gitlab.com/gitlab-org/gitlab-development-kit/gitpod-workspace:stable
Docker image which uses the stable tag.
- Visit the GitPod Image Integration test MR which utilizes the
mainGDK Gitpod image. - Rebase the GitPod Image Integration test MR using the
/rebasequick action. - Once rebased, launch a new Gitpod instance by visiting the GitPod Image Integration test Git branch and select the Gitpod button.
- Run some manual tests (manual login,
gdk update, maybe some manual test runs of jest / RSpec). - Once everything looks good, visit GDK's scheduled CI pipelines and locate the last successful pipeline ID for the
Rebuild Gitpod workspace imagejob. - Create a new comment on GitPod Image Integration test MR detailing you checked the GDK Gitpod
mainimage created via the pipeline ID located in step 5. - Using the pipeline located in step 5., promote the GDK Gitpod
mainimage tostableby selecting Run on the manualdeploy-gitpod-workspace-imagejob once it is available.





