- Prerequisites
- Configure the
remote_development
module in AP - Allow the AP for workspace use in the NG
- Grant workspace users necessary permissions
Tutorial: Set up the GitLab agent
In this tutorial, you’ll learn how to set up a cluster agent for remote development workspace.
The goal is to configure the workspace project (WP) with the agent project (AP), so that users in a root group (RG) or nested group (NG) can create and manage workspaces. For this use, we’ll use the group/project layout illustrated in the diagram below.
To set up the agent for the workspace project, you have to:
- Configure the
remote_development
module in the AP - Allow the AP for workspace use in the NG
- Grant workspace users necessary permissions
Prerequisites
- The workspace infrastructure must be set up.
- You must be an administrator or group owner.
Configure the remote_development
module in AP
- On the left sidebar, select Search or go to and find the AP.
- In the project, create a file
.gitlab/agents/{agentName}/config.yaml
(whereagentName
is the name of the agent created when setting up the workspace infrastructure). - In the
config.yaml
file, use the following configuration for workspace settings:
remote_development:
enabled: true
# reference only, please update to actual dns_zone to the load balancer exposed by the Ingress controller.
dns_zone: workspaces.localdev.me
Allow the AP for workspace use in the NG
When the agent has the remote_development
module configured, the next step is to allow the agent for workspace creation in a parent group of the workspace project.
With the current design, allowing the AP with either the NG or RG (any parent group of the WP), would both make the agent available for the WP. Why should we choose NG over RG?
Because any nested projects under the selected group can use the agent after configuration, so you must carefully consider the group where you allow an agent for workspaces.
To allow NG with AP:
- On the left sidebar, select Search or go to and find the NG group.
- On the left sidebar, select Settings > Workspaces.
- In the Group agents section, select the All agents tab.
- From the list of available agents, find the agent with status Blocked, and select Allow.
- On the confirmation dialog, select Allow agent.
Grant workspace users necessary permissions
One final step is to grant users, who would create and manage WP workspaces, necessary permissions.
To manage WP workspaces by using AP as the agent, users must have at least the Developer role for both AP and WP. For more information about user roles and how to add users to a project, or how to add users to a group.
You’re all set! WP is allowed with AP. Users with necessary permissions can go to the WP workspaces tab and create or manage workspaces as they like.