Working with Gitlab
The DTaaS relies on Gitlab for two purposes.
- OAuth2 authorisation service
- DevOps service
The admin documentation covers the OAuth2 authorisation configuration. This guide covers the use of git commands and project structure for Gitlab DevOps service inside the DTaaS.
Preparation
The first step is to create a gitlab project with username in gitlab user group named dtaas.
This user needs to have ownership permissions over the project.
Git commands
The usual git commands and workflows should be used. There are two ways to use Gitlab project as a remote git server.
- Over SSH using personal SSH key
- Over HTTPS using personal access tokens (PAT)
This tutorial shows use of PAT for working with Gitlab server.
First step is to create PAT.
Copy this token and use it to clone the git repository.
Library Assets
The Gitlab is used to store the reusable Library assets of all users. There is a mandatory structure for storing and using Library assets including digital twins. A properly initialised gitlab project should have the following structure.
Please pay special attention to .gitlab-ci.yml
. It must be a valid
Gitlab DevOps configuration. You can also check
example repo for a sample structure.
For example, with PAT1
as PAT of
dtaas/user1
repository, the command to clone the repository is
Add the required Library assets and then
Next Steps
Remember to have a gitlab runner integrated with your project repository. There might already be some runners installed with your DTaaS application. You can check them on the runners page. In addition, you can install your own runners integrated into your repository.
Now, the Digital Twins Preview can be used to access the DevOps features of the DTaaS platform.