Installfest Services: Difference between revisions

From WPLUG
Jump to navigation Jump to search
(consolidate two similar pages - BAS, can you update info?)
(Typo)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== DEPRECIATED ==
Installfest "Services" is an experiment by [[User:Bseklecki || Brian A. Seklecki]] and [[User:trodgers | Ted Rodgers]] to provide high performance Linux Distro Install and Update FTP/NFS/HTTP mirrors for use at the Installfest event.


NOTE: The content on this page is depreciated. The content will be updated on the weekend of 2/17/2012 to reflect current status.
The services run on CMU Hardware Resources and prevent the need for [[WPLUG]] attendees to consume Commodity Internet (commercial upstream Internet Connectivity).


== Synopsis ==
NOTE: WPLUG doesn't officially endorse or support the distros provided on Install Services.

Installfest "Services" is an working proof-of-concept by [[User:Bseklecki | Brian A. Seklecki]] and [[User:trodgers | Ted Rodgers]] to provide high performance servers for Linux Distro Boot, Install Media, and Updates retrieval via a local FTP/HTTP/RSYNC/NFS mirror within the Installfest event LAN.

The service runs on local hardware in the LAN. Having local install/update mirrors avoids the need for [[WPLUG]] attendees to consume commodity Internet (commercial upstream Internet Connectivity) at the [[InstallFest]] venue and thus saturating the limited WAN normally available.

NOTICE: [[WPLUG]] doesn't officially endorse or support the distros provided on [[Install Services]]; nor does provide any guarantees about the availability of service itself.

= Network PXE Install Services (PXELINUX) =

[[Image:wplug_installfest_servicesHardare_2009CFIPowerEdgeCisco.jpg|thumb|right|350px|Original Hardware (provided by Collaborative Fusion, Inc.)]]

The current configuration of services provides a PXE environment. There PXE magic is a simple 'next-server' and 'boot-file' flags provided to the client via an extended attribute via DHCP offer reply (DHCP options 66/150).

The PXE code in the BIOS of your device will translate extra data into a TFTP client download the 1st/2nd stage boot loader from the server. Currently the system is configured to hand out Redhat/Fedora 'intermediate' boot loader clients from the [http://www.syslinux.org/wiki/index.php/The_Syslinux_Project Syslinux] project. <br>

The Syslinux code then executes a set of additional TFTP request and downloads its configuration files, modules, included config files, graphics, and other data. <br>

The result is a menu of install'able operating systems; selecting an install target is analagous to booting from the install CD for that OS. <br>

After the boot loader starts the OS install image, select DHCP auto network configuration (DHCP will renew from the BIOS to the OS). <br>

Specific client MAC addresses can get specific bootloader code upon request. <br>

At install time, when media selection occurs, select "URL" for media source and enter:

http://updates.wplug.org/pub/fedora/linux/releases/$releasever/Fedora/{i386,x86_64}/os


= Update Services =
= Update Services =

After the OS update is complete, you can add new YUM update "repos" via inserting a file into '''/etc/yum.repos.d''' (for automatic inclusion).
<br>
Also, during the [[InstallFest]], run all yum(8) commands with the default depos enabled:


== Updates for Fedora Core 10 / i386 ==
== Updates for Fedora Core 10 / i386 ==
Line 11: Line 41:
1) Install the following file into directory ''/etc/yum.repos.d/"
1) Install the following file into directory ''/etc/yum.repos.d/"


[http://digitalfreaks.org/~lavalamp/wplug-updates.repo Fedora Core 10 i386 YUM Repo Config File]
Fetch a Fedora Core 10 i386 YUM Repo Config File at http://digitalfreaks.org/~lavalamp/wplug-updates.repo


Sample:
Note: To ensure that the local WPLUG / CMU repositories are utilized instead of the default Redhat / Fedora for all yum(8) functions, always prepend the command "--disablerepo=updates"

[updates-wplug]
name=Fedora Core $releasever - $basearch - Updates from WPLUG InstallFest Services
baseurl=http://updates.wplug.org/pub/fedora/linux/updates/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-fc$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora


Note: To ensure that the local WPLUG repositories are utilized instead of the default Redhat / Fedora for all yum(8) functions, always prepend the flag "--disablerepo=updates" to Yum commands until you are no longer connected to the installfest network

NOTE: "updates" here refers to the name of the default Fedora repo -- where as the new Repo is named "wplug-updates"


2) Update the available RPM database YUM maintains
2) Update the available RPM database YUM maintains
Line 22: Line 65:
'''# yum upgrade'''
'''# yum upgrade'''


4) Test the repo is functional:


'''# yum install vim'''
== Updates for Fedora Core 6 / i386 ==
'''# yum update'''


NOTE: Ensure that the RPMs are downloaded locally and not remotely
1) Install the following file into directory ''/etc/yum.repos.d/"


= Behind the Scenes =
[http://digitalfreaks.org/~lavalamp/wplug-updates.repo Fedora Core 6 i386 YUM Repo Config File]


The system is run on a Redhat6 or Fedora16+ system (previously NetBSD)
Note: To ensure that the local WPLUG / CMU repositories are utilized instead of the default Redhat / Fedora for all yum(8) functions, always prepend the command "--disablerepo=updates"


The system is composed of:
2) Update the available RPM database YUM maintains
* TFTP Service (defaults to an export of path ''/var/lib/tftp'' with read-only permissions)
'''# yum update'''
* PXE Loader file system directory hierarchy
* PXE Loader menu config file
* Various bootloader code manually located in /var/lib/tftp (from various install CD/DVD images)
* Apache server and Media/Update directory hierarchy


More details soon.
3) Update your system:
'''# yum check-update'''
'''# yum upgrade'''


== Setup ==
== Updates the Mandriva Linux 2007.0 Free i586 ==


After a base install, RHEL6 and F16 often lack a yum repo for the DVD media.
1) Run the following command:
'''# urpmi.addmedia --update WPLUGUpdates \ http://updates.wplug.org/mandriva/Mandrakelinux/official/updates/2007.0/i586/media/main/updates with ../../../media/meda_info/hdlist_main_updates.cz'''


* '''server% sudo vim /etc/yum.repos.d/rhel-media.repo
2) Instruct the URPMI system to update its database of available updates:

'''# urpmi.update WPLUGUpdates'''
[rhel6-media]
name=RHEL-$releasever - Media
baseurl=file:///media/cdrom/Server/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

* Install the various packages:
'''server% sudo yum install xinetd tftp-server dhcp syslinux'''

* Enable TFTP Service

'''server% sudo vim /etc/xinetd.d/tftp && /sbin/service xinetd restart"
disable = no

* Copy the various syslinux files into place

'''server% sudo cp /usr/share/syslinux/{pxelinux.0,vesamenu.c32} /var/lib/tftpboot'''
'''server% mkdir /var/lib/tftpboot/pxelinux.cfg'''

* Populate the default config with a menu

'''server% sudo vim /var/lib/tftpboot/pxelinux.cfg/default'''

Try to match [Link to SVN repository here]
Use this URL for now: https://alteeve.com/w/Setting_Up_a_PXE_Server_on_an_RPM-based_OS#The_Configuration_Files

'''NOTE:''' Setup a menu item for each distro. They vmlinuz and initrd will be relative to ''/var/lib/tftp'' and should reside in sub-directories.

* For each distro (rhel58,rhel62) copy the ''vmlinuz'' and ''initrd.img'' from the install (not the LiveCD) media
'''server% sudo mkdir -p /var/lib/tftpboot/rhel62 && cp /media/cdrom/isolinux/{initrd.img,vesamenu.c32} /var/lib/tftpboot/rhel62'''

* TFTP boot and load your end user device (permutations for i386/x86_64 will be required)

* Install Apache for the local media and updates service

NOTE: Make sure that ~500 gigs of space is available on '''/export'''

* Setup /etc/httpd/conf.d/wplug-services.conf

[Sample Soon]

* Setup a cron job to rsync a local copy of the redhat updates:

'''server% mkdir -p /export/services/linux/rhel/62 /export/services/linux/fedora/16'''

* Setup IPTables rules to permit inbound on 67,68,68, etc for DHCP/BOOTP and TFTP

% sudo iptables -L
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT udp -- anywhere anywhere state NEW udp dpt:tftp
ACCEPT udp -- anywhere anywhere state NEW udp dpts:bootps:bootpc


3) To automatically select available updates and install them ("update your system"):
'''# urpmi --auto-select'''


= Install Services =
= Install Services =


The installfest service runs a DHCP+TFTP service which will serve PXE compatible boot loaders and kernels.
Coming soon ~BAS

The service also provides NAT+PAT routing on an as-needed basis. When it is not functioning as a router, DHCP service should be turned off on the router in use.


[[Category:InstallFest]]
End.
[[Category:Update]]

Latest revision as of 21:05, 29 March 2012

DEPRECIATED

NOTE: The content on this page is depreciated. The content will be updated on the weekend of 2/17/2012 to reflect current status.

Synopsis

Installfest "Services" is an working proof-of-concept by Brian A. Seklecki and Ted Rodgers to provide high performance servers for Linux Distro Boot, Install Media, and Updates retrieval via a local FTP/HTTP/RSYNC/NFS mirror within the Installfest event LAN.

The service runs on local hardware in the LAN. Having local install/update mirrors avoids the need for WPLUG attendees to consume commodity Internet (commercial upstream Internet Connectivity) at the InstallFest venue and thus saturating the limited WAN normally available.

NOTICE: WPLUG doesn't officially endorse or support the distros provided on Install Services; nor does provide any guarantees about the availability of service itself.

Network PXE Install Services (PXELINUX)

Original Hardware (provided by Collaborative Fusion, Inc.)

The current configuration of services provides a PXE environment. There PXE magic is a simple 'next-server' and 'boot-file' flags provided to the client via an extended attribute via DHCP offer reply (DHCP options 66/150).

The PXE code in the BIOS of your device will translate extra data into a TFTP client download the 1st/2nd stage boot loader from the server. Currently the system is configured to hand out Redhat/Fedora 'intermediate' boot loader clients from the Syslinux project.

The Syslinux code then executes a set of additional TFTP request and downloads its configuration files, modules, included config files, graphics, and other data.

The result is a menu of install'able operating systems; selecting an install target is analagous to booting from the install CD for that OS.

After the boot loader starts the OS install image, select DHCP auto network configuration (DHCP will renew from the BIOS to the OS).

Specific client MAC addresses can get specific bootloader code upon request.

At install time, when media selection occurs, select "URL" for media source and enter:

http://updates.wplug.org/pub/fedora/linux/releases/$releasever/Fedora/{i386,x86_64}/os

Update Services

After the OS update is complete, you can add new YUM update "repos" via inserting a file into /etc/yum.repos.d (for automatic inclusion).
Also, during the InstallFest, run all yum(8) commands with the default depos enabled:

Updates for Fedora Core 10 / i386

1) Install the following file into directory /etc/yum.repos.d/"

Fetch a Fedora Core 10 i386 YUM Repo Config File at http://digitalfreaks.org/~lavalamp/wplug-updates.repo

Sample:

[updates-wplug]

name=Fedora Core $releasever - $basearch - Updates from WPLUG InstallFest Services
baseurl=http://updates.wplug.org/pub/fedora/linux/updates/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-fc$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora


Note: To ensure that the local WPLUG repositories are utilized instead of the default Redhat / Fedora for all yum(8) functions, always prepend the flag "--disablerepo=updates" to Yum commands until you are no longer connected to the installfest network

NOTE: "updates" here refers to the name of the default Fedora repo -- where as the new Repo is named "wplug-updates"

2) Update the available RPM database YUM maintains

  # yum update

3) Update your system:

 # yum check-update
 # yum upgrade

4) Test the repo is functional:

 # yum install vim
 # yum update

NOTE: Ensure that the RPMs are downloaded locally and not remotely

Behind the Scenes

The system is run on a Redhat6 or Fedora16+ system (previously NetBSD)

The system is composed of:

  • TFTP Service (defaults to an export of path /var/lib/tftp with read-only permissions)
  • PXE Loader file system directory hierarchy
  • PXE Loader menu config file
  • Various bootloader code manually located in /var/lib/tftp (from various install CD/DVD images)
  • Apache server and Media/Update directory hierarchy

More details soon.

Setup

After a base install, RHEL6 and F16 often lack a yum repo for the DVD media.

  • server% sudo vim /etc/yum.repos.d/rhel-media.repo
[rhel6-media]
name=RHEL-$releasever - Media
baseurl=file:///media/cdrom/Server/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
  • Install the various packages:
server% sudo yum install xinetd tftp-server dhcp syslinux
  • Enable TFTP Service
server% sudo vim /etc/xinetd.d/tftp && /sbin/service xinetd restart"
       disable                 = no
  • Copy the various syslinux files into place
server% sudo cp /usr/share/syslinux/{pxelinux.0,vesamenu.c32} /var/lib/tftpboot
server%  mkdir /var/lib/tftpboot/pxelinux.cfg
  • Populate the default config with a menu
server% sudo vim /var/lib/tftpboot/pxelinux.cfg/default

Try to match [Link to SVN repository here] Use this URL for now: https://alteeve.com/w/Setting_Up_a_PXE_Server_on_an_RPM-based_OS#The_Configuration_Files

NOTE: Setup a menu item for each distro. They vmlinuz and initrd will be relative to /var/lib/tftp and should reside in sub-directories.

  • For each distro (rhel58,rhel62) copy the vmlinuz and initrd.img from the install (not the LiveCD) media
server% sudo mkdir -p /var/lib/tftpboot/rhel62 && cp /media/cdrom/isolinux/{initrd.img,vesamenu.c32} /var/lib/tftpboot/rhel62
  • TFTP boot and load your end user device (permutations for i386/x86_64 will be required)
  • Install Apache for the local media and updates service

NOTE: Make sure that ~500 gigs of space is available on /export

  • Setup /etc/httpd/conf.d/wplug-services.conf

[Sample Soon]

  • Setup a cron job to rsync a local copy of the redhat updates:
server% mkdir -p /export/services/linux/rhel/62 /export/services/linux/fedora/16
  • Setup IPTables rules to permit inbound on 67,68,68, etc for DHCP/BOOTP and TFTP

% sudo iptables -L

ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:tftp
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpts:bootps:bootpc


Install Services

The installfest service runs a DHCP+TFTP service which will serve PXE compatible boot loaders and kernels.

The service also provides NAT+PAT routing on an as-needed basis. When it is not functioning as a router, DHCP service should be turned off on the router in use.