http://arctic.selinuxproject.org/w/?title=PuppetDemoServerKickstart&feed=atom&action=history
PuppetDemoServerKickstart - Revision history
2024-03-28T16:46:30Z
Revision history for this page on the wiki
MediaWiki 1.23.13
http://arctic.selinuxproject.org/w/?title=PuppetDemoServerKickstart&diff=679&oldid=prev
CraigGrube at 00:49, 18 September 2009
2009-09-18T00:49:37Z
<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 00:49, 18 September 2009</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">The Puppet demo </del>server kickstart <del class="diffchange diffchange-inline">file:</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">Here's a downloadable version of the [http://www.selinuxproject.org/~cgrube/puppet/kickstart/ks.server.cfg </ins>server kickstart<ins class="diffchange diffchange-inline">].</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 24:</td>
<td colspan="2" class="diff-lineno">Line 24:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#  se_fqdn - Fully qualified domain name of server (assumes</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#  se_fqdn - Fully qualified domain name of server (assumes</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># puppetmaster.${se_dnsdomain} if none is provided.)</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># puppetmaster.${se_dnsdomain} if none is provided.)</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>#  se_www - IP or resolvable DNS name of web server <del class="diffchange diffchange-inline">to</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>#  se_www - IP or resolvable DNS name of web server <ins class="diffchange diffchange-inline">and base</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div># from which <del class="diffchange diffchange-inline">to download </del>packages.  <del class="diffchange diffchange-inline">Assuming path</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div># <ins class="diffchange diffchange-inline">path </ins>from which packages <ins class="diffchange diffchange-inline">should be downloaded</ins>.  <ins class="diffchange diffchange-inline">Defaults</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div># <del class="diffchange diffchange-inline">of /</del>packages<del class="diffchange diffchange-inline">/ </del>from <del class="diffchange diffchange-inline">web root to various packages</del>.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div># <ins class="diffchange diffchange-inline"> to downloading the </ins>packages from <ins class="diffchange diffchange-inline">selinuxproject</ins>.<ins class="diffchange diffchange-inline">org</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># Assumptions:</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># Assumptions:</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 121:</td>
<td colspan="2" class="diff-lineno">Line 121:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># set default location of web server if none identified.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># set default location of web server if none identified.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>if [ "${se_www}x" == "x" ]; then</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>if [ "${se_www}x" == "x" ]; then</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> se_www=<del class="diffchange diffchange-inline">172</del>.<del class="diffchange diffchange-inline">16</del>.<del class="diffchange diffchange-inline">148.10</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> se_www=<ins class="diffchange diffchange-inline">"www</ins>.<ins class="diffchange diffchange-inline">selinuxproject</ins>.<ins class="diffchange diffchange-inline">org/~cgrube/puppet"</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>fi</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>fi</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 173:</td>
<td colspan="2" class="diff-lineno">Line 173:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>%end</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>%end</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td></tr>
</table>
CraigGrube
http://arctic.selinuxproject.org/w/?title=PuppetDemoServerKickstart&diff=673&oldid=prev
CraigGrube: New page: The Puppet demo server kickstart file: <pre> ########################################################## # Puppet Demo Server Kickstart file # # Purpose - # The purpose of the server kic...
2009-09-14T22:28:12Z
<p>New page: The Puppet demo server kickstart file: <pre> ########################################################## # Puppet Demo Server Kickstart file # # Purpose - # The purpose of the server kic...</p>
<p><b>New page</b></p><div>The Puppet demo server kickstart file:<br />
<br />
<pre><br />
##########################################################<br />
# Puppet Demo Server Kickstart file<br />
#<br />
# Purpose - <br />
# The purpose of the server kickstart is to build a <br />
# basic Puppet server. The installation is small (essentially<br />
# just base packages + Puppet and dependencies), so many <br />
# administrative and user packages are not installed.<br />
#<br />
# External Dependencies - <br />
# Installation: To install boot the system from FC9 <br />
# installation media (DVD, CD, netboot, etc). When the <br />
# grub interface appears, modify the boot options to load<br />
# the kickstart and provide the desired boot options to <br />
# customize the installation (i.e. ks=http://webserver/dir/<br />
# ks.cfg se_var1=val1 ...).<br />
#<br />
# Boot Options - <br />
# se_dnsdomain - DNS domain of server (assumes example.com<br />
# if none is provided)<br />
# se_fqdn - Fully qualified domain name of server (assumes<br />
# puppetmaster.${se_dnsdomain} if none is provided.)<br />
# se_www - IP or resolvable DNS name of web server to<br />
# from which to download packages. Assuming path<br />
# of /packages/ from web root to various packages.<br />
#<br />
# Assumptions:<br />
# By default network address provisioning is via DHCP. If<br />
# static addressing is required uncomment and modify the <br />
# network configuration for static addressing.<br />
#<br />
##########################################################<br />
# Kickstart file<br />
<br />
install<br />
logging --level=info<br />
<br />
## examples of repo sources if using local repos via http or nfs<br />
#nfs --server=192.168.1.3 --dir=/site/isos/redhat/10/i386<br />
#url --url http://192.168.1.3/fedora/10/i386<br />
<br />
# XXX: use a local repo , if available<br />
#repo --name="My Updates" --baseurl=http://192.168.1.3/fedora/9/updates/i386<br />
#repo --name="My Updates" --baseurl=http://192.168.1.3/fedora/10/updates/i386<br />
<br />
<br />
#<br />
# remove interactive for an automated install<br />
#<br />
interactive<br />
<br />
lang en_US.UTF-8<br />
keyboard us<br />
<br />
network --device eth0 --bootproto dhcp<br />
#network --device eth0 --bootproto static --ip 172.16.148.50 --netmask 255.255.255.0 --gateway 172.16.148.2 --nameserver 172.16.148.10<br />
<br />
<br />
#<br />
# make sure to change your password after installation, or during<br />
# for interactive installs<br />
#<br />
rootpw sefos1<br />
<br />
firewall --enabled --ssh --port=8140:tcp <br />
authconfig --enableshadow --enablemd5<br />
<br />
#<br />
# --Disable doesn't work. Selinux is still enabled.<br />
#<br />
selinux --permissive<br />
<br />
timezone --utc America/New_York<br />
bootloader --location=mbr <br />
<br />
reboot<br />
<br />
%packages --excludedocs --nobase<br />
@core<br />
yum<br />
openssh-server<br />
openssh-clients<br />
# optional packages<br />
audit<br />
audit-libs<br />
make<br />
perl<br />
man<br />
<br />
# basic networking tools<br />
dhclient<br />
bind-utils<br />
<br />
%end<br />
<br />
%post --erroronfail --log=/root/nklinstall.log<br />
<br />
# Boot arguments <br />
# get boot args beginning with 'se_'<br />
< /proc/cmdline sed 's/ /\n/g' | grep ^se_ > /tmp/boot_args <br />
. /tmp/boot_args<br />
<br />
<br />
############# BOOT ARGUMENTS DEFAULTS ########################<br />
# Enter default values below!<br />
# If boot arguments exist, use them else use these<br />
<br />
# set default domain name if necessary<br />
if [ "${se_dnsdomain}x" == "x" ]; then<br />
se_dnsdomain="example.com"<br />
fi<br />
<br />
# set default fqdn of system if necessary<br />
if [ "${se_fqdn}x" == "x" ]; then<br />
se_fqdn="puppetmaster.${se_dnsdomain}";<br />
fi<br />
<br />
# set default location of web server if none identified.<br />
if [ "${se_www}x" == "x" ]; then<br />
se_www=172.16.148.10<br />
fi<br />
<br />
############### NETWORK FILE TRANSFERS #######################<br />
# do initial update, this should just get the repository info<br />
/usr/bin/yum -y update | /usr/bin/tee -a /root/yumup.log<br />
echo | /usr/bin/tee -a /root/yumup.log<br />
<br />
#########################################<br />
# install custom selinux policy packages<br />
<br />
rpm -e selinux-policy-targeted selinux-policy<br />
<br />
# packages have the same version number, so just update<br />
# here if newer packages are made <br />
pv=3.6.12-78.fc11<br />
<br />
rpm -U --force http://${se_www}/packages/selinux-policy-${pv}.noarch.rpm http://${se_www}/packages/selinux-policy-doc-${pv}.noarch.rpm http://${se_www}/packages/selinux-policy-targeted-${pv}.noarch.rpm <br />
<br />
## install puppet server<br />
/usr/bin/yum -y install puppet-server ruby-rdoc | /usr/bin/tee -a /root/yumup.log<br />
<br />
## download and untar puppet policy to /etc/puppet<br />
/usr/bin/curl http://${se_www}/packages/puppet-policy.tar.gz -o /tmp/puppet-policy.tar.gz<br />
if [ -d /etc/puppet ]; then<br />
cd /etc/puppet && tar -xzf /tmp/puppet-policy.tar.gz<br />
chown -R root:root /etc/puppet<br />
else <br />
echo "/etc/puppet doesn't exist, unable to extract /tmp/puppet-policy.tar.gz"<br />
fi<br />
<br />
## relabel the file system to ensure all puppet files are appropriately <br />
## labeled<br />
touch /.autorelabel<br />
<br />
################# FILE CONFIGURATION ################<br />
# switch to enforcing mode<br />
/usr/bin/perl -p -i.sefback -e "s/=disabled/=enforcing/" /etc/selinux/config<br />
<br />
# set hostname<br />
/usr/bin/perl -p -i.sefback -e "s/HOSTNAME=localhost.localdomain/HOSTNAME=${se_fqdn}/g" /etc/sysconfig/network 2>&1<br />
<br />
# set default DNS search domain<br />
echo "SEARCH=${se_dnsdomain}" >> /etc/sysconfig/network-scripts/ifcfg-eth0<br />
<br />
# for some reason the network service isn't on by default, so when using<br />
# static addressing the interfaces never come up<br />
<br />
/sbin/chkconfig network on<br />
/sbin/chkconfig puppetmaster on<br />
<br />
%end<br />
</pre></div>
CraigGrube