Automating the deployment of FreeBSD & PC-BSD® systemsAutomating the deployment of FreeBSD & PC-BSD® systemsTexas Linux Fe...
The problem:The problem:You want to (quickly) deploy multipleYou want to (quickly) deploy multipleFreeBSD or PC-BSD system...
There are currently two ways to accomplishThere are currently two ways to accomplishthis:this:
Solution #1Solution #1●Write your own installation scriptsWrite your own installation scripts●Configure network booting by...
When to consider Solution #1:When to consider Solution #1:●You have a very unique installationYou have a very unique insta...
When to not consider Solution #1:When to not consider Solution #1:●Manual disk partitioning isnt your thingManual disk par...
Solution #2Solution #2●Use theUse the pc-thinclientpc-thinclient utility included withutility included withPC-BSD & TrueOS...
When to consider Solution #2:When to consider Solution #2:●You dont enjoy disk partitioningYou dont enjoy disk partitionin...
What you will need:What you will need:●A system with a network interface (2)?A system with a network interface (2)?●Runnin...
Getting StartedGetting Started●First, checkout a FreeBSD ports treeFirst, checkout a FreeBSD ports treeOn TrueOSOn TrueOS#...
On PC-BSDOn PC-BSDControl panel → System Manager → TasksControl panel → System Manager → Tasks→ Fetch Ports→ Fetch Ports
Getting StartedGetting Started
Getting StartedGetting Started
Getting StartedGetting Started●Install serverInstall server●Or desktop “Thin-Client” serverOr desktop “Thin-Client” server
Short DetourShort Detour
What is Remote Desktop?What is Remote Desktop?●The thin-client utility can operate bothThe thin-client utility can operate...
Why would you run Remote Desktop?Why would you run Remote Desktop?●You have a bunch of low-end clientsYou have a bunch of ...
Why should you not run Remote Desktop?Why should you not run Remote Desktop?●You dont have a server with horsepowerYou don...
Back to your previously scheduledBack to your previously scheduledpresentationpresentation
Getting StartedGetting Started●Will run DHCPDWill run DHCPD●Be careful which cable is usedBe careful which cable is used
Getting StartedGetting Started
Getting startedGetting started●You may now connect a client systemYou may now connect a client system●To PXE boot, you may...
Its Demo time!Its Demo time!
Customizing the installCustomizing the install●Of course you will want your ownOf course you will want your owninstallatio...
The two key directories:The two key directories:●/home/thinclient/installscripts/home/thinclient/installscripts●/home/thin...
●pc-sysinstall.example can be used as apc-sysinstall.example can be used as atemplate for other installationstemplate for ...
Example disk layout:Example disk layout:disk0-part=UFS+SUJ 1000 /disk0-part=UFS+SUJ 1000 /disk0-part=SWAP 2000 nonedisk0-p...
Example #2Example #2Changing installation archiveChanging installation archive
Example install archive:Example install archive:installMedium=localinstallMedium=locallocalPath=/installarchivelocalPath=/...
Example #3Example #3User ManagementUser Management
# Root Password# Root PasswordrootPass=rootrootPass=root# User Setup# User SetupuserName=krisuserName=krisuserComment=Kris...
Example #4Example #4Advanced CommandsAdvanced Commands
# Run command inside installed system# Run command inside installed systemrunCommand=sh /root/initme.shrunCommand=sh /root...
Example #5Example #5Packages, oh my!Packages, oh my!
installPackages=apache22 mysql55-serverinstallPackages=apache22 mysql55-serverCan use short package names, or fullCan use ...
PKGNG supportPKGNG support●Checks package format before installChecks package format before install●Will “boot-strap” PKGN...
Example #6Example #6FreeBSD dist filesFreeBSD dist files
# Install from vanilla FreeBSD dist files# Install from vanilla FreeBSD dist filesinstallMedium=localinstallMedium=locallo...
Putting the Automated in “Fully Automated”Putting the Automated in “Fully Automated”File: /home/thinclient/installscripts/...
ScalabilityScalability●All CPU instructions are run on the clientAll CPU instructions are run on the client●Server is in e...
ScalabilityScalability●Default DHCP server is configured for 99Default DHCP server is configured for 99clientsclients●To a...
Tips and TricksTips and Tricks●To greatly speed up installations, use ZFSTo greatly speed up installations, use ZFSmirrore...
Tips and TricksTips and Tricks●The PC-BSD GUI installer is your friendThe PC-BSD GUI installer is your friend●Every instal...
Generating Config filesGenerating Config files
Whats next?Whats next?●Improvements to pc-sysinstallImprovements to pc-sysinstall●Faster setup of initial thin-clientFaste...
Questions? Comments?Questions? Comments?wiki.pcbsd.orgwiki.pcbsd.orglists.pcbsd.orglists.pcbsd.orgforums.pcbsd.orgforums.p...
Thank you!Thank you!www.slideshare.net/krispcbsd/texas2013www.slideshare.net/krispcbsd/texas2013
Texas 2013
Texas 2013
Texas 2013
Texas 2013
Upcoming SlideShare
Loading in...5
×

Texas 2013

151

Published on

Texas Linux Fest - PC-BSD installation talk

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
151
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Texas 2013

  1. 1. Automating the deployment of FreeBSD & PC-BSD® systemsAutomating the deployment of FreeBSD & PC-BSD® systemsTexas Linux Fest 2013Texas Linux Fest 2013Kris MooreKris MoorePC-BSD / iXsystemsPC-BSD / iXsystemskris@pcbsd.orgkris@pcbsd.org
  2. 2. The problem:The problem:You want to (quickly) deploy multipleYou want to (quickly) deploy multipleFreeBSD or PC-BSD systems.FreeBSD or PC-BSD systems.You like what you hear about this wholeYou like what you hear about this whole“ZFS” thing“ZFS” thing
  3. 3. There are currently two ways to accomplishThere are currently two ways to accomplishthis:this:
  4. 4. Solution #1Solution #1●Write your own installation scriptsWrite your own installation scripts●Configure network booting by handConfigure network booting by hand●Maintain as necessaryMaintain as necessary
  5. 5. When to consider Solution #1:When to consider Solution #1:●You have a very unique installationYou have a very unique installation●You are a FreeBSD God – Congrats!You are a FreeBSD God – Congrats!
  6. 6. When to not consider Solution #1:When to not consider Solution #1:●Manual disk partitioning isnt your thingManual disk partitioning isnt your thing●You work for a livingYou work for a living
  7. 7. Solution #2Solution #2●Use theUse the pc-thinclientpc-thinclient utility included withutility included withPC-BSD & TrueOSPC-BSD & TrueOS
  8. 8. When to consider Solution #2:When to consider Solution #2:●You dont enjoy disk partitioningYou dont enjoy disk partitioning●You want to have a weekendYou want to have a weekend
  9. 9. What you will need:What you will need:●A system with a network interface (2)?A system with a network interface (2)?●Running PC-BSD 9.1 / TrueOS 9.1Running PC-BSD 9.1 / TrueOS 9.1●A few GB of disk spaceA few GB of disk space
  10. 10. Getting StartedGetting Started●First, checkout a FreeBSD ports treeFirst, checkout a FreeBSD ports treeOn TrueOSOn TrueOS# portsnap fetch extract update# portsnap fetch extract update
  11. 11. On PC-BSDOn PC-BSDControl panel → System Manager → TasksControl panel → System Manager → Tasks→ Fetch Ports→ Fetch Ports
  12. 12. Getting StartedGetting Started
  13. 13. Getting StartedGetting Started
  14. 14. Getting StartedGetting Started●Install serverInstall server●Or desktop “Thin-Client” serverOr desktop “Thin-Client” server
  15. 15. Short DetourShort Detour
  16. 16. What is Remote Desktop?What is Remote Desktop?●The thin-client utility can operate bothThe thin-client utility can operate bothinstall server or desktop serverinstall server or desktop server●Allows diskless clients to boot via PXEAllows diskless clients to boot via PXE●Brings up GDM login on clientBrings up GDM login on client
  17. 17. Why would you run Remote Desktop?Why would you run Remote Desktop?●You have a bunch of low-end clientsYou have a bunch of low-end clients●You want to simplify backup, security andYou want to simplify backup, security andmanagementmanagement
  18. 18. Why should you not run Remote Desktop?Why should you not run Remote Desktop?●You dont have a server with horsepowerYou dont have a server with horsepower●You need sound support on the clientsYou need sound support on the clients
  19. 19. Back to your previously scheduledBack to your previously scheduledpresentationpresentation
  20. 20. Getting StartedGetting Started●Will run DHCPDWill run DHCPD●Be careful which cable is usedBe careful which cable is used
  21. 21. Getting StartedGetting Started
  22. 22. Getting startedGetting started●You may now connect a client systemYou may now connect a client system●To PXE boot, you may need to checkTo PXE boot, you may need to checkBIOS on client firstBIOS on client first
  23. 23. Its Demo time!Its Demo time!
  24. 24. Customizing the installCustomizing the install●Of course you will want your ownOf course you will want your owninstallation options / archives, etcinstallation options / archives, etc●It is possible to adjust entirely on serverIt is possible to adjust entirely on serversideside
  25. 25. The two key directories:The two key directories:●/home/thinclient/installscripts/home/thinclient/installscripts●/home/thinclient/installarchive/home/thinclient/installarchiveClient mounted as:Client mounted as:●/installscripts/installscripts●/installarchive/installarchive
  26. 26. ●pc-sysinstall.example can be used as apc-sysinstall.example can be used as atemplate for other installationstemplate for other installationsExample #1Example #1Changing to ZFSChanging to ZFS
  27. 27. Example disk layout:Example disk layout:disk0-part=UFS+SUJ 1000 /disk0-part=UFS+SUJ 1000 /disk0-part=SWAP 2000 nonedisk0-part=SWAP 2000 nonedisk0-part=UFS+SUJ 0 /usrdisk0-part=UFS+SUJ 0 /usrcommitDiskLabelcommitDiskLabelConverted to ZFS becomes:Converted to ZFS becomes:disk0-part=ZFS 0 /,/root,/tmp,/usr,/vardisk0-part=ZFS 0 /,/root,/tmp,/usr,/varcommitDiskLabelcommitDiskLabel
  28. 28. Example #2Example #2Changing installation archiveChanging installation archive
  29. 29. Example install archive:Example install archive:installMedium=localinstallMedium=locallocalPath=/installarchivelocalPath=/installarchivepackageType=tarpackageType=tarinstallFile=fbsd-release.txzinstallFile=fbsd-release.txzChanged to custom archive:Changed to custom archive:installMedium=localinstallMedium=locallocalPath=/installarchivelocalPath=/installarchivepackageType=tarpackageType=tarinstallFile=fbsd-8.4-amd64.txzinstallFile=fbsd-8.4-amd64.txz
  30. 30. Example #3Example #3User ManagementUser Management
  31. 31. # Root Password# Root PasswordrootPass=rootrootPass=root# User Setup# User SetupuserName=krisuserName=krisuserComment=Kris MooreuserComment=Kris MooreuserPass=krisuserPass=krisuserShell=/bin/cshuserShell=/bin/cshuserHome=/home/krisuserHome=/home/krisuserGroups=wheel,operatoruserGroups=wheel,operatorcommitUsercommitUser
  32. 32. Example #4Example #4Advanced CommandsAdvanced Commands
  33. 33. # Run command inside installed system# Run command inside installed systemrunCommand=sh /root/initme.shrunCommand=sh /root/initme.sh# Run command outside installed system# Run command outside installed systemrunExtCommand=mount -t devfs devfs ${FSMNT}/devrunExtCommand=mount -t devfs devfs ${FSMNT}/dev
  34. 34. Example #5Example #5Packages, oh my!Packages, oh my!
  35. 35. installPackages=apache22 mysql55-serverinstallPackages=apache22 mysql55-serverCan use short package names, or fullCan use short package names, or fullversions.versions.
  36. 36. PKGNG supportPKGNG support●Checks package format before installChecks package format before install●Will “boot-strap” PKGNG if necessaryWill “boot-strap” PKGNG if necessary
  37. 37. Example #6Example #6FreeBSD dist filesFreeBSD dist files
  38. 38. # Install from vanilla FreeBSD dist files# Install from vanilla FreeBSD dist filesinstallMedium=localinstallMedium=locallocalPath=/distfiles/9.1-Release/amd64/distlocalPath=/distfiles/9.1-Release/amd64/distpackageType=distpackageType=distdistFiles=base doc games kernel lib32distFiles=base doc games kernel lib32
  39. 39. Putting the Automated in “Fully Automated”Putting the Automated in “Fully Automated”File: /home/thinclient/installscripts/unattended.cfgFile: /home/thinclient/installscripts/unattended.cfg●If config exists, the client will boot andIf config exists, the client will boot andbegin installation after 30 seconds.begin installation after 30 seconds.●System will shutdown when finishedSystem will shutdown when finished●USE WITH CAUTION!!USE WITH CAUTION!!
  40. 40. ScalabilityScalability●All CPU instructions are run on the clientAll CPU instructions are run on the client●Server is in essence a large “File Server”Server is in essence a large “File Server”●Will be mostly disk IO / network speedWill be mostly disk IO / network speeddependentdependent
  41. 41. ScalabilityScalability●Default DHCP server is configured for 99Default DHCP server is configured for 99clientsclients●To adjust edit the file:To adjust edit the file:●/usr/local/etc/dhcpd.conf/usr/local/etc/dhcpd.conf●range 192.168.2.100 192.168.2.199;range 192.168.2.100 192.168.2.199;
  42. 42. Tips and TricksTips and Tricks●To greatly speed up installations, use ZFSTo greatly speed up installations, use ZFSmirrored drives, SSD, or even TMPFSmirrored drives, SSD, or even TMPFS
  43. 43. Tips and TricksTips and Tricks●The PC-BSD GUI installer is your friendThe PC-BSD GUI installer is your friend●Every install is a scripted installEvery install is a scripted install●After installation a copy of the pc-After installation a copy of the pc-sysinstall.cfg file is saved to:sysinstall.cfg file is saved to:●/root/pc-sysinstallcfg/root/pc-sysinstallcfg
  44. 44. Generating Config filesGenerating Config files
  45. 45. Whats next?Whats next?●Improvements to pc-sysinstallImprovements to pc-sysinstall●Faster setup of initial thin-clientFaster setup of initial thin-clientenvironmentenvironment
  46. 46. Questions? Comments?Questions? Comments?wiki.pcbsd.orgwiki.pcbsd.orglists.pcbsd.orglists.pcbsd.orgforums.pcbsd.orgforums.pcbsd.org
  47. 47. Thank you!Thank you!www.slideshare.net/krispcbsd/texas2013www.slideshare.net/krispcbsd/texas2013
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×