Provisions VM with Fabric running remotely on the build server
Install the binary (you'll need git
and go
):
$ go get github.com/unifio/packer-provisioner-fabric
Copy the plugin into packer.d directory:
$ mkdir $HOME/.packer.d/plugins
$ cp $GOPATH/bin/packer-provisioner-fabric $HOME/.packer.d/plugins
Add the provisioner to your packer template:
{
"variables": {
"version": "0.0.1",
"box_name": "my-cool-project"
},
"builders": [ ... ],
"provisioners": [{
"type": "fabric",
"fab_file": "fabfile.py",
"fab_tasks": "test"
}]
}
All configuration properties are required, except where noted.
The relative path to the fabfile to be utilized.
Comma separated list of tasks to be executed.
Specific delimiter for task list. Default is comma ,
.
SSH user to be used to connect to the SSH server on the host machine to forward commands to the target machine.
A system-chosen port is used when local_port
is missing or empty.
(string) - The SSH key that will be used to run the SSH server on the host machine to forward commands to the target machine. Fabric connects to this server and will validate the identity of the server using the system known_hosts. The default behavior is to generate and use a onetime key. Host key checking is disabled if the key is generated.
(string) - The SSH public key of the Fabric ssh_user. The default behavior is to generate and use a onetime key. If this key is generated, the corresponding private key is passed to fab
with the -i
option.
(string) - The command to run on the machine being provisioned by Packer to handle the SFTP protocol that Fabric will use to transfer files. The command should read and write on stdin and stdout, respectively. Defaults to /usr/lib/sftp-server -e
.