Openstack builder artifacts and the the manifest post processor...

17 views
Skip to first unread message

Richard Beauchamp

unread,
Oct 9, 2017, 6:26:53 AM10/9/17
to Packer
I'm trying to write a post processor for my Openstack builds, that downloads the image does some work on it and then re-uploads it.

Didn't sound too hard!  I'm struggling to find a way to reference the created Openstack image that doesn't rely on the name I gave it in the build.

I though the manifest post-processor should output the Instance ID, but that doesn't seem to be the case.

==> openstack: Running post-processor: manifest
==> openstack: Running post-processor: shell-local
==> openstack (shell-local): Post processing with local shell script: ./openstack-postinstall.sh
    openstack (shell-local): Openstack post install
Build 'openstack' finished.

==> Builds finished. The artifacts of successful builds are:
--> openstack: An image was created: 089ea30b-4849-41be-baf7-6cb26cd5d42d
--> openstack:
--> openstack:
--> openstack:


This is the manifest file I get:
# cat manifest.json
{
  "builds": [
    {
      "name": "openstack",
      "builder_type": "openstack",
      "build_time": 1507542817,
      "files": null,
      "artifact_id": "",
      "packer_run_uuid": "0825d714-a86a-46e4-eb41-810c78b293e1"
    }
  ],
  "last_run_uuid": "0825d714-a86a-46e4-eb41-810c78b293e1"
}

Am I missing something?

Or is there an issue with the manifest production for the Openstack builder?

Thanks for any help...

Rich

Richard Beauchamp

unread,
Oct 9, 2017, 9:27:23 AM10/9/17
to Packer
Answering my own question!

I had the manifest post-processor running after a shell local post-processor in my template.

Putting the manifest as the first post-processor fixes the issue for me.
Reply all
Reply to author
Forward
0 new messages