vmware ignition url

247 views
Skip to first unread message

Douglas Davenport

unread,
Jan 18, 2017, 12:49:19 PM1/18/17
to CoreOS User
Can guestinfo.coreos.config.url be used to supply an Ignition JSON file?

Alex Crawford

unread,
Jan 18, 2017, 12:51:24 PM1/18/17
to Douglas Davenport, CoreOS User
On 01/18, Douglas Davenport wrote:
> Can guestinfo.coreos.config.url be used to supply an Ignition JSON file?

Currently, only coreos.config.data and coreos.config.data.encoding are
supported. I'm not opposed to adding support for a URL though. What is
your use-case?

-Alex
signature.asc

Douglas Davenport

unread,
Jan 18, 2017, 12:57:21 PM1/18/17
to CoreOS User


On Wednesday, January 18, 2017 at 12:49:19 PM UTC-5, Douglas Davenport wrote:
Can guestinfo.coreos.config.url be used to supply an Ignition JSON file?

I'd like to setup a template where guestinfo.coreos.config.url points to an Ignition file the can be customized before cloning the template into a new VM.

Is there a better way to do this?

Alex Crawford

unread,
Jan 18, 2017, 1:00:05 PM1/18/17
to Douglas Davenport, CoreOS User
On 01/18, Douglas Davenport wrote:
> I'd like to setup a template where guestinfo.coreos.config.url points to an
> Ignition file the can be customized before cloning the template into a new
> VM.
>
> Is there a better way to do this?

Hmm, it depends. Using a URL requires a remote service to be
operational, which may or may not be acceptable for you. The current
alternative is to include the Ignition config in the VM template itself.
In that scenario, the template can be used offline and still allows the
user to modify the config.

-Alex
signature.asc

Douglas Davenport

unread,
Jan 18, 2017, 1:07:44 PM1/18/17
to CoreOS User


On Wednesday, January 18, 2017 at 12:49:19 PM UTC-5, Douglas Davenport wrote:
Can guestinfo.coreos.config.url be used to supply an Ignition JSON file?

Supplying a new JSON file via a URL is easier for me as opposed to encoding the data and updating the .vmtx or .vmx file.

Is there a better way? 

Alex Crawford

unread,
Jan 18, 2017, 1:13:38 PM1/18/17
to Douglas Davenport, CoreOS User
On 01/18, Douglas Davenport wrote:
> Supplying a new JSON file via a URL is easier for me as opposed to encoding
> the data and updating the .vmtx or .vmx file.
>
> Is there a better way?

You can use chained configs [1] to achieve something similar. If you
encode the following config, at runtime, it will fetch the remote config
and use it instead:

{
"ignition": {
"version": "2.0.0",
"config": {
"replace": { "source": "http://example.com/config.json" }
}
}
}

If you need to modify the URL for every instance, it will still be a bit
of a pain since you'll need to re-encode the config. But if you have a
redirect in place or a server who knows who's making the requests, it
might work out of the box.

-Alex

[1]: https://coreos.com/ignition/docs/latest/examples.html#replacing-the-config-with-a-remote-config
signature.asc

Douglas Davenport

unread,
Jan 18, 2017, 1:20:38 PM1/18/17
to CoreOS User


On Wednesday, January 18, 2017 at 12:49:19 PM UTC-5, Douglas Davenport wrote:
Can guestinfo.coreos.config.url be used to supply an Ignition JSON file?

Yes, that will work, thanks for the insight. 
Reply all
Reply to author
Forward
0 new messages