You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitLab runners are the components that execute the jobs defined in your GitLab CI/CD pipelines. They can be installed on various operating systems and can run jobs on different platforms. Runners can be configured to be specific to a project or shared across multiple projects.
15
-
With terraform Scaleway provider and GitLab one, runners can be dynamically created and destroyed.
16
+
With the Terraform Scaleway provider and GitLab one, runners can be dynamically created and destroyed.
16
17
17
18
<Requirements />
18
19
19
20
- A Scaleway account logged into the [console](https://console.scaleway.com)
20
21
-[Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
21
-
-[Created IAM API key](/iam/how-to/create-api-keys/)
22
+
-[Created an API key](/iam/how-to/create-api-keys/)
22
23
- A GitLab account and project
23
24
24
-
## Provision a GitLab runner on a Scaleway instance with terraform.
25
+
## Provision a GitLab runner on a Scaleway Instance with Terraform/OpenTofu.
25
26
26
27
### Gitlab setup
27
28
@@ -31,13 +32,13 @@ The following GitLab CI/CD needs 3 secret variables:
31
32
- SCW_ACCES_KEY
32
33
33
34
The `GITLAB_TOKEN` needs to be a GitLab personal access token with the **Owner** role, and `create_runner` scope.
34
-
Create the environment variables in your [project cicd settings](https://docs.gitlab.com/ci/variables/)
35
+
Create the environment variables in your [project CI/CD settings](https://docs.gitlab.com/ci/variables/)
35
36
36
-
### terraform setup
37
+
### Terraform/OpenTofu setup
37
38
38
-
Start by providing a basic Terraform setup:
39
+
Start by providing a basic Terraform/OpenTofu setup:
39
40
40
-
1. Create the`main.tf` file:
41
+
1. Create a`main.tf` file and paste the following content into it:
41
42
```hcl
42
43
//providers
43
44
terraform {
@@ -108,7 +109,7 @@ Start by providing a basic Terraform setup:
108
109
value=gitlab_user_runner.project_runner.id
109
110
}
110
111
```
111
-
2. Create the`var.tf` file:
112
+
2. Create a`var.tf` file and paste the following content into it:
112
113
```hcl
113
114
variable "project_id" {
114
115
type=string
@@ -117,7 +118,7 @@ Start by providing a basic Terraform setup:
117
118
118
119
variable "scw_org_id" {
119
120
type=string
120
-
description="Your scaleway organisation ID"
121
+
description="Your Scaleway Organization ID"
121
122
}
122
123
123
124
variable "secret_key" {
@@ -167,7 +168,7 @@ Start by providing a basic Terraform setup:
167
168
description="volume in Gb"
168
169
}
169
170
```
170
-
3. Create the`cloud-init.yml` file:
171
+
3. Create a`cloud-init.yml` file and paste the following content into it:
171
172
```yml
172
173
#cloud-config
173
174
package_update: true
@@ -192,7 +193,7 @@ Start by providing a basic Terraform setup:
192
193
193
194
### Gitlab setup
194
195
195
-
1. Create the .gitlab-ci.yml:
196
+
1. Create the `.gitlab-ci.yml` configuration file:
196
197
```yml
197
198
stages:
198
199
- provision
@@ -203,7 +204,7 @@ Start by providing a basic Terraform setup:
@@ -299,7 +300,7 @@ Start by providing a basic Terraform setup:
299
300
```
300
301
301
302
With this setup, GitLab-CI/CD creates an Instance and registers it as a GitLab runner, runs the workload on the Instance, then deletes the Instance and the runner.
302
-
This setup allows you to dynamically provide high-computation runners in a cost-effective way. You can also customize the cloudinit to fit your business needs, such as connecting to your company's VPN.
303
+
This setup allows you to dynamically provide high-computation runners in a cost-effective way. You can also customize the cloud-init to fit your business needs, such as connecting to your company's VPN.
0 commit comments