The Packer Plugin for IBM Cloud Power Virtual Server (PowerVS) enables automated creation of custom images on IBM Cloud's Power Systems infrastructure. This plugin provides a builder, provisioner, post-processor, and data source for managing PowerVS resources through Packer.
- Automated Image Building: Create custom PowerVS images from stock images or Cloud Object Storage (COS) sources
- Flexible Provisioning: Support for shell scripts, Ansible, and other Packer provisioners
- Multiple Capture Options: Export images to Cloud Object Storage, Image Catalog, or both
- Network Management: Automatic DHCP network creation or use existing subnets
- SSH Support: Built-in SSH communicator for instance configuration
- Multi-Architecture: Native support for ppc64le architecture
- Requirements
- Installation
- Quick Start
- Configuration
- Examples
- Documentation
- Development
- Contributing
- License
- Packer >= 1.7.0
- Go >= 1.18 (for building from source)
- IBM Cloud Account with PowerVS service
- IBM Cloud API Key with appropriate permissions
- PowerVS Service Instance: Create a PowerVS service instance in your desired region
- API Key: Generate an IBM Cloud API key with PowerVS access
- SSH Key: Upload your SSH public key to PowerVS
- Network: Either existing subnet IDs or enable DHCP network creation
- Cloud Object Storage (Optional): For importing/exporting images
Add the following to your Packer template:
packer {
required_plugins {
powervs = {
version = ">= 0.0.1"
source = "github.com/ppc64le-cloud/powervs"
}
}
}Then run:
packer init .- Download the latest release from GitHub Releases
- Extract the binary to your Packer plugins directory:
- Linux/macOS:
~/.packer.d/plugins/ - Windows:
%APPDATA%\packer.d\plugins\
- Linux/macOS:
git clone https://github.com/ppc64le-cloud/packer-plugin-powervs.git
cd packer-plugin-powervs
make installThis will build the plugin and install it to your Packer plugins directory automatically.
Alternative: Development Installation
For development purposes, you can use:
make devThis builds and copies the binary to ~/.packer.d/plugins/ for quick testing.
Create a template file template.pkr.hcl:
packer {
required_plugins {
powervs = {
version = ">= 0.0.1"
source = "github.com/ppc64le-cloud/powervs"
}
}
}
source "powervs" "example" {
api_key = var.ibm_api_key
service_instance_id = "your-service-instance-id"
zone = "lon04"
source {
stock_image {
name = "CentOS-Stream-8"
}
}
instance_name = "packer-${timestamp()}"
key_pair_name = "your-ssh-key"
dhcp_network = true
ssh_username = "root"
ssh_private_key_file = "~/.ssh/id_rsa"
capture {
name = "my-image-${timestamp()}"
destination = "image-catalog"
}
}
build {
sources = ["source.powervs.example"]
provisioner "shell" {
inline = ["yum update -y && yum install -y vim"]
}
}Initialize and build:
packer init .
packer build -var="ibm_api_key=YOUR_KEY" template.pkr.hclFor detailed configuration options, see the User Guide and API Reference.
- Apache Web Server - Complete example with HTTP server setup
- Kubernetes Integration - Using with Kubernetes Image Builder
- More Examples - Additional use cases and configurations
- User Guide - Complete guide from basics to advanced usage
- API Reference - Full configuration reference
- Troubleshooting - Common issues and solutions
- Architecture - Plugin design and internals
- Plugin Components - Detailed component documentation
See CONTRIBUTING.md for complete development guide including:
- Development setup and workflow
- Building and testing
- Code standards and best practices
- Submitting contributions
We welcome contributions! See CONTRIBUTING.md for the complete guide.
Quick start: Fork → Create branch → Make changes → Test → Submit PR
Having issues? Check the Troubleshooting Guide for solutions to common problems.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Packer - HashiCorp Packer
- IBM Cloud Power Virtual Server
- Kubernetes Image Builder
- Cluster API Provider IBM Cloud
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
See OWNERS for the complete list of maintainers.
- HashiCorp Packer team for the plugin SDK
- IBM Cloud team for PowerVS APIs
- Kubernetes SIG Cluster Lifecycle for image-builder integration
- All contributors who have helped improve this plugin
Note: This plugin is community-maintained and not officially supported by IBM or HashiCorp.