aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Thibodeau <kyron@neuralbs.com>2008-07-02 20:06:31 -0400
committerEric Thibodeau <kyron@neuralbs.com>2008-07-02 20:06:31 -0400
commit1b505a9807658819d0cd02fd90ba834a4a09977a (patch)
tree45a43e7363b26d6bafac139cc65080712084546c /overlay
parentAdding LiveCD-HOWTO (diff)
downloadclustering-livecd-1b505a9807658819d0cd02fd90ba834a4a09977a.tar.gz
clustering-livecd-1b505a9807658819d0cd02fd90ba834a4a09977a.tar.bz2
clustering-livecd-1b505a9807658819d0cd02fd90ba834a4a09977a.zip
Fixed openldap built with minimal + added clustering profile to livecd-stage1
Diffstat (limited to 'overlay')
-rw-r--r--overlay/net-nds/ldap-auth/Manifest4
-rw-r--r--overlay/net-nds/ldap-auth/files/cluster_ldap_skel.conf5
-rw-r--r--overlay/net-nds/ldap-auth/ldap-auth-0.1.ebuild12
-rw-r--r--overlay/sys-cluster/beowulf-head/beowulf-head-0.1.ebuild79
-rw-r--r--overlay/sys-cluster/beowulf-head/files/beowulf_cluster.conf36
5 files changed, 66 insertions, 70 deletions
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)"
-