2018-09-18 14:48:46 +00:00
|
|
|
composer
|
|
|
|
========
|
2018-05-12 00:17:26 +00:00
|
|
|
|
|
|
|
:Authors:
|
|
|
|
Brian C. Lane <bcl@redhat.com>
|
|
|
|
|
2018-09-18 14:48:46 +00:00
|
|
|
``composer`` is used to interact with the ``lorax-composer`` API server, managing blueprints, exploring available packages, and building new images.
|
2018-05-12 00:17:26 +00:00
|
|
|
|
|
|
|
It requires `lorax-composer <lorax-composer.html>`_ to be installed on the
|
|
|
|
local system, and the user running it needs to be a member of the ``weldr``
|
|
|
|
group. They do not need to be root, but all of the `security precautions
|
|
|
|
<lorax-composer.html#security>`_ apply.
|
|
|
|
|
2018-09-18 14:48:46 +00:00
|
|
|
composer cmdline arguments
|
|
|
|
--------------------------
|
2018-05-12 00:17:26 +00:00
|
|
|
|
|
|
|
.. argparse::
|
|
|
|
:ref: composer.cli.cmdline.composer_cli_parser
|
2018-09-18 14:48:46 +00:00
|
|
|
:prog: composer
|
2018-05-12 00:17:26 +00:00
|
|
|
|
|
|
|
Edit a Blueprint
|
|
|
|
----------------
|
|
|
|
|
2018-09-18 14:48:46 +00:00
|
|
|
Start out by listing the available blueprints using ``composer blueprints
|
|
|
|
list``, pick one and save it to the local directory by running ``composer
|
2018-05-12 00:17:26 +00:00
|
|
|
blueprints save http-server``. If there are no blueprints available you can
|
|
|
|
copy one of the examples `from the test suite
|
|
|
|
<https://github.com/weldr/lorax/tree/master/tests/pylorax/blueprints/>`_.
|
|
|
|
|
2018-06-29 21:15:54 +00:00
|
|
|
Edit the file (it will be saved with a .toml extension) and change the
|
2018-05-12 00:17:26 +00:00
|
|
|
description, add a package or module to it. Send it back to the server by
|
2018-09-18 14:48:46 +00:00
|
|
|
running ``composer blueprints push http-server.toml``. You can verify that it was
|
|
|
|
saved by viewing the changelog - ``composer blueprints changes http-server``.
|
2018-05-12 00:17:26 +00:00
|
|
|
|
|
|
|
Build an image
|
|
|
|
----------------
|
|
|
|
|
2018-09-18 14:48:46 +00:00
|
|
|
Build a ``qcow2`` disk image from this blueprint by running ``composer
|
2018-05-12 00:17:26 +00:00
|
|
|
compose start http-server qcow2``. It will print a UUID that you can use to
|
|
|
|
keep track of the build. You can also cancel the build if needed.
|
|
|
|
|
2018-09-18 14:48:46 +00:00
|
|
|
The available types of images is displayed by ``composer compose types``.
|
2018-09-28 18:54:51 +00:00
|
|
|
Currently this consists of: ami, ext4-filesystem, live-iso, partitioned-disk,
|
2018-09-28 19:22:54 +00:00
|
|
|
qcow2, tar, vhd, vmdk
|
2018-05-12 00:17:26 +00:00
|
|
|
|
|
|
|
Monitor the build status
|
|
|
|
------------------------
|
|
|
|
|
2018-09-18 14:48:46 +00:00
|
|
|
Monitor it using ``composer compose status``, which will show the status of
|
2018-05-12 00:17:26 +00:00
|
|
|
all the builds on the system. You can view the end of the anaconda build logs
|
2018-09-18 14:48:46 +00:00
|
|
|
once it is in the ``RUNNING`` state using ``composer compose log UUID``
|
2018-05-12 00:17:26 +00:00
|
|
|
where UUID is the UUID returned by the start command.
|
|
|
|
|
|
|
|
Once the build is in the ``FINISHED`` state you can download the image.
|
|
|
|
|
|
|
|
Download the image
|
|
|
|
------------------
|
|
|
|
|
2018-09-18 14:48:46 +00:00
|
|
|
Downloading the final image is done with ``composer compose image UUID`` and it will
|
2018-05-12 00:17:26 +00:00
|
|
|
save the qcow2 image as ``UUID-disk.qcow2`` which you can then use to boot a VM like this::
|
|
|
|
|
|
|
|
qemu-kvm --name test-image -m 1024 -hda ./UUID-disk.qcow2
|