Integrations and Connected Services
Renku uses integrations so that users can easily gain access to resources from third party sources. Currently, these are limited to code repositories. But work is underway to expand this to container registries and different compute platforms such as HPC clusters. All of these integrations or connected services are just OAuth2 clients to 3rd party services or applications.
Therefore, for every integration there are 2 steps:
- Creating the client at the 3rd party application (e.g. at Gitlab.com).
- Adding the client configuration in Renku from the admin console.
You need to be a Renku administrator in order to add integrations. You can assign the administrator role by following the steps here.
Creating Integrations
Currently, we support only a few integrations. The steps to create and register the clients for each are described below.
Gitlab
This can be used with Gitlab.com or with any other Gitlab deployment. You can also
register more than one client of the "Gitlab" kind.
Create the client in Gitlab
- Navigate to your Gitlab deployment and log in. You may create the application
as an admin or even as a regular user as long as your specific Gitlab deployment
allows this.
info
Some Gitlab deployments have the option to create applications disabled. If this is the case you have to request this setting to be changed by the administrators of your Gitlab deployment.
- Click on your profile picture in Gitlab and then navigate to
Preferences. - Click on
Applications. - Click
Add new application. - Write a descriptive name for the application
- Specify the redirect URL based the base URL of your Renku deployment
like
https://<server-name>/api/data/oauth2/callback. For example, if your Renku deployment is athttps://renkulab.iothen the callback will behttps://renkulab.io/api/data/oauth2/callback. - Use the following scopes:
read_apiread_repositorywrite_repositoryread_registry
- Save the client ID and secret that were generated once you created the application. These will be needed in the steps to follow below.
From this point on you need to navigate to your Renku deployment and log in as an administrator. You can follow the steps below to finish adding the integration.
Create the integration in Renku
- Log into Renku and navigate to the admin panel.
- Come up with an identifier for the integration and fill that in the
Idfield. Some people use the domain of the Gitlab deployment as theId. - Select
Gitlabin theKindfield dropdown menu. - You can skip the
Application slugfield and leave it blank. - Provide a concise but clear descriptive name that your users can understand for the
Display Namefield. - Specify the base URL for the Gitlab deployment, for example
https://gitlab.com. - Specify the client ID and secret that you received when you created the application in the
Gitlab pages for the corresponding
Client IDandClient Secretfields. - Specify the same scopes in the
Scopefield that you requested when you created the application in the Gitlab pages in the steps above. List these separated by spaces like:
read_api read_repository write_repository read_registry
GitHub.com
GitHub allows for two ways to integrate it. Renku uses GitHub Apps
for accessing code repositories. It requires an OAuth App for
accessing private images at ghcr.io.
Therefore, two integrations for GitHub are necessary in
Renku. It is important, that the GitHub App - the one accessing code
repositories has an empty image_registry_url setting. For the
OAuth App however, a image_registry_url (which is
https://ghcr.io for github.com) is required.
Create the client in GitHub
This creates a GitHub App for accessing code repositories.
- Navigate to
https://github.com. - You can create the Renku client as part of your own profile or an organization.
It is more maintainable if you create the client as part of an organization rather than
as an individual user.
- To create the client in an organization, navigate to the settings
page for the organization and then to
GitHub Apps->New GitHubApp. - To create the client as part of a specific user, navigate to your profile settings page
then to
Developer settings->GitHub Apps->New GitHub App.
- To create the client in an organization, navigate to the settings
page for the organization and then to
- You should now see the form for adding the application.
- Name the GitHub application. GitHub will derive a slug from this name that you will need when you register the integration in Renku.
- Fill in the description which will be displayed to users when they connect the integration and are asked to log into GitHub.
- For the
Homepage URLuse the URL of your Renku deployment. - The
Callback URLis based on the URL of your Renku deployment likehttps://<server-name>/api/data/oauth2/callback. For example, if your Renku deployment is athttps://renkulab.iothen theCallback URLwill behttps://renkulab.io/api/data/oauth2/callback. - Under the
Webhooksection uncheck theActivecheckbox. - In the
Permissionssection select the following permissions:Repository permissions->Contents->Read and writeRepository permissions->Packages->Read-only
- For the question at the bottom asking
Where can this GitHub App be installedselectAny account. - Click
Create GitHub App - The URL where your browser page gets redirected to once you have created the app
will contain the slug of the application. Save this version of the name because you will need it
in the
Application slugfield in the Renku forms to add the integration. The url is different based on whether you are creating the application at the user or organization level.- Organization:
https://github.com/organizations/<organization>/settings/apps/<application-slug> - User:
https://github.com/settings/apps/<application-slug>
- Organization:
- You will need to request a client secret to be created, one does not get created automatically.
You can do this by clicking the
Generate a new client secretbutton once you have created the application. - Save the
Client IDand client secret because you will need them in the steps to follow.
Creating OAuth App client in GitHub
This is very similar to the above.
- Go to
Developer settings->OAuth Apps->New OAuth App. - You should now see the form for adding the application.
- Name the application. GitHub will derive a slug from this name that you will need when you register the integration in Renku.
- Fill in the description which will be displayed to users when they connect the integration and are asked to log into GitHub.
- For the
Homepage URLuse the URL of your Renku deployment. - The
Callback URLis based on the URL of your Renku deployment likehttps://<server-name>/api/data/oauth2/callback. For example, if your Renku deployment is athttps://renkulab.iothen theCallback URLwill behttps://renkulab.io/api/data/oauth2/callback. Device Flowis not necessary, it can be left disabled.- Register the application
Once registered, complete the process by generating a new client secret. Copy the client secret and client id somewhere, it is required to specify when creating the Renku integration.
Create the integration in Renku
- Log into Renku and navigate to the admin panel.
- Come up with an identifier for the integration and fill that in the
Idfield. Some people use the domain of the external service as theId. For example in this casegithub.com. - Select
GitHubin theKindfield dropdown menu. - Fill in the
Application slugfield, this is required for GitHub providers. There are instructions in the steps above on how to find the application slug. - Provide a concise but clear descriptive name that your users can understand for the
Display Namefield. - Specify the base URL for GitHub (i.e.
https://github.com) in theURLfield. - Specify the client ID and secret that you received when you created the application in the
GitHub pages for the corresponding
Client IDandClient Secretfields. - Only for an OAuth App: fill in the
Image Registry Url. Forgithub.comit ishttps://ghcr.io. LeaveImage Registry Urlempty when adding an integration for a GitHub App.
This needs to be done twice: once for a GitHub App (for accessing code repositories) and once for the OAuth App (for accessing images).
Enterprise GitHub
The steps for enterprise GitHub are almost identical to the steps for GitHub.com.
The main difference is that when you register the integration in Renku in the URL field you should provide
the specific URL for your GitHub deployment which is different from https://github.com.
Testing Integrations
After you have created an integration, you should test it to ensure that it is functioning properly. It is very easy to have a typo in some of the configurations which will cause the integration to not work.
Here are the steps needed to test an integration you have just added:
- Navigate to the
Integrationspage by logging in, clicking on your profile in the top right corner and selectingIntegrationsfrom the menu. - Find the integration you just added and click the
Connectbutton. - Fully complete the login flow by logging into the 3rd party service (i.e. Gitlab.com).
Once the login flow is complete you will redirected back to Renku and the integration should
have a status that reads
ConnectednoteIf you do not have an account at the 3rd party service, then either create one or ask one of the Renku users that has an account to test the integration.
- Try to access the resources from the 3rd party service in a session. For example for code repositories, try to add a repository to a project and check that you can both pull and push to the repository.