© 2006 UC Regents1 Track 1: Cluster and Grid Computing NBCR Summer Institute Session 2.1: Cluster and Grid Computing: Case Studies Building a Roll August 9, 2006 Nadya Williams
© 2006 UC Regents2 Prepare for the build Check out CVS Rocks distribution: cvs - login cvs - checkout -r ROCKS_4_1 rocks Go to the top-level rolls directory: # cd rocks/src/roll # ls bin/ cacl/ etc/ hpc/ patch/ birn/ condor/ gfarm/ intel/ nbcr/ birn-oracle1/ CVS/ grid/ java/ ninf/ …
© 2006 UC Regents3 Create new roll directory Prerequisites name version (or defaults to 1) a-17beta color (or random choice from X colors) Creation # cd rocks/src/roll # bin/make-roll-dir.py -n cacao -v c chocolate # ls cacao graphs/ Makefile nodes/ src/ version.mk
© 2006 UC Regents4 cacao/ contents graphs/ nodes/ src/ default/ version.mk cacao.xml Makefile cacao/ usersguide/ Makefile patch-files/ Makefile version.mk images/ Makefile version.mk *.sgml *.sgml.in
© 2006 UC Regents5 Clean new roll directory Remove template’s id entries old: # $Id: Makefile,v /12/01 01:31:55 nadya Exp $ new: # $Id: $ Remove template’s log entries old: # $Log: Makefile,v $ # Revision /12/01 01:31:55 nadya # baseline new: # $Log: $
© 2006 UC Regents6 What to clean? Makefile graphs/default/cacao.xml nodes/cacao.xml src/Makefile src/cacao/Makefile src/usersguide/Makefile src/usersguide/roll-cacao-usersguide.in
© 2006 UC Regents7 File graphs/default/cacao.xml the file describes how all the files in the nodes directory are linked together in the kickstart graph specify edges from known nodes to cacao node for graph file syntax see guide/4.1/kickstart-xml.html
© 2006 UC Regents8 Add edges in graphs/default/cacao.xml cacao Roll $Log: cacao.xml,v $ root client cacaointel server …… condor
© 2006 UC Regents9 File nodes/cacao.xml the files in nodes/ are used to install packages and to configure their respective services for nodes files syntax see guide/4.1/kickstart-xml.html
© 2006 UC Regents10 Add packages in nodes/cacao.xml Extension to Java beans, for internal consumption only. $Log: cacao.xml,v $ cacao roll-cacao-usersguide package name equals spec file name
© 2006 UC Regents11 src/cacao/ # cp /Venezuela/Chuao/cacao tar.gz. Makefile cacao tar.gz cacao.spec.in version.mk Makefile PKGROOT=/opt/cacao … install:: mkdir -p $(ROOT)/$(PKGROOT) ( cd $(NAME)-$(VERSION); make prefix=$(ROOT)/$(PKGROOT) install; ) build: gunzip -c $(NAME)-$(VERSION).tar.gz | tar -x ( cd $(NAME)-$(VERSION);./configure --prefix=$(PKGROOT); make; ) version.mk NAME = cacao RELEASE = 0 VERSION = 15.44
© 2006 UC Regents12 Caution! Naming convention is important cacao tar.gz will fail ! Why? $(NAME)-$(VERSION) combo NAME = cacao cacao VERSION = Fix NAME = cacao VERSION = cacao_15.44.tar.gz ---> cacao_15.44/ $(NAME)_$(VERSION) NAME = Cacao VERSION = 15.44
© 2006 UC Regents13 Adding the fortune packages in nodes/cacao.xml $Log: cacao.xml,v $ cacao fortune fortune-starwars fortune-simpsons-homer
© 2006 UC Regents14 Using ‘fortune’. /usr/bin/fortune
© 2006 UC Regents15 Linking cacao into the Graph The cacao Roll cacao
© 2006 UC Regents16 Building Build rpms - debugging # cd rocks/src/roll/cacao/src/cacao; make rpm Build roll - for real # cd rocks/src/roll/cacao; make roll Result /home/cacao/rocks/redhat/RPMS/noarch/roll-cacao-kickstart noarch.rpm /home/cacao/rocks/redhat/RPMS/noarch/roll-cacao-usersguide noarch.rpm /home/cacao/rocks/redhat/RPMS/i386/cacao i386.rpm /home/cacao/rocks/redhat/SRPMS/cacao src.rpm /home/cacao/rocks/redhat/SRPMS/roll-cacao-usersguide src.rpm cacao i386.disk1.iso