Break New Ground

  • February 14, 2018

Announcing Packer Builder for Oracle Cloud Infrastructure Classic

Stephen Cross
Director, Partner Enablement

HashiCorp Packer 1.2.0 adds native support for building images on Oracle Cloud Infrastructure Classic.

Packer is an open source tool for creating machine images across multiple platforms from a single source configuration. With the new oracle-classic builder, Packer can now build new application images directly on Oracle Classic Compute, similar to the oracle-oci builder. New Images can be created from an Oracle provided base OS image, an existing private image, or an image that that has been installed from the Oracle Cloud Marketplace

Note: Packer can also create Oracle Cloud Infrastructure Classic compatible machine images using the VirtualBox builder - and this approach still remains useful when building new base OS images from ISOs, see Creating Oracle Compute Cloud Virtual Machine Images using Packer

oracle-classic Builder Example

This examples creates a new image with Redis installed using an existing Ubuntu image as the base OS.

Create a packer configuration file redis.json

Now run Packer to build the image

After packer completes the new Image is available in the Compute Classic console to launch new instances.

See also

For building Oracle Cloud Infrastructure images see:

Join the discussion

Comments ( 3 )
  • Craig Barr Thursday, July 5, 2018
    This is great!
    But how does one increase the disk size of the Oracle Machine Image created by Packer?
    When using defaults I get `no space left on device` once I'm a few provisioners deep in the build process
  • Andrew Dorman Thursday, October 11, 2018
    Great article, just one question.

    When using one of the Oracle Provided images as a source (e.g. OL_7.2_UEKR4_x86_64, is it possible to select the specific image version to use when creating the new image with packer?

    From what I can see the builder will always select the "latest" image version.

    (e.g. use the OL_7.2_UEKR4_x86_64-18.1.2-20180109-213545 (aka version 3) image and not the latest OL_7.2_UEKR4_x86_64-18.1.4-20180209-231028 (version 4) image.
  • Stephen Cross Thursday, October 11, 2018
    @Andrew The Packer builder for OCI-C currently does not support setting the image list entry to select older versions of an image. I suggest you open an issue against the Packer GitHub repo to request the enhancement.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.