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
|`cloud`| string | Name of the cloud config from clouds.yaml to use |
14
+
|`clouds_config`| string | Optional. Path to clouds.yaml |
15
+
|`name`| string | Name of the Auto Scaling Group |
16
+
|`boot_time`| string | Optional. Maximum wait time for instance to boot up. During that time plugin check Cloud-Init signatures. |
17
+
|`server_spec`| object | Server spec used to create instances. See: [Compute API](https://docs.openstack.org/api-ref/compute/#create-server)|
22
18
23
19
### Default connector config
24
20
25
-
| Parameter | Default |
26
-
|--------------------------|----------|
27
-
|`os`|`linux`|
28
-
|`protocol`|`ssh`|
29
-
|`username`|`unset`|
30
-
|`use_static_credentials`|`true`|
21
+
| Parameter | Default |
22
+
| ------------------------ | ------- |
23
+
|`os`|`linux`|
24
+
|`protocol`|`ssh`|
25
+
|`username`|`unset`|
26
+
|`use_static_credentials`|`true`|
27
+
28
+
### SSH Key Authentication
29
+
30
+
The plugin supports two methods for SSH key authentication:
31
+
32
+
1.**OpenStack Keypairs (Traditional)**: Pre-register SSH keys in OpenStack and reference them via `key_name` in `server_spec`
33
+
2.**Cloud-Init User Data**: Embed SSH public keys directly in the instance's user data using cloud-init's `ssh_authorized_keys`
34
+
35
+
When using SSH keys via user data:
31
36
37
+
- Set `use_static_credentials = false` in `connector_config`
38
+
- Provide `key_path` pointing to your private key file
39
+
- Do NOT specify `key_name` in `server_spec`
40
+
- Add your public key to `user_data` using cloud-init's `ssh_authorized_keys` directive
32
41
33
-
OpenStack setup
34
-
---------------
42
+
See `example_config_userdata_ssh.toml` for a complete example.
43
+
44
+
## OpenStack setup
35
45
36
46
1. You should create a special user (recommended) and project (optional),
37
47
then export clouds.yaml with credentials for that cloud.
@@ -43,12 +53,14 @@ OpenStack setup
43
53
3. You should upload a special image with gitlab-runner and container runtime installed in it.
44
54
For example we use [Fedora 38 with Podman](https://mirror.sardinasystems.com/images/Fedora-Cloud-Gitlab-Runner-38-1.6.x86_64.qcow2).
45
55
46
-
4. You should generate SSH keypair which will be used my manager instance to connect to workers.
47
-
Public key must be added to Nova from the user.
56
+
4.**SSH Key Setup (Choose one method)**:
57
+
-**Method A (Cloud-Init)**: Generate an SSH keypair for the manager instance. The public key will be embedded in user data via cloud-init's `ssh_authorized_keys`. No OpenStack keypair registration needed.
58
+
-**Method B (OpenStack Keypairs)**: Generate an SSH keypair and register the public key in Nova/OpenStack, then reference it via `key_name` in the server spec.
59
+
60
+
## Example runner config
48
61
62
+
### Example 1: Using OpenStack Keypairs (Traditional)
49
63
50
-
Example runner config
51
-
---------------------
52
64
```
53
65
concurrent = 16
54
66
check_interval = 0
@@ -138,3 +150,13 @@ idle_time = "30m0s"
138
150
scale_factor = 0.0
139
151
scale_factor_limit = 0
140
152
```
153
+
154
+
### Example 2: Using SSH Keys via Cloud-Init User Data
155
+
156
+
See [`example_config_userdata_ssh.toml`](./example_config_userdata_ssh.toml) for a complete example that embeds SSH public keys in user data without requiring OpenStack keypair registration.
0 commit comments