SlideShare una empresa de Scribd logo
1 de 46
Descargar para leer sin conexión
Automating the deployment of FreeBSD & PC-BSD® systems




              AsiaBSDCon 2013

                   Kris Moore
              PC-BSD / iXsystems
                kris@pcbsd.org
The problem:
 You want to (quickly) deploy multiple
    FreeBSD or PC-BSD systems.
You like what you hear about this whole
              “ZFS” thing
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 isn't 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 don't enjoy disk partitioning
●   You want to have a weekend
Defining some Terms
PXE

 The Preboot eXecution Environment (PXE, also
known 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.
NFS


 Network File System (NFS) is a distributed file
  system protocol originally developed by Sun
Microsystems in 1984, allowing a user on a client
  computer to access files over a network in a
manner similar to how local storage is accessed. .
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-BSD

Control 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 clients to boot via PXE
●   Brings up GDM login on client
Why would you run Remote Desktop?

●   You have a bunch of low-end clients
●   You want to simplify backup, security and
    management
Why should you not run Remote Desktop?

●   You don't 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 adjust entirely on server
    side
The two key directories:
●   /home/thinclient/installscripts
●   /home/thinclient/installarchive
              Client mounted as:
●   /installscripts
●   /installarchive
●   pc-sysinstall.example can be used as a
    template for other installations


                 Example #1
               Changing to ZFS
Example disk layout:
disk0-part=UFS+SUJ 1000 /
disk0-part=SWAP 2000 none
disk0-part=UFS+SUJ 0 /usr
commitDiskLabel
Converted to ZFS becomes:
disk0-part=ZFS 0 /,/root,/tmp,/usr,/var
commitDiskLabel
Example #2
Changing installation archive
Example install archive:
installMedium=local
localPath=/installarchive
packageType=tar
installFile=fbsd-release.txz
Changed to custom archive:
installMedium=local
localPath=/installarchive
packageType=tar
installFile=fbsd-8.4-amd64.txz
Example #3
User Management
# Root Password
rootPass=root

# User Setup
userName=kris
userComment=Kris Moore
userPass=kris
userShell=/bin/csh
userHome=/home/kris
userGroups=wheel,operator
commitUser
Example #4
Advanced Commands
# Run command inside installed system
runCommand=sh /root/initme.sh


# Run command outside installed system
runExtCommand=mount -t devfs devfs ${FSMNT}/dev
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
Example #5
Packages, oh my!
installPackages=apache22 mysql55-server


Can use short package names, or full
versions.
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;
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!!
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
Tips and Tricks

●   To greatly speed up installations, use ZFS
    mirrored drives, SSD, or even TMPFS
What's next?
●   Improvements to pc-sysinstall
       ●   Allows dist-file installation
       ●   PKGNG support
●   Faster setup of initial thin-client
    environment
Questions? Comments?


    wiki.pcbsd.org
    lists.pcbsd.org
  forums.pcbsd.org
Thank you!


www.slideshare.net/krispcbsd/asiabsd2013

Más contenido relacionado

La actualidad más candente

Lavigne bsdmag apr13
Lavigne bsdmag apr13Lavigne bsdmag apr13
Lavigne bsdmag apr13Dru Lavigne
 
Upgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseUpgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseGratien D'haese
 
Quick Starter Guide For Lotus Foundations Trial
Quick Starter Guide For Lotus Foundations TrialQuick Starter Guide For Lotus Foundations Trial
Quick Starter Guide For Lotus Foundations TrialChris Sparshott
 
Forcefully unmount a linux disk partition
Forcefully unmount a linux disk partitionForcefully unmount a linux disk partition
Forcefully unmount a linux disk partitionMuqthiyar Pasha
 
Article may11 bsdmag
Article may11 bsdmagArticle may11 bsdmag
Article may11 bsdmagDru Lavigne
 
Asiabsdcon14 lavigne
Asiabsdcon14 lavigneAsiabsdcon14 lavigne
Asiabsdcon14 lavigneDru Lavigne
 
Lavigne sept11 bsdmag
Lavigne sept11 bsdmagLavigne sept11 bsdmag
Lavigne sept11 bsdmagDru Lavigne
 
Installing Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System ConsiderationsInstalling Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System ConsiderationsKevin OBrien
 
Lavigne bsdmag july
Lavigne bsdmag julyLavigne bsdmag july
Lavigne bsdmag julyDru Lavigne
 

La actualidad más candente (20)

Self 2013
Self 2013Self 2013
Self 2013
 
Asiabsdcon14
Asiabsdcon14Asiabsdcon14
Asiabsdcon14
 
Lavigne bsdmag apr13
Lavigne bsdmag apr13Lavigne bsdmag apr13
Lavigne bsdmag apr13
 
Upgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseUpgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaese
 
LinuxTag2012 Rear
LinuxTag2012 RearLinuxTag2012 Rear
LinuxTag2012 Rear
 
Quick Starter Guide For Lotus Foundations Trial
Quick Starter Guide For Lotus Foundations TrialQuick Starter Guide For Lotus Foundations Trial
Quick Starter Guide For Lotus Foundations Trial
 
Ilf2011
Ilf2011Ilf2011
Ilf2011
 
Forcefully unmount a linux disk partition
Forcefully unmount a linux disk partitionForcefully unmount a linux disk partition
Forcefully unmount a linux disk partition
 
Asiabsdcon15
Asiabsdcon15Asiabsdcon15
Asiabsdcon15
 
Ilf2012
Ilf2012Ilf2012
Ilf2012
 
Tlf2014
Tlf2014Tlf2014
Tlf2014
 
Article may11 bsdmag
Article may11 bsdmagArticle may11 bsdmag
Article may11 bsdmag
 
Asiabsdcon14 lavigne
Asiabsdcon14 lavigneAsiabsdcon14 lavigne
Asiabsdcon14 lavigne
 
Olf2013
Olf2013Olf2013
Olf2013
 
Lavigne sept11 bsdmag
Lavigne sept11 bsdmagLavigne sept11 bsdmag
Lavigne sept11 bsdmag
 
Ch12
Ch12Ch12
Ch12
 
Installing Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System ConsiderationsInstalling Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System Considerations
 
Lavigne bsdmag july
Lavigne bsdmag julyLavigne bsdmag july
Lavigne bsdmag july
 
VirtualOS-using-Qemu
VirtualOS-using-QemuVirtualOS-using-Qemu
VirtualOS-using-Qemu
 
Ilf2013
Ilf2013Ilf2013
Ilf2013
 

Similar a Asiabsdcon2013

Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorialDru Lavigne
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012Philip Polstra
 
Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 201244CON
 
Perfect Linux Desktop - OpenSuSE 12.2
Perfect Linux Desktop - OpenSuSE 12.2Perfect Linux Desktop - OpenSuSE 12.2
Perfect Linux Desktop - OpenSuSE 12.2Davor Guttierrez
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Bud Siddhisena
 
Strategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesStrategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesMender.io
 
logical volume manager.ppt
logical volume manager.pptlogical volume manager.ppt
logical volume manager.pptPandiya Rajan
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxplarsen67
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut iiplarsen67
 
2013 Indiana LinuxFest - Getting Started With PC-BSD
2013 Indiana LinuxFest -  Getting Started With PC-BSD2013 Indiana LinuxFest -  Getting Started With PC-BSD
2013 Indiana LinuxFest - Getting Started With PC-BSDKen Moore
 

Similar a Asiabsdcon2013 (20)

BSDCan2013
BSDCan2013BSDCan2013
BSDCan2013
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
Linux Conf Admin
Linux Conf AdminLinux Conf Admin
Linux Conf Admin
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
olf10
olf10olf10
olf10
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorial
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
 
Polstra 44con2012
Polstra 44con2012Polstra 44con2012
Polstra 44con2012
 
Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012Hacking and Forensics on the Go - 44CON 2012
Hacking and Forensics on the Go - 44CON 2012
 
Perfect Linux Desktop - OpenSuSE 12.2
Perfect Linux Desktop - OpenSuSE 12.2Perfect Linux Desktop - OpenSuSE 12.2
Perfect Linux Desktop - OpenSuSE 12.2
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)
 
FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016
 
Strategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesStrategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and images
 
logical volume manager.ppt
logical volume manager.pptlogical volume manager.ppt
logical volume manager.ppt
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Howto Pxeboot
Howto PxebootHowto Pxeboot
Howto Pxeboot
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut ii
 
2013 Indiana LinuxFest - Getting Started With PC-BSD
2013 Indiana LinuxFest -  Getting Started With PC-BSD2013 Indiana LinuxFest -  Getting Started With PC-BSD
2013 Indiana LinuxFest - Getting Started With PC-BSD
 
Kickstart server
Kickstart serverKickstart server
Kickstart server
 

Último

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Último (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Asiabsdcon2013