Presentation is loading. Please wait.

Presentation is loading. Please wait.

C. Aiftimiei, E. Ferro / January 2003 1 LCFGng server installation Cristina Aiftimiei, Enrico Ferro INFN-LNL.

Similar presentations


Presentation on theme: "C. Aiftimiei, E. Ferro / January 2003 1 LCFGng server installation Cristina Aiftimiei, Enrico Ferro INFN-LNL."— Presentation transcript:

1 C. Aiftimiei, E. Ferro / January 2003 1 LCFGng server installation Cristina Aiftimiei, Enrico Ferro INFN-LNL

2 C. Aiftimiei, E. Ferro / January 2003 2 " Where are documentation & packages " LCFGng in 1 slide " Differences between LCFG and LCFGng " Server installation: –Install a RH62 + openssh + 3 additional packages –Download the RPM from the EDG repository –Install additional packages automatically –Build installroot(s) –Set up services: DHCP, NFS, Apache, mkxprofd –Prepare and build XML profile(s) [see Andrea's slides] –Install a node via floppy –Install a node via PXE Roadmap

3 C. Aiftimiei, E. Ferro / January 2003 3 Client nodes LCFGng Server LCFGng in 1 slide Notification ( UDP ) Source files XML profiles Compile r (mkxprof) HTTP server Download (HTTP) Clien t Daemo n ( rdxprof ) Local cache Profil e Componen t Components

4 C. Aiftimiei, E. Ferro / January 2003 4 " You can find LCFGng server installation guide in PDF, PS, HTML: –http://datagrid.in2p3.fr/distribution/datagrid/wp4/edg- lcfg/documentation " The software packages are available here: –http://datagrid.in2p3.fr/distribution/datagrid/wp4/edg-lcfg/packages –Please note that almost all will be downloaded automatically Documentation and software packages

5 C. Aiftimiei, E. Ferro / January 2003 5 " These changes are described in detail in: –http://datagrid.in2p3.fr/distribution/datagrid/wp4/edg- lcfg/documentation/lcfgng-migration.txt " Support both RedHat 6.2 and Cern Redhat 7.3.1 " Both XML profiles and source directories changed :-( ".def files are in a different directory (in the past they were with the configuration files) " Many components (i.e. objects) changed (some splitted, some added, some removed). See the previous link for the details. LCFG vs LCFGng (1/2)

6 C. Aiftimiei, E. Ferro / January 2003 6 " mkxprof, the XML compiler  Now it must be run as a daemon: /sbin/service mkxprofd start  To rebuild the profiles you must reload the daemon: /sbin/service mkxprofd reload " A web interface is available with  the status of mkxprof: http:// /status  To select which nodes should be installed: http:// /install/install.cgi " Installation more flexyble: –Now it is possible to specify additional commands that must be run during the installation customizing the LCFGng configuration files –Added PXE support LCFG vs LCFGng (2/2)

7 C. Aiftimiei, E. Ferro / January 2003 7 " You should install a RedHat Linux 6.2 node that will provide the following services: –NFS: to distribute the software packages and rpm lists –DHCP: for the 1st installation –HTTP: to distribute the XML profiles " Why RH6.2? To simplify the update of an existing LCFG server " From: –http://datagrid.in2p3.fr/distribution/datagrid/wp4/edg-lcfg/packages Download and install the latest version of these 3 packages: –edg-populate-serverng, updaterpms-static-server, edg-updaterep " Download and install ssh for RedHat from: –http://datagrid.in2p3.fr/distribution/external/RPMS/ 1/9: To start install a RH62

8 C. Aiftimiei, E. Ferro / January 2003 8 2/9: Download packages via updaterep " To download all the EDG, RedHat and external packages you can use a tool called updaterep (see man updaterep) " Due to the frequent changes on RPM repositories :-(, get the updaterep's configuration file matching your EDG release from: –http://datagrid.in2p3.fr/cgi-bin/cvsweb.cgi/edg-release/updaterep/ " updaterep will –Create automatically the required directory –Download via wget only the packages that are not already present  Write automatically the hdfiles ( package.rpm->.package.rpm ) (they are needed by updaterpms, the packages installer) –Write a 'Makefile' in each repository to create the hdfiles " With LCFGng you must use version 2. version of updaterep

9 C. Aiftimiei, E. Ferro / January 2003 9 3/9: Installation/upgrade of server packages " If you are upgrading an existing LCFGng server you have to remove the old packages with something like: –rpm -e lcfg-adapt-server –rpm -e `rpm -qa | grep 'obj-.*-server'` " To install other packages run this script (it is provided by edg-populate- serverng) –/opt/local/linux/utils/installpackages-ngserver

10 C. Aiftimiei, E. Ferro / January 2003 10 4/9: Building installroot(s) " The installroot is a basic Linux system mounted via NFS during the installation. This script will create the RPM DB and install all the required packages. So run: – /opt/local/linux/utils/create-nginstallroot-rh62 " You have also to provide an installparams file; customize it changing the default keyboard (UK) to your preferred: –cd /opt/local/linux/nginstallroot/6.2/etc –cp installparams.default installparams –vi installparams " Follow similar steps for RH 7.3 (the installroot are differents)

11 C. Aiftimiei, E. Ferro / January 2003 11 5/9: Set up DHCP " To configure DHCP: –touch /var/state/dhcp/dhcpd.leases –An example of /etc/dhcpd.conf is provided in /etc/dhcpd.conf.ngexample " Remember to customize there: –Domain, DNS, gateway " And for each node you need: –MAC address, IP address " To start it –/etc/rc.d/init.d/dhcpd start " Enable it for the future:  / sbin/chkconfig --level 2345 dhcpd on " Warning: some dhcpd.conf lines changed from the old LCFG!

12 C. Aiftimiei, E. Ferro / January 2003 12 6/9: Set up NFS " An example of /etc/export is provided by /etc/exports.ngexample. The installroot and the RPM repositories should be read-only available to the clients " Start (or restart) the nfs service: –/etc/rc.d/init.d/nfs start –/etc/rc.d/init.d/nfslock start " Enable them for the future: –/sbin/chkconfig --level 345 nfs on –/sbin/chkconfig --level 345 nfslock on

13 C. Aiftimiei, E. Ferro / January 2003 13 7/9: Set up HTTP " Shut down apache (if running) –/etc/rc.d/init.d/httpd stop " Follow the instructions on the server installation guide to customize some lines on /etc/httpd/conf/httpd.conf " Create an htpasswd file to protect the CGI script used to select the machines to install (it will be explained in the next PXE slides): –htpasswd -c /etc/httpd/.htpasswd lcfgng " Start it and enable it: –/etc/rc.d/init.d/httpd start –/sbin/chkconfig --level 345 httpd on

14 C. Aiftimiei, E. Ferro / January 2003 14 8/9: Set up mkxprofd " In LCFGng mkxprof must be run as daemon " Start and enabled mkxprofd: –/etc/rc.d/init.d/mkxprofd start –/sbin/chkconfig --level 345 nfslock on " When you change the configuration files and you have to deploy the changes to the client, you should reload the daemon so it will rebuild the XML files and send the notifications: –/etc/rc.d/init.d/mkxprofd reload " The compilation output is available only via web :-( –http:// /status/

15 C. Aiftimiei, E. Ferro / January 2003 15 9/9: Build the XML profiles " See Andrea's presentation in the afternoon...

16 C. Aiftimiei, E. Ferro / January 2003 16 " There are two diskettes, RH62 or RH731. Download the image: –http://datagrid.in2p3.fr/distribution/datagrid/wp4/edg- lcfg/packages/external/diskettes/ " Write the image on a diskette –dd if= of=/dev/fd0 bs=1024 " Boot from it on the client and confirm manually when asked " Put a look on the server: –tail -f /var/log/messages " Cross all your fingers ;-) Install a client: floppy

17 C. Aiftimiei, E. Ferro / January 2003 17 1/3: Install a client: PXE " Copy the loader, provided by the package syslinux, in /tftpboot: –cp /usr/lib/syslinux/pxelinux.0 /tftpboot/ " Enable TFTP in /etc/inetd.conf by adding this line: – tftp dgram udp wait root/usr/sbin/tcpd in.tftpd -s /tftpboot " Restart the service: –/etc/rc.d/init.d/inetd restart " Via web you can choose which nodes should be installed. If there is the corresponfing XML profile, the node will be listed here: –http:// /install/install.cgi " This web interface updates some symlinks that are used by pxelinux to choose the boot from the local disk or the installation via network " On the next slide a screen shot...

18 C. Aiftimiei, E. Ferro / January 2003 18 2/3 How pxelinux works (only for curious) LCFG serverNode NIC (broadcast): "Please, I need an IP" DHCP server: "Your IP is 192...; to boot you have to load a file called pxelinux.0" NIC (now configured): "Could you give me this pxelinux.0"? TFTP server: "Of course, it's for free!" pxelinux.0: "Thank you Sir. I am the OS loader. Could send me my configuration file (it is called as my ipaddress)?" TFTP server: "Yessir" – pxelinux.0 looks into its configuration file and decide if it has to boot from the local disk or to mount via NFS a root file system (and starting automatic installation without manual intervention)

19 C. Aiftimiei, E. Ferro / January 2003 19 3/3: Web interface for PXE installations " This CGI script creates symlinks so each client download its configuration file " At the end the installation script, using wget, calls another CGI script that restore the boot from hard disk


Download ppt "C. Aiftimiei, E. Ferro / January 2003 1 LCFGng server installation Cristina Aiftimiei, Enrico Ferro INFN-LNL."

Similar presentations


Ads by Google