From SELinux Wiki
Jump to: navigation, search

This pages briefly describes how to build a boot server for use with the Puppet demonstration.

General Notes

The sample configurations assume a local network using the address block. Network ranges/addresses should be modified to match those currently in use if desired.

A default domain of "example.com" is used throughout the configuration examples and in the demo environment. The domain may be modified to match an existing domain. Changes to the kickstarts will be required to set the new default domain and to change the creation of the ldap structure if the domain name is increased beyond two levels.

The location of the configuration files identified for the boot server configuration are assuming Fedora Core 11 is the host operating system. Different release versions or distributions may place the configuration files in different locations.

As the DNS, DHCP, and HTTP servers need to be accessible to remote systems, the boot server firewall may need to be configured to allow incoming connections from the local network to these ports:

   * 80/tcp
   * 67/udp
   * 53/udp 

Installing packages

The YUM package tool is used to install packages. This requires a connection to the Internet to connect to remote package repositories, or a local repository containing the packages.

Use the command 'yum install <packagename>' to install the indicated packages.

Setting up the DHCP server

packages: dhcp

Edit /etc/dhcpd.conf and configure a subnet range to be served. The example provided is one that is being used in a VMware environment.

[excerpt from sample /etc/dhcpd.conf]

	default-lease-time 1800;		# 30 minutes
	max-lease-time 7200;			# 2 hours

	subnet netmask {
		option broadcast-address;
		option domain-name-servers;
		option domain-name "example.com";
		option routers;

		host puppetmaster {
			hardware ethernet 0:c:29:42:3a:25;
			option host-name "puppetmaster.example.com";
		host client1 {
			hardware ethernet 0:c:29:42:c4:7c;
			option host-name "client1.example.com";
		host client2 {
			hardware ethernet 0:c:29:42:9f:8e;
			option host-name "client2.example.com";

As each client machine must be listed in the above group section, it might be useful to generate that portion of the DHCPD config file from a flat text file that contains a list of names and MAC addresses.

Start the dhcpd service and enable it to be run on bootup.

	# service dhcpd start
	# chkconfig dhcpd on

Setting up the DNS Server

packages: named

The default configuration will only listen on the localhost address. You will need to set the listen-on and allow-query addresses in the options section of /etc/named.conf so that named can respond to queries on the local network.

options {
   // ...
   listen-on port 53 {;; };
   allow-query {;; };


Add forward and reverse zones for the address range in use:

zone "example.com" in{
  type master;
  file "example.com";
// reverse map for class C
zone "201.168.192.IN-ADDR.ARPA" in{
  type master;
  file "192.168.201.rev";

Create the forward zone in /var/named/example.com:

@               IN      SOA     dns.example.com. root.example.com. (
                                200806256       ; Serial
                                1H      ; Refresh
                                300     ; Retry
                                2D      ; Expire
                                12H)     ; Minimum TTL
                        NS      dns.example.com.
localhost     A

; address of machine acting as DNS server
dns           A
puppetmaser   A

client1       A
client1a      CNAME   client1
client1b      CNAME   client1
client2       A

Create the reverse zone in /var/named/192.168.201.rev:

@               IN      SOA     dns.example.com. root.example.com. (
                                200806201       ; Serial
                                1H      ; Refresh
                                300     ; Retry
                                2D      ; Expire
                                12H)     ; Minimum TTL
                        NS      dns.example.com.
3       IN PTR  dns.example.com.
13      IN PTR  puppetmaster.example.com.
50      IN PTR client1.example.com.
51      IN PTR client2.example.com.

Start the named service and enable it to run on bootup.

	# service named start
	# chkconfig named on

Setting up the Web server

packages: httpd

Download the latest versions of the kickstart files and binary RPMs as identified in the | Puppet demonstration.

  • Client Kickstart
  • Server Kickstart
  • Custom SELinux Policy packages

Create a directory to hold the kickstart files, /var/www/html/kickstart. Copy the client and server kickstart files into this directory.

Create a directory to hold the packages, /var/www/html/packages. Copy the custom SELinux Policy packages and the Puppet configuration tarball into this directory.

Start the httpd service and enable it to be run on bootup.

	# service httpd start
	# chkconfig httpd on

Kickstart Customization and System Installation

Documentation at the beginning of the kickstart files details some boot time options that can be specified to customize the installation.

Some generic notes about the kickstarts:

  • Depending on the network environment the kickstart can be configured to use DHCP for address provisioning or static addressing. The default is to use DHCP, however a sample static address configuration is included for reference. If addresses are assigned statically, the kickstarts will need to be modified for each client/server installation (to provide the appropriate address).
  • If installing FC11 from CD/DVD access to a yum repository (via external network connection or local mirror) is required as some packages required for the installs are not included in the CD/DVD install media.
  • Installs are currently interactive. To convert the kickstarts to a fully automated install comment out the "interactive" directive at the beginning of the files.