Skip to content

Commit

Permalink
Update integration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nywilken committed Aug 30, 2023
1 parent 386e547 commit 0b79003
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 84 deletions.
7 changes: 3 additions & 4 deletions .web-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ $ packer plugins install github.com/hashicorp/hyperv

#### Builders

- [hyperv-iso](packer/integrations/hashicorp/hyperv/latest/components/builder/hyperv-iso.mdx) - Starts from an ISO file,
- [hyperv-iso](packer/integrations/hashicorp/hyperv/latest/components/builder/iso) - Starts from an ISO file,
creates a brand new Hyper-V VM, installs an OS, provisions software within
the OS, then exports that machine to create an image. This is best for
people who want to start from scratch.

- [hyperv-vmcx](packer/integrations/hashicorp/hyperv/latest/components/builder/hyperv-vmcx.mdx) - Clones an an existing
virtual machine, provisions software within the OS, then exports that
machine to create an image. This is best for people who have existing base
- [hyperv-vmcx](packer/integrations/hashicorp/hyperv/latest/components/builder/vmcx) - Clones an existing
virtual machine, provisions software within the OS, then exports that machine to create an image. This is best for people who have existing base
images and want to customize them.
51 changes: 23 additions & 28 deletions .web-docs/components/builder/iso/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ leading to corruption of files or lost changes. As such, it is important to
add a `shutdown_command`. This tells Packer how to safely shutdown and
power off the VM.

## ISO Configuration Reference
## Configuration Reference

There are many configuration options available for the Hyper-V builder. They
are organized below into two categories: required and optional. Within each
category, the available options are alphabetized and described.

In addition to the options listed here, a
[communicator](/packer/docs/templates/legacy_json_templates/communicator) can be configured for this
builder.

### ISO Configuration Reference

<!-- Code generated from the comments of the ISOConfig struct in multistep/commonsteps/iso_config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -119,7 +129,6 @@ In HCL2:
<!-- End of code generated from the comments of the ISOConfig struct in multistep/commonsteps/iso_config.go; -->


### Required:

<!-- Code generated from the comments of the ISOConfig struct in multistep/commonsteps/iso_config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -150,7 +159,7 @@ In HCL2:
<!-- End of code generated from the comments of the ISOConfig struct in multistep/commonsteps/iso_config.go; -->


### Optional:
**Optional:**

<!-- Code generated from the comments of the ISOConfig struct in multistep/commonsteps/iso_config.go; DO NOT EDIT MANUALLY -->

Expand All @@ -169,18 +178,6 @@ In HCL2:
<!-- End of code generated from the comments of the ISOConfig struct in multistep/commonsteps/iso_config.go; -->


## Configuration Reference

There are many configuration options available for the Hyper-V builder. They
are organized below into two categories: required and optional. Within each
category, the available options are alphabetized and described.

In addition to the options listed here, a
[communicator](/packer/docs/templates/legacy_json_templates/communicator) can be configured for this
builder.

### Optional:

- `output_directory` (string) - This setting specifies the directory that
artifacts from the build, such as the virtual machine files and disks,
will be output to. The path to the directory may be relative or
Expand Down Expand Up @@ -368,7 +365,7 @@ created, must be empty prior to running the builder. By default this is
<!-- End of code generated from the comments of the CommonConfig struct in builder/hyperv/common/config.go; -->


## Http directory configuration reference
### HTTP Directory configuration

<!-- Code generated from the comments of the HTTPConfig struct in multistep/commonsteps/http_config.go; DO NOT EDIT MANUALLY -->

Expand All @@ -385,7 +382,7 @@ wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg
<!-- End of code generated from the comments of the HTTPConfig struct in multistep/commonsteps/http_config.go; -->


### Optional:
**Optional:**

<!-- Code generated from the comments of the HTTPConfig struct in multistep/commonsteps/http_config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -426,9 +423,7 @@ wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg
<!-- End of code generated from the comments of the HTTPConfig struct in multistep/commonsteps/http_config.go; -->


## Shutdown configuration reference

### Optional:
### Shutdown configuration reference

<!-- Code generated from the comments of the ShutdownConfig struct in shutdowncommand/config.go; DO NOT EDIT MANUALLY -->

Expand All @@ -449,7 +444,7 @@ wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg
<!-- End of code generated from the comments of the ShutdownConfig struct in shutdowncommand/config.go; -->


## Floppy configuration reference
### Floppy configuration reference

<!-- Code generated from the comments of the FloppyConfig struct in multistep/commonsteps/floppy_config.go; DO NOT EDIT MANUALLY -->

Expand All @@ -465,7 +460,7 @@ provisioner](/packer/docs/provisioner/file).
<!-- End of code generated from the comments of the FloppyConfig struct in multistep/commonsteps/floppy_config.go; -->


### Optional:
**Optional:**

<!-- Code generated from the comments of the FloppyConfig struct in multistep/commonsteps/floppy_config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -504,7 +499,7 @@ provisioner](/packer/docs/provisioner/file).
<!-- End of code generated from the comments of the FloppyConfig struct in multistep/commonsteps/floppy_config.go; -->


### CD configuration reference
#### CD configuration reference

<!-- Code generated from the comments of the CDConfig struct in multistep/commonsteps/extra_iso_config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -573,9 +568,9 @@ provisioner](/packer/docs/provisioner/file).
<!-- End of code generated from the comments of the CDConfig struct in multistep/commonsteps/extra_iso_config.go; -->


## Communicator configuration reference
### Communicator configuration reference

### Optional common fields:
#### Optional common fields:

<!-- Code generated from the comments of the Config struct in communicator/config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -720,7 +715,7 @@ provisioner](/packer/docs/provisioner/file).
of current user.


### Optional WinRM fields:
#### Optional WinRM fields:

<!-- Code generated from the comments of the WinRM struct in communicator/config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -759,7 +754,7 @@ provisioner](/packer/docs/provisioner/file).
<!-- End of code generated from the comments of the WinRM struct in communicator/config.go; -->


## Boot Configuration Reference
### Boot Configuration Reference

<!-- Code generated from the comments of the BootConfig struct in bootcommand/config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -901,7 +896,7 @@ For more examples of various boot commands, see the sample projects from our
<!-- End of code generated from the comments of the BootConfig struct in bootcommand/config.go; -->


### Optional:
**Optional:**

<!-- Code generated from the comments of the BootConfig struct in bootcommand/config.go; DO NOT EDIT MANUALLY -->

Expand Down
20 changes: 9 additions & 11 deletions .web-docs/components/builder/vmcx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ In HCL2:
<!-- End of code generated from the comments of the ISOConfig struct in multistep/commonsteps/iso_config.go; -->


### Optional:
**Optional:**

<!-- Code generated from the comments of the ISOConfig struct in multistep/commonsteps/iso_config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -207,7 +207,7 @@ In HCL2:
- `clone_from_vm_name` (string) - The name of the VM to clone from. Ideally
the machine to clone from should be shutdown.

### Optional:
**Optional:**

<!-- Code generated from the comments of the Config struct in builder/hyperv/vmcx/builder.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -392,9 +392,7 @@ In HCL2:
<!-- End of code generated from the comments of the CommonConfig struct in builder/hyperv/common/config.go; -->


## Communicator configuration reference

### Optional common fields:
### Communicator configuration reference

<!-- Code generated from the comments of the Config struct in communicator/config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -428,7 +426,7 @@ In HCL2:
<!-- End of code generated from the comments of the Config struct in communicator/config.go; -->


### Optional SSH fields:
#### SSH fields:

<!-- Code generated from the comments of the SSH struct in communicator/config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -539,7 +537,7 @@ In HCL2:
of current user.


### Optional WinRM fields:
#### WinRM fields:

<!-- Code generated from the comments of the WinRM struct in communicator/config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -595,7 +593,7 @@ boot time.
<!-- End of code generated from the comments of the CDConfig struct in multistep/commonsteps/extra_iso_config.go; -->


#### Optional:
**Optional:**

<!-- Code generated from the comments of the CDConfig struct in multistep/commonsteps/extra_iso_config.go; DO NOT EDIT MANUALLY -->

Expand Down Expand Up @@ -664,7 +662,7 @@ boot time.
<!-- End of code generated from the comments of the CDConfig struct in multistep/commonsteps/extra_iso_config.go; -->


## Boot Command
### Boot Command

The `boot_command` configuration is very important: it specifies the keys to
type when the virtual machine is first booted in order to start the OS
Expand Down Expand Up @@ -768,7 +766,7 @@ The example shown below is a working boot command used to start an Ubuntu
For more examples of various boot commands, see the sample projects from our
[community templates page](/community-tools#templates).

## Http directory configuration
### HTTP directory configuration

<!-- Code generated from the comments of the HTTPConfig struct in multistep/commonsteps/http_config.go; DO NOT EDIT MANUALLY -->

Expand All @@ -785,7 +783,7 @@ wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/foo/bar/preseed.cfg
<!-- End of code generated from the comments of the HTTPConfig struct in multistep/commonsteps/http_config.go; -->


### Optional:
**Optional:**

<!-- Code generated from the comments of the HTTPConfig struct in multistep/commonsteps/http_config.go; DO NOT EDIT MANUALLY -->

Expand Down
7 changes: 3 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ $ packer plugins install github.com/hashicorp/hyperv

#### Builders

- [hyperv-iso](packer/integrations/hashicorp/hyperv/latest/components/builder/hyperv-iso.mdx) - Starts from an ISO file,
- [hyperv-iso](packer/integrations/hashicorp/hyperv/latest/components/builder/iso) - Starts from an ISO file,
creates a brand new Hyper-V VM, installs an OS, provisions software within
the OS, then exports that machine to create an image. This is best for
people who want to start from scratch.

- [hyperv-vmcx](packer/integrations/hashicorp/hyperv/latest/components/builder/hyperv-vmcx.mdx) - Clones an an existing
virtual machine, provisions software within the OS, then exports that
machine to create an image. This is best for people who have existing base
- [hyperv-vmcx](packer/integrations/hashicorp/hyperv/latest/components/builder/vmcx) - Clones an existing
virtual machine, provisions software within the OS, then exports that machine to create an image. This is best for people who have existing base
images and want to customize them.
47 changes: 21 additions & 26 deletions docs/builders/iso.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,6 @@ leading to corruption of files or lost changes. As such, it is important to
add a `shutdown_command`. This tells Packer how to safely shutdown and
power off the VM.

## ISO Configuration Reference

@include 'packer-plugin-sdk/multistep/commonsteps/ISOConfig.mdx'

### Required:

@include 'packer-plugin-sdk/multistep/commonsteps/ISOConfig-required.mdx'

### Optional:

@include 'packer-plugin-sdk/multistep/commonsteps/ISOConfig-not-required.mdx'

## Configuration Reference

There are many configuration options available for the Hyper-V builder. They
Expand All @@ -69,7 +57,16 @@ In addition to the options listed here, a
[communicator](/packer/docs/templates/legacy_json_templates/communicator) can be configured for this
builder.

### Optional:
### ISO Configuration Reference

@include 'packer-plugin-sdk/multistep/commonsteps/ISOConfig.mdx'


@include 'packer-plugin-sdk/multistep/commonsteps/ISOConfig-required.mdx'

**Optional:**

@include 'packer-plugin-sdk/multistep/commonsteps/ISOConfig-not-required.mdx'

- `output_directory` (string) - This setting specifies the directory that
artifacts from the build, such as the virtual machine files and disks,
Expand All @@ -83,35 +80,33 @@ created, must be empty prior to running the builder. By default this is

@include 'builder/hyperv/common/CommonConfig-not-required.mdx'

## Http directory configuration reference
### HTTP Directory configuration

@include 'packer-plugin-sdk/multistep/commonsteps/HTTPConfig.mdx'

### Optional:
**Optional:**

@include 'packer-plugin-sdk/multistep/commonsteps/HTTPConfig-not-required.mdx'

## Shutdown configuration reference

### Optional:
### Shutdown configuration reference

@include 'packer-plugin-sdk/shutdowncommand/ShutdownConfig-not-required.mdx'

## Floppy configuration reference
### Floppy configuration reference

@include 'packer-plugin-sdk/multistep/commonsteps/FloppyConfig.mdx'

### Optional:
**Optional:**

@include 'packer-plugin-sdk/multistep/commonsteps/FloppyConfig-not-required.mdx'

### CD configuration reference
#### CD configuration reference

@include 'packer-plugin-sdk/multistep/commonsteps/CDConfig-not-required.mdx'

## Communicator configuration reference
### Communicator configuration reference

### Optional common fields:
#### Optional common fields:

@include 'packer-plugin-sdk/communicator/Config-not-required.mdx'

Expand All @@ -121,15 +116,15 @@ created, must be empty prior to running the builder. By default this is

@include 'packer-plugin-sdk/communicator/SSH-Private-Key-File-not-required.mdx'

### Optional WinRM fields:
#### Optional WinRM fields:

@include 'packer-plugin-sdk/communicator/WinRM-not-required.mdx'

## Boot Configuration Reference
### Boot Configuration Reference

@include 'packer-plugin-sdk/bootcommand/BootConfig.mdx'

### Optional:
**Optional:**

@include 'packer-plugin-sdk/bootcommand/BootConfig-not-required.mdx'

Expand Down
Loading

0 comments on commit 0b79003

Please sign in to comment.