1
Local Mirroring of Boot Images
2
==============================
4
Boot images are delivered to MAAS via the simplestreams protocol. It is
5
useful in some situations, such as testing, to mirror the images locally
6
so that you don't need to repeatedly pull them down over a slower Internet
9
First, install the required packages on the host where you wish to store
12
$ sudo apt-get install simplestreams ubuntu-cloudimage-keyring apache2
14
Now you can pull the images over using the mirroring tools for simplestreams.
15
This example gets the daily trusty (14.04) and precise (12.04) images for the
16
amd64/generic and amd64/hwe-t architectures::
18
$ sudo sstream-mirror --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg http://maas.ubuntu.com/images/ephemeral-v2/daily/ /var/www/html/maas/images/ephemeral-v2/daily 'arch=amd64' 'subarch~(generic|hwe-t)' 'release~(trusty|precise)' --max=1
20
This may take a while as hundreds of megabytes will be downloaded.
22
The images will be written to the local disk and you can verify their
23
presence by browsing to
24
``http://<server>/maas/images/ephemeral-v2/daily/streams/v1/index.sjson``
25
(replace ``<server>`` with your own server's name).
27
It is a good idea to configure a ``cron`` job to repeat this import on a
28
regular basis to keep your mirror up-to-date.
31
Configuring MAAS to use the local mirror
32
----------------------------------------
34
You can do this using the API or the web UI. To do this via the API you
35
can use the ``maas`` (see :doc:`maascli`) command, logged in as the admin
38
$ maas <profile> boot-sources create url=http://<server>keyring_filename=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg
40
And then initiate the download with::
42
$ maas <profile> boot-resources import
44
See :doc:`bootsources` for more detail.
46
In the web UI, browse to the Settings tab as the admin user and scroll down
47
to the "Boot Images" section. There you will find input boxes for the
48
Sync URL and the keyring path, which should be set as the values in the API
51
The import is initiated by browsing to the Images tab and following the
52
instructions on that page.