wiki:ManualInstall

Initial Configuration

We used for the HP/Intel Solution Center a single HP Proliant DL 380 G3 connected to an EVA 8000 with 1.5 TB of storage for distributions and 1 TB for images. On the server a Mandriva 2010.1 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  1,2G  733M  61% /
/dev/cciss/c0d0p9      50G  1,0G   49G   3% /dploy.org
/dev/cciss/c0d0p8     981M   17M  915M   2% /tmp
/dev/cciss/c0d0p5     9,7G  2,5G  6,7G  27% /usr
/dev/cciss/c0d0p7     2,7G  1,6G  947M  64% /var
/dev/mapper/mpath0    1,5T  198M  1,5T   1% /dploy.org/distribs
/dev/mapper/mpath1    985G  200M  985G   1% /dploy.org/images

/dploy.org is the main directory where all files related to the project are located. /dploy.org/distribs points to the EVA and will contain all the public files needed for deployment (ISO images, mirrors of distributions, ...). /dploy.org/images points to the EVA and will contain all the images that could as well be used for deployment (Mondorescue images).

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)
     |
     |------ distribs
     |           |
     |           |
     |           |
     |           |------ centos
     |           |          |
     |           |          |--- 3.9
     |           |          |     |
     |           |          |     |-- os
     |           |          |         |----- i386
     |           |          |         |----- ia64
     |           |          |         |----- x86_64
     |           |          |--- 4.8
     |           |          |     |
     |           |          |     |-- os
     |           |          |         |----- i386
     |           |          |         |----- ia64
     |           |          |         |----- x86_64
     |           |          |--- 5.5
     |           |                |
     |           |                |-- os
     |           |                    |----- i386
     |           |                    |----- ia64
     |           |                    |----- x86_64
     |           |
     |           |------ debian
     |           |------ fedora
     |           |          |
     |           |          |--- core
     |           |          |--- releases
     |           |                |
     |           |                |-- 13
     |           |                    |----- 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
     |           |                |
     |           |                |-- 20010.0
     |           |                |   |----- i386
     |           |                |   |----- x86_64
     |           |                |
     |           |                |-- 2010.1
     |           |                |    |----- i386
     |           |                |    |----- x86_64
     |           |                |
     |           |                |-- 2011.0
     |           |                     |----- i386
     |           |                     |----- x86_64
     |           |                
     |           |------ opensuse
     |           |          |
     |           |          |--- distribution
     |           |                |
     |           |                |-- 11.2/repo/oss/suse
     |           |                |                   |----- i386
     |           |                |                   |----- x86_64
     |           |                |
     |           |                |-- 11.3/repo/oss/suse
     |           |                                    |----- i386
     |           |                                    |----- x86_64
     |           |                 
     |           |------ ubuntu
     |
     |------ images

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 /var/www/html/ftp>
        Options Indexes FollowSymlinks SymLinksifOwnerMatch IncludesNOEXEC
</Directory>
EOF
# ln -sf /var/ftp /var/www/html/ftp

FTP server setup:

# rmdir /var/ftp/pub/
# rmdir /var/ftp/
# ln -sf /dploy.org/ftp /var/ftp
# 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/2010.0/linuxcoe'*'.rpm
$ sudo urpmi linuxcoe-*rpm

Configure LinuxCOE by providing the boot images content for community distributions

$ cd /usr/share/linuxcoe-sd/images
$ wget -m http://www.instalinux.com/snapshots/images/
$ mv www.instalinux.com/snapshots/images/*.tar .
$ rm -rf www.instalinux.com

For commercial distributions such as RHEL or SLES, you'll have to create these files yourself (Example here is with RHEL 5 Server i386 DVD mounted under /mnt/cdrom).

$ mkdir /tmp/1
$ cp /mnt/cdrom/isolinux /tmp/1
$ chmod -R 777 /tmp/1/isolinux
$ cd /tmp/1
$ tar cvf /usr/share/linuxcoe-sd/images/RedHat-5Server-i386.tar isolinux
$ cd ..
$ rm -rf 1

Then you need to teach LinuxCOE that your preferred deployment server is local

$ cp -a /usr/share/linuxcoe-sd/osvend.d /etc/linuxcoe-sd/
$ cd /etc/linuxcoe-sd/
$ vi *

modify the locations of the configuration files to point to your local http/ftp server.