Openstack builder - source image url

151 views
Skip to first unread message

Richard Beauchamp

unread,
Oct 6, 2017, 7:20:25 AM10/6/17
to Packer
The documentation suggests that the source_image can be a URL - but is a little light on what this means.

source_image (string) - The ID or full URL to the base image to use. This is the image that will be used to launch a new server and provision it. Unless you specify completely custom SSH settings, the source image must have cloud-init installed so that the keypair gets assigned properly.

I was hoping that it would download and cache the image at the URL and upload this as a temporary image to my Openstack.  However, providing a URL as the source_image is giving me an error.

This is basically what I currently do in my homespun build scripts, but I'm trying to move everything to Packer.

I am working around this by using a wrapper script to handle the image download from the remote web site and upload this to glance and then call my packer build, setting the source_image to the id of the created image via a user variable.  It then deletes the image after the build.

This has some weaknesses, and I would much rather move to doing this in packer and using the Cache rather than my own crude version, based on keeping the image on disk and curl to only download if it's changed!


Can you let me know if this is the intended use of the URL in source_image (much like the ISO download in other builders)...and if not suggest the best way to extend packer to do something similar.

Thanks,
Richard.

Alvaro Miranda Aguilera

unread,
Oct 6, 2017, 8:08:13 AM10/6/17
to packe...@googlegroups.com
Hello

I am not 100% sure, but seems is the url of the image you already have in the openstack.

Checking this, looks like it use the id to find the url, or you can just use the url.


So seems is not to create a new image from an url from outiside the openstack.



--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/6516b8e2-b644-4f43-bcbf-af1286027761%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Rickard von Essen

unread,
Oct 6, 2017, 8:23:17 AM10/6/17
to packe...@googlegroups.com
I can confirm that that is how it works. 

Reply all
Reply to author
Forward
0 new messages