<trclass="field-odd field"><thclass="field-name">Authors:</th><tdclass="field-body">Brian C. Lane <<aclass="reference external"href="mailto:bcl%40redhat.com">bcl<span>@</span>redhat<span>.</span>com</a>></td>
</tr>
</tbody>
</table>
<p><codeclass="docutils literal notranslate"><spanclass="pre">composer-cli</span></code> is used to interact with the <codeclass="docutils literal notranslate"><spanclass="pre">lorax-composer</span></code> API server, managing blueprints, exploring available packages, and building new images.</p>
<p>It requires <aclass="reference external"href="lorax-composer.html">lorax-composer</a> to be installed on the
local system, and the user running it needs to be a member of the <codeclass="docutils literal notranslate"><spanclass="pre">weldr</span></code>
group. They do not need to be root, but all of the <aclass="reference external"href="lorax-composer.html#security">security precautions</a> apply.</p>
<h2>Edit a Blueprint<aclass="headerlink"href="#edit-a-blueprint"title="Permalink to this headline">¶</a></h2>
<p>Start out by listing the available blueprints using <codeclass="docutils literal notranslate"><spanclass="pre">composer-cli</span><spanclass="pre">blueprints</span>
<spanclass="pre">list</span></code>, pick one and save it to the local directory by running <codeclass="docutils literal notranslate"><spanclass="pre">composer-cli</span>
<spanclass="pre">blueprints</span><spanclass="pre">save</span><spanclass="pre">http-server</span></code>. If there are no blueprints available you can
copy one of the examples <aclass="reference external"href="https://github.com/weldr/lorax/tree/master/tests/pylorax/blueprints/">from the test suite</a>.</p>
description, add a package or module to it. Send it back to the server by
running <codeclass="docutils literal notranslate"><spanclass="pre">composer-cli</span><spanclass="pre">blueprints</span><spanclass="pre">push</span><spanclass="pre">http-server.toml</span></code>. You can verify that it was
saved by viewing the changelog - <codeclass="docutils literal notranslate"><spanclass="pre">composer-cli</span><spanclass="pre">blueprints</span><spanclass="pre">changes</span><spanclass="pre">http-server</span></code>.</p>
</div>
<divclass="section"id="build-an-image">
<h2>Build an image<aclass="headerlink"href="#build-an-image"title="Permalink to this headline">¶</a></h2>
<p>Build a <codeclass="docutils literal notranslate"><spanclass="pre">qcow2</span></code> disk image from this blueprint by running <codeclass="docutils literal notranslate"><spanclass="pre">composer-cli</span>
<spanclass="pre">compose</span><spanclass="pre">start</span><spanclass="pre">http-server</span><spanclass="pre">qcow2</span></code>. It will print a UUID that you can use to
keep track of the build. You can also cancel the build if needed.</p>
The available types of images is displayed by <codeclass="docutils literal notranslate"><spanclass="pre">composer-cli</span><spanclass="pre">compose</span><spanclass="pre">types</span></code>.
Currently this consists of: ami, ext4-filesystem, live-iso, partitioned-disk,
<h2>Monitor the build status<aclass="headerlink"href="#monitor-the-build-status"title="Permalink to this headline">¶</a></h2>
<p>Monitor it using <codeclass="docutils literal notranslate"><spanclass="pre">composer-cli</span><spanclass="pre">compose</span><spanclass="pre">status</span></code>, which will show the status of
all the builds on the system. You can view the end of the anaconda build logs
once it is in the <codeclass="docutils literal notranslate"><spanclass="pre">RUNNING</span></code> state using <codeclass="docutils literal notranslate"><spanclass="pre">composer-cli</span><spanclass="pre">compose</span><spanclass="pre">log</span><spanclass="pre">UUID</span></code>
where UUID is the UUID returned by the start command.</p>
<p>Once the build is in the <codeclass="docutils literal notranslate"><spanclass="pre">FINISHED</span></code> state you can download the image.</p>
</div>
<divclass="section"id="download-the-image">
<h2>Download the image<aclass="headerlink"href="#download-the-image"title="Permalink to this headline">¶</a></h2>
<p>Downloading the final image is done with <codeclass="docutils literal notranslate"><spanclass="pre">composer-cli</span><spanclass="pre">compose</span><spanclass="pre">image</span><spanclass="pre">UUID</span></code> and it will
save the qcow2 image as <codeclass="docutils literal notranslate"><spanclass="pre">UUID-disk.qcow2</span></code> which you can then use to boot a VM like this:</p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.