[install-guide] Import "Image requirements"
Import Image requirements under a new "Creating and adding images to the Image service" block in the "Configure integration with other OpenStack components" section. Change-Id: I503f8c60c7579e7ae5daf30032eb0b047ad40531 Partial-bug: #1612278
This commit is contained in:
parent
fb027ec924
commit
21e7fc3a68
@ -83,101 +83,10 @@ has been moved to the Bare Metal service Install Guide.
|
||||
Image requirements
|
||||
==================
|
||||
|
||||
Bare Metal provisioning requires two sets of images: the deploy images
|
||||
and the user images. The deploy images are used by the Bare Metal service
|
||||
to prepare the bare metal server for actual OS deployment. Whereas the
|
||||
user images are installed on the bare metal server to be used by the
|
||||
end user. Below are the steps to create the required images and add
|
||||
them to the Image service:
|
||||
The `Image requirements`_ section has been moved to the Bare Metal service
|
||||
Install Guide.
|
||||
|
||||
1. The `disk-image-builder`_ can be used to create images required for
|
||||
deployment and the actual OS which the user is going to run.
|
||||
|
||||
.. _disk-image-builder: http://docs.openstack.org/developer/diskimage-builder/
|
||||
|
||||
- Install diskimage-builder package (use virtualenv, if you don't
|
||||
want to install anything globally)::
|
||||
|
||||
sudo pip install diskimage-builder
|
||||
|
||||
- Build the image your users will run (Ubuntu image has been taken as
|
||||
an example)::
|
||||
|
||||
Partition images:
|
||||
disk-image-create ubuntu baremetal dhcp-all-interfaces grub2 -o my-image
|
||||
|
||||
Whole disk images:
|
||||
disk-image-create ubuntu vm dhcp-all-interfaces -o my-image
|
||||
|
||||
The partition image command creates *my-image.qcow2*, *my-image.vmlinuz* and
|
||||
*my-image.initrd* files. The *grub2* element in the partition image creation
|
||||
command is only needed if local boot will be used to deploy *my-image.qcow2*,
|
||||
otherwise the images *my-image.vmlinuz* and *my-image.initrd* will be used for
|
||||
PXE booting after deploying the bare metal with *my-image.qcow2*.
|
||||
|
||||
If you want to use Fedora image, replace *ubuntu* with *fedora* in the chosen
|
||||
command.
|
||||
|
||||
- To build the deploy image take a look at the `Building or
|
||||
downloading a deploy ramdisk image`_ section.
|
||||
|
||||
2. Add the user images to the Image service
|
||||
|
||||
Load all the images created in the below steps into the Image service,
|
||||
and note the image UUIDs in the Image service for each one as it is
|
||||
generated.
|
||||
|
||||
- Add the kernel and ramdisk images to the Image service::
|
||||
|
||||
glance image-create --name my-kernel --visibility public \
|
||||
--disk-format aki --container-format aki < my-image.vmlinuz
|
||||
|
||||
Store the image uuid obtained from the above step as
|
||||
*$MY_VMLINUZ_UUID*.
|
||||
|
||||
::
|
||||
|
||||
glance image-create --name my-image.initrd --visibility public \
|
||||
--disk-format ari --container-format ari < 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::
|
||||
|
||||
glance image-create --name my-image --visibility public \
|
||||
--disk-format qcow2 --container-format bare --property \
|
||||
kernel_id=$MY_VMLINUZ_UUID --property \
|
||||
ramdisk_id=$MY_INITRD_UUID < my-image.qcow2
|
||||
|
||||
- *Note:* To deploy a whole disk image, a kernel_id and a ramdisk_id
|
||||
shouldn't be associated with the image. An example is as follows::
|
||||
|
||||
glance image-create --name my-whole-disk-image --visibility public \
|
||||
--disk-format qcow2 \
|
||||
--container-format bare < my-whole-disk-image.qcow2
|
||||
|
||||
3. Add the deploy images to the Image service
|
||||
|
||||
Add the *my-deploy-ramdisk.kernel* and
|
||||
*my-deploy-ramdisk.initramfs* images to the Image service::
|
||||
|
||||
glance image-create --name deploy-vmlinuz --visibility public \
|
||||
--disk-format aki --container-format aki < my-deploy-ramdisk.kernel
|
||||
|
||||
Store the image UUID obtained from the above step as
|
||||
*$DEPLOY_VMLINUZ_UUID*.
|
||||
|
||||
::
|
||||
|
||||
glance image-create --name deploy-initrd --visibility public \
|
||||
--disk-format ari --container-format ari < my-deploy-ramdisk.initramfs
|
||||
|
||||
Store the image UUID obtained from the above step as
|
||||
*$DEPLOY_INITRD_UUID*.
|
||||
.. _`Image requirements`: http://docs.openstack.org/project-install-guide/baremetal/draft/configure-integration.html#configure-the-image-service
|
||||
|
||||
Flavor creation
|
||||
===============
|
||||
|
@ -7,3 +7,5 @@ Integration with other OpenStack services
|
||||
.. include:: include/configure-nova-compute.rst
|
||||
|
||||
.. include:: include/configure-neutron-networks.rst
|
||||
|
||||
.. include:: include/configure-glance-images.rst
|
||||
|
116
install-guide/source/include/configure-glance-images.rst
Normal file
116
install-guide/source/include/configure-glance-images.rst
Normal file
@ -0,0 +1,116 @@
|
||||
.. _image-requirements:
|
||||
|
||||
Create and add images to the Image service
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Bare Metal provisioning requires two sets of images: the deploy images
|
||||
and the user images. The deploy images are used by the Bare Metal service
|
||||
to prepare the bare metal server for actual OS deployment. Whereas the
|
||||
user images are installed on the bare metal server to be used by the
|
||||
end user. Below are the steps to create the required images and add
|
||||
them to the Image service:
|
||||
|
||||
#. The `disk-image-builder`_ can be used to create images required for
|
||||
deployment and the actual OS which the user is going to run.
|
||||
|
||||
.. _disk-image-builder: http://docs.openstack.org/developer/diskimage-builder/
|
||||
|
||||
- Install diskimage-builder package (use virtualenv, if you don't
|
||||
want to install anything globally):
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# pip install diskimage-builder
|
||||
|
||||
- Build the image your users will run (Ubuntu image has been taken as
|
||||
an example):
|
||||
|
||||
- Partition images
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ disk-image-create ubuntu baremetal dhcp-all-interfaces grub2 -o my-image
|
||||
|
||||
|
||||
- Whole disk images
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ disk-image-create ubuntu vm dhcp-all-interfaces -o my-image
|
||||
|
||||
The partition image command creates ``my-image.qcow2``,
|
||||
``my-image.vmlinuz`` and ``my-image.initrd`` files. The ``grub2`` element
|
||||
in the partition image creation command is only needed if local boot will
|
||||
be used to deploy ``my-image.qcow2``, otherwise the images
|
||||
``my-image.vmlinuz`` and ``my-image.initrd`` will be used for PXE booting
|
||||
after deploying the bare metal with ``my-image.qcow2``.
|
||||
|
||||
If you want to use Fedora image, replace ``ubuntu`` with ``fedora`` in the
|
||||
chosen command.
|
||||
|
||||
.. note:: To build the deploy image take a look at the `Building or
|
||||
downloading a deploy ramdisk image`_ section.
|
||||
|
||||
.. _`Building or downloading a deploy ramdisk image`: http://docs.openstack.org/developer/ironic/deploy/install-guide.html#building-or-downloading-a-deploy-ramdisk-image
|
||||
|
||||
#. Add the user images to the Image service
|
||||
|
||||
Load all the images created in the below steps into the Image service,
|
||||
and note the image UUIDs in the Image service for each one as it is
|
||||
generated.
|
||||
|
||||
- Add the kernel and ramdisk images to the Image service:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ glance image-create --name my-kernel --visibility public \
|
||||
--disk-format aki --container-format aki < my-image.vmlinuz
|
||||
|
||||
Store the image uuid obtained from the above step as ``MY_VMLINUZ_UUID``.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ glance image-create --name my-image.initrd --visibility public \
|
||||
--disk-format ari --container-format ari < 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
|
||||
|
||||
$ glance image-create --name my-image --visibility public \
|
||||
--disk-format qcow2 --container-format bare --property \
|
||||
kernel_id=$MY_VMLINUZ_UUID --property \
|
||||
ramdisk_id=$MY_INITRD_UUID < my-image.qcow2
|
||||
|
||||
.. note:: To deploy a whole disk image, a kernel_id and a ramdisk_id
|
||||
shouldn't be associated with the image. For example,
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ glance image-create --name my-whole-disk-image --visibility public \
|
||||
--disk-format qcow2 \
|
||||
--container-format bare < my-whole-disk-image.qcow2
|
||||
|
||||
#. Add the deploy images to the Image service
|
||||
|
||||
Add the *my-deploy-ramdisk.kernel* and *my-deploy-ramdisk.initramfs* images
|
||||
to the Image service:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ glance image-create --name deploy-vmlinuz --visibility public \
|
||||
--disk-format aki --container-format aki < my-deploy-ramdisk.kernel
|
||||
|
||||
Store the image UUID obtained from the above step as ``DEPLOY_VMLINUZ_UUID``.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ glance image-create --name deploy-initrd --visibility public \
|
||||
--disk-format ari --container-format ari < my-deploy-ramdisk.initramfs
|
||||
|
||||
Store the image UUID obtained from the above step as ``DEPLOY_INITRD_UUID``.
|
Loading…
x
Reference in New Issue
Block a user