Update set up instructions to include packer init

This commit is contained in:
Dom Del Nano 2021-04-22 20:15:25 -07:00 committed by GitHub
parent 77801d5798
commit 6005f12d3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,18 +14,35 @@ At the time of this writing the packer builder has been verified to work with Xe
The following list contains things that are incomplete but will be worked on soon:
- The documentation is still in an inconsistent state with upstream
- Examples that are easier for new users to get up and running quickly
- XVA builder is untested
- Lots of dead code to remove from upstream
## Using the builder
Download the relevant release from the project's [releases page](https://github.com/ddelnano/packer-builder-xenserver/releases) and copy the binary to `~/.packer.d/plugins/packer-builder-xenserver-iso`.
The packer builder can be installed via `packer init` as long as the packer template includes the following in it's `pkr.hcl` file
```
packer {
required_plugins {
xenserver= {
version = ">= v0.3.2"
source = "github.com/ddelnano/xenserver"
}
}
}
```
The following command will install the packer plugin using the Ubuntu example provided in this repository.
```
packer init examples/ubuntu/ubuntu-2004.pkr.hcl
```
If you are using an older version of packer or are still using json templates you will need to download the relevant release from the project's [releases page](https://github.com/ddelnano/packer-builder-xenserver/releases) and copy the binary to `~/.packer.d/plugins/packer-builder-xenserver-iso`.
## Developing the builder
### Dependencies
* Packer >= v1.7.0 (https://packer.io)
* Packer >= v1.7.1 (https://packer.io)
* XenServer / Citrix Hypervisor > 7.6
* Golang 1.16