Installation
This page will help you install Port's GitLab integration (powered by the Ocean framework).
This page outlines the following steps:
- How to create a GitLab group access token to give the integration permissions to query your GitLab account.
- How to configure and customize the integration before deploying it.
- How to deploy the integration in the configuration that fits your use case.
- A gitlab account with admin privileges.
- A gitlab group account with the
api
scope. - If you choose the real time & always on installation method - a kubernetes cluster to install the integration on.
- Your Port user role is set to
Admin
.
Creating a GitLab group access tokenβ
A group access token can be used for the group it was generated at, as well as for all sub-groups underneath it.
The GitLab integration is able to query multiple GitLab root groups. To do so, it will require multiple group access tokens, each at the correct root group.
GitLab group access tokens example
For example, let's assume the following GitLab account structure:
GitLab account
.
βββ microservices-group
βΒ Β βββmicroservice1-group
βΒ Β βββmicroservice2-group
βββ apis-group
βΒ Β βββ rest-api-group
βΒ Β βββ graphql-api-group
In this example:
- To map only the
microservices-group
, we require one group access token - one for themicroservices-group
. - To map the
microservices-group
and all of its subgroups, we require only one group access token - one for themicroservices-group
. - To map the
microservices-group
, theapis-group
and all of their subgroups, we require only two group access tokens - one for themicroservices-group
and one for theapis-group
. - To map the
microservice1-group
, we have 2 options:- Create a group access token for the
microservices-group
and use the token mapping to select just themicroservice1-group
. - Create a group access token for the
microservice1-group
directly.
- Create a group access token for the
See the token mapping section for more information.
The following steps will guide you how to create a GitLab group access token.
-
Sign in to GitLab and go to your desired group's settings page:
-
In the "Access Tokens" section, you need to provide the token details, including the name and an optional expiration date. Additionally, select the api scope, and then proceed to click on the "Create access token" button.
-
Click "Create group access token".
-
Copy the generated token and use it when deploying the integration in the following steps.