Difference between revisions of "Fedora Arm Secondary Architecture/Koji Builders"

From CDOT Wiki
Jump to: navigation, search
(Start Kojid)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Fedora ARM Secondary Architecture]][[Category:SBR600]]
+
[[Category:Fedora ARM Secondary Architecture]][[Category:Winter 2010 SBR600]]
= Koji Configuration - Builder =
+
= Goal =
 +
 
 +
To configure a Koji builder system (either VM or physical hardware).
  
 
Kojid is the build daemon that runs on each of the build machines. Its primary responsibility is polling for incoming build requests and handling them accordingly. Koji also has support for tasks other than building. Creating install images is one example. kojid is responsible for handling these tasks as well. kojid uses mock for building. It also creates a fresh buildroot for every build. kojid is written in Python and communicates with koji-hub via XML-RPC.
 
Kojid is the build daemon that runs on each of the build machines. Its primary responsibility is polling for incoming build requests and handling them accordingly. Koji also has support for tasks other than building. Creating install images is one example. kojid is responsible for handling these tasks as well. kojid uses mock for building. It also creates a fresh buildroot for every build. kojid is written in Python and communicates with koji-hub via XML-RPC.
  
'''Configuration Files:'''
+
= Configuration Files =
  
 
* /etc/kojid/kojid.conf - Koji Daemon Configuration
 
* /etc/kojid/kojid.conf - Koji Daemon Configuration
 
* /etc/sysconfig/kojid - Koji Daemon Switches
 
* /etc/sysconfig/kojid - Koji Daemon Switches
 +
 +
= Steps to Perform =
 +
 +
== Storage Space ==
 +
 +
Ensure that there is a good amount of space on the ARM system for mock (<code>/var/lib/mock</code> and <code>/var/cache/mock</code>) before proceeding. You will want a minimum of about 8GB.
 +
 +
On the ARM VMs, you may need to increase the VM size. Stop the VM, add additional storage, and then restart the VM:
 +
 +
'''On the VM:'''
 +
poweroff
 +
 +
Allow 30 seconds for system shutdown.
 +
 +
'''On HongKong:'''
 +
virsh destroy ''domain''
 +
dd if=/dev/zero bs=1M count=8192 >>/var/lib/libvirt/images/arm/''domain''.img
 +
fsck -f /var/lib/libvirt/images/arm/''domain''.img
 +
resize2fs /var/lib/libvirt/images/arm/''domain''.img
 +
virsh start ''domain''
 +
 +
Where ''domain'' is the VM name, such as <code>arm-001-999</code>.
 +
 +
If using a physical ARM system, ensure that <code>/var/lib/mock</code> and <code>/var/cache/mock</code> have sufficient space, perhaps by symlinking them to subdirectories of the mountpoint of an external disk, NFS share, or iSCSI block device.
  
 
== Install kojid ==
 
== Install kojid ==
<pre>
+
yum install koji-builder
root@localhost$ yum install koji-builder
 
</pre>
 
  
 
== NFS Configuration ==
 
== NFS Configuration ==
Line 22: Line 46:
 
/etc/kojid/kojid.conf:
 
/etc/kojid/kojid.conf:
 
''This needs to point at your koji-hub.''
 
''This needs to point at your koji-hub.''
<pre>
 
; The URL for the xmlrpc server
 
server=http://hongkong/kojihub
 
  
; the username has to be the same as what you used with add-host
+
; The URL for the xmlrpc server
; in this example follow as below
+
server=http://hongkong/kojihub
user = arm-001-001 ;Matches your VM name
+
 +
; the username has to be the same as what you used with add-host
 +
; in this example follow as below
 +
user = arm-001-001 ;Matches your VM name
 +
 +
; The URL for the packages tree
 +
pkgurl=http://hongkong/yum/arm_built/base/12/arm/
 +
 +
; ''This item may be changed, but may not be the same as KojiDir on the kojihub.conf file (although it can be something under KojiDir, just not the same as KojiDir)''
 +
  ; The directory root for temporary storage
 +
workdir=/tmp/koji
 +
 
 +
==== SSL Certificates For Authentication ====
  
; The URL for the packages tree
+
Copy the appropriate certificate(s) from <code>HongKong:/etc/pki/koji/certs/</code>
pkgurl=http://hongkong/yum/arm_built/base/12/arm/
 
</pre>
 
''This item may be changed, but may not be the same as KojiDir on the kojihub.conf file (although it can be something under KojiDir, just not the same as KojiDir)''
 
<pre>
 
; The directory root for temporary storage
 
workdir=/tmp/koji
 
</pre>
 
  
==== SSL Certificates For Authentication ====
 
 
/etc/kojid/kojid.conf:
 
/etc/kojid/kojid.conf:
''If using SSL, these settings need to be valid.''
 
<pre>
 
;client certificate
 
; This should reference the builder certificate we created above, for
 
; kojibuilder1.example.com
 
cert = /etc/kojid/arm-001-008.pem
 
  
;certificate of the CA that issued the client certificate
+
  ;client certificate
ca = /etc/kojid/koji_ca_cert.crt
+
; This should reference the builder certificate we created above, for
 +
; kojibuilder1.example.com
 +
cert = /etc/kojid/arm-001-008.pem
 +
 +
;certificate of the CA that issued the client certificate
 +
ca = /etc/kojid/koji_ca_cert.crt
 +
 +
;certificate of the CA that issued the HTTP server certificate
 +
serverca = /etc/kojid/koji_ca_cert.crt
  
;certificate of the CA that issued the HTTP server certificate
+
==== Start Kojid ====
serverca = /etc/kojid/koji_ca_cert.crt
+
{{Admon/important|Koji Host Entry|Before starting Kojid, make sure that the entry for your builder is in the database. The command to do this (as ''kojiadmin'' on HongKong) is <code>koji add-host ''hostname'' armv5tel</code>}}
  
</pre>
+
After, start Kojid and configure it to start at each boot:
 +
service kojid start
 +
chkconfig kojid on
  
==== Start Kojid ====
+
== Testing ==
{{Admon/important|Koji Host Entry|Before starting Kojid, make sure that the entry for your builder is in the database. The command to do this (as ''kojiadmin'' on HongKong) is <code>koji add-host ''hostname''</code>}}
+
Check <code>/var/log/kojid.log</code> on the builder to verify that kojid has started successfully.
  
After, start Kojid:
+
Finally, check the [http://hongkong.proximity.on.ca/koji/hosts Koji hosts web display] on HongKong to see that the host is working properly -- it should be enabled, ready, and checking it.
<pre>
 
root@localhost$ /sbin/service kojid start
 
</pre>
 
Check /var/log/kojid.log to verify that kojid has started successfully.
 

Latest revision as of 09:51, 28 April 2010

Goal

To configure a Koji builder system (either VM or physical hardware).

Kojid is the build daemon that runs on each of the build machines. Its primary responsibility is polling for incoming build requests and handling them accordingly. Koji also has support for tasks other than building. Creating install images is one example. kojid is responsible for handling these tasks as well. kojid uses mock for building. It also creates a fresh buildroot for every build. kojid is written in Python and communicates with koji-hub via XML-RPC.

Configuration Files

  • /etc/kojid/kojid.conf - Koji Daemon Configuration
  • /etc/sysconfig/kojid - Koji Daemon Switches

Steps to Perform

Storage Space

Ensure that there is a good amount of space on the ARM system for mock (/var/lib/mock and /var/cache/mock) before proceeding. You will want a minimum of about 8GB.

On the ARM VMs, you may need to increase the VM size. Stop the VM, add additional storage, and then restart the VM:

On the VM:

poweroff

Allow 30 seconds for system shutdown.

On HongKong:

virsh destroy domain
dd if=/dev/zero bs=1M count=8192 >>/var/lib/libvirt/images/arm/domain.img
fsck -f /var/lib/libvirt/images/arm/domain.img
resize2fs /var/lib/libvirt/images/arm/domain.img
virsh start domain

Where domain is the VM name, such as arm-001-999.

If using a physical ARM system, ensure that /var/lib/mock and /var/cache/mock have sufficient space, perhaps by symlinking them to subdirectories of the mountpoint of an external disk, NFS share, or iSCSI block device.

Install kojid

yum install koji-builder

NFS Configuration

Perform the steps outlined on the NFS Configuration page, including adding entries to the /etc/hosts file.

Koji Configuration

/etc/kojid/kojid.conf: This needs to point at your koji-hub.

; The URL for the xmlrpc server
server=http://hongkong/kojihub

; the username has to be the same as what you used with add-host
; in this example follow as below
user = arm-001-001 ;Matches your VM name

; The URL for the packages tree
pkgurl=http://hongkong/yum/arm_built/base/12/arm/

; This item may be changed, but may not be the same as KojiDir on the kojihub.conf file (although it can be something under KojiDir, just not the same as KojiDir)
 ; The directory root for temporary storage
workdir=/tmp/koji

SSL Certificates For Authentication

Copy the appropriate certificate(s) from HongKong:/etc/pki/koji/certs/

/etc/kojid/kojid.conf:

 ;client certificate
; This should reference the builder certificate we created above, for
; kojibuilder1.example.com
cert = /etc/kojid/arm-001-008.pem

;certificate of the CA that issued the client certificate
ca = /etc/kojid/koji_ca_cert.crt

;certificate of the CA that issued the HTTP server certificate
serverca = /etc/kojid/koji_ca_cert.crt

Start Kojid

Important.png
Koji Host Entry
Before starting Kojid, make sure that the entry for your builder is in the database. The command to do this (as kojiadmin on HongKong) is koji add-host hostname armv5tel

After, start Kojid and configure it to start at each boot:

service kojid start
chkconfig kojid on

Testing

Check /var/log/kojid.log on the builder to verify that kojid has started successfully.

Finally, check the Koji hosts web display on HongKong to see that the host is working properly -- it should be enabled, ready, and checking it.