1COMPOSER-CLI(1)                      Lorax                     COMPOSER-CLI(1)
2
3
4

NAME

6       composer-cli - Composer Cmdline Utility Documentation
7
8       Authors
9              Brian C. Lane <bcl@redhat.com>
10
11       composer-cli  is  used  to interact with the lorax-composer API server,
12       managing blueprints, exploring available  packages,  and  building  new
13       images.
14
15       It requires lorax-composer to be installed on the local system, and the
16       user running it needs to be a member of the weldr group.  They  do  not
17       need to be root, but all of the security precautions apply.
18

COMPOSER-CLI CMDLINE ARGUMENTS

20       Lorax Composer commandline tool
21
22
23          usage: composer-cli [-h] [-j] [-s SOCKET] [--log LOG] [-a APIVER]
24                              [--test TESTMODE] [-V]
25                              ...
26
27   Positional Arguments
28          Named Arguments
29
30       j, --json
31              Output the raw JSON response instead of the normal output.
32
33              Default: False
34
35       s, --socket
36              Path to the socket file to listen on
37
38              Default: "/run/weldr/api.socket"
39
40       -log   Path to logfile (./composer-cli.log)
41
42       a, --api
43              API Version to use
44
45              Default: "0"
46
47       -test  Pass test mode to compose. 1=Mock compose with fail. 2=Mock com‐
48              pose with finished.
49
50              Default: 0
51
52       V      show program's version number and exit
53
54              Default: False
55
56
57       compose start <BLUEPRINT> <TYPE>
58              Start a compose using the selected blueprint and output type.
59
60       compose types
61              List the supported output types.
62
63       compose status
64              List the status of all running and finished composes.
65
66       compose list [waiting|running|finished|failed]
67              List basic information about composes.
68
69       compose log <UUID> [<SIZE>]
70              Show the last SIZE kB of the compose log.
71
72       compose cancel <UUID>
73              Cancel a running compose and delete any intermediate results.
74
75       compose delete <UUID,...>
76              Delete the listed compose results.
77
78       compose info <UUID>
79              Show detailed information on the compose.
80
81       compose metadata <UUID>
82              Download the metadata use to create the compose to  <uuid>-meta‐
83              data.tar
84
85       compose logs <UUID>
86              Download the compose logs to <uuid>-logs.tar
87
88       compose results <UUID>
89              Download  all  of the compose results; metadata, logs, and image
90              to <uuid>.tar
91
92       compose image <UUID>
93              Download the output image from the compose. Filename depends  on
94              the type.
95
96       blueprints list
97              List the names of the available blueprints.
98
99       blueprints show <BLUEPRINT,...>
100              Display the blueprint in TOML format.
101
102       blueprints changes <BLUEPRINT,...>
103              Display the changes for each blueprint.
104
105       blueprints diff <BLUEPRINT> <FROM-COMMIT> <TO-COMMIT>
106              Display  the  differences  between  2  versions  of a blueprint.
107              FROM-COMMIT can be a commit hash or NEWEST TO-COMMIT  can  be  a
108              commit hash, NEWEST, or WORKSPACE
109
110       blueprints save <BLUEPRINT,...>
111              Save the blueprint to a file, <BLUEPRINT>.toml
112
113       blueprints delete <BLUEPRINT>
114              Delete a blueprint from the server
115
116       blueprints depsolve <BLUEPRINT,...>
117              Display the packages needed to install the blueprint.
118
119       blueprints push <BLUEPRINT>
120              Push a blueprint TOML file to the server.
121
122       blueprints freeze <BLUEPRINT,...>
123              Display the frozen blueprint's modules and packages.
124
125       blueprints freeze show <BLUEPRINT,...>
126              Display the frozen blueprint in TOML format.
127
128       blueprints freeze save <BLUEPRINT,...>
129              Save    the    frozen    blueprint    to    a    file,    <blue‐
130              print-name>.frozen.toml.
131
132       blueprints tag <BLUEPRINT>
133              Tag the most recent blueprint commit as a release.
134
135       blueprints undo <BLUEPRINT> <COMMIT>
136              Undo changes to a blueprint by reverting to the selected commit.
137
138       blueprints workspace <BLUEPRINT>
139              Push the blueprint TOML to the temporary workspace storage.
140
141       modules list
142              List the available modules.
143
144       projects list
145              List the available projects.
146
147       projects info <PROJECT,...>
148              Show details about the listed projects.
149
150       sources list
151              List the available sources
152
153       sources info <SOURCE-NAME,...>
154              Details about the source.
155
156       sources add <SOURCE.TOML>
157              Add a package source to the server.
158
159       sources change <SOURCE.TOML>
160              Change an existing source
161
162       sources delete <SOURCE-NAME>
163              Delete a package source.
164
165       status show                         Show API server status.
166
167

EDIT A BLUEPRINT

169       Start out by listing the available blueprints using composer-cli  blue‐
170       prints  list,  pick  one  and save it to the local directory by running
171       composer-cli blueprints save http-server. If there  are  no  blueprints
172       available you can copy one of the examples from the test suite.
173
174       Edit  the file (it will be saved with a .toml extension) and change the
175       description, add a package or module to it. Send it back to the  server
176       by  running composer-cli blueprints push http-server.toml. You can ver‐
177       ify that it was saved by viewing the  changelog  -  composer-cli  blue‐
178       prints changes http-server.
179

BUILD AN IMAGE

181       Build  a  qcow2  disk image from this blueprint by running composer-cli
182       compose start http-server qcow2. It will print a UUID that you can  use
183       to keep track of the build. You can also cancel the build if needed.
184
185       The  available  types  of  images  is displayed by composer-cli compose
186       types.  Currently this  consists  of:  alibaba,  ami,  ext4-filesystem,
187       google,  hyper-v,  live-iso,  openstack,  partitioned-disk, qcow2, tar,
188       vhd, vmdk
189

MONITOR THE BUILD STATUS

191       Monitor it using composer-cli compose status, which will show the  sta‐
192       tus  of  all the builds on the system. You can view the end of the ana‐
193       conda build logs once it is in the  RUNNING  state  using  composer-cli
194       compose log UUID where UUID is the UUID returned by the start command.
195
196       Once the build is in the FINISHED state you can download the image.
197

DOWNLOAD THE IMAGE

199       Downloading  the  final  image  is done with composer-cli compose image
200       UUID and it will save the qcow2 image as UUID-disk.qcow2 which you  can
201       then use to boot a VM like this:
202
203          qemu-kvm --name test-image -m 1024 -hda ./UUID-disk.qcow2
204

AUTHOR

206       Weldr Team
207
209       2018, Red Hat, Inc.
210
211
212
213
21430.19                            May 06, 2019                  COMPOSER-CLI(1)
Impressum