QubitPi Packer multi-component plugin can be used with HashiCorp Packer to create images hosted on AWS. For the full list of available features for this plugin see docs.
Starting from version 1.7, Packer supports a new packer init
command allowing automatic installation of Packer
plugins. Read the Packer documentation for more information.
To install this plugin, copy and paste this code into Packer configuration. Then, run
packer init
.
packer {
required_plugins {
qubitpi = {
version = ">= 0.0.50"
source = "github.com/QubitPi/qubitpi"
}
}
}
We can find pre-built binary releases of the plugin here. Once we have downloaded the latest archive corresponding to our target OS, uncompress it to retrieve the plugin binary file corresponding to our platform. To install the plugin, please follow the Packer documentation on installing a plugin.
If one prefer to build the plugin from sources, clone the GitHub repository locally and run the command make build
from the root directory. Upon successful compilation, a packer-plugin-qubitpi
plugin binary file can be found in
the root directory. To install the compiled plugin, please follow the official Packer documentation on
installing a plugin.
For more information on how to configure the plugin, please read the documentation located in the docs/
directory.
See CONTRIBUTING.md for best practices and instructions on contributing to the Plugin.
Go expects a single workspace for third-party Go tools installed via go install
. By default, this workspace is located
in $HOME/go
with source code for these tools stored in $HOME/go/src
and the compiled binaries in $HOME/go/bin
. Set
$GOPATH
environment variable to this path first:
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
-
Clone this GitHub repository locally:
git clone [email protected]:QubitPi/packer-plugin-qubitpi.git cd packer-plugin-qubitpi
-
Build the plugin from the root directory:
go build -ldflags="-X github.com/QubitPi/packer-plugin-qubitpi/version.VersionPrerelease=dev" -o packer-plugin-qubitpi
-
After We successfully compile, the
packer-plugin-qubitpi
plugin binary file is in the root directory. -
To install the compiled plugin, run the following command
packer plugins install --path packer-plugin-qubitpi github.com/QubitPi/qubitpi
Tip
If executing the packer plugins install
reports an error, please make sure the version of packer
command is the
latest. To upgrade to the latest version, please refer to
Packer's documentation
Make sure to install the plugin locally using the steps in Build from source.
Once everything needed is set up, run:
PACKER_ACC=1 go test -count 1 -v ./... -timeout=120m
This will run the acceptance tests for all plugins in this set.
Caution
Please make sure the acceptance tests are running against the local version by deleting all previously installed
versions under $HOME/. config/packer/plugins
directory. Otherwise, the tests will pick up the old released version
if they were installed before. Deleting github.com/QubitPi/qubitpi
, for example, would be
rm -rf ~/.config/packer/plugins/github.com/QubitPi/qubitpi
Partner and community plugins can be hard to find if a user doesn't know what they are looking for. To assist with plugin discovery Packer offers an integration portal at https://developer.hashicorp.com/packer/integrations to list known integrations that work with the latest release of Packer.
Registering a plugin as an integration requires metadata configuration within the plugin repository and approval by the Packer team. To initiate the process of registering your plugin as a Packer integration refer to the Developing Plugins page.
The use and distribution terms for [packer-plugin-qubitpi] are covered by the Apache License, Version 2.0.