packerman
Ruby DSL for Packer by HashiCorp.
Usage
Packerman is converter ruby DSL to Packer template.
Currently, Packerman is supporting these template structures.
Builders (contains full communicator support)
- amazon-ebs
- amazon-instance
- amazon-chroot
- docker
- googlecompute
- null
- virtualbox-iso
Provisioners
- shell
- chef-solo
Variables
- variables are also supported
DSL
Here is DSL sample.
Builders type: "docker" do
image "centos"
export_path "image.tar"
end
Provisioners type: "shell" do
inline ['echo Hello Packerman']
end
then, use this command to convert DSL.
$ bundle exec packerman <filename>
{
"builders": [
{
"type": "docker",
"export_path": "image.tar",
"image": "centos"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"echo Hello Packerman"
]
}
]
}
Installation
add this line to your Gemfile
gem 'packerman'
then
$ bundle install
Contributing
- Fork it ( https://github.com/the40san/packerman/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Welcome :)