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
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ The following driver parameters are common to both instance types, but are not r
50
50
-`oci_profile_name`, OCI profile to use (default: `DEFAULT`)
51
51
-`oci_config`, Hash of additional `OCI::Config` settings. Allows you to test without an oci config file [[more](#use-without-oci-config-file)]
52
52
-`ssh_keypath`, SSH public key (default: `~/.ssh/id_rsa.pub`)
53
+
-`ssh_keygen`, Automatically generate the rsa key pair for an instance (default: `false`) [[more](#ssh-keygen)]
53
54
-`post_create_script`, run a script on an instance after deployment
54
55
-`post_create_reboot`, reboot the instance after instance creation (default: `false`)
55
56
-`proxy_url`, Connect via the specified proxy URL [[more](#proxy-support)]
@@ -274,6 +275,26 @@ Alternately, if you simply pass a string to the user_data, it will be base64 enc
274
275
gid: 1000
275
276
```
276
277
278
+
## SSH Keygen
279
+
280
+
The driver can generate an ssh key pair for an instance during creation. In order to turn this feature on, add the `ssh_keygen` property to the `driver` and set the value to `true`. This can be set in the `driver` section on a
281
+
per-platform or per-suite basis, but can also be enabled globally for the entire kitchen.yml in the top-level `driver` section.
282
+
283
+
Ensure that the `transport` section does not contain a path to a private key (the `ssh_key` property). If the `transport` has a value in `ssh_key` property, this will mismatch with the key pair that the driver will create causing your
284
+
instance creation to be stuck in an endless loop waiting for `transport` to receive a confirmed ssh connection.
285
+
286
+
The generated key pair is stored in the `.kitchen/.ssh` directory and is named for the instance that generated it so each instance in your `kitchen.yml` can have its own key pair.
287
+
288
+
Upon instance termination (`kitchen destroy`), the generated key pair will be removed from the `.kitchen/.ssh` directory along with the state file as should be expected.
289
+
290
+
```yml
291
+
driver:
292
+
ssh_keygen: true
293
+
294
+
transport:
295
+
username: opc
296
+
```
297
+
277
298
## Proxy support
278
299
279
300
If running Kitchen on a private subnet with no public IPs permitted, it may be necessary to connect to the OCI API via a web proxy. The proxy URL can either be specified on the command line:
0 commit comments