summaryrefslogtreecommitdiff
path: root/doc/source/install/configure-glance-images.rst
blob: 4b8300678f160479c40efb0ce9c44280bbcec972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
.. _image-requirements:

Add images to the Image service
===============================

Instance (end-user) images
~~~~~~~~~~~~~~~~~~~~~~~~~~

Build or download the user images as described in :doc:`/user/creating-images`.

Load all the created images into the Image service, and note the image UUIDs in
the Image service for each one as it is generated.

- For *whole disk images* just upload the image:

  .. code-block:: console

     $ openstack image create my-whole-disk-image --public \
       --disk-format qcow2 --container-format bare \
       --file my-whole-disk-image.qcow2

  .. warning::
      The kernel/ramdisk pair must not be set for whole disk images,
      otherwise they'll be mistaken for partition images.

- For *partition images* to be used only with *local boot* (the default)
  the ``img_type`` property must be set:

  .. code-block:: console

     $ openstack image create my-image --public \
       --disk-format qcow2 --container-format bare \
       --property img_type=partition --file my-image.qcow2

- For *partition images* to be used with both *local* and *network* boot:

  Add the kernel and ramdisk images to the Image service:

  .. code-block:: console

     $ openstack image create my-kernel --public \
       --disk-format aki --container-format aki --file my-image.vmlinuz

  Store the image uuid obtained from the above step as ``MY_VMLINUZ_UUID``.

  .. code-block:: console

     $ openstack image create my-image.initrd --public \
       --disk-format ari --container-format ari --file my-image.initrd

  Store the image UUID obtained from the above step as ``MY_INITRD_UUID``.

  Add the *my-image* to the Image service which is going to be the OS
  that the user is going to run. Also associate the above created
  images with this OS image. These two operations can be done by
  executing the following command:

  .. code-block:: console

     $ openstack image create my-image --public \
       --disk-format qcow2 --container-format bare --property \
       kernel_id=$MY_VMLINUZ_UUID --property \
       ramdisk_id=$MY_INITRD_UUID --file my-image.qcow2

Deploy ramdisk images
~~~~~~~~~~~~~~~~~~~~~

#. Build or download the deploy images

   The deploy images are used initially for preparing the server (creating disk
   partitions) before the actual OS can be deployed.

   There are several methods to build or download deploy images, please read
   the :ref:`deploy-ramdisk` section.

#. Add the deploy images to the Image service

   Add the deployment kernel and ramdisk images to the Image service:

   .. code-block:: console

      $ openstack image create deploy-vmlinuz --public \
        --disk-format aki --container-format aki \
        --file ironic-python-agent.vmlinuz

   Store the image UUID obtained from the above step as ``DEPLOY_VMLINUZ_UUID``.

   .. code-block:: console

      $ openstack image create deploy-initrd --public \
        --disk-format ari --container-format ari \
        --file ironic-python-agent.initramfs

   Store the image UUID obtained from the above step as ``DEPLOY_INITRD_UUID``.

#. Configure the Bare Metal service to use the produced images. It can be done
   per node as described in :doc:`enrollment` or globally in the configuration
   file:

   .. code-block:: ini

    [conductor]
    deploy_kernel = <insert DEPLOY_VMLINUZ_UUID>
    deploy_ramdisk = <insert DEPLOY_INITRD_UUID>