Agama URLs
In addition to well known protocols, like http(s)://
. ftp://
, file://
, etc., Agama understands
most of
YaST and AutoYaST specific URLs. So
when you need to specify a URL (e.g., if you want to perform an unattended installation), you can
use any of those options.
Supported schemes
Agama supports the following standard schemes1:
http
andhttps
for HTTP and HTTPS.ftp
andftps
for FTP and FTP over TSL.smb
andsmbs
for the Server Message Block (SMB) protocol2.nfs
for the Network File System (NFS) protocol.file
for local files.
In addition to those schemes, Agama supports a set of specific ones which can be rather useful:
device
for finding files on specific devices (even unmounted ones).usb
for finding files in USB devices (even unmounted ones).label
for finding files in a file system with a given label.cd
,dvd
,hd
for finding files on specific devices (preferdevice
).
Relative references
For "scripts"
and "files"
in the Agama JSON config, the "url"
property
can be a relative reference, where the resolution base is the URL of the containing config.
This is a replacement for the scheme used in AutoYaST.relurl
For example, if the configuration below is retrieved from
https://example.com/machines/sles16.jsonnet
, it refers to
https://example.com/machines/scripts/snapshot.sh
.
{
scripts: {
postPartitioning: [
{
name: "snapshot",
url: "scripts/snapshot.sh"
}
]
}
}
Agama specific schemes
The typical protocols are enough for most use cases. However, more specific URLs can be handy in
many situations. For instance, instead of serving your profile through HTTP, you could just put it
on a USB stick and tell Agama about it with usb:///profile.json
. Agama would search on all your
USB devices for the profile to use.
Let's have a look to the different kind of URLs that Agama offers.
device
This is the most flexible scheme. The general form is device://[DEVICE]/PATH
. Let's have a look to
some examples to better understand of how it works.
In the following example, Agama will search for the profile.json
file in the /dev/sda1
device:
device://sda1/profile.json
It is possible to search in a given directory. In this case, the /profiles/sles.json
file in the
/dev/sda1
device:
device://sda1/profiles/sles.json
Nested devices are supported too:
device:///cciss/c1d0p5/sles.json
usb
The usb://
scheme is a particular form of the device://
but limited to USB devices. As mentioned
before, the following URL will search the profile/sles.json
on all USB devices.
usb:///profile/sles.json
label
The label://
scheme allows to search on file systems with a given label. It has the form
label://LABEL/PATH
. In the following example, Agama will search for the sles.json
in a file
system labeled as OEMDRV
:
label://OEMDRV/sles.json
cd
, dvd
and hd
This is another particular case of device://
but with a slightly different form. In Agama, there
is no difference between these forms (hd
, dvd
and cd
). The syntax is
dvd:/PATH?devices=DEVICE
:
hd:/sles.jsonnet?devices=/dev/sr0
dvd:/autoinst.xml?devices=sr1
Prefer device
to cd
, dvd
or hd
Given that cd
, dvd
and hd
do not offer any
advantage, using device
might be a better option.
Not supported yet
The repo://
URLs are not supported yet, but there are plans to implement them.
Footnotes
-
Agama relies on curl to support generic protocols (network protocols and
file://
). So it might happen that some protocol is supported "by accident". However, only the documented protocols are really supported by Agama. ↩ -
Use
smb
instead ofcifs
, although in the future you should be able to use any of them. ↩