Initial Configuration
We used for the HP/Intel Solution Center a single HP Proliant DL 380 G3 connected to an EVA 5000 with 2 TB of storage. On the server a Mandriva 2008.0 distribution has been installed with a minimal set of packages (Development, Web Server, Network Server), including mandatory tools for a dploy.org server:
- apache-mpm-prefork (Everything is based on a Web interface, so apache is needed)
- rsync (used to mirror master sites)
- sudo (used to act as ftp or apache user)
- postfix (mail sent for accounting)
- rpm-build (ability to build rpm packages)
- openssh-server (support remote secure connections)
- losetup (support loopback mount)
The dependency on the distribution is not required, every distribution providing the mandatory packages mentioned throughout the document is suited (fedora, debian comes to mind) Then additional mandatory packages have been added to provide the dploy.org functions (we used urpmi <package-name> on our distribution, use yum install <package-name> or apt-get install <package-name> for Fedora or Debian respectively):
- dhcp-server (DHCP server to control boot file management)
- pxelinux (ability to support PXE boot for Linux systems)
- tftp-server (TFTP server needed to download initial ramdisk and kernel)
- vsftpd (Secure FTP server)
- mirror (used to mirror master sites)
- rpmtools (tool to create mandriva repositories)
- apt (tool to handle debian packages)
- dpkg (tool to create debian repositories)
- yum (tool to handle fedora packages)
- lndir (create a shadow directory of symbolic links to another directory tree)
- createrepo (tool to create yum repositpries)
- repoview (creates a set of static HTML pages in a yum repository)
- mrepo (manages yum repositories)
- fuseiso (allows to mount more than 256 ISO images in loopback)
- ocsng-linux-server-ipdiscover (OCS Inventory to serve as a base Web interface)
- perl-Net-Netmask (used by dploy-dhcp)
- perl-Project-Builder (used by dploy-*)
- perl-Locale-gettext \
- perl-Mail-Sendmail |
- perl-File-MimeInfo |
- perl-File-BaseDir | (used by perl-Project-Builder)
- perl-File-DesktopEntry |
- perl-Date-Manip /
Note on RHEL5 you may want to get them from DAG repository:
wget http://dag.wieers.com/rpm/packages/perl-Locale-gettext/perl-Locale-gettext-1.05-1.el5.rf.i386.rpm wget http://ftp.belnet.be/packages/dries.ulyssis.org/redhat/el5/en/i386/RPMS.dries/perl-Mail-Sendmail-0.79-1.2.el5.rf.noarch.rpm wget http://dag.wieers.com/rpm/packages/perl-File-MimeInfo/perl-File-MimeInfo-0.14-1.el5.rf.noarch.rpm wget http://dag.wieers.com/rpm/packages/perl-File-BaseDir/perl-File-BaseDir-0.02-1.el5.rf.noarch.rpm wget http://dag.wieers.com/rpm/packages/perl-File-DesktopEntry/perl-File-DesktopEntry-0.02-1.el5.rf.noarch.rpm
The layout of the server is the following:
Filesystem Size Used Avail Use% Mounted on /dev/cciss/c0d0p1 2,0G 140M 1,7G 8% / /dev/cciss/c0d0p8 981M 17M 915M 2% /tmp /dev/cciss/c0d0p5 9,7G 1,7G 7,6G 18% /usr /dev/cciss/c0d0p7 2,7G 234M 2,3G 10% /var /dev/cciss/c0d0p9 50G 33M 50G 1% /dploy.org /dev/sda1 2,0T 1,4T 613G 70% /dploy.org/ftp/pub
/dploy.org is the main directory where all files related to the project are located. /dploy.org/ftp/pub points to the EVA and will contain all the public files needed for deployment (ISO images, mirrors of distributions, ...).
We recommend to create separte /usr, /var and /tmp directories in order to ease system administration, even if it's not mandatory.
Configuration
First create a user dploy, group dploy on your system. This user will be used for all operations related to the dploy.org functions. Example:
useradd -d /dploy.org -m -c 'dploy.org user' dploy perl -pi -e 's/^dploy:\!\!:/dploy:*:/ /etc/shadow
There is now a need to populate our ftp area with various Linux distributions. FLOSS distributions are the easiest as everything can be downloaded from their main ftp servers. 2 means are used to populate and keep up to date the local repository under /dploy.org/ftp/pub. One is using rsync. Another one is using mirror (perl script based on the FTP protocol). Other means can be easily added at will.
The directory structure proposed on our dploy.org server is the following :
/usr
| |
| |--- src/ (provide the latest versions of the tools under their CMS)
| |
| |-- svn (owner/group: dploy/dploy)
| |
| |----- dploy.org (obtained by svn checkout svn://svn.dploy.org/dploy dploy.org)
| |----- mrepo (obtained by svn checkout svn://svn.rpmforge.net/svn/trunk/tools/mrepo)
| |----- pb (obtained by svn checkout svn://svn.project-builder.org/pb pb)
| |----- LinuxCOE (obtained by export CVSROOT=:pserver:anonymous@linuxcoe.cvs.sourceforge.net:/cvsroot/linuxcoe) (or :ext:account for ssh)
| |
| |----- SystemDesigner (cvs checkout SystemDesigner)
| |----- SystemDesigner-CentOS (cvs checkout SystemDesigner-CentOS)
| |----- SystemDesigner-Debian (cvs checkout SystemDesigner-Debian)
| |----- SystemDesigner-Fedora (cvs checkout SystemDesigner-Fedora)
| |----- SystemDesigner-OpenSUSE (cvs checkout SystemDesigner-OpenSUSE)
| |----- SystemDesigner-RHEL (cvs checkout SystemDesigner-RHEL)
| |----- SystemDesigner-SLES (cvs checkout SystemDesigner-SLES)
| |----- SystemDesigner-Ubuntu (cvs checkout SystemDesigner-Ubuntu)
| |----- docs (cvs checkout docs)
| |----- packaging (cvs checkout packaging)
|
/dploy.org (owner/group: dploy/dploy)
|
|------ ftp (root for the ftp server)
| |
| |----- pub (public area)
| | |
| | |------ centos
| | | |
| | | |--- 3.9
| | | | |
| | | | |-- os
| | | | |----- i386
| | | | |----- ia64
| | | | |----- x86_64
| | | |--- 4.5
| | | | |
| | | | |-- os
| | | | |----- i386
| | | | |----- ia64
| | | | |----- x86_64
| | | |--- 5.0
| | | |
| | | |-- os
| | | |----- i386
| | | |----- ia64
| | | |----- x86_64
| | |
| | |------ debian
| | |------ fedora
| | | |
| | | |--- core
| | | | |
| | | | |-- 5
| | | | | |----- i386
| | | | | |----- x86_64
| | | | |
| | | | |-- 6
| | | | |----- i386
| | | | |----- x86_64
| | | |
| | | |--- releases
| | | |
| | | |-- 7
| | | |----- i386
| | | |----- x86_64
| | |
| | |------ iso (ISO images of non FLOSS distributions)
| | | |
| | | |--- redhat (RHEL)
| | | | |----- i386
| | | | |----- ia64
| | | | |----- x86_64
| | | |
| | | |--- suse (SLES)
| | | | |----- i386
| | | | |----- ia64
| | | | |----- x86_64
| | | |
| | | |--- vmware
| | | |----- i386
| | |
| | |
| | |------ mandrakelinux
| | | |
| | | |--- official
| | | |
| | | |-- 2007.0
| | | | |----- i386
| | | | |----- x86_64
| | | |
| | | |-- 2007.1
| | | | |----- i386
| | | | |----- x86_64
| | | |
| | | |-- 2008.0
| | | |----- i386
| | | |----- x86_64
| | |
| | |------ opensuse
| | | |
| | | |--- distribution
| | | |
| | | |-- 10.2/repo/oss/suse
| | | | |----- i386
| | | | |----- x86_64
| | | |
| | | |-- 10.3/repo/oss/suse
| | | |----- i386
| | | |----- x86_64
| | |
| | |------ ubuntu
The detailed sizes (> 1GB) occupied by that structure is as follows:
18G centos/3.8 8,6G centos/3.9 22G centos/4.5 24G centos/5.0 1,5G debian/dists 181G debian/pool 19G debian-security/pool 122G fedora/core 21G fedora/development 31G fedora/extras 37G fedora/releases 9,1G fedora/updates 132G iso/redhat 103G iso/suse 224G mandrakelinux/devel 309G mandrakelinux/official 112G opensuse/distribution 142G ubuntu/archive 37G ubuntu/releases
Apache server setup
Support ftp area browsing:
cat > /etc/httpd/conf.d/ftp.conf << EOF
### Directory-based for the main server
<Directory /pub>
Options Indexes FollowSymlinks SymLinksifOwnerMatch IncludesNOEXEC
</Directory>
EOF
FTP server setup:
# rmdir /var/ftp/pub/ # rmdir /var/ftp/ # ln -sf /dploy.org/ftp /var # modprobe capability # /etc/init.d/vsftpd restart
and adds a ftpsecure user without login + configure /etc/vsftpd/vsftpd.conf
Install LinuxCOE from packages made with Project-Builder
$ ncftpget ftp://ftp.project-builder.org/mandriva/2008.0/linuxcoe'*'.rpm $ sudo urpmi linuxcoe-*rpm
