Automating the deployment of FreeBSD & PC-BSD® systems              AsiaBSDCon 2013                   Kris Moore          ...
The problem: You want to (quickly) deploy multiple    FreeBSD or PC-BSD systems.You like what you hear about this whole   ...
There are currently two ways to accomplish                   this:
Solution #1●   Write your own installation scripts●   Configure network booting by hand●   Maintain as necessary
When to consider Solution #1:●   You want to configure everything by hand●   You are a FreeBSD God – Congrats!
When to not consider Solution #1:●   Manual disk partitioning isnt your thing●   You work for a living
Solution #2●   Use the pc-thinclient utility included with    PC-BSD & TrueOS
When to consider Solution #2:●   You dont enjoy disk partitioning●   You want to have a weekend
Defining some Terms
PXE The Preboot eXecution Environment (PXE, alsoknown as Pre-Execution Environment; sometimes   pronounced "pixie") is an ...
NFS Network File System (NFS) is a distributed file  system protocol originally developed by SunMicrosystems in 1984, allo...
What you will need:●   A system with a network interface (2)?●   Running PC-BSD 9.1 / TrueOS 9.1●   A few GB of disk space
Getting Started●   First, checkout a FreeBSD ports tree                   On TrueOS# portsnap fetch extract update
On PC-BSDControl panel → System Manager → Tasks→ Fetch Ports
Getting Started
Getting Started
Getting Started●   Install server●   Or desktop “Thin-Client” server
Short Detour
What is Remote Desktop?●   The thin-client utility can operate both    install server or desktop server●   Allows diskless...
Why would you run Remote Desktop?●   You have a bunch of low-end clients●   You want to simplify backup, security and    m...
Why should you not run Remote Desktop?●   You dont have a server with horsepower●   You need sound support on the clients
Back to your previously scheduled          presentation
Getting Started●   Will run DHCPD●   Be careful which cable is used
Getting Started
Getting started●   You may now connect a client system●   To PXE boot, you may need to check    BIOS on client first
Its Demo time!
Customizing the install●   Of course you will want your own    installation options / archives, etc●   It is possible to a...
The two key directories:●   /home/thinclient/installscripts●   /home/thinclient/installarchive              Client mounted...
●   pc-sysinstall.example can be used as a    template for other installations                 Example #1               Ch...
Example disk layout:disk0-part=UFS+SUJ 1000 /disk0-part=SWAP 2000 nonedisk0-part=UFS+SUJ 0 /usrcommitDiskLabelConverted to...
Example #2Changing installation archive
Example install archive:installMedium=locallocalPath=/installarchivepackageType=tarinstallFile=fbsd-release.txzChanged to ...
Example #3User Management
# Root PasswordrootPass=root# User SetupuserName=krisuserComment=Kris MooreuserPass=krisuserShell=/bin/cshuserHome=/home/k...
Example #4Advanced Commands
# Run command inside installed systemrunCommand=sh /root/initme.sh# Run command outside installed systemrunExtCommand=moun...
Scalability●   All CPU instructions are run on the client●   Server is in essence a large “File Server”●   Will be mostly ...
Example #5Packages, oh my!
installPackages=apache22 mysql55-serverCan use short package names, or fullversions.
Scalability●   Default DHCP server is configured for 99    clients●   To adjust edit the file:       ●   /usr/local/etc/dh...
Putting the Automated in “Fully Automated”     File: /home/thinclient/installscripts/unattended.cfg●   If config exists, t...
Tips and Tricks●   The PC-BSD GUI installer is your friend●   Every install is a scripted install●   After installation a ...
Tips and Tricks●   To greatly speed up installations, use ZFS    mirrored drives, SSD, or even TMPFS
Whats next?●   Improvements to pc-sysinstall       ●   Allows dist-file installation       ●   PKGNG support●   Faster set...
Questions? Comments?    wiki.pcbsd.org    lists.pcbsd.org  forums.pcbsd.org
Thank you!www.slideshare.net/krispcbsd/asiabsd2013
Upcoming SlideShare
Loading in...5
×

Asiabsdcon2013

152

Published on

Slides of Kris Moore's talk at AsiaBSDCon 2013

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
152
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Asiabsdcon2013

  1. 1. Automating the deployment of FreeBSD & PC-BSD® systems AsiaBSDCon 2013 Kris Moore PC-BSD / iXsystems kris@pcbsd.org
  2. 2. The problem: You want to (quickly) deploy multiple FreeBSD or PC-BSD systems.You like what you hear about this whole “ZFS” thing
  3. 3. There are currently two ways to accomplish this:
  4. 4. Solution #1● Write your own installation scripts● Configure network booting by hand● Maintain as necessary
  5. 5. When to consider Solution #1:● You want to configure everything by hand● You are a FreeBSD God – Congrats!
  6. 6. When to not consider Solution #1:● Manual disk partitioning isnt your thing● You work for a living
  7. 7. Solution #2● Use the pc-thinclient utility included with PC-BSD & TrueOS
  8. 8. When to consider Solution #2:● You dont enjoy disk partitioning● You want to have a weekend
  9. 9. Defining some Terms
  10. 10. PXE The Preboot eXecution Environment (PXE, alsoknown as Pre-Execution Environment; sometimes pronounced "pixie") is an environment to boot computers using a network interface independently of data storage devices (like hard disks) or installed operating systems.
  11. 11. NFS Network File System (NFS) is a distributed file system protocol originally developed by SunMicrosystems in 1984, allowing a user on a client computer to access files over a network in amanner similar to how local storage is accessed. .
  12. 12. What you will need:● A system with a network interface (2)?● Running PC-BSD 9.1 / TrueOS 9.1● A few GB of disk space
  13. 13. Getting Started● First, checkout a FreeBSD ports tree On TrueOS# portsnap fetch extract update
  14. 14. On PC-BSDControl panel → System Manager → Tasks→ Fetch Ports
  15. 15. Getting Started
  16. 16. Getting Started
  17. 17. Getting Started● Install server● Or desktop “Thin-Client” server
  18. 18. Short Detour
  19. 19. What is Remote Desktop?● The thin-client utility can operate both install server or desktop server● Allows diskless clients to boot via PXE● Brings up GDM login on client
  20. 20. Why would you run Remote Desktop?● You have a bunch of low-end clients● You want to simplify backup, security and management
  21. 21. Why should you not run Remote Desktop?● You dont have a server with horsepower● You need sound support on the clients
  22. 22. Back to your previously scheduled presentation
  23. 23. Getting Started● Will run DHCPD● Be careful which cable is used
  24. 24. Getting Started
  25. 25. Getting started● You may now connect a client system● To PXE boot, you may need to check BIOS on client first
  26. 26. Its Demo time!
  27. 27. Customizing the install● Of course you will want your own installation options / archives, etc● It is possible to adjust entirely on server side
  28. 28. The two key directories:● /home/thinclient/installscripts● /home/thinclient/installarchive Client mounted as:● /installscripts● /installarchive
  29. 29. ● pc-sysinstall.example can be used as a template for other installations Example #1 Changing to ZFS
  30. 30. Example disk layout:disk0-part=UFS+SUJ 1000 /disk0-part=SWAP 2000 nonedisk0-part=UFS+SUJ 0 /usrcommitDiskLabelConverted to ZFS becomes:disk0-part=ZFS 0 /,/root,/tmp,/usr,/varcommitDiskLabel
  31. 31. Example #2Changing installation archive
  32. 32. Example install archive:installMedium=locallocalPath=/installarchivepackageType=tarinstallFile=fbsd-release.txzChanged to custom archive:installMedium=locallocalPath=/installarchivepackageType=tarinstallFile=fbsd-8.4-amd64.txz
  33. 33. Example #3User Management
  34. 34. # Root PasswordrootPass=root# User SetupuserName=krisuserComment=Kris MooreuserPass=krisuserShell=/bin/cshuserHome=/home/krisuserGroups=wheel,operatorcommitUser
  35. 35. Example #4Advanced Commands
  36. 36. # Run command inside installed systemrunCommand=sh /root/initme.sh# Run command outside installed systemrunExtCommand=mount -t devfs devfs ${FSMNT}/dev
  37. 37. Scalability● All CPU instructions are run on the client● Server is in essence a large “File Server”● Will be mostly disk IO / network speed dependent
  38. 38. Example #5Packages, oh my!
  39. 39. installPackages=apache22 mysql55-serverCan use short package names, or fullversions.
  40. 40. Scalability● Default DHCP server is configured for 99 clients● To adjust edit the file: ● /usr/local/etc/dhcpd.conf ● range 192.168.2.100 192.168.2.199;
  41. 41. Putting the Automated in “Fully Automated” File: /home/thinclient/installscripts/unattended.cfg● If config exists, the client will boot and begin installation after 30 seconds.● System will shutdown when finished● USE WITH CAUTION!!
  42. 42. Tips and Tricks● The PC-BSD GUI installer is your friend● Every install is a scripted install● After installation a copy of the pc- sysinstall.cfg file is saved to: ● /root/pc-sysinstallcfg
  43. 43. Tips and Tricks● To greatly speed up installations, use ZFS mirrored drives, SSD, or even TMPFS
  44. 44. Whats next?● Improvements to pc-sysinstall ● Allows dist-file installation ● PKGNG support● Faster setup of initial thin-client environment
  45. 45. Questions? Comments? wiki.pcbsd.org lists.pcbsd.org forums.pcbsd.org
  46. 46. Thank you!www.slideshare.net/krispcbsd/asiabsd2013
  1. A particular slide catching your eye?

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

×