HashiCorp Packer 0.8

HashiCorp Packer 0.8

Jun 23 2015 Mitchell Hashimoto

We've released Packer 0.8. Packer is a tool for building virtual machine images, containers, and other deployable artifacts.

Packer 0.7 has been out for almost a year (with minor releases since then), and we decided it was time for a major release. Packer 0.8 is an immensely large release, with over a dozen new features. A big thanks to the community who had over 100 pull requests, as well as to HashiCorp employees Chris Bednarski and Clint Shryock who both dedicated time to this release.

Packer 0.8 is available immediately for download and is already running within Atlas.

Feature highlights for Packer 0.8:

    "communicator": "winrm",
    "winrm_username": "Administrator"
}]

}

You can also configure the WinRM port, WinRM password, etc. But most builders will automatically export this information for you.

Packer 0.8 also ships with three new Windows-specific provisioners: PowerShell, windows-shell (cmd), and windows-restart. These provisioners each require WinRM to be used as the connection.

The PowerShell provisioner lets you execute PowerShell scripts, the Windows Shell provisioner executes batch scripts, and the Windows restart provisioner initiates a restart and waits for the machine to complete the restart.

Windows AWS Images

    "communicator": "winrm",
    "winrm_username": "Administrator"
}],

"provisioners": [
    {
        "type": "powershell",
        "inline": [
            "dir c:\\"
        ]
    }
]

}

SSH Agent Forwarding, Bastion Hosts, and more

SSH within Packer has received many features and improvements. Packer will forward your SSH agent by default, can connect through bastion hosts, and SSH can also be completely disabled now.

    "ssh_bastion_host": "1.2.3.4",
    "ssh_bastion_username": "foo",
    "ssh_bastion_private_key_file": "{{template_dir}}/bastion.key"
}],

"provisioners": [
    {
        "type": "powershell",
        "inline": [
            "dir c:\\"
        ]
    }
]

}

And finally, you can now completely disable SSH if you don't want to use it. You can do this by specifying "communicator": "none". Note that without a communicator, provisioners will not work.

OpenStack Identity v3 and more

The OpenStack builder has been reworked from the ground up to be much more user friendly and to support new features. The most notable new feature is support for v3 of the identity API.

In addition to identity v3, various improvements have been made:

  • UUID as well as human friendly names can be specified for flavors and images.

  • Availability zones are supported.

  • Packer will stop the instance prior to snapshotting to avoid disk corruption if the OpenStack cluster supports the extension.

  • User data is supported.

And much more...

Local Shell Provisioning

Packer now has a shell-local provisioner for executing local shell scripts as part of the provisioning process. Usage is straightforward:

{ "provisioners": [{ "type": "shell-local", "command": "echo hello!" }] }

This is also supported in Atlas! Atlas runs Packer builds within a virtual machine, so you can execute custom scripts.

Dozens of smaller improvements

In addition to the major features above, Packer 0.8 includes some noteworthy improvements:

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×