Skip to content

Commit

Permalink
fix doc links + Limitations + typo (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxtof authored Nov 25, 2022
1 parent a75d4f9 commit e2592e9
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 56 deletions.
17 changes: 6 additions & 11 deletions docs/builders/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,35 +57,30 @@ To install the compiled plugin, please follow the official Packer documentation

### Configuration

For more information on how to configure the plugin, please find some examples in the [`example/`](https://github.com/nutanix-cloud-native/packer-plugin-nutanix/example) directory.
For more information on how to configure the plugin, please find some examples in the [`example`](https://github.com/nutanix-cloud-native/packer-plugin-nutanix/tree/main/example) directory.


## Builder

- The builder of the plugin is detailed [here](plugin).
- Documentation of the builder plugin is detailed [here](/packer/plugins/builders/nutanix/plugin).

## Limitations
### Building temporary ISOs on MacOS
If you want to use the cd_files Option to create an additional iso-image for kickstart-files or similiar be aware that MacOS won´t create a suitable file.
If you want to use the cd_files Option to create an additional iso-image for kickstart-files or similar be aware that MacOS won´t create a suitable file.
Please install xorriso for support on MacOS.
```
brew install xorriso
```
### Image Creation
Right now the plugin cannot upload source-images directly, but Terraform can be used to create a source image before running packer itself.
Create a Terraform Manifest using the Nutanix Provider to create your Image and define an output with your image uuid. You can pass this uuid into a Packer Variable. In that case the centos_iso_image_name Variable in the example settings file must be commented.
```
export PKR_VAR_centos_iso_image_name=$(terraform output -raw centos_uuid)
```

## Contributing
See the [contributing docs](CONTRIBUTING.md).
See the [contributing docs](https://github.com/nutanix-cloud-native/packer-plugin-nutanix/blob/main/CONTRIBUTING.md).

## Support
### Community Plus

This code is developed in the open with input from the community through issues and PRs. A Nutanix engineering team serves as the maintainer. Documentation is available in the project repository.

Issues and enhancement requests can be submitted in the [Issues tab of this repository](../../issues). Please search for and review the existing open issues before submitting a new issue.
Issues and enhancement requests can be submitted in the [Issues tab of this repository](https://github.com/nutanix-cloud-native/packer-plugin-nutanix/issues). Please search for and review the existing open issues before submitting a new issue.

## License
The project is released under version 2.0 of the [Apache license](http://www.apache.org/licenses/LICENSE-2.0).
90 changes: 45 additions & 45 deletions docs/builders/plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,67 +7,67 @@ nav_title: Nutanix

# Nutanix Builder

This document is going to detail all Nutanix plugin source parameters.
This document is going to detail all Nutanix plugin parameters.

## Principle
The Nutanix plugin will create a temporary VM as foundation of your Packer image, apply all providers your want to customize your image, then clone the VM disk image as your final Packer image.
The Nutanix plugin will create a temporary VM as foundation of your Packer image, apply all providers you define to customize your image, then clone the VM disk image as your final Packer image.

## Environment configuration
These parameters allow to define information about platform and temporary VM used to create the image.

### Required
- `nutanix_username` (string) - User used for Prism Central login
- `nutanix_password` (string) - Password of this user for Prism Central login
- `nutanix_endpoint` (string) - Prism Central FQDN or IP
- `cluster_name` or `cluster_uuid` (string) - Nutanix cluster name or uuid used to create and store image
- `os_type` (string) - OS Type ("Linux" or "Windows")
- `nutanix_username` (string) - User used for Prism Central login.
- `nutanix_password` (string) - Password of this user for Prism Central login.
- `nutanix_endpoint` (string) - Prism Central FQDN or IP.
- `cluster_name` or `cluster_uuid` (string) - Nutanix cluster name or uuid used to create and store image.
- `os_type` (string) - OS Type ("Linux" or "Windows").

### Optional
- `nutanix_port` (integer) - Port configured on Prism Central to connect on
- `nutanix_insecure` (boolean) - Authorize connection on Prism Central without valid certificate
- `cpu` (integer) - Number of vCPU for temporary VM
- `memory_mb` (integer) - Size of vRAM for temporary VM (in megabytes)
- `cd_files` (array of strings) - A list of files to place onto a CD that is attached when the VM is booted. This can include either files or directories; any directories will be copied onto the CD recursively, preserving directory structure hierarchy
- `cd_label` (string) - Label of this CD Drive
- `boot_type` (string) - Type of boot used on the temporary VM ("legacy" or "UEFI")
- `nutanix_port` (integer) - Port used for connection to Prism Central.
- `nutanix_insecure` (boolean) - Authorize connection to Prism Central without valid certificate.
- `cpu` (integer) - Number of vCPU for temporary VM.
- `memory_mb` (integer) - Size of vRAM for temporary VM (in megabytes).
- `cd_files` (array of strings) - A list of files to place onto a CD that is attached when the VM is booted. This can include either files or directories; any directories will be copied onto the CD recursively, preserving directory structure hierarchy.
- `cd_label` (string) - Label of this CD Drive.
- `boot_type` (string) - Type of boot used on the temporary VM ("legacy" or "UEFI").

## Output configuration
These parameters allow to configure everything around image creation, from the temporary VM connection to the final image definition.

### All OS
- `image_name` (string) - Name of the output image
- `image_description` (string) - Description for output image
- `force_deregister` (boolean) - Allow output image override if already exists
- `shutdown_command` (string) - Command line to shutdown your temporary VM
- `shutdown_timeout` (string) - Timeout for VM shutdown (format : 2m)
- `communicator` (string) - Protocol used for Packer connection (ex "winrm" or "ssh"). Default is : "ssh"
- `image_name` (string) - Name of the output image.
- `image_description` (string) - Description for output image.
- `force_deregister` (boolean) - Allow output image override if already exists.
- `shutdown_command` (string) - Command line to shutdown your temporary VM.
- `shutdown_timeout` (string) - Timeout for VM shutdown (format : 2m).
- `communicator` (string) - Protocol used for Packer connection (ex "winrm" or "ssh"). Default is : "ssh".

### Dedicated to Linux
- `user_data` (string) - cloud-init (Linux) content base64 coded.
- `user_data` (string) - cloud-init content base64 coded.
- `ssh_username` (string) - user for ssh connection initiated by Packer.
- `ssh_password` (string) - password for the this ssh user.
- `ssh_password` (string) - password for the ssh user.

### Dedicated to Windows
- `winrm_port` (integer) - Port for WinRM communication (Default is 5986)
- `winrm_insecure` (boolean) - Allow insecure connection on WinRM
- `winrm_use_ssl` (boolean) - Request SSL connection with WinRM
- `winrm_timeout` (string) - Timeout for WinRM (format 45m)
- `winrm_username` (string) - User login for WinRM connection
- `winrm_password` (string) - Password this User
- `winrm_port` (integer) - Port for WinRM communication (default is 5986).
- `winrm_insecure` (boolean) - Allow insecure connection to WinRM.
- `winrm_use_ssl` (boolean) - Request SSL connection with WinRM.
- `winrm_timeout` (string) - Timeout for WinRM (format 45m).
- `winrm_username` (string) - User login for WinRM connection.
- `winrm_password` (string) - Password this User.

## Disk configuration
Use `vm_disks{}` entry to configure disk to your VM image. If you want to configure several disks, use this entry multiple times.

All parameters of this `vm_disks` section are described below.

3 types of disk configurations can be used
3 types of disk configurations can be used:
- disk (create an empty disk)
- disk image (create disk from Nutanix image library)
- ISO image (create disk from ISO image).
- ISO image (create disk from ISO image)

### Disk
- `image_type` (string) - "DISK"
- `disk_size_gb` (integer) - size of th disk (in gigabytes)
- `image_type` (string) - "DISK".
- `disk_size_gb` (integer) - size of th disk (in gigabytes).

Sample:
```hcl
Expand All @@ -78,11 +78,11 @@ Sample:
```

### Disk image
- `image_type` (string) - "DISK_IMAGE" (You must use one of the three following parameter to source the image)
- `source_image_name` (string) - Name of the image used as disk source
- `source_image_uuid` (string) - UUID of the image used as disk source
- `source_image_uri` (string) - URI of the image used as disk source (If image is not already on the cluster, it will download and store it before launching output image creation process)
- `disk_size_gb` (integer) - size of th disk (in gigabytes)
- `image_type` (string) - "DISK_IMAGE" (you must use one of the three following parameters to source the image).
- `source_image_name` (string) - Name of the image used as disk source.
- `source_image_uuid` (string) - UUID of the image used as disk source.
- `source_image_uri` (string) - URI of the image used as disk source (if image is not already on the cluster, it will download and store it before launching output image creation process).
- `disk_size_gb` (integer) - size of the disk (in gigabytes).

Sample:
```hcl
Expand All @@ -93,9 +93,9 @@ Sample:
}
```
### ISO Image
- `image_type` (string) - "ISO_IMAGE"
- `source_image_name` (string) - Name of the ISO image to mount
- `source_image_uuid` (string) - UUID of the ISO image to mount
- `image_type` (string) - "ISO_IMAGE".
- `source_image_name` (string) - Name of the ISO image to mount.
- `source_image_uuid` (string) - UUID of the ISO image to mount.

Sample:
```hcl
Expand All @@ -108,17 +108,17 @@ Sample:
## Network Configuration
Use `vm_nics{}` entry to configure NICs in your image

In this section, you have to define network you will connect on with this keyword :
In this section, you have to define network you will to connect with one of this keyword :

- `subnet_name` (string) - Name of the cluster subnet to use
- `subnet_uuid` (string) - UUID of the cluster subnet to use
- `subnet_name` (string) - Name of the cluster subnet to use.
- `subnet_uuid` (string) - UUID of the cluster subnet to use.

Sample
```hcl
vm_nics {
subnet_name = "<mySubnet>"
subnet_name = "<mySubnet>"
}
```

## Samples
You can find samples [here](https://github.com/nutanix-cloud-native/packer-plugin-nutanix/example) for these instructions usage.
You can find samples [here](https://github.com/nutanix-cloud-native/packer-plugin-nutanix/tree/main/example) for these instructions usage.

0 comments on commit e2592e9

Please sign in to comment.