Log in

Generating oVirt node iso with modified packages

This post is about generate an oVirt Node image with updated packages, in
the below example we will update VDSM (node agent) and oVirt Node Plugin VDSM (TUI plugin for node registration).

Iso that will be updated: ovirt-node-iso-3.0.4-1.0.201401291204.vdsm34.el6.iso

Packages versions that will be updated in the above iso:

Note: CentOS 6.5 (CentOS-6.5-x86_64-minimal.iso) will be used in this demo as specific virtual machine to build oVirt Node iso.

Required tool to edit the node:
edit-node is the tool used to edit the node image and include a new package.
Please note that it must be run on the same OS which is used within the image.
So an CentOS image must be edited on a CentOS host.

Repos for edit-node:
1.el6: http://resources.ovirt.org/releases/node-base/edit-node-el6.repo
2.fedora: http://resources.ovirt.org/releases/node-base/edit-node.repo

Step by step:
# cat /etc/centos-release
CentOS release 6.5 (Final)

# yum install wget createrepo
# wget -O /etc/yum.repos.d/edit-node-el6.repo http://resources.ovirt.org/releases/node-base/edit-node-el6.repo

# yum install ovirt-node-tools (download stable edit-node and pre-requirements)

Install required packages for build:
# yum install make autoconf automake pyflakes logrotate gcc python-pep8 libvirt-python python-devel python-nose rpm-build sanlock-python genisoimage python-ordereddict python-pthreading libselinux-python python-ethtool m2crypto python-dmidecode python-netaddr python-inotify python-argparse git python-cpopen bridge-utils libguestfs-tools-c pyparted openssl libnl libtool gettext-devel

Update pep8:
# yum install http://danken.fedorapeople.org/python-pep8-1.4.5-2.el6.noarch.rpm

Install Apache to be your local repo
# yum install httpd
# chkconfig --levels 235 httpd on
# mkdir -p /var/www/html/nodebuild

Build vdsm and ovirt-node-plugin-vdsm:
# git clone git://gerrit.ovirt.org/vdsm && cd vdsm
# git checkout remotes/origin/ovirt-3.4 -b 3.4 (3.4 is current stable branch)
make your changes
# ./autogen.sh --system && make && make rpm && cd ..
* To ignore tests and other tips: http://www.ovirt.org/Vdsm_Developers#Building_a_Vdsm_RPM

# git clone git://gerrit.ovirt.org/ovirt-node-plugin-vdsm && cd ovirt-node-plugin-vdsm
# git checkout remotes/origin/node-3.0 -b 3.0 (3.0 is the current stable branch)
make your changes
# ./autogen.sh && make && make rpms && cd ..

Copy rpms generated to /var/www/html/nodebuild/ and create a local repo
# cp ~/rpmbuild/RPMS/noarch/* ~/rpmbuild/RPMS/x86_64/* /var/www/html/nodebuild/
# createrepo /var/www/html/nodebuild/

Add the additional repo:
# vi /etc/yum.repos.d/edit-node-el6.repo
name=Local node build

Download the iso that will be changed:
# wget http://resources.ovirt.org/releases/3.4/iso/ovirt-node-iso-3.0.4-1.0.201401291204.vdsm34.el6.iso

Download the last edit-node and execute it:
# git clone git://gerrit.ovirt.org/ovirt-node
# ovirt-node/tools/edit-node --repo /etc/yum.repos.d/edit-node-el6.repo --update vdsm,ovirt-node-plugin-vdsm* ovirt-node-iso-3.0.4-1.0.201401291204.vdsm34.el6.iso --name mynewovirtbuild

Note: It's not required to store edit-node repo into /etc/yum.repos.d. You can use it in any directory to avoid cluttering up normal system operation.

Others related links:


It's a nice one, man!
Until this post I was using the --install option, but now I see --update was added - I should try it!

Also, why are using httpd for the repo?
I would just create a local folder somewhere and run createrepo for it.

local folder

I have tried local folder with --update and didn't work. Although, the ovirt node repo might be updated with new version of edit-node which works at this moment.

Re: local folder

Running it now, with local repo file and --update and seems to be working.
Fetched the latest version of ovirt-node before starting.

Re: local folder

Built fine.
Next I need to use your other post and test it with nested-kvm and the virt-manager. I should!

Re: local folder

Thanks for the update. Please double check if your package get updated in the ovirt-node iso. In my previous tests the iso get built but the package was not updated.

Re: local folder

All is just good with locally defined repo + using --update.

October 2016



Powered by LiveJournal.com