Personal tools
     DOCUMENTATION

FAQ:Use the rBuilder CLI

From rPath Wiki

Jump to: navigation, search
FAQ
Question: How do I use the rBuilder command line interface?

Contents


Answer: Use the rBuilder Command Line (also called the rBuilder client) to automate various aspects of rBuilder's operation. After you install and configure the rBuilder CLI, use the commands outlined here to perform tasks on rBuilder without using the web interface. Execute these commands manually, or include them in scripts to automate rBuilder tasks.

Click each linked command or option to scroll to its definition and examples.

COMMANDS
OPTIONS
--config="<key> <value>"
--config-file=<path>
--debug
-h , --help
--version

build-create

rbuilder build-create <project_name> '<full_appliance_identity>' <image_type> [--wait] [--timeout <seconds>] [--option "<key> <value>"]

Syntax

Use this command to create a build based on the provided information:

The command returns a build ID in a form suitable for use with eval. This provides something like BUILD_ID=100 in standard output.

Use --wait to cause the command to block until the build completes. This is an immediate block to prevent other commands from executing on the build until the process is complete. To execute subsequent commands on the build prior to waiting, leave out the --wait option and use build-wait after the subsequent commands.

Use --timeout to force the rbuilder command to exit after the specified number of whether the build has completed or not.

Use --option "<key> <value>" to set particular build options where <key> is the name of the option and <value> is the specific value you want to use. Use --option multiple times to to specify multiple options.

The options corresponding to each build type are as follows:

installable_iso
anaconda-custom, anaconda-templates, autoResolve, baseFileName, betaNag, bugsUrl, installLabelPath, maxIsoSize, media-template, mirrorUrl, showMediaCheck, swapSize
live_iso
autoResolve, baseFileName, installLabelPath, mirrorUrl, unionfs, zisofs
raw_fs_image
autoResolve, baseFileName, freespace, installLabelPath, mirrorUrl, swapSize
raw_hd_image
autoResolve, baseFileName, freespace, installLabelPath, mirrorUrl, swapSize
tarball
autoResolve, baseFileName, installLabelPath, mirrorUrl, swapSize
virtual_pc_image
autoResolve, baseFileName, freespace, installLabelPath, mirrorUrl, swapSize, vhdDiskType
virtual_iron
autoResolve, baseFileName, freespace, installLabelPath, mirrorUrl, swapSize, vhdDiskType
vmware_esx_image
autoResolve, baseFileName, freespace, installLabelPath, mirrorUrl, natNetworking, swapSize, vmMemory
vmware_image
autoResolve, baseFileName, diskAdapter, freespace, installLabelPath, mirrorUrl, natNetworking, swapSize, vmMemory, vmSnapshots
ami
autoResolve, freespace, amiHugeDiskMountpoint, baseFileName, installLabelPath
update_iso
baseFileName, media-template
appliance_iso
autoResolve, bugsUrl, media-template, betaNag, anaconda-templates, installLabelPath, anaconda-custom, baseFileName, showMediaCheck

The options listed correspond to the advanced options in the rBuilder interface for each build type. The syntax for using each option is as follows:

--option='autoResolve <value>'
Automatically install required dependencies during updates (values: 1 or 0; default: 0)
--option='anaconda-custom <value>'
Version of the anaconda-custom trove to use
--option='anaconda-templates <value>'
Version of the anaconda-templates trove to use
--option='baseFileName <value>'
Custom prefix for filenames output from the build (default: name-version-architecture)
--option='betaNag <value>'
Alert message displayed during install that this build is a beta (values: 1 or 0; default: 0)
--option='bugsUrl <value>'
Specify a URL where appliance users can obtain assistance, shown in the help screens displayed during install (default: http://issues.rpath.com/)
--option='diskAdapter <value>'
Hard disk adapter, SCSI or IDE, for which the image should be built (values: lsilogic or ide; default: lsilogic)
--option='freespace <value>'
Free space in MB that should be allocated in the image (default: 250)
--option='installLabelPath <value>'
Custom Conary installLabelPath Conary configuration value from which the appliance will install and update software (default is blank to let the value be a Conary default)
--option='maxIsoSize <value>'
ISO size (default: 681574400)
--option='media-template <value>'
Version of the media-template trove to use
--option='mirrorUrl <value>'
rPath Mirror URL from which the appliance will obtain Conary configuration settings (default is blank)
--option='natNetworking <value>'
Use NAT instead of bridged networking (values: 1 or 0; default: 0 to use bridged)
--option='showMediaCheck <value>'
Prompt the installing user whether to test the CD/DVD media before installation (values: 1 or 0; default: 0)
--option='swapSize <value>'
Swap space in MB that should be reserved in this image (default: 128)
--option='unionfs <value>'
Enable UnionFS for the entire filesystem (requires the UnionFS kernel module; values: 1 or 0; default: 0)
--option='vhdDiskType <value>'
VHD hard disk type (values: dynamic, fixed, difference; default: dynamic)
--option='vmMemory <value>'
Memory in MB that VMware should use when running the image (default: 256)
--option='vmSnapshots <value>'
Allow VMware snapshot creation within the image (value: 1 or 0; default: 0)

Examples

The following are examples of using the build-create command in the rbuilder client.

$> conary rq group-example --full-versions --all-flavors
group-example=/example.rpath.org@corp:devel/2.0-2-2[dietlibc,domU,~!grub.static,~kernel.debugdata,~!kernel.pae,~kernel.smp,sasl,~!vmware,xen is: x86(mmx,~!sse2)]
group-example=/example.rpath.org@corp:devel/2.0-2-2[dietlibc,~!domU,~!grub.static,~kernel.debugdata,~kernel.pae,~kernel.smp,sasl,~!vmware,~!xen is: x86(~!sse2)]
group-example=/example.rpath.org@corp:devel/2.0-2-2[dietlibc,~!domU,~!grub.static,~kernel.debugdata,~!kernel.pae,~kernel.smp,sasl,vmware,~!xen is: x86(~!sse2)]
group-example=/example.rpath.org@corp:devel/2.0-2-2[~!dietlibc,domU,~grub.static,~kernel.debugdata,~!kernel.pae,~kernel.smp,sasl,~!vmware,xen is: x86 x86_64]
group-example=/example.rpath.org@corp:devel/2.0-2-2[~!dietlibc,~!domU,~grub.static,~kernel.debugdata,~!kernel.pae,~kernel.smp,sasl,vmware,~!xen is: x86 x86_64]
group-example=/example.rpath.org@corp:devel/2.0-2-2[~!dietlibc,~!domU,~grub.static,~kernel.debugdata,~!kernel.pae,~kernel.smp,sasl,~!vmware,~!xen is: x86 x86_64]

$> rbuilder build-create exampleapp1 'group-example=/example.rpath.org@corp:devel/2.0-2-2[~!dietlibc,
~!domU,~grub.static,~kernel.debugdata,~!kernel.pae,~kernel.smp,sasl,~!vmware,~!xen is: x86 x86_64]' 
installable_iso --option="bugsUrl http://issues.example.com/"
BUILD_ID=100

$> rbuilder build-create exampleapp1 'group-example=/example.rpath.org@corp:devel/2.0-2-2[dietlibc,
~!domU,~!grub.static,~kernel.debugdata,~!kernel.pae,~kernel.smp,sasl,vmware,~!xen is: x86(~!sse2)]'
vmware --option="vmMemory 256"
BUILD_ID=101

build-url

rbuilder build-url <build-id>

Syntax

Use this command to list the URLs of each file created by build <build-id>.

Examples

The following is an example of using the build-url command in the rbuilder client.

rbuilder build-url 100

build-wait

rbuilder build-wait <build-id> [--timeout <seconds>]

Syntax

Use this command to block commands on <build-id> until it has finished building. Use the --wait option with build-create to block immediately when the build creation starts, or use build-wait to start the wait after subsequent commands on the build. Use --timeout to force the rbuilder command to exit after the specified number of whether the build has completed or not.

Examples

The following is an example of using the build-wait command in the rbuilder client.

rbuilder build-wait 100 --timeout 120

config

rbuilder config

Syntax

Use this command to display the rbuilder configuration settings currently in use. If you do not have not yet created ~/.rbuilderrc, you will be asked to set the serverUrl configuration option in ~/.rbuilderrc.


project-add

rbuilder project-add <username> <project-name> <owner|developer>

Syntax

Use this command to add an rBuilder user named <username> to an existing rBuilder project named <project-name>. Use owner or developer to designate the user as a project owner or developer.

Examples

The following is an example of using the project-add command in the rbuilder client.

$ rbuilder project-add exampleuser exampleapp1 developer

user-create

rbuilder user-create <username> <email> [--password <password>]

Syntax

Use this command to create a new rBuilder user named <username> with an email address of <email>. Use --password to set the password for the user; if a password is not set, you will be prompted to enter one.

Examples

The following is an example of using the user-create command in the rbuilder client.

$ rbuilder user-create exampleuser exampluser@example.com --password eX@mpl3

--config="<key> <value>"

Syntax

Use this option to set configuration setting <key> to value <value>. Currently, serverUrl is the only key for the configuration, and it will overwrite the existing serverUrl line in ~/.rbuilderrc. The command syntax is as follows where <username> and <password>) match the user credentials for a project owner or developer on an rBuilder project, and <rbuilder> is the fully qualified domain name of the rBuilder instance.

$ rbuilder --config="serverUrl http://<username>:<password>@<rbuilder>/xmlrpc-private/"

--config-file=<path>

Syntax

Use this option to direct rbuilder to use the configuration file <path> as its configuration file for the single execution of the rbuilder command.

Examples

The following is an example of using the --config-file option in the rbuilder client.

rbuilder build-create exampleapp1 group-app1 installable_iso --config-file=~/app1config

--debug

Syntax

Use this option to display debugging information. This command has not yet been implemented and will currently redirect to epdb, a Python debugger, if there are any problems.


--help

Syntax

Use this option to display rbuilder command usage information. Use either -h or --help

Examples

The following is an example of using the --help option in the rbuilder client:

$ rbuilder build-create --help

--version

Syntax

Use this option to display the rbuilder version.

Examples

The following are examples of using the --version option in the rbuilder client.

$ rbuilder --version
2.0.2