From a0581d82709cd5b8db3ccce0865e6078b78c3edf Mon Sep 17 00:00:00 2001 From: BrandonRomano Date: Wed, 14 Jun 2023 10:11:04 -0700 Subject: [PATCH 1/8] Upgrade plugin for integrations library --- .docs/builders/vm-clone.mdx | 144 ++++++++++++++++++ .docs/builders/vm-create.mdx | 113 ++++++++++++++ .docs/post-processors/anka-registry-push.mdx | 104 +++++++++++++ .github/workflows/ensure-docs-compiled.yaml | 22 +++ ...notify-integration-release-via-manual.yaml | 46 ++++++ .../notify-integration-release-via-tag.yaml | 40 +++++ .../components/builder/vm-clone/README.md | 135 ++++++++++++++++ .../components/builder/vm-create/README.md | 103 +++++++++++++ .../anka-registry-push/README.md | 95 ++++++++++++ .web-docs/metadata.hcl | 22 +++ .web-docs/scripts/compile-to-webdocs.sh | 129 ++++++++++++++++ Makefile | 8 +- docs/builders/vm-clone.mdx | 4 +- docs/builders/vm-create.mdx | 4 +- docs/post-processors/anka-registry-push.mdx | 4 +- 15 files changed, 966 insertions(+), 7 deletions(-) create mode 100644 .docs/builders/vm-clone.mdx create mode 100644 .docs/builders/vm-create.mdx create mode 100644 .docs/post-processors/anka-registry-push.mdx create mode 100644 .github/workflows/ensure-docs-compiled.yaml create mode 100644 .github/workflows/notify-integration-release-via-manual.yaml create mode 100644 .github/workflows/notify-integration-release-via-tag.yaml create mode 100644 .web-docs/components/builder/vm-clone/README.md create mode 100644 .web-docs/components/builder/vm-create/README.md create mode 100644 .web-docs/components/post-processor/anka-registry-push/README.md create mode 100644 .web-docs/metadata.hcl create mode 100755 .web-docs/scripts/compile-to-webdocs.sh diff --git a/.docs/builders/vm-clone.mdx b/.docs/builders/vm-clone.mdx new file mode 100644 index 0000000..8b953a8 --- /dev/null +++ b/.docs/builders/vm-clone.mdx @@ -0,0 +1,144 @@ +--- +description: | + The veertu-anka-vm-clone Packer builder is able to clone existing Anka VM Templates for use with Anka Virtualization and the Anka Build Cloud. The builder takes a source VM name, clones it, and then runs any provisioning necessary on the new VM Template before stopping or suspending it. +page_title: Anka VM Clone - Builders +nav_title: VM Clone +--- + +# Anka VM Clone Builder + +Type: `veertu-anka-vm-clone` + +The `veertu-anka-vm-clone` Packer builder is able to clone existing Anka VM Templates for use with the [Anka Virtualization](https://veertu.com/technology/) package and the [Anka Build Cloud](https://veertu.com/anka-build/). The builder takes a source VM name, clones it, and then runs any provisioning necessary on the new VM Template before stopping or suspending it. + +The builder does _not_ manage templates. Once a template is created, it is up +to you to use it or delete it. + +This builder is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to your hcl template: + +```hcl +packer { + required_plugins { + veertu-anka = { + version = "= 3.1.1" + source = "github.com/veertuinc/veertu-anka" + } + } +} +``` + +## Important Notes + +**In Anka 3.0** we now require a tagged source VM before cloning in order to share the underlying .ank image and optimize disk space. If your source VM is not tagged yet, we will assign one . **We highly recommend pushing this VM Template/Tag to your registry so [disk usage is optimized](https://docs.veertu.com/anka/apple/getting-started/creating-your-first-vm/#disk-optimization).** + +## Configuration Reference + +There are many configuration options available for the builder. They are segmented below into two categories: required and optional parameters. + +### _**Required Configuration**_ + +* `source_vm_name` (String) The VM to clone for provisioning, either stopped or suspended. + +* `type` (String) Must be `veertu-anka-vm-clone`. + +### _**Optional Configuration**_ + +* `vm_name` (String) The name for the VM that is created. + + > Generated using the source_vm_name if not provided: (`{{ source_vm_name }}-{10RandomChars}`). + +* `vcpu_count` (String) The number of vCPU cores, defaults to `2`. + +* `ram_size` (String) The size in "[0-9]+G" format, defaults to `2G`. + +* `disk_size` (String) The size in "[0-9]+G" format, defaults to `25G`. + + > We will automatically resize the internal disk for you by executing `diskutil apfs resizeContainer disk0s2 0` inside of the VM. + +* `stop_vm` (Boolean) Whether or not to stop the vm after it has been created, defaults to false. + +* `display_controller` (string) The display controller to set (run `anka modify VMNAME set display --help` to see available options). + +* `always_fetch` (Boolean) Always pull the source VM from the registry. Defaults to false. + +* `boot_delay` (String) The time to wait before running packer provisioner commands, defaults to `7s`. + +* `cacert` (String) Path to a CA Root certificate. + +* `cert` (String) Path to your node's client certificate to use for registry communication (if certificate authorization is enabled). + +* `insecure` (Boolean) Skip TLS verification. + +* `key` (String) Path to your node's client certificate key, if the `cert` certificate doesn't contain one, to use for registry communication (if certificate authorization is enabled). + +* `hw_uuid` (String) (Anka 2 only) The Hardware UUID you wish to set (usually generated with `uuidgen`). + +* `port_forwarding_rules` (Struct) + + > If port forwarding rules are already set and you want to not have them fail the packer build, use `packer build --force`. + + * `port_forwarding_guest_port` (Int) + * `port_forwarding_host_port` (Int) + * `port_forwarding_rule_name` (String) + +* `registry-path` (String) The registry URL (will use your default configuration if not set). + +* `remote` (String) The registry name (will use your default configuration if not set). + + > This takes priority in Anka 3 and `registry-path` will be ignored. + +* `source_vm_tag` (String) Specify the tag of the VM we want to clone instead of using the default. + +* `update_addons` (Boolean) (Anka 2 only) Update the vm addons. Defaults to false. + +* `use_anka_cp` (Boolean) Use built in anka cp command. Defaults to false. + +## Example + +Here is an example that uses the file and shell provisioners. + +```hcl + +variable "source_vm_name" { + type = string + default = "anka-packer-base-macos" +} + +variable "vm_name" { + type = string + default = "anka-packer-from-source" +} + +source "veertu-anka-vm-clone" "clone" { + vm_name = "${var.vm_name}" + source_vm_name = "${var.source_vm_name}" +} + +build { + sources = [ + "source.veertu-anka-vm-clone.clone", + ] + provisioner "file" { + destination = "/private/tmp/" + source = "./examples/ansible" + } + provisioner "shell" { + inline = [ + "[[ ! -d /tmp/ansible ]] && exit 100", + "touch /tmp/ansible/test1" + ] + } + provisioner "file" { + destination = "./" + direction = "download" + source = "/private/tmp/ansible/test1" + } + provisioner "shell-local" { + inline = [ + "[[ ! -f ./test1 ]] && exit 200", + "rm -f ./test1" + ] + } +} + +``` diff --git a/.docs/builders/vm-create.mdx b/.docs/builders/vm-create.mdx new file mode 100644 index 0000000..b0967c9 --- /dev/null +++ b/.docs/builders/vm-create.mdx @@ -0,0 +1,113 @@ +--- +description: | + The veertu-anka-vm-create Packer builder is able to create new VM templates for use with + Anka. The builder takes the path to macOS installer .app, installs macOS using that installer inside of an Anka VM Template, and then runs any provisioning necessary on the instance. +page_title: Anka VM Create - Builders +nav_title: VM Create +--- + +# Veertu's Anka VM Create Builder + +Type: `veertu-anka-vm-create` + +**Packer 3.x will no longer support Anka 2.x. You can still however use the Packer 2.x release for support.** + +The `veertu-anka-vm-create` Packer builder is able to create new Anka VM Templates for use with the +[Anka Virtualization](https://veertu.com/technology/) package and the [Anka Build Cloud](https://veertu.com/anka-build/). The builder takes the path to macOS installer .app +and installs that macOS version inside of an Anka VM Template. + +The builder does _not_ manage templates. Once a template is created, it is up +to you to use it or delete it. + +This builder is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to +your hcl template: + +```hcl +packer { + required_plugins { + veertu-anka = { + version = "= 3.1.1" + source = "github.com/veertuinc/veertu-anka" + } + } +} +``` + +## Configuration Reference + +There are many configuration options available for the builder. They are +segmented below into two categories: required and optional parameters. + +### Required Configuration + +* `installer` (String) The path to a macOS installer. This process takes about 20 minutes. + +* `type` (String) Must be `veertu-anka-vm-create`. + +### Optional Configuration + +* `vm_name` (String) The name for the VM that is created. One is generated with installer data if not provided (`anka-packer-base-{{ installer.OSVersion }}-{{ installer.BundlerVersion }}`). + +* `vcpu_count` (String) The number of vCPU cores, defaults to `2`. + + > This change gears us up for Anka 3.0 release when cpu_count will be vcpu_count. For now this is still CPU and not vCPU. + +* `ram_size` (String) The size in "[0-9]+G" format, defaults to `4G`. + +* `disk_size` (String) The size in "[0-9]+G" format, defaults to `40G`. + + > We will automatically resize the internal disk for you by executing `diskutil apfs resizeContainer disk0s2 0` inside of the VM + +* `stop_vm` (Boolean) Whether or not to stop the vm after it has been created, defaults to false. + +* `use_anka_cp` (Boolean) Use built in anka cp command. You shouldn't need this option. Defaults to false. + +* `anka_password` (String) Sets the password for the vm. Can also be set with `ANKA_DEFAULT_PASSWD` env var. Defaults to `admin`. + +* `anka_user` (String) Sets the username for the vm. Can also be set with `ANKA_DEFAULT_USER` env var. Defaults to `anka`. + +* `boot_delay` (String) The time to wait before running packer provisioner commands, defaults to `7s`. + +* `log_level` (String) The log level for Anka. This currently only supports `debug` and is only useful for VM creation failures. + +## Example + +Here is an example: + +```hcl + +variable "vm_name" { + type = string + default = "anka-packer-base-macos" +} + +variable "installer" { + type = string + default = "/Applications/Install macOS Big Sur.app/" +} + +variable "vcpu_count" { + type = string + default = "" +} + +source "veertu-anka-vm-create" "base" { + installer = "${var.installer}" + vm_name = "${var.vm_name}" + vcpu_count = "${var.vcpu_count}" +} + +build { + sources = [ + "source.veertu-anka-vm-create.base" + ] + + provisioner "shell" { + inline = [ + "echo hello world", + "echo llamas rock" + ] + } +} + +``` diff --git a/.docs/post-processors/anka-registry-push.mdx b/.docs/post-processors/anka-registry-push.mdx new file mode 100644 index 0000000..d0be677 --- /dev/null +++ b/.docs/post-processors/anka-registry-push.mdx @@ -0,0 +1,104 @@ +--- +description: | + The veertu-anka-registry-push Packer Post Processor is able to push your created VM template to the Anka Build Cloud Registry. +page_title: Anka Build Cloud Registry Push - Post Processors +nav_title: Anka Registry Push +--- + +# Anka Build Cloud Registry Push Post-Processor + +Type: `veertu-anka-registry-push` + +The `veertu-anka-registry-push` Packer Post Processor is able to push your created Anka VM templates to the [Anka Build Cloud Registry](https://veertu.com/anka-build/) through the [Anka Virtualization](https://veertu.com/technology/) package. + +This post-processor is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to your hcl template: + +```hcl +packer { + required_plugins { + veertu-anka = { + version = "= 3.1.1" + source = "github.com/veertuinc/veertu-anka" + } + } +} +``` + +## Configuration Reference + +There are many configuration options available for the post-processor. They are +segmented below into two categories: required and optional parameters. + +### _**Required Configuration**_ + +* `type` (String) **Must be `veertu-anka-registry-push`; no other types** + +### _**Optional Configuration**_ + +* `cacert` (String) Path to a CA Root certificate. + +* `cert` (String) Path to your node certificate (if certificate authority is enabled). + +* `description` (String) The description of the tag. + +* `insecure` (Boolean) Skip TLS verification. + +* `key` (String) Path to your node certificate key if the client/node certificate doesn't contain one. + +* `local` (Boolean) Assign a tag to your local template and avoid pushing to the Registry. + +* `remote` (String) The registry URL or name to target for registry operation (will use your default configuration if not set). + +* `remote_vm` (String) The name of a registry template you want to push the local template onto. + +* `tag` (String) The name of the tag to push (will default as 'latest' if not set). + +* `force` (Boolean) Whether or not to forcefully push, regardless of a tag already existing + +## Other + +When using `packer build -force`, the post-processor will issue a [revert API call](https://docs.veertu.com/anka/anka-build-cloud/working-with-registry-and-api/#revert) to remove the existing tag before pushing the new. + +## Example + +Here is an example that uses the file and shell provisioners. + +```hcl + +variable "source_vm_name" { + type = string + default = "anka-packer-base-macos" +} + +variable "vm_name" { + type = string + default = "anka-packer-from-source" +} + +source "veertu-anka-vm-clone" "clone" { + vm_name = "${var.vm_name}" + source_vm_name = "${var.source_vm_name}" +} + +build { + sources = [ + "source.veertu-anka-vm-clone.clone", + ] + + provisioner "file" { + destination = "/private/tmp/" + source = "./examples/ansible" + } + provisioner "shell" { + inline = [ + "[[ ! -d /tmp/ansible ]] && exit 100", + "touch /tmp/ansible/test1" + ] + } + + post-processor "veertu-anka-registry-push" { + tag = "v2" + } +} + +``` diff --git a/.github/workflows/ensure-docs-compiled.yaml b/.github/workflows/ensure-docs-compiled.yaml new file mode 100644 index 0000000..8d10ac7 --- /dev/null +++ b/.github/workflows/ensure-docs-compiled.yaml @@ -0,0 +1,22 @@ +name: Ensure Docs are Compiled +on: + push: +jobs: + ensure-docs-compiled: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎 + uses: actions/checkout@v2 + - uses: actions/setup-go@v4 + - shell: bash + run: make build-docs + - shell: bash + run: | + if [[ -z "$(git status -s)" ]]; then + echo "OK" + else + echo "Docs have been updated, but the compiled docs have not been committed." + echo "Run 'make build-docs', and commit the result to resolve this error." + exit 1 + fi + diff --git a/.github/workflows/notify-integration-release-via-manual.yaml b/.github/workflows/notify-integration-release-via-manual.yaml new file mode 100644 index 0000000..eec48a4 --- /dev/null +++ b/.github/workflows/notify-integration-release-via-manual.yaml @@ -0,0 +1,46 @@ +name: Notify Integration Release (Manual) +on: + workflow_dispatch: + inputs: + version: + description: "The release version (semver)" + default: 0.0.1 + required: false + branch: + description: "A branch or SHA" + default: 'main' + required: false +jobs: + notify-release: + runs-on: ubuntu-latest + steps: + - name: Checkout this repo + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + ref: ${{ github.event.inputs.branch }} + # Ensure that Docs are Compiled + - uses: actions/setup-go@v4 + - shell: bash + run: make build-docs + - shell: bash + run: | + if [[ -z "$(git status -s)" ]]; then + echo "OK" + else + echo "Docs have been updated, but the compiled docs have not been committed." + echo "Run 'make build-docs', and commit the result to resolve this error." + exit 1 + fi + # Perform the Release + - name: Checkout integration-release-action + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + repository: hashicorp/integration-release-action + path: ./integration-release-action + - name: Notify Release + uses: ./integration-release-action + with: + integration_identifier: 'packer/BrandonRomano/veertu-anka' + release_version: ${{ github.event.inputs.version }} + release_sha: ${{ github.event.inputs.branch }} + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/notify-integration-release-via-tag.yaml b/.github/workflows/notify-integration-release-via-tag.yaml new file mode 100644 index 0000000..103fd1f --- /dev/null +++ b/.github/workflows/notify-integration-release-via-tag.yaml @@ -0,0 +1,40 @@ +name: Notify Integration Release (Tag) +on: + push: + tags: + - '*.*.*' # Proper releases + - '*.*.*-*' # Pre releases +jobs: + notify-release: + runs-on: ubuntu-latest + steps: + - name: Checkout this repo + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + ref: ${{ github.ref }} + # Ensure that Docs are Compiled + - uses: actions/setup-go@v4 + - shell: bash + run: make build-docs + - shell: bash + run: | + if [[ -z "$(git status -s)" ]]; then + echo "OK" + else + echo "Docs have been updated, but the compiled docs have not been committed." + echo "Run 'make build-docs', and commit the result to resolve this error." + exit 1 + fi + # Perform the Release + - name: Checkout integration-release-action + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + repository: hashicorp/integration-release-action + path: ./integration-release-action + - name: Notify Release + uses: ./integration-release-action + with: + integration_identifier: 'packer/BrandonRomano/veertu-anka' + release_version: ${{ github.ref_name }} + release_sha: ${{ github.ref }} + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.web-docs/components/builder/vm-clone/README.md b/.web-docs/components/builder/vm-clone/README.md new file mode 100644 index 0000000..671533d --- /dev/null +++ b/.web-docs/components/builder/vm-clone/README.md @@ -0,0 +1,135 @@ +Type: `veertu-anka-vm-clone` + +The `veertu-anka-vm-clone` Packer builder is able to clone existing Anka VM Templates for use with the [Anka Virtualization](https://veertu.com/technology/) package and the [Anka Build Cloud](https://veertu.com/anka-build/). The builder takes a source VM name, clones it, and then runs any provisioning necessary on the new VM Template before stopping or suspending it. + +The builder does _not_ manage templates. Once a template is created, it is up +to you to use it or delete it. + +This builder is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to your hcl template: + +```hcl +packer { + required_plugins { + veertu-anka = { + version = "= 3.1.1" + source = "github.com/veertuinc/veertu-anka" + } + } +} +``` + +## Important Notes + +**In Anka 3.0** we now require a tagged source VM before cloning in order to share the underlying .ank image and optimize disk space. If your source VM is not tagged yet, we will assign one . **We highly recommend pushing this VM Template/Tag to your registry so [disk usage is optimized](https://docs.veertu.com/anka/apple/getting-started/creating-your-first-vm/#disk-optimization).** + +## Configuration Reference + +There are many configuration options available for the builder. They are segmented below into two categories: required and optional parameters. + +### _**Required Configuration**_ + +* `source_vm_name` (String) The VM to clone for provisioning, either stopped or suspended. + +* `type` (String) Must be `veertu-anka-vm-clone`. + +### _**Optional Configuration**_ + +* `vm_name` (String) The name for the VM that is created. + + > Generated using the source_vm_name if not provided: (`{{ source_vm_name }}-{10RandomChars}`). + +* `vcpu_count` (String) The number of vCPU cores, defaults to `2`. + +* `ram_size` (String) The size in "[0-9]+G" format, defaults to `2G`. + +* `disk_size` (String) The size in "[0-9]+G" format, defaults to `25G`. + + > We will automatically resize the internal disk for you by executing `diskutil apfs resizeContainer disk0s2 0` inside of the VM. + +* `stop_vm` (Boolean) Whether or not to stop the vm after it has been created, defaults to false. + +* `display_controller` (string) The display controller to set (run `anka modify VMNAME set display --help` to see available options). + +* `always_fetch` (Boolean) Always pull the source VM from the registry. Defaults to false. + +* `boot_delay` (String) The time to wait before running packer provisioner commands, defaults to `7s`. + +* `cacert` (String) Path to a CA Root certificate. + +* `cert` (String) Path to your node's client certificate to use for registry communication (if certificate authorization is enabled). + +* `insecure` (Boolean) Skip TLS verification. + +* `key` (String) Path to your node's client certificate key, if the `cert` certificate doesn't contain one, to use for registry communication (if certificate authorization is enabled). + +* `hw_uuid` (String) (Anka 2 only) The Hardware UUID you wish to set (usually generated with `uuidgen`). + +* `port_forwarding_rules` (Struct) + + > If port forwarding rules are already set and you want to not have them fail the packer build, use `packer build --force`. + + * `port_forwarding_guest_port` (Int) + * `port_forwarding_host_port` (Int) + * `port_forwarding_rule_name` (String) + +* `registry-path` (String) The registry URL (will use your default configuration if not set). + +* `remote` (String) The registry name (will use your default configuration if not set). + + > This takes priority in Anka 3 and `registry-path` will be ignored. + +* `source_vm_tag` (String) Specify the tag of the VM we want to clone instead of using the default. + +* `update_addons` (Boolean) (Anka 2 only) Update the vm addons. Defaults to false. + +* `use_anka_cp` (Boolean) Use built in anka cp command. Defaults to false. + +## Example + +Here is an example that uses the file and shell provisioners. + +```hcl + +variable "source_vm_name" { + type = string + default = "anka-packer-base-macos" +} + +variable "vm_name" { + type = string + default = "anka-packer-from-source" +} + +source "veertu-anka-vm-clone" "clone" { + vm_name = "${var.vm_name}" + source_vm_name = "${var.source_vm_name}" +} + +build { + sources = [ + "source.veertu-anka-vm-clone.clone", + ] + provisioner "file" { + destination = "/private/tmp/" + source = "./examples/ansible" + } + provisioner "shell" { + inline = [ + "[[ ! -d /tmp/ansible ]] && exit 100", + "touch /tmp/ansible/test1" + ] + } + provisioner "file" { + destination = "./" + direction = "download" + source = "/private/tmp/ansible/test1" + } + provisioner "shell-local" { + inline = [ + "[[ ! -f ./test1 ]] && exit 200", + "rm -f ./test1" + ] + } +} + +``` diff --git a/.web-docs/components/builder/vm-create/README.md b/.web-docs/components/builder/vm-create/README.md new file mode 100644 index 0000000..78a410a --- /dev/null +++ b/.web-docs/components/builder/vm-create/README.md @@ -0,0 +1,103 @@ +Type: `veertu-anka-vm-create` + +**Packer 3.x will no longer support Anka 2.x. You can still however use the Packer 2.x release for support.** + +The `veertu-anka-vm-create` Packer builder is able to create new Anka VM Templates for use with the +[Anka Virtualization](https://veertu.com/technology/) package and the [Anka Build Cloud](https://veertu.com/anka-build/). The builder takes the path to macOS installer .app +and installs that macOS version inside of an Anka VM Template. + +The builder does _not_ manage templates. Once a template is created, it is up +to you to use it or delete it. + +This builder is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to +your hcl template: + +```hcl +packer { + required_plugins { + veertu-anka = { + version = "= 3.1.1" + source = "github.com/veertuinc/veertu-anka" + } + } +} +``` + +## Configuration Reference + +There are many configuration options available for the builder. They are +segmented below into two categories: required and optional parameters. + +### Required Configuration + +* `installer` (String) The path to a macOS installer. This process takes about 20 minutes. + +* `type` (String) Must be `veertu-anka-vm-create`. + +### Optional Configuration + +* `vm_name` (String) The name for the VM that is created. One is generated with installer data if not provided (`anka-packer-base-{{ installer.OSVersion }}-{{ installer.BundlerVersion }}`). + +* `vcpu_count` (String) The number of vCPU cores, defaults to `2`. + + > This change gears us up for Anka 3.0 release when cpu_count will be vcpu_count. For now this is still CPU and not vCPU. + +* `ram_size` (String) The size in "[0-9]+G" format, defaults to `4G`. + +* `disk_size` (String) The size in "[0-9]+G" format, defaults to `40G`. + + > We will automatically resize the internal disk for you by executing `diskutil apfs resizeContainer disk0s2 0` inside of the VM + +* `stop_vm` (Boolean) Whether or not to stop the vm after it has been created, defaults to false. + +* `use_anka_cp` (Boolean) Use built in anka cp command. You shouldn't need this option. Defaults to false. + +* `anka_password` (String) Sets the password for the vm. Can also be set with `ANKA_DEFAULT_PASSWD` env var. Defaults to `admin`. + +* `anka_user` (String) Sets the username for the vm. Can also be set with `ANKA_DEFAULT_USER` env var. Defaults to `anka`. + +* `boot_delay` (String) The time to wait before running packer provisioner commands, defaults to `7s`. + +* `log_level` (String) The log level for Anka. This currently only supports `debug` and is only useful for VM creation failures. + +## Example + +Here is an example: + +```hcl + +variable "vm_name" { + type = string + default = "anka-packer-base-macos" +} + +variable "installer" { + type = string + default = "/Applications/Install macOS Big Sur.app/" +} + +variable "vcpu_count" { + type = string + default = "" +} + +source "veertu-anka-vm-create" "base" { + installer = "${var.installer}" + vm_name = "${var.vm_name}" + vcpu_count = "${var.vcpu_count}" +} + +build { + sources = [ + "source.veertu-anka-vm-create.base" + ] + + provisioner "shell" { + inline = [ + "echo hello world", + "echo llamas rock" + ] + } +} + +``` diff --git a/.web-docs/components/post-processor/anka-registry-push/README.md b/.web-docs/components/post-processor/anka-registry-push/README.md new file mode 100644 index 0000000..83b84d2 --- /dev/null +++ b/.web-docs/components/post-processor/anka-registry-push/README.md @@ -0,0 +1,95 @@ +Type: `veertu-anka-registry-push` + +The `veertu-anka-registry-push` Packer Post Processor is able to push your created Anka VM templates to the [Anka Build Cloud Registry](https://veertu.com/anka-build/) through the [Anka Virtualization](https://veertu.com/technology/) package. + +This post-processor is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to your hcl template: + +```hcl +packer { + required_plugins { + veertu-anka = { + version = "= 3.1.1" + source = "github.com/veertuinc/veertu-anka" + } + } +} +``` + +## Configuration Reference + +There are many configuration options available for the post-processor. They are +segmented below into two categories: required and optional parameters. + +### _**Required Configuration**_ + +* `type` (String) **Must be `veertu-anka-registry-push`; no other types** + +### _**Optional Configuration**_ + +* `cacert` (String) Path to a CA Root certificate. + +* `cert` (String) Path to your node certificate (if certificate authority is enabled). + +* `description` (String) The description of the tag. + +* `insecure` (Boolean) Skip TLS verification. + +* `key` (String) Path to your node certificate key if the client/node certificate doesn't contain one. + +* `local` (Boolean) Assign a tag to your local template and avoid pushing to the Registry. + +* `remote` (String) The registry URL or name to target for registry operation (will use your default configuration if not set). + +* `remote_vm` (String) The name of a registry template you want to push the local template onto. + +* `tag` (String) The name of the tag to push (will default as 'latest' if not set). + +* `force` (Boolean) Whether or not to forcefully push, regardless of a tag already existing + +## Other + +When using `packer build -force`, the post-processor will issue a [revert API call](https://docs.veertu.com/anka/anka-build-cloud/working-with-registry-and-api/#revert) to remove the existing tag before pushing the new. + +## Example + +Here is an example that uses the file and shell provisioners. + +```hcl + +variable "source_vm_name" { + type = string + default = "anka-packer-base-macos" +} + +variable "vm_name" { + type = string + default = "anka-packer-from-source" +} + +source "veertu-anka-vm-clone" "clone" { + vm_name = "${var.vm_name}" + source_vm_name = "${var.source_vm_name}" +} + +build { + sources = [ + "source.veertu-anka-vm-clone.clone", + ] + + provisioner "file" { + destination = "/private/tmp/" + source = "./examples/ansible" + } + provisioner "shell" { + inline = [ + "[[ ! -d /tmp/ansible ]] && exit 100", + "touch /tmp/ansible/test1" + ] + } + + post-processor "veertu-anka-registry-push" { + tag = "v2" + } +} + +``` diff --git a/.web-docs/metadata.hcl b/.web-docs/metadata.hcl new file mode 100644 index 0000000..7cf8535 --- /dev/null +++ b/.web-docs/metadata.hcl @@ -0,0 +1,22 @@ +# For full specification on the configuration of this file visit: +# https://github.com/hashicorp/integration-template#metadata-configuration +integration { + name = "Anka" + description = "TODO" + identifier = "packer/BrandonRomano/veertu-anka" + component { + type = "builder" + name = "Anka VM Create" + slug = "vm-create" + } + component { + type = "builder" + name = "Anka VM Clone" + slug = "vm-clone" + } + component { + type = "post-processor" + name = "Anka Build Cloud Registry Push" + slug = "anka-registry-push" + } +} diff --git a/.web-docs/scripts/compile-to-webdocs.sh b/.web-docs/scripts/compile-to-webdocs.sh new file mode 100755 index 0000000..51a7238 --- /dev/null +++ b/.web-docs/scripts/compile-to-webdocs.sh @@ -0,0 +1,129 @@ +#!/usr/bin/env bash + +# Converts the folder name that the component documentation file +# is stored in into the integration slug of the component. +componentTypeFromFolderName() { + if [[ "$1" = "builders" ]]; then + echo "builder" + elif [[ "$1" = "provisioners" ]]; then + echo "provisioner" + elif [[ "$1" = "post-processors" ]]; then + echo "post-processor" + elif [[ "$1" = "datasources" ]]; then + echo "data-source" + else + echo "" + fi +} + +# $1: The content to adjust links +# $2: The organization of the integration +rewriteLinks() { + local result="$1" + local organization="$2" + + urlSegment="([^/]+)" + urlAnchor="(#[^/]+)" + + # Rewrite Component Index Page links to the Integration root page. + # + # (\1) (\2) (\3) + # /packer/plugins/datasources/amazon#anchor-tag--> + # /packer/integrations/hashicorp/amazon#anchor-tag + local find="\(\/packer\/plugins\/$urlSegment\/$urlSegment$urlAnchor?\)" + local replace="\(\/packer\/integrations\/$organization\/\2\3\)" + result="$(echo "$result" | sed -E "s/$find/$replace/g")" + + + # Rewrite Component links to the Integration component page + # + # (\1) (\2) (\3) (\4) + # /packer/plugins/datasources/amazon/parameterstore#anchor-tag --> + # /packer/integrations/{organization}/amazon/latest/components/datasources/parameterstore + local find="\(\/packer\/plugins\/$urlSegment\/$urlSegment\/$urlSegment$urlAnchor?\)" + local replace="\(\/packer\/integrations\/$organization\/\2\/latest\/components\/\1\/\3\4\)" + result="$(echo "$result" | sed -E "s/$find/$replace/g")" + + # Rewrite the Component URL segment from the Packer Plugin format + # to the Integrations format + result="$(echo "$result" \ + | sed "s/\/datasources\//\/data-source\//g" \ + | sed "s/\/builders\//\/builder\//g" \ + | sed "s/\/post-processors\//\/post-processor\//g" \ + | sed "s/\/provisioners\//\/provisioner\//g" \ + )" + + echo "$result" +} + +# $1: Docs Dir +# $2: Web Docs Dir +# $3: Component File +# $4: The org of the integration +processComponentFile() { + local docsDir="$1" + local webDocsDir="$2" + local componentFile="$3" + + local escapedDocsDir="$(echo "$docsDir" | sed 's/\//\\\//g' | sed 's/\./\\\./g')" + local componentTypeAndSlug="$(echo "$componentFile" | sed "s/$escapedDocsDir\///g" | sed 's/\.mdx//g')" + + # Parse out the Component Slug & Component Type + local componentSlug="$(echo "$componentTypeAndSlug" | cut -d'/' -f 2)" + local componentType="$(componentTypeFromFolderName "$(echo "$componentTypeAndSlug" | cut -d'/' -f 1)")" + if [[ "$componentType" = "" ]]; then + echo "Failed to process '$componentFile', unexpected folder name." + echo "Documentation for components must be stored in one of:" + echo "builders, provisioners, post-processors, datasources" + exit 1 + fi + + + # Calculate the location of where this file will ultimately go + local webDocsFolder="$webDocsDir/components/$componentType/$componentSlug" + mkdir -p "$webDocsFolder" + local webDocsFile="$webDocsFolder/README.md" + local webDocsFileTmp="$webDocsFolder/README.md.tmp" + + # Copy over the file to its webDocsFile location + cp "$componentFile" "$webDocsFile" + + # Remove the Header + local lastMetadataLine="$(grep -n -m 2 '^\-\-\-' "$componentFile" | tail -n1 | cut -d':' -f1)" + cat "$webDocsFile" | tail -n +"$(($lastMetadataLine+2))" > "$webDocsFileTmp" + mv "$webDocsFileTmp" "$webDocsFile" + + # Remove the top H1, as this will be added automatically on the web + cat "$webDocsFile" | tail -n +3 > "$webDocsFileTmp" + mv "$webDocsFileTmp" "$webDocsFile" + + # Rewrite Links + rewriteLinks "$(cat "$webDocsFile")" "$4" > "$webDocsFileTmp" + mv "$webDocsFileTmp" "$webDocsFile" +} + +# Compiles the Packer SDC compiled docs folder down +# to a integrations-compliant folder (web docs) +# +# $1: The directory of the plugin +# $2: The directory of the SDC compiled docs files +# $3: The output directory to place the web-docs files +# $4: The org of the integration +compileWebDocs() { + local docsDir="$1/$2" + local webDocsDir="$1/$3" + + echo "Compiling MDX docs in '$2' to Markdown in '$3'..." + # Create the web-docs directory if it hasn't already been created + mkdir -p "$webDocsDir" + + # Copy the README over + cp "$docsDir/README.md" "$webDocsDir/README.md" + + # Process all MDX component files (exclude index files, which are unsupported) + for file in $(find "$docsDir" | grep "$docsDir/.*/.*\.mdx" | grep --invert-match "index.mdx"); do + processComponentFile "$docsDir" "$webDocsDir" "$file" "$4" + done +} + +compileWebDocs "$1" "$2" "$3" "$4" diff --git a/Makefile b/Makefile index fa87d28..bc691ca 100644 --- a/Makefile +++ b/Makefile @@ -114,4 +114,10 @@ go.hcl2spec: install-packer-sdc #generate-docs: @ Generate packer docs generate-docs: install-packer-sdc - @pushd dist/; packer-sdc renderdocs -src ../docs -partials docs-partials/ -dst docs/ && /bin/sh -c "[ -d docs ] && zip -r docs.zip docs/" \ No newline at end of file + @pushd dist/; packer-sdc renderdocs -src ../docs -partials docs-partials/ -dst docs/ && /bin/sh -c "[ -d docs ] && zip -r docs.zip docs/" + +build-docs: install-packer-sdc + @if [ -d ".docs" ]; then rm -r ".docs"; fi + @packer-sdc renderdocs -src "docs" -partials docs-partials/ -dst ".docs/" + @./.web-docs/scripts/compile-to-webdocs.sh "." ".docs" ".web-docs" "BrandonRomano" + @rm -r ".docs" diff --git a/docs/builders/vm-clone.mdx b/docs/builders/vm-clone.mdx index b6a8d35..37fdcb6 100644 --- a/docs/builders/vm-clone.mdx +++ b/docs/builders/vm-clone.mdx @@ -35,13 +35,13 @@ packer { There are many configuration options available for the builder. They are segmented below into two categories: required and optional parameters. -#### _**Required Configuration**_ +### _**Required Configuration**_ * `source_vm_name` (String) The VM to clone for provisioning, either stopped or suspended. * `type` (String) Must be `veertu-anka-vm-clone`. -#### _**Optional Configuration**_ +### _**Optional Configuration**_ * `vm_name` (String) The name for the VM that is created. diff --git a/docs/builders/vm-create.mdx b/docs/builders/vm-create.mdx index ebb8432..d471e81 100644 --- a/docs/builders/vm-create.mdx +++ b/docs/builders/vm-create.mdx @@ -38,14 +38,14 @@ packer { There are many configuration options available for the builder. They are segmented below into two categories: required and optional parameters. -#### Required Configuration +### Required Configuration * `installer` (String) The path to a macOS installer. This process takes about 20 minutes. - Starting in 3.1.2: This can also be set to 'latest' or a specific macOS version in order to have Anka attempt downloading the installer for you (`vm_name` will be set to `anka-packer-base-${installer}`). * `type` (String) Must be `veertu-anka-vm-create`. -#### Optional Configuration +### Optional Configuration * `vm_name` (String) The name for the VM that is created. One is generated with installer data if not provided (`anka-packer-base-{{ installer.OSVersion }}-{{ installer.BundlerVersion }}`). diff --git a/docs/post-processors/anka-registry-push.mdx b/docs/post-processors/anka-registry-push.mdx index 739b29a..33be668 100644 --- a/docs/post-processors/anka-registry-push.mdx +++ b/docs/post-processors/anka-registry-push.mdx @@ -29,11 +29,11 @@ packer { There are many configuration options available for the post-processor. They are segmented below into two categories: required and optional parameters. -#### _**Required Configuration**_ +### _**Required Configuration**_ * `type` (String) **Must be `veertu-anka-registry-push`; no other types** -#### _**Optional Configuration**_ +### _**Optional Configuration**_ * `cacert` (String) Path to a CA Root certificate. From d0c5dd080dbb119faee2cd71d645cc6af22a61c5 Mon Sep 17 00:00:00 2001 From: BrandonRomano Date: Wed, 14 Jun 2023 10:19:24 -0700 Subject: [PATCH 2/8] Delete intermediary docs folder --- .docs/builders/vm-clone.mdx | 144 ------------------- .docs/builders/vm-create.mdx | 113 --------------- .docs/post-processors/anka-registry-push.mdx | 104 -------------- .web-docs/README.md | 5 + docs/README.md | 5 + 5 files changed, 10 insertions(+), 361 deletions(-) delete mode 100644 .docs/builders/vm-clone.mdx delete mode 100644 .docs/builders/vm-create.mdx delete mode 100644 .docs/post-processors/anka-registry-push.mdx create mode 100644 .web-docs/README.md create mode 100644 docs/README.md diff --git a/.docs/builders/vm-clone.mdx b/.docs/builders/vm-clone.mdx deleted file mode 100644 index 8b953a8..0000000 --- a/.docs/builders/vm-clone.mdx +++ /dev/null @@ -1,144 +0,0 @@ ---- -description: | - The veertu-anka-vm-clone Packer builder is able to clone existing Anka VM Templates for use with Anka Virtualization and the Anka Build Cloud. The builder takes a source VM name, clones it, and then runs any provisioning necessary on the new VM Template before stopping or suspending it. -page_title: Anka VM Clone - Builders -nav_title: VM Clone ---- - -# Anka VM Clone Builder - -Type: `veertu-anka-vm-clone` - -The `veertu-anka-vm-clone` Packer builder is able to clone existing Anka VM Templates for use with the [Anka Virtualization](https://veertu.com/technology/) package and the [Anka Build Cloud](https://veertu.com/anka-build/). The builder takes a source VM name, clones it, and then runs any provisioning necessary on the new VM Template before stopping or suspending it. - -The builder does _not_ manage templates. Once a template is created, it is up -to you to use it or delete it. - -This builder is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to your hcl template: - -```hcl -packer { - required_plugins { - veertu-anka = { - version = "= 3.1.1" - source = "github.com/veertuinc/veertu-anka" - } - } -} -``` - -## Important Notes - -**In Anka 3.0** we now require a tagged source VM before cloning in order to share the underlying .ank image and optimize disk space. If your source VM is not tagged yet, we will assign one . **We highly recommend pushing this VM Template/Tag to your registry so [disk usage is optimized](https://docs.veertu.com/anka/apple/getting-started/creating-your-first-vm/#disk-optimization).** - -## Configuration Reference - -There are many configuration options available for the builder. They are segmented below into two categories: required and optional parameters. - -### _**Required Configuration**_ - -* `source_vm_name` (String) The VM to clone for provisioning, either stopped or suspended. - -* `type` (String) Must be `veertu-anka-vm-clone`. - -### _**Optional Configuration**_ - -* `vm_name` (String) The name for the VM that is created. - - > Generated using the source_vm_name if not provided: (`{{ source_vm_name }}-{10RandomChars}`). - -* `vcpu_count` (String) The number of vCPU cores, defaults to `2`. - -* `ram_size` (String) The size in "[0-9]+G" format, defaults to `2G`. - -* `disk_size` (String) The size in "[0-9]+G" format, defaults to `25G`. - - > We will automatically resize the internal disk for you by executing `diskutil apfs resizeContainer disk0s2 0` inside of the VM. - -* `stop_vm` (Boolean) Whether or not to stop the vm after it has been created, defaults to false. - -* `display_controller` (string) The display controller to set (run `anka modify VMNAME set display --help` to see available options). - -* `always_fetch` (Boolean) Always pull the source VM from the registry. Defaults to false. - -* `boot_delay` (String) The time to wait before running packer provisioner commands, defaults to `7s`. - -* `cacert` (String) Path to a CA Root certificate. - -* `cert` (String) Path to your node's client certificate to use for registry communication (if certificate authorization is enabled). - -* `insecure` (Boolean) Skip TLS verification. - -* `key` (String) Path to your node's client certificate key, if the `cert` certificate doesn't contain one, to use for registry communication (if certificate authorization is enabled). - -* `hw_uuid` (String) (Anka 2 only) The Hardware UUID you wish to set (usually generated with `uuidgen`). - -* `port_forwarding_rules` (Struct) - - > If port forwarding rules are already set and you want to not have them fail the packer build, use `packer build --force`. - - * `port_forwarding_guest_port` (Int) - * `port_forwarding_host_port` (Int) - * `port_forwarding_rule_name` (String) - -* `registry-path` (String) The registry URL (will use your default configuration if not set). - -* `remote` (String) The registry name (will use your default configuration if not set). - - > This takes priority in Anka 3 and `registry-path` will be ignored. - -* `source_vm_tag` (String) Specify the tag of the VM we want to clone instead of using the default. - -* `update_addons` (Boolean) (Anka 2 only) Update the vm addons. Defaults to false. - -* `use_anka_cp` (Boolean) Use built in anka cp command. Defaults to false. - -## Example - -Here is an example that uses the file and shell provisioners. - -```hcl - -variable "source_vm_name" { - type = string - default = "anka-packer-base-macos" -} - -variable "vm_name" { - type = string - default = "anka-packer-from-source" -} - -source "veertu-anka-vm-clone" "clone" { - vm_name = "${var.vm_name}" - source_vm_name = "${var.source_vm_name}" -} - -build { - sources = [ - "source.veertu-anka-vm-clone.clone", - ] - provisioner "file" { - destination = "/private/tmp/" - source = "./examples/ansible" - } - provisioner "shell" { - inline = [ - "[[ ! -d /tmp/ansible ]] && exit 100", - "touch /tmp/ansible/test1" - ] - } - provisioner "file" { - destination = "./" - direction = "download" - source = "/private/tmp/ansible/test1" - } - provisioner "shell-local" { - inline = [ - "[[ ! -f ./test1 ]] && exit 200", - "rm -f ./test1" - ] - } -} - -``` diff --git a/.docs/builders/vm-create.mdx b/.docs/builders/vm-create.mdx deleted file mode 100644 index b0967c9..0000000 --- a/.docs/builders/vm-create.mdx +++ /dev/null @@ -1,113 +0,0 @@ ---- -description: | - The veertu-anka-vm-create Packer builder is able to create new VM templates for use with - Anka. The builder takes the path to macOS installer .app, installs macOS using that installer inside of an Anka VM Template, and then runs any provisioning necessary on the instance. -page_title: Anka VM Create - Builders -nav_title: VM Create ---- - -# Veertu's Anka VM Create Builder - -Type: `veertu-anka-vm-create` - -**Packer 3.x will no longer support Anka 2.x. You can still however use the Packer 2.x release for support.** - -The `veertu-anka-vm-create` Packer builder is able to create new Anka VM Templates for use with the -[Anka Virtualization](https://veertu.com/technology/) package and the [Anka Build Cloud](https://veertu.com/anka-build/). The builder takes the path to macOS installer .app -and installs that macOS version inside of an Anka VM Template. - -The builder does _not_ manage templates. Once a template is created, it is up -to you to use it or delete it. - -This builder is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to -your hcl template: - -```hcl -packer { - required_plugins { - veertu-anka = { - version = "= 3.1.1" - source = "github.com/veertuinc/veertu-anka" - } - } -} -``` - -## Configuration Reference - -There are many configuration options available for the builder. They are -segmented below into two categories: required and optional parameters. - -### Required Configuration - -* `installer` (String) The path to a macOS installer. This process takes about 20 minutes. - -* `type` (String) Must be `veertu-anka-vm-create`. - -### Optional Configuration - -* `vm_name` (String) The name for the VM that is created. One is generated with installer data if not provided (`anka-packer-base-{{ installer.OSVersion }}-{{ installer.BundlerVersion }}`). - -* `vcpu_count` (String) The number of vCPU cores, defaults to `2`. - - > This change gears us up for Anka 3.0 release when cpu_count will be vcpu_count. For now this is still CPU and not vCPU. - -* `ram_size` (String) The size in "[0-9]+G" format, defaults to `4G`. - -* `disk_size` (String) The size in "[0-9]+G" format, defaults to `40G`. - - > We will automatically resize the internal disk for you by executing `diskutil apfs resizeContainer disk0s2 0` inside of the VM - -* `stop_vm` (Boolean) Whether or not to stop the vm after it has been created, defaults to false. - -* `use_anka_cp` (Boolean) Use built in anka cp command. You shouldn't need this option. Defaults to false. - -* `anka_password` (String) Sets the password for the vm. Can also be set with `ANKA_DEFAULT_PASSWD` env var. Defaults to `admin`. - -* `anka_user` (String) Sets the username for the vm. Can also be set with `ANKA_DEFAULT_USER` env var. Defaults to `anka`. - -* `boot_delay` (String) The time to wait before running packer provisioner commands, defaults to `7s`. - -* `log_level` (String) The log level for Anka. This currently only supports `debug` and is only useful for VM creation failures. - -## Example - -Here is an example: - -```hcl - -variable "vm_name" { - type = string - default = "anka-packer-base-macos" -} - -variable "installer" { - type = string - default = "/Applications/Install macOS Big Sur.app/" -} - -variable "vcpu_count" { - type = string - default = "" -} - -source "veertu-anka-vm-create" "base" { - installer = "${var.installer}" - vm_name = "${var.vm_name}" - vcpu_count = "${var.vcpu_count}" -} - -build { - sources = [ - "source.veertu-anka-vm-create.base" - ] - - provisioner "shell" { - inline = [ - "echo hello world", - "echo llamas rock" - ] - } -} - -``` diff --git a/.docs/post-processors/anka-registry-push.mdx b/.docs/post-processors/anka-registry-push.mdx deleted file mode 100644 index d0be677..0000000 --- a/.docs/post-processors/anka-registry-push.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -description: | - The veertu-anka-registry-push Packer Post Processor is able to push your created VM template to the Anka Build Cloud Registry. -page_title: Anka Build Cloud Registry Push - Post Processors -nav_title: Anka Registry Push ---- - -# Anka Build Cloud Registry Push Post-Processor - -Type: `veertu-anka-registry-push` - -The `veertu-anka-registry-push` Packer Post Processor is able to push your created Anka VM templates to the [Anka Build Cloud Registry](https://veertu.com/anka-build/) through the [Anka Virtualization](https://veertu.com/technology/) package. - -This post-processor is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to your hcl template: - -```hcl -packer { - required_plugins { - veertu-anka = { - version = "= 3.1.1" - source = "github.com/veertuinc/veertu-anka" - } - } -} -``` - -## Configuration Reference - -There are many configuration options available for the post-processor. They are -segmented below into two categories: required and optional parameters. - -### _**Required Configuration**_ - -* `type` (String) **Must be `veertu-anka-registry-push`; no other types** - -### _**Optional Configuration**_ - -* `cacert` (String) Path to a CA Root certificate. - -* `cert` (String) Path to your node certificate (if certificate authority is enabled). - -* `description` (String) The description of the tag. - -* `insecure` (Boolean) Skip TLS verification. - -* `key` (String) Path to your node certificate key if the client/node certificate doesn't contain one. - -* `local` (Boolean) Assign a tag to your local template and avoid pushing to the Registry. - -* `remote` (String) The registry URL or name to target for registry operation (will use your default configuration if not set). - -* `remote_vm` (String) The name of a registry template you want to push the local template onto. - -* `tag` (String) The name of the tag to push (will default as 'latest' if not set). - -* `force` (Boolean) Whether or not to forcefully push, regardless of a tag already existing - -## Other - -When using `packer build -force`, the post-processor will issue a [revert API call](https://docs.veertu.com/anka/anka-build-cloud/working-with-registry-and-api/#revert) to remove the existing tag before pushing the new. - -## Example - -Here is an example that uses the file and shell provisioners. - -```hcl - -variable "source_vm_name" { - type = string - default = "anka-packer-base-macos" -} - -variable "vm_name" { - type = string - default = "anka-packer-from-source" -} - -source "veertu-anka-vm-clone" "clone" { - vm_name = "${var.vm_name}" - source_vm_name = "${var.source_vm_name}" -} - -build { - sources = [ - "source.veertu-anka-vm-clone.clone", - ] - - provisioner "file" { - destination = "/private/tmp/" - source = "./examples/ansible" - } - provisioner "shell" { - inline = [ - "[[ ! -d /tmp/ansible ]] && exit 100", - "touch /tmp/ansible/test1" - ] - } - - post-processor "veertu-anka-registry-push" { - tag = "v2" - } -} - -``` diff --git a/.web-docs/README.md b/.web-docs/README.md new file mode 100644 index 0000000..19c7f1f --- /dev/null +++ b/.web-docs/README.md @@ -0,0 +1,5 @@ +(TODO) + +This is a [Packer](https://www.packer.io/) Plugin for building images that work with [Veertu's Anka macOS Virtualization tool](https://veertu.com/). + +- For use with the post-processor, it's important to use `anka registry add` to [set your default registry on the machine building your templates/tags](https://docs.veertu.com/anka/apple/command-line-reference/#registry-add). diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..19c7f1f --- /dev/null +++ b/docs/README.md @@ -0,0 +1,5 @@ +(TODO) + +This is a [Packer](https://www.packer.io/) Plugin for building images that work with [Veertu's Anka macOS Virtualization tool](https://veertu.com/). + +- For use with the post-processor, it's important to use `anka registry add` to [set your default registry on the machine building your templates/tags](https://docs.veertu.com/anka/apple/command-line-reference/#registry-add). From c847c9e461e881ebdb2e8db4587f4dd87bb50fb0 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 21 Nov 2023 18:45:27 +0000 Subject: [PATCH 3/8] Add top-level README for integration --- .web-docs/README.md | 36 +++++++++++++++++-- .../components/builder/vm-clone/README.md | 15 +------- .../components/builder/vm-create/README.md | 27 +++++++------- .../anka-registry-push/README.md | 2 +- docs/README.md | 36 +++++++++++++++++-- docs/builders/vm-clone.mdx | 13 ------- docs/builders/vm-create.mdx | 14 -------- 7 files changed, 81 insertions(+), 62 deletions(-) diff --git a/.web-docs/README.md b/.web-docs/README.md index 19c7f1f..fa4208c 100644 --- a/.web-docs/README.md +++ b/.web-docs/README.md @@ -1,5 +1,35 @@ -(TODO) - This is a [Packer](https://www.packer.io/) Plugin for building images that work with [Veertu's Anka macOS Virtualization tool](https://veertu.com/). -- For use with the post-processor, it's important to use `anka registry add` to [set your default registry on the machine building your templates/tags](https://docs.veertu.com/anka/apple/command-line-reference/#registry-add). +### Installation + +To install this plugin, copy and paste this code into your Packer configuration, then run [`packer init`](https://www.packer.io/docs/commands/init). + +```hcl +packer { + required_plugins { + veertu-anka = { + version = "= 3.2.0" + source = "github.com/veertuinc/veertu-anka" + } + } +} +``` + +Alternatively, you can use `packer plugins install` to manage installation of this plugin. + +```sh +$ packer plugins install github.com/veertuinc/veertu-anka +``` + +### Components +~> For use with the post-processor, it's important to use `anka registry add` to [set your default registry on the machine building your templates/tags](https://docs.veertu.com/anka/apple/command-line-reference/#registry-add). + +#### Builders +- [veertu-anka-vm-clone](/packer/integrations/veertuinc/veertu-anka/latest/components/builder/clone) - Packer builder is able to clone existing Anka VM Templates for use with the [Anka Virtualization](https://veertu.com/technology/) package and the [Anka Build Cloud](https://veertu.com/anka-build/). The builder takes a source VM name, clones it, and then runs any provisioning necessary on the new VM Template before stopping or suspending it. +- [veertu-anka-vm-create- ](/packer/integrations/veertuinc/veertu-anka/latest/components/builder/create) Packer builder is able to create new Anka VM Templates for use with the +[Anka Virtualization](https://veertu.com/technology/) package and the [Anka Build Cloud](https://veertu.com/anka-build/). The builder takes the path to macOS installer .app +and installs that macOS version inside of an Anka VM Template. + +#### Post-Processors +- [veertu-anka-registry-push](/packer/integrations/veertuinc/veertu-anka/latest/components/post-processor/veertu-anka-registry-push) Packer Post Processor is able to push your created Anka VM templates to +the [Anka Build Cloud Registry](https://veertu.com/anka-build/) through the [Anka Virtualization](https://veertu.com/technology/) package. diff --git a/.web-docs/components/builder/vm-clone/README.md b/.web-docs/components/builder/vm-clone/README.md index 671533d..1b2e685 100644 --- a/.web-docs/components/builder/vm-clone/README.md +++ b/.web-docs/components/builder/vm-clone/README.md @@ -5,19 +5,6 @@ The `veertu-anka-vm-clone` Packer builder is able to clone existing Anka VM Temp The builder does _not_ manage templates. Once a template is created, it is up to you to use it or delete it. -This builder is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to your hcl template: - -```hcl -packer { - required_plugins { - veertu-anka = { - version = "= 3.1.1" - source = "github.com/veertuinc/veertu-anka" - } - } -} -``` - ## Important Notes **In Anka 3.0** we now require a tagged source VM before cloning in order to share the underlying .ank image and optimize disk space. If your source VM is not tagged yet, we will assign one . **We highly recommend pushing this VM Template/Tag to your registry so [disk usage is optimized](https://docs.veertu.com/anka/apple/getting-started/creating-your-first-vm/#disk-optimization).** @@ -78,7 +65,7 @@ There are many configuration options available for the builder. They are segment > This takes priority in Anka 3 and `registry-path` will be ignored. -* `source_vm_tag` (String) Specify the tag of the VM we want to clone instead of using the default. +* `source_vm_tag` (String) Specify the tag of the VM we want to clone instead of using the default. Also the tag to target when pulling from the registry (defaults to latest tag). * `update_addons` (Boolean) (Anka 2 only) Update the vm addons. Defaults to false. diff --git a/.web-docs/components/builder/vm-create/README.md b/.web-docs/components/builder/vm-create/README.md index 78a410a..6fda7ff 100644 --- a/.web-docs/components/builder/vm-create/README.md +++ b/.web-docs/components/builder/vm-create/README.md @@ -9,20 +9,6 @@ and installs that macOS version inside of an Anka VM Template. The builder does _not_ manage templates. Once a template is created, it is up to you to use it or delete it. -This builder is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to -your hcl template: - -```hcl -packer { - required_plugins { - veertu-anka = { - version = "= 3.1.1" - source = "github.com/veertuinc/veertu-anka" - } - } -} -``` - ## Configuration Reference There are many configuration options available for the builder. They are @@ -31,6 +17,7 @@ segmented below into two categories: required and optional parameters. ### Required Configuration * `installer` (String) The path to a macOS installer. This process takes about 20 minutes. + - Starting in 3.1.2: This can also be set to 'latest' or a specific macOS version in order to have Anka attempt downloading the installer for you (`vm_name` will be set to `anka-packer-base-${installer}`). * `type` (String) Must be `veertu-anka-vm-create`. @@ -60,6 +47,18 @@ segmented below into two categories: required and optional parameters. * `log_level` (String) The log level for Anka. This currently only supports `debug` and is only useful for VM creation failures. +* `hw_uuid` (String) (Anka 2 only) The Hardware UUID you wish to set (usually generated with `uuidgen`). + +* `port_forwarding_rules` (Struct) + + > If port forwarding rules are already set and you want to not have them fail the packer build, use `packer build --force`. + + * `port_forwarding_guest_port` (Int) + * `port_forwarding_host_port` (Int) + * `port_forwarding_rule_name` (String) + +* `display_controller` (string) The display controller to set (run `anka modify VMNAME set display --help` to see available options). + ## Example Here is an example: diff --git a/.web-docs/components/post-processor/anka-registry-push/README.md b/.web-docs/components/post-processor/anka-registry-push/README.md index 83b84d2..b9b2364 100644 --- a/.web-docs/components/post-processor/anka-registry-push/README.md +++ b/.web-docs/components/post-processor/anka-registry-push/README.md @@ -8,7 +8,7 @@ This post-processor is part of the [Veertu Anka plugin](https://github.com/veert packer { required_plugins { veertu-anka = { - version = "= 3.1.1" + version = "= 3.2.0" source = "github.com/veertuinc/veertu-anka" } } diff --git a/docs/README.md b/docs/README.md index 19c7f1f..fa4208c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,35 @@ -(TODO) - This is a [Packer](https://www.packer.io/) Plugin for building images that work with [Veertu's Anka macOS Virtualization tool](https://veertu.com/). -- For use with the post-processor, it's important to use `anka registry add` to [set your default registry on the machine building your templates/tags](https://docs.veertu.com/anka/apple/command-line-reference/#registry-add). +### Installation + +To install this plugin, copy and paste this code into your Packer configuration, then run [`packer init`](https://www.packer.io/docs/commands/init). + +```hcl +packer { + required_plugins { + veertu-anka = { + version = "= 3.2.0" + source = "github.com/veertuinc/veertu-anka" + } + } +} +``` + +Alternatively, you can use `packer plugins install` to manage installation of this plugin. + +```sh +$ packer plugins install github.com/veertuinc/veertu-anka +``` + +### Components +~> For use with the post-processor, it's important to use `anka registry add` to [set your default registry on the machine building your templates/tags](https://docs.veertu.com/anka/apple/command-line-reference/#registry-add). + +#### Builders +- [veertu-anka-vm-clone](/packer/integrations/veertuinc/veertu-anka/latest/components/builder/clone) - Packer builder is able to clone existing Anka VM Templates for use with the [Anka Virtualization](https://veertu.com/technology/) package and the [Anka Build Cloud](https://veertu.com/anka-build/). The builder takes a source VM name, clones it, and then runs any provisioning necessary on the new VM Template before stopping or suspending it. +- [veertu-anka-vm-create- ](/packer/integrations/veertuinc/veertu-anka/latest/components/builder/create) Packer builder is able to create new Anka VM Templates for use with the +[Anka Virtualization](https://veertu.com/technology/) package and the [Anka Build Cloud](https://veertu.com/anka-build/). The builder takes the path to macOS installer .app +and installs that macOS version inside of an Anka VM Template. + +#### Post-Processors +- [veertu-anka-registry-push](/packer/integrations/veertuinc/veertu-anka/latest/components/post-processor/veertu-anka-registry-push) Packer Post Processor is able to push your created Anka VM templates to +the [Anka Build Cloud Registry](https://veertu.com/anka-build/) through the [Anka Virtualization](https://veertu.com/technology/) package. diff --git a/docs/builders/vm-clone.mdx b/docs/builders/vm-clone.mdx index 37fdcb6..5a028e2 100644 --- a/docs/builders/vm-clone.mdx +++ b/docs/builders/vm-clone.mdx @@ -14,19 +14,6 @@ The `veertu-anka-vm-clone` Packer builder is able to clone existing Anka VM Temp The builder does _not_ manage templates. Once a template is created, it is up to you to use it or delete it. -This builder is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to your hcl template: - -```hcl -packer { - required_plugins { - veertu-anka = { - version = "= 3.2.0" - source = "github.com/veertuinc/veertu-anka" - } - } -} -``` - ## Important Notes **In Anka 3.0** we now require a tagged source VM before cloning in order to share the underlying .ank image and optimize disk space. If your source VM is not tagged yet, we will assign one . **We highly recommend pushing this VM Template/Tag to your registry so [disk usage is optimized](https://docs.veertu.com/anka/apple/getting-started/creating-your-first-vm/#disk-optimization).** diff --git a/docs/builders/vm-create.mdx b/docs/builders/vm-create.mdx index d471e81..f94a436 100644 --- a/docs/builders/vm-create.mdx +++ b/docs/builders/vm-create.mdx @@ -19,20 +19,6 @@ and installs that macOS version inside of an Anka VM Template. The builder does _not_ manage templates. Once a template is created, it is up to you to use it or delete it. -This builder is part of the [Veertu Anka plugin](https://github.com/veertuinc/packer-plugin-veertu-anka). To install this plugin using `packer init`, add the following Packer block to -your hcl template: - -```hcl -packer { - required_plugins { - veertu-anka = { - version = "= 3.2.0" - source = "github.com/veertuinc/veertu-anka" - } - } -} -``` - ## Configuration Reference There are many configuration options available for the builder. They are From 8a4c2e4f029f9cde9517bd4d2dfb1c0e323144ba Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 21 Nov 2023 20:15:24 +0000 Subject: [PATCH 4/8] Update workflows --- ...notify-integration-release-via-manual.yaml | 18 ++++++----- .../notify-integration-release-via-tag.yaml | 30 ++++++++++++++----- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/.github/workflows/notify-integration-release-via-manual.yaml b/.github/workflows/notify-integration-release-via-manual.yaml index eec48a4..d2c0ff0 100644 --- a/.github/workflows/notify-integration-release-via-manual.yaml +++ b/.github/workflows/notify-integration-release-via-manual.yaml @@ -1,10 +1,12 @@ +# Manual release workflow is used for deploying documentation updates +# on the specified branch without making an official plugin release. name: Notify Integration Release (Manual) on: workflow_dispatch: inputs: version: description: "The release version (semver)" - default: 0.0.1 + default: 1.0.0 required: false branch: description: "A branch or SHA" @@ -15,32 +17,34 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout this repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: ref: ${{ github.event.inputs.branch }} # Ensure that Docs are Compiled - - uses: actions/setup-go@v4 + - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 - shell: bash - run: make build-docs + run: make generate - shell: bash run: | if [[ -z "$(git status -s)" ]]; then echo "OK" else echo "Docs have been updated, but the compiled docs have not been committed." - echo "Run 'make build-docs', and commit the result to resolve this error." + echo "Run 'make generate', and commit the result to resolve this error." exit 1 fi # Perform the Release - name: Checkout integration-release-action - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: repository: hashicorp/integration-release-action path: ./integration-release-action - name: Notify Release uses: ./integration-release-action with: - integration_identifier: 'packer/BrandonRomano/veertu-anka' + # The integration identifier will be used by the Packer team to register the integration + # the expected format is packer// + integration_identifier: "packer/hashicorp/scaffolding" release_version: ${{ github.event.inputs.version }} release_sha: ${{ github.event.inputs.branch }} github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/notify-integration-release-via-tag.yaml b/.github/workflows/notify-integration-release-via-tag.yaml index 103fd1f..7318c02 100644 --- a/.github/workflows/notify-integration-release-via-tag.yaml +++ b/.github/workflows/notify-integration-release-via-tag.yaml @@ -3,38 +3,52 @@ on: push: tags: - '*.*.*' # Proper releases - - '*.*.*-*' # Pre releases jobs: + strip-version: + runs-on: ubuntu-latest + outputs: + packer-version: ${{ steps.strip.outputs.packer-version }} + steps: + - name: Strip leading v from version tag + id: strip + env: + REF: ${{ github.ref_name }} + run: | + echo "packer-version=$(echo "$REF" | sed -E 's/v?([0-9]+\.[0-9]+\.[0-9]+)/\1/')" >> "$GITHUB_OUTPUT" notify-release: + needs: + - strip-version runs-on: ubuntu-latest steps: - name: Checkout this repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: ref: ${{ github.ref }} # Ensure that Docs are Compiled - - uses: actions/setup-go@v4 + - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 - shell: bash - run: make build-docs + run: make generate - shell: bash run: | if [[ -z "$(git status -s)" ]]; then echo "OK" else echo "Docs have been updated, but the compiled docs have not been committed." - echo "Run 'make build-docs', and commit the result to resolve this error." + echo "Run 'make generate', and commit the result to resolve this error." exit 1 fi # Perform the Release - name: Checkout integration-release-action - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: repository: hashicorp/integration-release-action path: ./integration-release-action - name: Notify Release uses: ./integration-release-action with: - integration_identifier: 'packer/BrandonRomano/veertu-anka' - release_version: ${{ github.ref_name }} + # The integration identifier will be used by the Packer team to register the integration + # the expected format is packer// + integration_identifier: "packer/hashicorp/scaffolding" + release_version: ${{ needs.strip-version.outputs.packer-version }} release_sha: ${{ github.ref }} github_token: ${{ secrets.GITHUB_TOKEN }} From f493ff993a13a2871c39cb92658f14d691bad0c4 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 22 Nov 2023 17:38:25 +0000 Subject: [PATCH 5/8] Update integration Organization name --- .web-docs/metadata.hcl | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.web-docs/metadata.hcl b/.web-docs/metadata.hcl index 7cf8535..eacc26a 100644 --- a/.web-docs/metadata.hcl +++ b/.web-docs/metadata.hcl @@ -3,7 +3,7 @@ integration { name = "Anka" description = "TODO" - identifier = "packer/BrandonRomano/veertu-anka" + identifier = "packer/veertuinc/veertu-anka" component { type = "builder" name = "Anka VM Create" diff --git a/Makefile b/Makefile index bc691ca..c11b9fc 100644 --- a/Makefile +++ b/Makefile @@ -119,5 +119,5 @@ generate-docs: install-packer-sdc build-docs: install-packer-sdc @if [ -d ".docs" ]; then rm -r ".docs"; fi @packer-sdc renderdocs -src "docs" -partials docs-partials/ -dst ".docs/" - @./.web-docs/scripts/compile-to-webdocs.sh "." ".docs" ".web-docs" "BrandonRomano" + @./.web-docs/scripts/compile-to-webdocs.sh "." ".docs" ".web-docs" "veertuinc" @rm -r ".docs" From 0ba6699e534bac5e2d13f79bd54a50220ffc3a34 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 22 Nov 2023 18:48:13 +0000 Subject: [PATCH 6/8] Update identifier in workflows --- .github/workflows/notify-integration-release-via-manual.yaml | 2 +- .github/workflows/notify-integration-release-via-tag.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/notify-integration-release-via-manual.yaml b/.github/workflows/notify-integration-release-via-manual.yaml index d2c0ff0..f227253 100644 --- a/.github/workflows/notify-integration-release-via-manual.yaml +++ b/.github/workflows/notify-integration-release-via-manual.yaml @@ -44,7 +44,7 @@ jobs: with: # The integration identifier will be used by the Packer team to register the integration # the expected format is packer// - integration_identifier: "packer/hashicorp/scaffolding" + integration_identifier: "packer/veertuinc/veertu-anka" release_version: ${{ github.event.inputs.version }} release_sha: ${{ github.event.inputs.branch }} github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/notify-integration-release-via-tag.yaml b/.github/workflows/notify-integration-release-via-tag.yaml index 7318c02..f5fea35 100644 --- a/.github/workflows/notify-integration-release-via-tag.yaml +++ b/.github/workflows/notify-integration-release-via-tag.yaml @@ -48,7 +48,7 @@ jobs: with: # The integration identifier will be used by the Packer team to register the integration # the expected format is packer// - integration_identifier: "packer/hashicorp/scaffolding" + integration_identifier: "packer/veertuinc/veertu-anka" release_version: ${{ needs.strip-version.outputs.packer-version }} release_sha: ${{ github.ref }} github_token: ${{ secrets.GITHUB_TOKEN }} From dfad0c54c0af32fbe23bf85272dd63b6212a08bd Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 24 Nov 2023 16:06:58 -0500 Subject: [PATCH 7/8] Makefile: replace build-docs by generate-docs --- .github/workflows/ensure-docs-compiled.yaml | 4 ++-- Makefile | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ensure-docs-compiled.yaml b/.github/workflows/ensure-docs-compiled.yaml index 8d10ac7..33a143c 100644 --- a/.github/workflows/ensure-docs-compiled.yaml +++ b/.github/workflows/ensure-docs-compiled.yaml @@ -9,14 +9,14 @@ jobs: uses: actions/checkout@v2 - uses: actions/setup-go@v4 - shell: bash - run: make build-docs + run: make generate-docs - shell: bash run: | if [[ -z "$(git status -s)" ]]; then echo "OK" else echo "Docs have been updated, but the compiled docs have not been committed." - echo "Run 'make build-docs', and commit the result to resolve this error." + echo "Run 'make generate-docs', and commit the result to resolve this error." exit 1 fi diff --git a/Makefile b/Makefile index c11b9fc..1a0c6ab 100644 --- a/Makefile +++ b/Makefile @@ -114,9 +114,6 @@ go.hcl2spec: install-packer-sdc #generate-docs: @ Generate packer docs generate-docs: install-packer-sdc - @pushd dist/; packer-sdc renderdocs -src ../docs -partials docs-partials/ -dst docs/ && /bin/sh -c "[ -d docs ] && zip -r docs.zip docs/" - -build-docs: install-packer-sdc @if [ -d ".docs" ]; then rm -r ".docs"; fi @packer-sdc renderdocs -src "docs" -partials docs-partials/ -dst ".docs/" @./.web-docs/scripts/compile-to-webdocs.sh "." ".docs" ".web-docs" "veertuinc" From f4f478a2f372d8937badb20cfb37228616cc7245 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 29 Nov 2023 12:03:23 -0500 Subject: [PATCH 8/8] Update .web-docs/metadata.hcl --- .web-docs/metadata.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.web-docs/metadata.hcl b/.web-docs/metadata.hcl index eacc26a..f92ae17 100644 --- a/.web-docs/metadata.hcl +++ b/.web-docs/metadata.hcl @@ -2,7 +2,7 @@ # https://github.com/hashicorp/integration-template#metadata-configuration integration { name = "Anka" - description = "TODO" + description = "A plugin for building images that work with Veertu's Anka macOS Virtualization tool." identifier = "packer/veertuinc/veertu-anka" component { type = "builder"