1 # OpenDaylight CI Packer
3 [Packer][1] is a tool for automatically creating VM and container images,
4 configuring them and post-processing them into standard output formats.
6 We build OpenDaylight's CI images via Packer.
10 You'll need to [install Packer][2], of course.
12 OpenDaylight's Packer configuration separates build-specific variables,
13 output-specific templates, and a set of shared provisioning scripts. To do a
14 specific build, combine the template for the desired output artifact type with
15 a variable file. To build a new java-builder instance run this command:
18 packer build -var-file=vars/cloud-env.json -var-file=vars/centos.json templates/java-builder.json
21 **NOTE:** vars/cloud-env.json is a gitignored file as it contains private
22 information. The vars/cloud-env.json.example file is available as an example.
24 This would build bootable image in two different OpenStack clouds. In specific,
25 Rackspace's Public cloud and a private OpenStack cloud.
27 From a high level, the builds:
29 - Boot a specified base image in both clouds.
30 - Run a set of shell scripts, listed in the template's shell provisioner
31 section, to do any configuration required by the builder.
32 - Execute a shutdown of the running instance in the clouds.
33 - Execute a 'nova image-create' operation against the shutdown instance.
34 - Perform a 'nova delete' operation against the shutdown instance.
36 [1]: https://www.packer.io/
37 [2]: https://www.packer.io/intro/getting-started/setup.html