vbsd2013
-
Upload
krispcbsd -
Category
Technology
-
view
381 -
download
0
description
Transcript of vbsd2013
![Page 1: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/1.jpg)
Automating the deployment of FreeBSD & PC-BSD® systemsAutomating the deployment of FreeBSD & PC-BSD® systems
VBSDCon 2013VBSDCon 2013
Kris MooreKris MoorePC-BSD / iXsystemsPC-BSD / iXsystems
[email protected]@pcbsd.org
![Page 2: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/2.jpg)
The problem:The problem:
You want to (quickly) deploy multiple You want to (quickly) deploy multiple FreeBSD or PC-BSD systems.FreeBSD or PC-BSD systems.
You want a variety of scripted installsYou want a variety of scripted installs
![Page 3: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/3.jpg)
There are currently two ways to accomplish There are currently two ways to accomplish this: this:
![Page 4: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/4.jpg)
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
![Page 5: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/5.jpg)
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!
![Page 6: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/6.jpg)
When to not consider Solution #1:When to not consider Solution #1:● Manual disk partitioning isn't your thingManual disk partitioning isn't your thing● You work for a livingYou work for a living
![Page 7: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/7.jpg)
Solution #2Solution #2
● Use the Use the pc-thinclientpc-thinclient utility included with utility included with PC-BSD & TrueOSPC-BSD & TrueOS
![Page 8: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/8.jpg)
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.1Running PC-BSD > 9.1
oror● Port: sysutils/pcbsd-utilsPort: sysutils/pcbsd-utils● A few GB of disk spaceA few GB of disk space
![Page 9: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/9.jpg)
Getting StartedGetting Started
![Page 10: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/10.jpg)
Getting StartedGetting Started
![Page 11: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/11.jpg)
Getting StartedGetting Started
● Install serverInstall server● Or desktop “Thin-Client” serverOr desktop “Thin-Client” server
![Page 12: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/12.jpg)
Short DetourShort Detour
![Page 13: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/13.jpg)
What is Remote Desktop?What is Remote Desktop?
● The thin-client utility can operate both The thin-client utility can operate both install 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
![Page 14: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/14.jpg)
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 and You want to simplify backup, security and
managementmanagement
![Page 15: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/15.jpg)
Why should you not run Remote Desktop?Why should you not run Remote Desktop?
● You don't have a server with horsepowerYou don't have a server with horsepower● You need sound support on the clientsYou need sound support on the clients
![Page 16: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/16.jpg)
Back to your previously scheduled Back to your previously scheduled presentationpresentation
![Page 17: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/17.jpg)
Getting StartedGetting Started
● Will run DHCPDWill run DHCPD● Be careful which interface you plug intoBe careful which interface you plug into
![Page 18: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/18.jpg)
Getting StartedGetting Started
![Page 19: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/19.jpg)
Getting startedGetting started
● You may now connect a client systemYou may now connect a client system● To PXE boot, you may need to check To PXE boot, you may need to check
BIOS on client firstBIOS on client first
![Page 20: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/20.jpg)
Customizing the installCustomizing the install
● Of course you will want your own Of course you will want your own installation options / archives, etcinstallation options / archives, etc
● It is possible to adjust entirely on server It is possible to adjust entirely on server sideside
![Page 21: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/21.jpg)
The two key directories:The two key directories:● /home/thinclient/installscripts/home/thinclient/installscripts● /home/thinclient/installarchive/home/thinclient/installarchive
Client mounted as:Client mounted as:● /installscripts/installscripts● /installarchive/installarchive
![Page 22: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/22.jpg)
● pc-sysinstall.example can be used as a pc-sysinstall.example can be used as a template for other installationstemplate for other installations
Example #1Example #1
Changing to ZFSChanging to ZFS
![Page 23: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/23.jpg)
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 /usrcommitDiskLabelcommitDiskLabel
Converted to ZFS becomes:Converted to ZFS becomes:
disk0-part=ZFS 0 /,/root,/tmp,/usr,/vardisk0-part=ZFS 0 /,/root,/tmp,/usr,/varcommitDiskLabelcommitDiskLabel
![Page 24: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/24.jpg)
Slightly more complex ZFS layout:Slightly more complex ZFS layout:
disk0-part=ZFS 0 /(atime=off), /root(compress=lz4),disk0-part=ZFS 0 /(atime=off), /root(compress=lz4),/tmp,/usr(canmount=off),/usr/local(compress=lz4), /var, /tmp,/usr(canmount=off),/usr/local(compress=lz4), /var, /var/log(compress=gzip)/var/log(compress=gzip)commitDiskLabelcommitDiskLabel
![Page 25: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/25.jpg)
Example #2Example #2
Changing installation archiveChanging installation archive
![Page 26: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/26.jpg)
Example install archive:Example install archive:
installMedium=localinstallMedium=locallocalPath=/installarchivelocalPath=/installarchivepackageType=tarpackageType=tarinstallFile=fbsd-release.txzinstallFile=fbsd-release.txz
Changed to custom archive:Changed to custom archive:
installMedium=localinstallMedium=locallocalPath=/installarchivelocalPath=/installarchivepackageType=tarpackageType=tarinstallFile=fbsd-8.4-amd64.txzinstallFile=fbsd-8.4-amd64.txz
![Page 27: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/27.jpg)
Example local installExample local install
installMedium=localinstallMedium=locallocalPath=/installarchivelocalPath=/installarchivepackageType=tarpackageType=tarinstallFile=fbsd-8.4-amd64.txzinstallFile=fbsd-8.4-amd64.txz
Changed to remote:Changed to remote:
installMedium=ftpinstallMedium=ftpftpPath=ftp://example.org/installfilesftpPath=ftp://example.org/installfilespackageType=tarpackageType=tarinstallFile=fbsd-8.4-amd64.txzinstallFile=fbsd-8.4-amd64.txz
![Page 28: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/28.jpg)
Example #3Example #3
User ManagementUser Management
![Page 29: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/29.jpg)
# 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
![Page 30: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/30.jpg)
Example #4Example #4
Advanced CommandsAdvanced Commands
![Page 31: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/31.jpg)
# Run command inside installed system# Run command inside installed system
runCommand=sh /root/initme.shrunCommand=sh /root/initme.sh
# Run command outside installed system# Run command outside installed system
runExtCommand=mount -t devfs devfs ${FSMNT}/devrunExtCommand=mount -t devfs devfs ${FSMNT}/dev
![Page 32: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/32.jpg)
Example #5Example #5
Packages, oh my!Packages, oh my!
![Page 33: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/33.jpg)
installPackages=apache22 mysql55-serverinstallPackages=apache22 mysql55-server
Can use short package names, or full Can use short package names, or full versions.versions.
![Page 34: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/34.jpg)
PKGNG supportPKGNG support● Checks package format before installChecks package format before install● Will “boot-strap” PKGNG if necessaryWill “boot-strap” PKGNG if necessary
![Page 35: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/35.jpg)
Example #6Example #6
FreeBSD dist filesFreeBSD dist files
![Page 36: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/36.jpg)
# Install from vanilla FreeBSD dist files# Install from vanilla FreeBSD dist files
installMedium=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
![Page 37: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/37.jpg)
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 and If config exists, the client will boot and begin installation after 30 secondsbegin installation after 30 seconds
● System will shutdown when finishedSystem will shutdown when finished● MAC address can be used as well MAC address can be used as well ● USE WITH CAUTION!!USE WITH CAUTION!!
![Page 38: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/38.jpg)
Its Demo time!Its Demo time!
![Page 39: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/39.jpg)
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 speed Will be mostly disk IO / network speed
dependentdependent
![Page 40: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/40.jpg)
ScalabilityScalability
● Default DHCP server is configured for 99 Default DHCP server is configured for 99 clientsclients
● 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;
![Page 41: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/41.jpg)
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
![Page 42: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/42.jpg)
Tips and TricksTips and Tricks
● To greatly speed up installations, use ZFS To greatly speed up installations, use ZFS mirrored drives, SSD, or even TMPFSmirrored drives, SSD, or even TMPFS
![Page 43: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/43.jpg)
What's next?What's next?● Improvements to pc-sysinstallImprovements to pc-sysinstall
● GRUB Support!GRUB Support!● ZFS 4K BlockSize enable / disableZFS 4K BlockSize enable / disable● ZFS Pool NamingZFS Pool Naming● Install from ZFS replicationInstall from ZFS replication
● Faster setup of initial thin-client Faster setup of initial thin-client environmentenvironment
![Page 44: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/44.jpg)
What's next?What's next?● Web interface to config file managementWeb interface to config file management
● Allow editing configsAllow editing configs● Creating MAC entries → Config FileCreating MAC entries → Config File
● Text-based front-end to PC-BSDText-based front-end to PC-BSD● Basic at firstBasic at first● Will allow install / prototyping via CLIWill allow install / prototyping via CLI
![Page 45: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/45.jpg)
What's next?What's next?
● Enhanced Desktop Server SupportEnhanced Desktop Server Support● ThinClient → ThickClientThinClient → ThickClient● Sound SupportSound Support● Much more scalableMuch more scalable
![Page 46: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/46.jpg)
Questions? Comments?Questions? Comments?
wiki.pcbsd.orgwiki.pcbsd.orglists.pcbsd.orglists.pcbsd.org
forums.pcbsd.orgforums.pcbsd.org
![Page 47: vbsd2013](https://reader033.fdocuments.net/reader033/viewer/2022060119/558d1642d8b42af0408b4592/html5/thumbnails/47.jpg)
Thank you!Thank you!
slideshare.net/krispcbsd/vbsd2013slideshare.net/krispcbsd/vbsd2013