diff options
author | Eric Thibodeau <kyron@neuralbs.com> | 2008-07-02 20:06:31 -0400 |
---|---|---|
committer | Eric Thibodeau <kyron@neuralbs.com> | 2008-07-02 20:06:31 -0400 |
commit | 1b505a9807658819d0cd02fd90ba834a4a09977a (patch) | |
tree | 45a43e7363b26d6bafac139cc65080712084546c | |
parent | Adding LiveCD-HOWTO (diff) | |
download | clustering-livecd-1b505a9807658819d0cd02fd90ba834a4a09977a.tar.gz clustering-livecd-1b505a9807658819d0cd02fd90ba834a4a09977a.tar.bz2 clustering-livecd-1b505a9807658819d0cd02fd90ba834a4a09977a.zip |
Fixed openldap built with minimal + added clustering profile to livecd-stage1
-rw-r--r-- | LiveCD-HOWTO | 33 | ||||
-rw-r--r-- | catalyst/releases/2008.0/specs/amd64/livecd-stage1.spec | 16 | ||||
-rw-r--r-- | catalyst/releases/2008.0/specs/amd64/livecd-stage2.spec | 7 | ||||
-rw-r--r-- | overlay/net-nds/ldap-auth/Manifest | 4 | ||||
-rw-r--r-- | overlay/net-nds/ldap-auth/files/cluster_ldap_skel.conf | 5 | ||||
-rw-r--r-- | overlay/net-nds/ldap-auth/ldap-auth-0.1.ebuild | 12 | ||||
-rw-r--r-- | overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild | 79 | ||||
-rw-r--r-- | overlay/sys-cluster/beowulf-head/files/beowulf_cluster.conf | 36 | ||||
-rw-r--r-- | profile/package.use | 14 |
9 files changed, 123 insertions, 83 deletions
diff --git a/LiveCD-HOWTO b/LiveCD-HOWTO index 3e7195c..888f4d9 100644 --- a/LiveCD-HOWTO +++ b/LiveCD-HOWTO @@ -6,6 +6,11 @@ If you want to be able to create liveCDs with as little hassle as possible you will need the following: + - The loop module, it's required for the licecd-stage2 creation of the kernel + modprobe loop + + - dev-util/subversion + - dev-util/git - dev-util/catalyst (am using CVS version which is close to 2.0.6) ** for some reason, catalyst won't create the skeleton dirs so here is the sequence to get you started @@ -15,9 +20,7 @@ If you want to be able to create liveCDs with as little hassle as possible you w export MAKEOPTS="-j6" export FEATURES="parallel-fetch" # you can set CFLAGS here but it's not recommended - # edit /etc/catalyst/catalyst.conf and enable ccache (make sure you built it with USE=ccache) - # and DISABLE distcc (it was broken the last time I tried to use it) - options="autoresume ccache kerncache metadata_overlay pkgcache seedcache snapcache " + # NOTE, don't try to use distcc, it's broken, the distcc user is not being created in the catalyst build - http://sources.gentoo.org/viewcvs.py/releng/ pulled in as /var/svnroot/releng mkdir -p /var/svnroot/ @@ -30,9 +33,10 @@ If you want to be able to create liveCDs with as little hassle as possible you w wget ftp://mirrors.tera-byte.com/pub/gentoo/snapshots/portage-latest.tar.bz2 -O /var/tmp/catalyst/snapshots/portage-20080629.tar.bz2 - - The abovementionned snapshot suffers from the following problems: - http://bugs.gentoo.org/show_bug.cgi?id=229103 "www-client/mozilla-firefox-bin-2.0.0.14 missing pango-dependency" - http://bugs.gentoo.org/show_bug.cgi?id=206753 "gnome-base/gnome-desktop-2.20.3 - parser errors during emerge" + - A recent stage3, this eliminates many problems related to circular dependancies and collisions. We used drobbin's packages from funtoo.org + mkdir -p /var/tmp/catalyst/builds/drobbins/ + cd /var/tmp/catalyst/builds/drobbins/ + wget http://www.funtoo.org/linux/amd64/funtoo-amd64-2008.06.27/stage3-amd64-2008.06.27.tar.bz2 - This git checked out into /var/git/: @@ -40,11 +44,23 @@ If you want to be able to create liveCDs with as little hassle as possible you w cd /var/git/ git clone git://git.overlays.gentoo.org/proj/clustering-livecd.git + - The abovementionned snapshot suffers from the following bugs (whch have been fixed if you take something more recent): + http://bugs.gentoo.org/show_bug.cgi?id=229103 "www-client/mozilla-firefox-bin-2.0.0.14 missing pango-dependency" + http://bugs.gentoo.org/show_bug.cgi?id=206753 "gnome-base/gnome-desktop-2.20.3 - parser errors during emerge" + + ** This bug isn't going to be resolved any time soon: + http://bugs.gentoo.org/show_bug.cgi?id=142637 "missing dependency in eutils.eclass" + + So you have to edit the openldap ebuild (currently the setup pulls in 2.4.10) and add DEPEND="sys-apps/shadow": + + vi /var/tmp/catalyst/snapshot_cache/20080629/portage/net-nds/openldap/openldap-2.4.10.ebuild + ebuild /var/tmp/catalyst/snapshot_cache/20080629/portage/net-nds/openldap/openldap-2.4.10.ebuild digest + ## Actually building the CD ## ** NOTE: if you have lots of RAM: ** You can build everything in RAM with no problems as long as tmpfs has at least 6Gigs (for the LiveCD stages) - mount -t tmpfs -o size=6G,noatime catalystbuild /var/tmp/catalyst/tmp/default + alias mnttmp='mount -t tmpfs -o size=6G,noatime catalystbuild /var/tmp/catalyst/tmp/default' ** # Barring the bugs 229103 and 206753, the following sequence should get you down to a LiveCD (haha...HAHA...HAHAHAHAHA) @@ -52,11 +68,12 @@ If you want to be able to create liveCDs with as little hassle as possible you w cd clustering-livecd/catalyst/releases/2008.0/specs/amd64/ for I in stage* do + mnttmp catalyst -f $I # we empty out stuff we don't need anymore ;) umount /var/tmp/catalyst/tmp/default - mount -t tmpfs -o size=6G,noatime catalystbuild /var/tmp/catalyst/tmp/default done + mnttmp catalyst -f livecd-stage1.spec catalyst -f livecd-stage2.spec diff --git a/catalyst/releases/2008.0/specs/amd64/livecd-stage1.spec b/catalyst/releases/2008.0/specs/amd64/livecd-stage1.spec index 0f8ca44..acc976a 100644 --- a/catalyst/releases/2008.0/specs/amd64/livecd-stage1.spec +++ b/catalyst/releases/2008.0/specs/amd64/livecd-stage1.spec @@ -8,11 +8,13 @@ source_subpath: default/stage3-amd64-desktop-2008.0 # Kyron: portage_confdir: /var/git/clustering-livecd/profile/ -pkgcache_path: /var/tmp/catalyst/packages/amd64 +pkgcache_path: /var/tmp/catalyst/packages/amd64/ +portage_overlay: /var/git/clustering-livecd/overlay/ ### end # Kyron: added # openmp (might as well since we have gcc-4.3.1 +# autoconfigure authmaster for ldap-auth # -minimal (for openldap to be used as auth server) # -fam to fix circular dependancy preventing the build livecd/use: @@ -22,6 +24,7 @@ livecd/use: socks5 ldap openmp + authmaster -minimal -fam @@ -180,6 +183,15 @@ livecd/packages: x11-themes/gdm-themes-livecd x11-themes/gentoo-artwork-livecd ## Kyron: -# sys-cluster/clustercd +# explicitly adding net-nds/openldap so it +# gets rebuilt with -minimal (can't do that in +# stage3 at the moment. + net-nds/openldap app-portage/portage-utils + net-nds/ldap-auth + sys-cluster/beowulf-head + sys-cluster/openmpi + app-admin/eselect-cblas + app-admin/eselect-blas + app-admin/eselect-lapack diff --git a/catalyst/releases/2008.0/specs/amd64/livecd-stage2.spec b/catalyst/releases/2008.0/specs/amd64/livecd-stage2.spec index 3ced797..ec98c60 100644 --- a/catalyst/releases/2008.0/specs/amd64/livecd-stage2.spec +++ b/catalyst/releases/2008.0/specs/amd64/livecd-stage2.spec @@ -9,16 +9,17 @@ source_subpath: default/livecd-stage1-amd64-installer-2008.0 # Kyron: portage_confdir: /var/git/clustering-livecd/profile/ pkgcache_path: /var/tmp/catalyst/packages/amd64 +livecd/motd:/var/git/clustering-livecd/catalyst/releases/2008.0/misc/clusterlivecd.motd.txt +livecd/iso: ~/livecd-amd64-installer-2008.0.iso +livecd/volid: x86_64 Gentoo Clustering LiveCD ### end -livecd/bootargs: dokeymap +livecd/bootargs: dokeymap nox livecd/cdtar: /usr/lib/catalyst/livecd/cdtar/isolinux-elilo-memtest86+-cdtar.tar.bz2 livecd/fsscript: /var/svnroot/releng/trunk/releases/2008.0/scripts/livecd.sh livecd/fstype: squashfs livecd/gk_mainargs: --lvm --dmraid --evms --mdadm --makeopts=-j5 -livecd/iso: ~/livecd-amd64-installer-2008.0.iso livecd/type: gentoo-release-livecd -livecd/volid: x86_64 Gentoo Clustering LiveCD livecd/xsession: xfce livecd/xdm: gdm diff --git a/overlay/net-nds/ldap-auth/Manifest b/overlay/net-nds/ldap-auth/Manifest index caab865..d4da05c 100644 --- a/overlay/net-nds/ldap-auth/Manifest +++ b/overlay/net-nds/ldap-auth/Manifest @@ -1,2 +1,2 @@ -AUX cluster_ldap_skel.conf 3737 RMD160 eb82a475caa338f29dbd7bc64d0de659829d52f7 SHA1 bf5cbca83cec4633442523506123c92862d27623 SHA256 d03ddca79b751e182c44d346c555c7bd08f411cd87c32608915964de9664810b -EBUILD ldap-auth-0.1.ebuild 12734 RMD160 cc4869546234d9496beff0318afa22a037e7b734 SHA1 bacacc1425cdd63fd5a5140f1d445c795734d8e8 SHA256 5b18dc255b9c96fc26422ef96bd9d73d36b13934b713a4342ba18413d41b2b0a +AUX cluster_ldap_skel.conf 3849 RMD160 21ddf218b92583b48ee0cfca2936d2eb55c6d652 SHA1 c79f463486e88ada5af76ed19c465a97bb680bf6 SHA256 473d7bab701aaac2b9091c577cebdca4822ec37b8ed94002f33a37cf6e329bbf +EBUILD ldap-auth-0.1.ebuild 12810 RMD160 c749e2f9a9df69fb600d7c74304a9df5cc69b8a6 SHA1 7172dba8aecc6d1173acb30cc5b145f18725e638 SHA256 f23a36cf16f99dccee22fa23ff19a61b1dcaccc3b70c139645faf4e8f1439a16 diff --git a/overlay/net-nds/ldap-auth/files/cluster_ldap_skel.conf b/overlay/net-nds/ldap-auth/files/cluster_ldap_skel.conf index 83c2e42..d08ba70 100644 --- a/overlay/net-nds/ldap-auth/files/cluster_ldap_skel.conf +++ b/overlay/net-nds/ldap-auth/files/cluster_ldap_skel.conf @@ -22,7 +22,10 @@ CONFIG_OK="no" # is actually more like : "machine.domain.com". ASSuming # the machine is set up right, we can pull that in autmatically # using the following: -DOMAIN=$(hostname -f) +#DOMAIN=$(hostname -f) +# but we hardcode it for the LiveCD, else you'd be getting my +# machine's name :) +DOMAIN="livecd.gentoo.local" DOMAIN_DESC="This the LDAP server residing on $DOMAIN" # Which part of your organisation is this machine filling in diff --git a/overlay/net-nds/ldap-auth/ldap-auth-0.1.ebuild b/overlay/net-nds/ldap-auth/ldap-auth-0.1.ebuild index 459c4e7..293f5e7 100644 --- a/overlay/net-nds/ldap-auth/ldap-auth-0.1.ebuild +++ b/overlay/net-nds/ldap-auth/ldap-auth-0.1.ebuild @@ -9,7 +9,7 @@ SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~x86" -IUSE="autoconfigure authmaster" +IUSE="autoconfigure authmaster livecd" DEPEND="" RDEPEND="sys-auth/nss_ldap @@ -33,7 +33,9 @@ src_install() { if use authmaster; then cp $TEMPLATE_FILE ./ldap_auth.conf - doconfd ./ldap_auth.conf + dodir /etc/gentoo/ + insinto /etc/gentoo/ + doins $TEMPLATE_FILE if ! use autoconfigure; then elog "You need to edit $CONFIG_FILE to your likings" elog "Once you are done, set CONFIG_OK=\"yes\" in there and" @@ -386,8 +388,10 @@ creade_db() #chown -R ldap: `awk '/^directory/ {print $2}' $SLAPDCONF` chown -R ldap: $DBDIR - einfo "Starting slapd" - /etc/init.d/slapd start || ewarn "Failed to start slapd, check /var/log/messages"; + if ! use livecd; then + einfo "Starting slapd" + /etc/init.d/slapd start || ewarn "Failed to start slapd, check /var/log/messages"; + fi einfo "Adding slapd to default runlevel" rc-update add slapd default diff --git a/overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild b/overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild index 6f223ca..d6ac242 100644 --- a/overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild +++ b/overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild @@ -2,32 +2,33 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -DESCRIPTION="This is a meta ebuild that pulls in the packages and some config -scripts/files for building the Gentoo Clustering Master node" -HOMEPAGE="http://code.google.com/soc/2008/gentoo/appinfo.html?csaid=79DB497BA0D95148" +DESCRIPTION="This is a meta ebuild that pulls in the packages and some config scripts/files for building the Gentoo Clustering Master node" +HOMEPAGE="http://git.overlays.gentoo.org/gitweb/" SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~x86" -IUSE="" +IUSE="autoconfigure" DEPEND="" RDEPEND="net-nds/ldap-auth - sys-boot/syslinux - net-dns/dnsmasq - app-admin/sudo - net-misc/sipcalc + sys-boot/syslinux + net-dns/dnsmasq + net-misc/sipcalc net-fs/nfs-utils" +CONFPATH="/etc/gentoo" +CONFIG_FILE="cluster.conf" + gent_ip_config() { - CLUSTER_ETH_IP=$(sipcalc $CLUSTER_ETH | egrep 'Host address\W*-' | cut -d- -f2) - RANGE_START=$(sipcalc $CLUSTER_ETH | egrep 'Host address\W*-' | cut -d- -f2) - IPSTART="${RANGE_START#*.}.$(( ${RANGE_START##*.} +1 ))" - IPSTOP=$(sipcalc $CLUSTER_ETH | egrep 'Usable range\W*-' | cut -d- -f3) - SUBNET=$(sipcalc $CLUSTER_ETH | egrep 'Network mask\W*-' | cut -d- -f2) - NETADDR=$(sipcalc $CLUSTER_ETH | egrep 'Network address' | cut -d- -f2) + CLUSTER_ETH_IP="$(sipcalc ${CLUSTER_ETH} | egrep 'Host address\W*-' | cut -d- -f2)" + RANGE_START="$(sipcalc ${CLUSTER_ETH} | egrep 'Host address\W*-' | cut -d- -f2)" + IPSTART="${RANGE_START%.*}.$(( ${RANGE_START##*.} +1 ))" + IPSTOP="$(sipcalc ${CLUSTER_ETH} | egrep 'Usable range\W*-' | cut -d- -f3)" + SUBNET="$(sipcalc ${CLUSTER_ETH} | egrep 'Network mask\W*-' | cut -d- -f2)" + NETADDR="$(sipcalc ${CLUSTER_ETH} | egrep 'Network address' | cut -d- -f2)" } dnsmasq_conf() @@ -85,10 +86,11 @@ pxe_conf() BOOTPATH="${BOOTPATH#/}/boot" mkdir -p ${TFTPROOT}/pxelinux.cfg - cat >> ${TFTPROOT}/pxelinux.cfg/default <<-EOF + + cat > ${TFTPROOT}/pxelinux.cfg/default <<-EOF prompt 1 timeout 50 - say Press F1 for boot profiles, default is $PROFNAME in 5 seconds... + say Press F1 for boot profiles, default is $PROFNAME in 5 seconds... F1 BootProfiles default $PROFNAME @@ -98,39 +100,62 @@ pxe_conf() label local localboot 0 - EOF - cat >> ${TFTPROOT}/BootProfiles <<-EOF - ^L + cat > ${TFTPROOT}/BootProfiles <<-EOF + Type $PROFNAME for regular bootup (default after 5 seconds) Type local to boot on the local HDD EOF - ln -s ${ROOT}/usr/lib/syslinux/pxelinux.0 ${TFTPROOT}/pxelinux.0 - + ln -s "${ROOT}/usr/lib/syslinux/pxelinux.0" "${TFTPROOT}/pxelinux.0" } nfs_root_conf() { - cat >> ${ROOT}/etc/exportfs <<-EOF - ${NFSROOT} $NETADDR/$SUBNET(ro,no_root_squash,async,no_subtree_check) - EOF + cat > ${ROOT}/etc/exportfs <<-EOF + ${NFSROOT} $NETADDR/$SUBNET(ro,no_root_squash,async,no_subtree_check) + EOF mkdir -p ${NFSROOT} einfo "${NFSROOT} has been populated, all configs point to this root" - einfo "to boot, firthermore, the fonfigs expect the kernel to be" + einfo "to boot, furthermore, the fonfigs expect the kernel to be" einfo "${NFSROOT}/boot/vmlinuz" } +parse_config() +{ + [[ -f ${1} ]] || die "${1} missing!!! re-emerge ${PF}" + if ! use autoconfigure; then + . ${1} + [[ $CONFIG_OK != "yes" ]] && die "You need to edit ${CONFIG_FILE} and set CONFIG_OK=\"yes\"" + fi +} + +src_install() +{ + dodir ${CONFPATH} + insinto ${CONFPATH} + doins ${FILESDIR}/${TEMPLATE_FILE} + + if ! use autoconfigure; then + elog "You need to edit ${CONFPATH}/${CONFIG_FILE} to your likings" + elog "Once you are done, set CONFIG_OK=\"yes\" in there and" + elog "call emerge --config =${CATEGORY}/${PF}" + fi +} + pkg_config() { + parse_config "${CONFPATH}/${CONFIG_FILE}" + dnsmasq_conf pxe_conf nfs_root_conf - for I in dnsmasq netmount; + for I in dnsmasq netmount do - rc-update add $I + rc-update add $I default done } + diff --git a/overlay/sys-cluster/beowulf-head/files/beowulf_cluster.conf b/overlay/sys-cluster/beowulf-head/files/beowulf_cluster.conf deleted file mode 100644 index 7b223d5..0000000 --- a/overlay/sys-cluster/beowulf-head/files/beowulf_cluster.conf +++ /dev/null @@ -1,36 +0,0 @@ -# Clustering template configuration file -# Eric Thibodeau June 2008 - -# PUBETH is the public-side ETH, which means dnsmasq won't listen on this -# interfaces, any other interface will be taken in charge by dnsmasq. -PUBETH="eth0" - -# CLUSTER_ETH defines the interface connected to the cluster's -# _PRIVATE_ network. All relevant information is derived automatically -# from this interface's configuration to create the proper address -# mapping using net-misc/sipcalc -# IMPORTANT, it is ASSumed the interface has an address of NETWORKSADDR+1 -# this means that, if the cluster network base is 10.0.0.0/24, we assume -# eth1 to be 10.0.0.1, other configurations are beyond the scope of this -# automation script and you shouldn't even be using it in this case ;) -CLUSTER_ETH="eth1" - -# Not sure we want this to be (auto)configurable since -# we are building an isolated (true) Beowulf cluster -# where the nodes aren't supposed to be accessible from -# the outside. For the same reason, we don't set up -# routing on the head server. -LOCALDOMAINNAME="cluster.local" - -# This is where the boot images and boot files are stored, -# including pxelinux and kernel stuff. -TFTPROOT="/tftproot" - -# This is the location of the pxelinux.0 file used for booting. -# The file is provided by sys-boot/syslinux. -PXELINUX="${TFTPROOT}/pxelinux.0" - -# This is where the NFS booted image resides, for practical reasons, -# this is kept within TFTPROOT: -NFSROOT="${TFTPROOT}/nfsroot/$(uname -m)" - diff --git a/profile/package.use b/profile/package.use index f37005c..86b5f21 100644 --- a/profile/package.use +++ b/profile/package.use @@ -1,3 +1,17 @@ <=net-misc/neon-0.28.2 -socks -socks5 # We want good integration of the LDAP system app-admin/sudo ldap + +# 2008/07/02 - Eric Thibodeau <kyron@neurabls.com> +# +# This is from /usr/portage/profiles/default/linux/amd64/2008.0/desktop/../../../../../targets/desktop/package.use +## 2008/03/26 - Chris Gianelloni <wolf31o2@gentoo.org> +## While we may need LDAP client support, who needs the server on a desktop? +## Did I mention that this also fixes the horrible perl dependency hell, too? +# +# Let the fun begin :( I have no choice to set this here since stage*.spec does not provide the means to set USE flags +#net-nds/openldap -minimal + +# ^^^ Nope...that won't work, so commenting and trying in livecd-stage1.spec instead (net-nds/openldap added to the list) + +sys-cluster/openmpi smp threads fortran |