© 2006 uc regents1 track 1: cluster and grid computing nbcr summer institute session 2.1: cluster...
TRANSCRIPT
![Page 1: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/1.jpg)
© 2006 UC Regents 1
Track 1: Clusterand Grid Computing
NBCR Summer Institute
Session 2.1: Cluster and Grid Computing: Case Studies
Building a Roll
August 9, 2006Nadya Williams [email protected]
![Page 2: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/2.jpg)
© 2006 UC Regents 2
Prepare for the build Check out CVS Rocks distribution:
cvs -d:pserver:[email protected]:/home/cvs/CVSROOT login
cvs -d:pserver:[email protected]:/home/cvs/CVSROOT 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/
…
![Page 3: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/3.jpg)
© 2006 UC Regents 3
Create new roll directory
Prerequisites name version (or defaults to 1)
• 2• 23.4• 2a-17beta
color (or random choice from X colors)
Creation # cd rocks/src/roll # bin/make-roll-dir.py -n cacao -v 15.44 -c
chocolate # ls cacao graphs/ Makefile nodes/ src/ version.mk
![Page 4: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/4.jpg)
© 2006 UC Regents 4
cacao/ contents
graphs/ nodes/ src/
default/
version.mk
cacao.xml
cacao.xml
Makefile
cacao/ usersguide/Makefile
patch-files/
Makefile
version.mk
images/
Makefile
version.mk
*.sgml
*.sgml.in
![Page 5: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/5.jpg)
© 2006 UC Regents 5
Clean new roll directory
Remove template’s id entriesold:
# $Id: Makefile,v 1.1 2004/12/01 01:31:55 nadya Exp $new:
# $Id: $
Remove template’s log entriesold:
# $Log: Makefile,v $# Revision 1.1 2004/12/01 01:31:55 nadya# baseline
new:# $Log: $
![Page 6: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/6.jpg)
© 2006 UC Regents 6
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
![Page 7: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/7.jpg)
© 2006 UC Regents 7
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
http://www.rocksclusters.org/rocks-documentation/reference-guide/4.1/kickstart-xml.html
![Page 8: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/8.jpg)
© 2006 UC Regents 8
Add edges in graphs/default/cacao.xml
<?xml version="1.0" standalone="no"?>
<graph><description>cacao Roll</description>
<changelog>$Log: cacao.xml,v $</changelog>
<edge from=”server" to=”cacao"/><edge from=”client" to=”cacao"/>
</graph>
root
client
cacao intel
server
… …
condor
![Page 9: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/9.jpg)
© 2006 UC Regents 9
File nodes/cacao.xml
the files in nodes/ are used to install packages and to configure their respective services
for nodes files syntax see
http://www.rocksclusters.org/rocks-documentation/reference-guide/4.1/kickstart-xml.html
![Page 10: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/10.jpg)
© 2006 UC Regents 10
Add packages in nodes/cacao.xml
<?xml version="1.0" standalone="no"?> <kickstart>
<description>Extension to Java beans, for internal consumption only. </description>
<copyright></copyright><changelog>$Log: cacao.xml,v $<changelog>
<package>cacao</package><package>roll-cacao-usersguide</package>
<post></post></kickstart>
package name equals
spec file name
![Page 11: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/11.jpg)
© 2006 UC Regents 11
src/cacao/ # cp /Venezuela/Chuao/cacao-15.44.tar.gz .
Makefile cacao-15.44.tar.gz cacao.spec.in version.mk
MakefilePKGROOT=/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.mkNAME = cacaoRELEASE = 0VERSION = 15.44
![Page 12: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/12.jpg)
© 2006 UC Regents 12
Caution! Naming convention is important
cacao-15.44.tar.gz will fail ! Why?
$(NAME)-$(VERSION) comboNAME = cacao cacao-15.44VERSION = 15.44
Fix NAME = cacao
VERSION = 15.44cacao_15.44.tar.gz ---> cacao_15.44/$(NAME)_$(VERSION)
NAME = CacaoVERSION = 15.44
![Page 13: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/13.jpg)
© 2006 UC Regents 13
Adding the fortune packages in nodes/cacao.xml
<?xml version="1.0" standalone="no"?><kickstart>
<description></description>
<copyright></copyright><changelog>$Log: cacao.xml,v $<changelog>
<package>cacao</package>
<package>fortune</package><package>fortune-starwars</package>
<package>fortune-simpsons-homer</package>
<post></post></kickstart>
![Page 14: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/14.jpg)
© 2006 UC Regents 14
Using ‘fortune’<?xml version="1.0" standalone="no"?><kickstart>...<post>
<file name="/etc/motd" mode="append"><eval shell="bash">/usr/bin/fortune</eval></file>
</post>
</kickstart>
![Page 15: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/15.jpg)
© 2006 UC Regents 15
Linking cacao into the Graph
<?xml version="1.0" standalone="no"?>
<graph> <description> The cacao Roll </description>
<order gen="kgen" head="compute"> <tail>cacao</tail> </order>
<edge from="server" to="cacao"/> <edge from="client" to="cacao"/>
</graph>
![Page 16: © 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](https://reader035.vdocuments.us/reader035/viewer/2022072006/56649f495503460f94c6b147/html5/thumbnails/16.jpg)
© 2006 UC Regents 16
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-4.1-0.noarch.rpm/home/cacao/rocks/redhat/RPMS/noarch/roll-cacao-usersguide-4.1-0.noarch.rpm/home/cacao/rocks/redhat/RPMS/i386/cacao-15.44-0.i386.rpm/home/cacao/rocks/redhat/SRPMS/cacao-15.44-0.src.rpm/home/cacao/rocks/redhat/SRPMS/roll-cacao-usersguide-4.1-0.src.rpmcacao-4.1-0.i386.disk1.iso