• Infrastructure
    • terraform
    • packer
  • Networking
    • consul
  • Security
    • vault
    • boundary
  • Applications
    • nomad
    • waypoint
    • vagrant
  • HashiCorp Cloud Platform

    A fully managed platform to automate infrastructure on any cloud with HashiCorp products.

    • consul
    • terraform
    • vault
    • packerbeta
    Visit cloud.hashicorp.com
  • Overview
  • Tutorials
  • Docs
  • Plugins
  • Community
GitHubInstall PackerTry HCP Packer
  • About External Plugins

      • 1&1
      • Alicloud ECS
      • Alicloud Import
      • Anka Registry Push
      • VM Clone
      • VM Create
      • Ansible (Remote)
      • Ansible Local
      • Overview
      • Amazon AMI
      • Parameter Store
      • Secrets Manager
      • Overview
      • chroot
      • EBS
      • EBS Surrogate
      • EBS Volume
      • Instance
      • Amazon Import
      • Overview
      • ARM
      • chroot
      • DTL
      • Azure DTL Artifact
      • Chef Client
      • Chef Solo
      • CloudStack
      • Converge
      • digitalocean
      • digitalocean-import
      • Docker
      • Docker Import
      • Docker Push
      • Docker Save
      • Docker Tag
      • Overview
      • Commit
      • Repository
      • Tree
      • Google Cloud Platform
      • googlecompute-export
      • googlecompute-import
      • Overview
      • Receipt
      • Overview
      • Toppings
      • Overview
      • Coffees
      • Ingredients
      • Overview
      • Order
      • Hetzner Cloud
      • HuaweiCloud
      • HyperOne
      • Overview
      • ISO
      • VMCX
      • InSpec
      • JDCloud
      • Kamatera
      • Linode
      • Libvirt
      • LXC
      • LXD
      • Naver Cloud
      • OpenStack
      • Overview
      • Classic
      • OCI
      • Overview
      • BSU
      • BSU Surrogate
      • BSU Volume
      • chroot
      • Overview
      • ISO
      • PVM
      • ProfitBricks
      • Overview
      • Clone
      • ISO
      • Puppet Masterless
      • Puppet Server
      • QEMU
      • Salt Masterless
      • Scaleway
      • SSH Key
      • Tencent Cloud
      • Triton
      • UCloud
      • UCloud Import
      • upcloud
      • upcloud-import
      • Vagrant
      • Vagrant
      • Vagrant Cloud
      • Overview
      • ISO
      • OVF
      • VM
      • Overview
      • Clone
      • ISO
      • vSphere
      • vSphere Template
      • Overview
      • ISO
      • VMX
      • Vultr
      • Yandex
      • yandex-export
      • yandex-import
Type '/' to Search
Community
v2.3.1

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 through the Anka Virtualization package.

This post-processor is part of the Veertu Anka plugin. To install this plugin using packer init, add the following Packer block to your hcl template:

packer {
  required_plugins {
    veertu-anka = {
      version = ">= 2.1.0"
      source  = "github.com/veertuinc/packer-plugin-veertu-anka"
    }
  }
}
packer {
  required_plugins {
    veertu-anka = {
      version = ">= 2.1.0"
      source  = "github.com/veertuinc/packer-plugin-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

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.

  • registry_path (String)

The registry URL (will use your default configuration if not set).

  • registry_name (String)

The registry name (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 (String)

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 to remove the existing tag before pushing the new.

Example

Here is an example that uses the file and shell provisioners.


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"
  }
}
 
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"
  }
}

github logoEdit this page
IntroGuidesDocsCommunityPrivacySecurityPress KitConsent Manager