~ubuntu-branches/ubuntu/vivid/maas/vivid-updates

« back to all changes in this revision

Viewing changes to docs/sstreams-mirror.rst

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2014-12-04 12:24:18 UTC
  • mfrom: (1.3.3)
  • Revision ID: package-import@ubuntu.com-20141204122418-9imwp88egsves0hd
Tags: 1.7.0+bzr3299-0ubuntu2
debian/maas-common.postinst: Ensure that the maas user gets its home
directory created in /var/lib/maas. (LP: #1399016)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Local Mirroring of Boot Images
 
2
==============================
 
3
 
 
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
 
7
link.
 
8
 
 
9
First, install the required packages on the host where you wish to store
 
10
the mirrored images::
 
11
 
 
12
  $ sudo apt-get install simplestreams ubuntu-cloudimage-keyring apache2
 
13
 
 
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::
 
17
 
 
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
 
19
 
 
20
This may take a while as hundreds of megabytes will be downloaded.
 
21
 
 
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).
 
26
 
 
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.
 
29
 
 
30
 
 
31
Configuring MAAS to use the local mirror
 
32
----------------------------------------
 
33
 
 
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
 
36
user::
 
37
 
 
38
  $ maas <profile> boot-sources create url=http://<server>keyring_filename=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg
 
39
 
 
40
And then initiate the download with::
 
41
 
 
42
  $ maas <profile> boot-resources import
 
43
 
 
44
See :doc:`bootsources` for more detail.
 
45
 
 
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
 
49
example above.
 
50
 
 
51
The import is initiated by browsing to the Images tab and following the
 
52
instructions on that page.