Configure GitLab
Use this guide to configure your file for use with ofc-bootstrap.
Edit
init.yaml
and setgitlab_instance:
to the public address of your GitLab instance.
Create an access token
You will need to create an access token with sudo
permissions and API access.
- Go to your Personal profile
- Click Access Tokens
- Create a token
- Name: OpenFaaS Cloud
- Scopes: You will be given an API token at this time and must enter it into init.yaml.
Create the system hook
This hook will publish events when there is a git push
into a repo.
- Go to your Admin area.
- Enter the URL
replacing
domain.com
with your domain - Do not enter a value for Secret Token at this time
Create an OAuth application
The OAuth application will be used for logging in to your dashboard.
- Click Admin Area then Applications
- Click New application
- Under Name enter "OpenFaaS Cloud for GitLab"
In Redirect URI enter ""
After creating your application you will get a client_id and client_secret.
Set your (Application Id) client_id in init.yaml
under: and client_id
Set your (Secret) client_secret in init.yaml
under: "of-client-secret"
.
Set oauth_provider_base_url
to https://gitlab.domain.com
, where this is the domain of your GitLab instance. Don't add a final slash to the URL.