AEM Hello World Custom Image Provisioner
This is an example AEM Hello World Custom Image Provisioner artifact that will be set up as one of Packer AEM customisation points.
This artifact contains:
pre-common.shshell script which will be executed before component image provisioning
post-common.shshell script which will be executed after component image provisioning
- Example Puppet module manifests in
- Example InSpec tests which will check the result of the above Puppet module, the binary is available at
Here's an example log output of the post step:
The use of Puppet and InSpec here is just an example. You can use other tools like Ansible, or even plain shell script if need be. They can be installed either in the pre-common.sh/post-common.sh shell scripts or in Packer AEM source image.
To create artifact tar.gz file:
The artifact will be written at
Copy the tar.gz artifact file to Packer AEM, please note that the file must be (re)named to
cp stage/aem-helloworld-custom-image-provisioner-<version>.tar.gz <path/to/packer-aem>/stage/custom/aem-custom-image-provisioner.tar.gz
If you are using Puppet, the following global facts are available:
||The component name, useful for identifying which image is being provisioned.|
||A user defined string for passing additional provisioning run information. User can inject this value by specifying environment variable
If you need more information from the provisioning process, you can tap into the Hiera data by adding
-hiera_config='/tmp/packer-puppet-masterless/hiera.yaml flag to your Puppet apply call.