[CentOS-devel] Image building features enabled in CBS

Jim Perrin jperrin at centos.org
Thu Dec 4 20:08:52 UTC 2014



On 11/13/2014 02:50 PM, Ian McLeod wrote:
> Hello all,
> 
> Thanks to Thomas' (alphacc) work last Friday, we now have the image
> building features enable on the CBS koji instance.  I'll give a very
> brief summary of how to use it.  The general form of the koji command is:
> 
> koji -p cbs image-build <image_name> <image_version> <build_target>
>                         <install_tree_url> <arch>
>                         --release <image_release>
>                         --distro <distro_name_version>
>                         --kickstart <local_kickstart_file>
>                         --format <format_type>
>                         --disk-size <disk_size_in_gb>
>                         --repo <repo_url> (optional)
>                         --scratch (optional)
>                         --nowait (optional)
> 
> The image build must be given a name, version and release.  These
> function in much the same way as they do in RPM.  In particular, the
> name must be added as an allowed package in the output tag for the
> <build_target> provided on the command line.
> 
> You can specify more than one --format option.  The most useful options are:
> 
> 'raw-xz' - xz compressed raw file
> 'qcow2' - qcow2
> 'rhevm-ova' - A single file OVF image (aka OVA) for RHEV-M
> 'vsphere-ova' - An OVA for vSphere/VMWare
> 'docker' - A docker base image, suitable for "docker load"
> 
> Any "url" or "repo" lines in your input kickstart file will be removed.
>  The "url" line is replaced by whatever <install_tree_url> you give
> above.  You can, optionally, provide additional repos to Anaconda by
> giving one or more "--repo <url>" arguments.
> 
> Until we sort out how exactly we want kickstart files store in RCM
> (likely git.centos.org) we will be restricted to doing scratch builds,
> indicated with a "--scratch" option above.
> 
> Here is the exact command I used to do initial testing of the feature:
> 
> koji image-build \
>   centos-7-imcleod-test 1 atomic7-el7.centos \
>   http://mirror.centos.org/centos/7/os/x86_64/ x86_64 \
>   --release=1 \
>   --distro RHEL-7.0 \
>   --kickstart=/tmp/RHEL7.auto \
>   --format=qcow2 \
>   --scratch \
>   --nowait \
>   --disk-size=10
> 
> The "RHEL7.auto" kickstart is the minimal/JEOS RHEL7 kickstart from Oz,
> available here:
> 
> https://raw.githubusercontent.com/clalancette/oz/master/oz/auto/RHEL7.auto
> 
> In order for this to work I had to ask alphacc to add me to the "image"
> permission in the CBS.
> 
> I then had to add the centos-7-imcleod-test "package" to the
> "atomic7-testing" tag (which is the destination for the
> "atomic7-el7.centos" build target).  The command to do this was:
> 
> koji add-pkg --owner=imcleod atomic7-testing centos-7-imcleod-test
> 
> Please follow up with questions, thoughts, RFEs, etc.


I've been attempting to test this for docker builds with the command:

koji image-build centos-7-jperrin-test 20141204 atomic7-el7.centos  \
http://mirror.centos.org/centos/7/os/x86_64/ x86_64 \ --release=20141204
--distro RHEL-7.0 --kickstart=/tmp/centos-7.ks \
--format=docker --scratch --nowait --disk-size=10

using the docker kickstart for centos7. After a few minor issues
surrounding the --distro option, I'm now getting an odd failure that I'm
not sure how to debug.

https://cbs.centos.org/koji/taskinfo?taskID=3424 should be a decent
example.

Thoughts?

-- 
Jim Perrin
The CentOS Project | http://www.centos.org
twitter: @BitIntegrity | GPG Key: FA09AD77


More information about the CentOS-devel mailing list