Skip to content

Commit

Permalink
Added support for additional disks; Windows Server 2008R2 support; Ad…
Browse files Browse the repository at this point in the history
…ded support for scratch disks
  • Loading branch information
stiller-leser committed Mar 14, 2018
1 parent 6512987 commit 3f6a955
Show file tree
Hide file tree
Showing 6 changed files with 434 additions and 79 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 1.5.2 / 2018-03-14

* Local SSDs can now be added as scratch disks

## 1.5.1 / 2018-03-08

* Added support for Windows Server 2008R2 and later

## 1.5.0 / 2018-02-26

* Add support for additional disks to be attached to the instance

## 1.4.0 / 2017-09-28

* #47: Add support for Google Shared VPC Networks (XPN)
Expand Down
76 changes: 56 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,31 +190,11 @@ must be unique. By default, a unique name will be auto-generated; note that
auto-generated names must be used if there is more than one test suite. Default:
`tk-<suite>-<platform>-<UUID>`

### `autodelete_disk`

Boolean specifying whether or not to automatically delete boot disk
for test instance. Default: `true`

NOTE: If you set this to false, once Test Kitchen destroys your instance,
the boot disk used will remain in your project. You will need to manually delete it to
avoid consuming unused resources by either using the `gcloud compute disks delete`
command in the GCP SDK or by using `knife google disk delete` from
[knife-google](https://github.com/chef/knife-google).

### `auto_migrate`

Boolean specifying whether or not to automatically migrate the instance
to a host in the event of host maintenance. Default: `false`

### `disk_size`

Size, in gigabytes, of boot disk. Default: `10`.

Some images, such as windows images, have a larger source image size
and require the disk_size to be the same size or larger than the source.
An error message will be displayed to you indicating this requirement
if necessary.

### `email`

**Required for Windows instances.** The email address of the
Expand Down Expand Up @@ -300,6 +280,62 @@ Default:
"test-kitchen-instance" => <instance.name>,
"test-kitchen-user" => <env_user>,

### Disk configuration

NOTE: In order to support multiple disks in this driver, the disk configuration has been reworked. However, old .kitchen-files will keep working and simply be adapted automatically.

```yaml
driver:
disks:
disk0:
autodelete_disk: false
disk1:
disk_size: 30
disk2:
disk_size: 50
```

In the above example the `disk0` would be automatically be used as the bootdisk (/dev/sda), `disk1` would be mounted as /dev/sdb and be 30 gigabytes in size. `disk2` would be mounted as /dev/sdc and 50 gigabytes in size. Any of these disks could be the bootdisk (see below), but since none is specified, disk0 is automatically elected. Note that if `disk1` would be set as bootdisk using `boot: true` it will be mounted as /dev/sda.

#### `boot`

Specifies wether or not a disk should be used as the boot disk for the instance. By default the first disk will be used as boot disk.

#### `autodelete_disk` - deprecated as standalone option

Boolean specifying whether or not to automatically delete boot disk
for test instance. Default: `true`

*This option is deprecated as a standlone configuration, but can be applied on a per disk level.*

NOTE: If you set this to false, once Test Kitchen destroys your instance,
the boot disk used will remain in your project. You will need to manually delete it to
avoid consuming unused resources by either using the `gcloud compute disks delete`
command in the GCP SDK or by using `knife google disk delete` from
[knife-google](https://github.com/chef/knife-google).

#### `disk_size` - deprecated as standalone option

Size, in gigabytes, of boot disk. Default: `10`.

*This option is deprecated as a standlone configuration, but can be applied on a per disk level.*

Some images, such as windows images, have a larger source image size
and require the disk_size to be the same size or larger than the source.
An error message will be displayed to you indicating this requirement
if necessary.

#### `disk_type` - deprecated as standalone option

Type of the disk. Default: `pd-standard`.

*This option is deprecated as a standlone configuration, but can be applied on a per disk level.*

Valid disk types:

- `pd-standard`: Attached magnetic hard drive
- `pd-ssd`: Attached SSD
- `local-ssd`: [Local scratch SSD](https://cloud.google.com/compute/docs/disks/#localssds). NOTE: You cannot specify their size. They always are 375 GB!

### Transport Settings

Expand Down
5 changes: 3 additions & 2 deletions kitchen-google.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ Gem::Specification.new do |s|
s.homepage = "https://github.com/test-kitchen/kitchen-google"
s.license = "Apache 2.0"

s.add_dependency "gcewinpass", "~> 1.0"
s.add_dependency "google-api-client", "~> 0.9.0"
s.add_dependency "gcewinpass", "~> 1.1"
s.add_dependency "google-api-client", "~> 0.19"
s.add_dependency "test-kitchen"

s.add_development_dependency "bundler"
s.add_development_dependency "pry"
s.add_development_dependency "rake", "~> 10.5"
s.add_development_dependency "rspec"
s.add_development_dependency "rubocop"
s.add_development_dependency "byebug"

s.required_ruby_version = ">= 2.0"
end
Loading

0 comments on commit 3f6a955

Please sign in to comment.