Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put examples at the bottom and cleanup markdown #1854

Merged
merged 1 commit into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
106 changes: 53 additions & 53 deletions docs/content/docs/drivers/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,6 @@ menu:

kitchen-ec2 is a Test Kitchen *driver* for EC2 in Amazon AWS.

Example **kitchen.yml**:

```yaml
---
driver:
name: ec2
aws_ssh_key_id: id_rsa-aws
security_group_ids: ["sg-1a2b3c4d"]
region: us-west-2
availability_zone: b
subnet_id: subnet-6e5d4c3b
iam_profile_name: chef-client
instance_type: m3.medium
associate_public_ip: true
interface: dns

provisioner:
name: chef_infra

verifier:
name: inspec

transport:
ssh_key: /path/to/id_rsa-aws
connection_timeout: 10
connection_retries: 5
username: ubuntu

platforms:
- name: ubuntu-16.04
- name: centos-6.9
- name: centos-7
driver:
image_id: ami-c7d092f7
block_device_mappings:
- device_name: /dev/sdb
ebs:
volume_type: gp2
virtual_name: test
volume_size: 8
delete_on_termination: true
transport:
username: centos
- name: windows-2012r2
- name: windows-2016

suites:
- name: default
run_list:
- recipe[my_cookbook::default]
attributes:
```

### Setting Driver Configuration

The Amazon AWS driver for Test Kitchen includes many configuration options that can be set globally in the driver section of your kitchen.yml config file or within each platform configuration. Global settings apply to all platforms in the `kitchen.yml`, while platform level driver configuration is applied to only those platforms and override globally set configuration options. Even if you use platform level configuration options, it's a good idea to specify the driver you use to use globally.
Expand Down Expand Up @@ -481,3 +428,56 @@ If the `Private DNS Name` is preferred over the private IP, it must be specified
driver:
interface: private_dns
```

### Example **kitchen.yml**

```yaml
---
driver:
name: ec2
aws_ssh_key_id: id_rsa-aws
security_group_ids: ["sg-1a2b3c4d"]
region: us-west-2
availability_zone: b
subnet_id: subnet-6e5d4c3b
iam_profile_name: chef-client
instance_type: m3.medium
associate_public_ip: true
interface: dns

provisioner:
name: chef_infra

verifier:
name: inspec

transport:
ssh_key: /path/to/id_rsa-aws
connection_timeout: 10
connection_retries: 5
username: ubuntu

platforms:
- name: ubuntu-16.04
- name: centos-6.9
- name: centos-7
driver:
image_id: ami-c7d092f7
block_device_mappings:
- device_name: /dev/sdb
ebs:
volume_type: gp2
virtual_name: test
volume_size: 8
delete_on_termination: true
transport:
username: centos
- name: windows-2012r2
- name: windows-2016

suites:
- name: default
run_list:
- recipe[my_cookbook::default]
attributes:
```
64 changes: 32 additions & 32 deletions docs/content/docs/drivers/azurerm.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,6 @@ menu:

kitchen-azurerm is a Test Kitchen *driver* for Microsoft Azure.

### Example **kitchen.yml**

```yaml
---
driver:
name: azurerm
subscription_id: '4801fa9d-YOUR-GUID-HERE-b265ff49ce21'
location: 'West Europe'
machine_size: 'Standard_D2_V2'

provisioner:
name: chef_infra

verifier:
name: inspec

platforms:
- name: windows2016
driver:
image_urn: MicrosoftWindowsServer:WindowsServer:2016-Datacenter:latest
transport:
name: winrm
elevated: true

suites:
- name: default
run_list:
- recipe[my_cookbook::default]
attributes:
```

### Setting Driver Configuration

The Microsoft Azure driver for Test Kitchen includes many configuration options that can be set globally in the driver section of your kitchen.yml config file or within each platform configuration. Global settings apply to all platforms in the `kitchen.yml`, while platform level driver configuration is applied to only those platforms and override globally set configuration options. Even if you use platform level configuration options, it's a good idea to specify the driver you use to use globally.
Expand Down Expand Up @@ -330,4 +299,35 @@ identities.
#### use_fqdn_hostname

* _boolean_ : When true, Kitchen will use the FQDN that is assigned to the Virtual Machine. When false, kitchen will use the public IP address of the machine. This may overcome issues with Corporate firewalls or VPNs blocking Public IP addresses.
* Default Value: `false`
* Default Value: `false`

### Example **kitchen.yml**

```yaml
---
driver:
name: azurerm
subscription_id: '4801fa9d-YOUR-GUID-HERE-b265ff49ce21'
location: 'West Europe'
machine_size: 'Standard_D2_V2'

provisioner:
name: chef_infra

verifier:
name: inspec

platforms:
- name: windows2016
driver:
image_urn: MicrosoftWindowsServer:WindowsServer:2016-Datacenter:latest
transport:
name: winrm
elevated: true

suites:
- name: default
run_list:
- recipe[my_cookbook::default]
attributes:
```
66 changes: 33 additions & 33 deletions docs/content/docs/drivers/digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,6 @@ menu:

kitchen-digitalocean is a Test Kitchen *driver* for DigitalOcean that runs against the DigitalOcean V2 API.

### Example **kitchen.yml**

```yaml
---
driver:
name: digitalocean

provisioner:
name: chef_infra

verifier:
name: inspec

platforms:
- name: ubuntu-20
- name: ubuntu-18
region: sfo1
driver:
tags:
- test-kitchen-instance
monitoring: true # disabled by default
vpcs:
- 3a92ae2d-f1b7-4589-81b8-8ef144374453
ipv6: true # disabled by default
private_networking: false # enabled by default

suites:
- name: default
run_list:
- recipe[my_cookbook::default]
attributes:
```

### Setting Driver Configuration

The DigitalOcean driver for Test Kitchen includes many configuration options that can be set globally in the driver section of your kitchen.yml config file or within each platform configuration. Global settings apply to all platforms in the `kitchen.yml`, while platform level driver configuration is applied to only those platforms and override globally set configuration options. Even if you use platform level configuration options, it's a good idea to specify the driver you use to use globally.
Expand Down Expand Up @@ -252,3 +219,36 @@ Note that your `vpc_uuid` must be the numeric ids of your vpc. To get the numeri
```bash
curl -X GET https://api.digitalocean.com/v2/vpcs -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN"
```

### Example **kitchen.yml**

```yaml
---
driver:
name: digitalocean

provisioner:
name: chef_infra

verifier:
name: inspec

platforms:
- name: ubuntu-20
- name: ubuntu-18
region: sfo1
driver:
tags:
- test-kitchen-instance
monitoring: true # disabled by default
vpcs:
- 3a92ae2d-f1b7-4589-81b8-8ef144374453
ipv6: true # disabled by default
private_networking: false # enabled by default

suites:
- name: default
run_list:
- recipe[my_cookbook::default]
attributes:
```
78 changes: 39 additions & 39 deletions docs/content/docs/drivers/dokken.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,6 @@ kitchen-dokken is a Test Kitchen *plugin* for Docker that uses specially created

Unlike all other Test Kitchen drivers, kitchen-dokken handles all the tasks of the driver, transport, and provisioner itself. This approach focuses purely on Chef Infra cookbook testing to provide ultra-fast testing times. Docker containers have a fast creation and start time, and kitchen-dokken uses the official Chef Infra Client containers instead of spending the time to download and install the Chef Infra Client packages. These design decisions result in tests that run in seconds instead of minutes and don't require high bandwidth Internet connections.

### Example **kitchen.yml**

```yaml
---
driver:
name: dokken
privileged: true # allows systemd services to start

provisioner:
name: dokken

transport:
name: dokken

verifier:
name: inspec

platforms:
- name: ubuntu-20.04
driver:
image: dokken/ubuntu-20.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: centos-8
driver:
image: dokken/centos-8
pid_one_command: /usr/lib/systemd/systemd

suites:
- name: default
run_list:
- recipe[my_cookbook::default]
verifier:
inspec_tests:
- test/integration/default
```

### Driver vs. Provisioner vs. Transport

Since kitchen-dokken combines driver, transport, and provisioner functionality into a single plugin, its configuration differs from other Test Kitchen drivers. kitchen-dokken includes specific configuration options that can be set in the driver, provisioner, or transport sections or in the individual platforms / suites. At a bare minimum to use kitchen-dokken you must specify dokken as the driver, provisioner, and transport sections of your `kitchen.yml` file:
Expand Down Expand Up @@ -537,3 +498,42 @@ The `timeout` configuration option specifies the timeout in seconds for communic
### Dokken Linux Containers

Specially created containers for kitchen-dokken, build off official Linux distro images, but include all of the packages and services necessary to test Chef Infra cookbooks. These containers are produced for leading Linux distributions such as CentOS, OpenSUSE, Amazon Linux, and Ubuntu. For a complete list of available dokken specific container images see [u/dokken](https://hub.docker.com/u/dokken) on Docker Hub.

### Example **kitchen.yml**

```yaml
---
driver:
name: dokken
privileged: true # allows systemd services to start

provisioner:
name: dokken

transport:
name: dokken

verifier:
name: inspec

platforms:
- name: ubuntu-20.04
driver:
image: dokken/ubuntu-20.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: centos-8
driver:
image: dokken/centos-8
pid_one_command: /usr/lib/systemd/systemd

suites:
- name: default
run_list:
- recipe[my_cookbook::default]
verifier:
inspec_tests:
- test/integration/default
```
2 changes: 1 addition & 1 deletion docs/content/docs/drivers/hyperv.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ menu:

kitchen-hyperv is a Test Kitchen *driver* for Microsoft Hyper-V.

Example **kitchen.yml**:
## Example **kitchen.yml**

```yaml
---
Expand Down