Friday, April 16, 2010

Koji Daemon Builder

With help form a Paul's blog post I was able to complete the task.


The first thing I did was download the koji builder on the virtual arm machine

yum install koji-builder

Still working on the koji machine I edited the kojid.conf file in /etc/kojid.

The line below was edited

; The URL for the xmlrpc server

server=http://hongkong.proximity.on.ca/kojihub

Then the line below was added

; the username of you arm machine

user = arm-001-003

The lines below were uncommented and edited

;configuration for SSL authentication

;client certificate

cert = /etc/kojid/arm-001-007.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

Now after editing the kojid.conf file the certificates were copied from the Hong Kong server to /etc/kojid

scp arm-001-007.pem root@arm-001-003:/etc/kojid

scp koji_ca_cert.crt root@arm-001-003:/etc/kojid

The kojid daemon will be started

service kojid start

There was no errors but the server was resized to 10G

  1. Shut down the arm machine "init 0"
  2. Located the arm image on Hong Kong to be resized in "/var/lib/libvirt/images/arm".
  3. Used the command "df -h" to see if there is space available.
  4. Provide the space and then resize the drive

dd if=/dev/zero bs=1M count=10000 >> rootfs-arm-f12-003

e2fsck -f rootfs-arm-f12-003

resize2fs rootfs-arm-f12-003

The server is now resized but not ready for use.

Now I had to completely stop and start the machine

  1. Stop the arm machine "virsh destroy arm-001-003"
  2. Start the arm machine "virsh start arm-001-003"

Now back to the arm machine and start the kojid daemon

service kojid start

Friday, April 9, 2010

Testing packages on a virtual ARM machine

I was given six packages to test on my arm machine. Listed below are the problems I encounted and how they were resolved.

Firstly I had to prepare the VM for testing by, creating a user account and then add myself to mock group with the command "usermod -aG mock [user name].

The command
time mock -r feroda-12-arm --rebuild [package]
was used to test all the packages. The first package I tested, had an error indicating that there were missing dependencies.

My second package tested successfully and so it would have to be copied to the Hong Kong server. I wanted to use the scp command to do this but couldn't because scp was not installed. I then installed ssh to allow scp.

When I tried testing the remaining four packages but it wouldn't compile. I got an error and after checking the build.log file in /var/lib/mock/fedora-12-arm. The errors indicated that there was "No space left on the device".

Using the command "df -h" I noticed that there was no space available. With the aid of Prof. Tyler(I haven't done this in a while) I was able to resize the drive using the steps below.
  1. Shut down the arm machine "init 0"
  2. Located the arm image on Hong Kong to be resized in "/var/lib/libvirt/images/arm".
  3. Used the command "df -h" to see if there is space available.
  4. Provide the space and then resize the drive
dd if=/dev/zero bs=1M count=4096 >> rootfs-arm-f12-[arm server]
e2fsck -f rootfs-arm-f12-[arm server]
resize2fs rootfs-arm-f12-[arm server]
The server is now resized but not ready for use.
Now I had to completely stop and start the machine
  1. Stop the arm machine "virsh destroy [machine name]"
  2. Start the arm machine "virsh start [machine name]"

I then resumed my testing. The next two packages tested without any problems. But there are two packages left that are giving me headaches.

Sunday, April 4, 2010

Creating the virtual arms

My team members and I worked on Setting up the VMs running the ARM image. My main task was to autostart all the VMs and create a table with all the VMs, their assigned ip addresses and the student assigned to each machine.

The command below executed as root to view all the virtual machines that were running
virsh list --all

and the command
virsh autostart [nameofmachine]
was used to autostart the machine. This command was executed for all the running VMs. (arm-001-001 to arm-001-008)

Signing RPM Packages

I encounted only one error when completing this exercise. Below are the commands in order that were executed:

1. gpg --gen-key

2. the lines below were added to ~/.rpmmacros
%_signature gpg
%_gpg_name [email address] (added your email address)

3. gpg --export --armor [email address] > [file] (file of your choice)

4. Create a directory in
/var/www/html
Put your package into that directory

5. Sign the package with the command below
rpm --addsign yourrpmpackage.rpm

6. Create a repo directory
createrepo .

After executing all the commands below my package Xye can be dowloaded here.

When generating a key keep note of all your answers.