tlf2013
DESCRIPTION
My presentation for Texas LinuxFest 2013.TRANSCRIPT
![Page 1: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/1.jpg)
TrueOS and Warden: Easy to Deploy FreeBSD Servers
Dru LavigneDirector of Community Development, iXsystemsTxLF, June 1, 2013
![Page 2: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/2.jpg)
Outline
Introduction
TrueOS Features
Automated Deployment
Warden Features
Additional Resources
![Page 3: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/3.jpg)
Introduction
PC-BSD Project started as a graphical installer and graphical utilities to make it easy to install and use a FreeBSD desktop
Project did not simply port existing Linux utils due to differences between Linux and BSD and to provide one consistent look
Each graphical utility is a QT based front-end based on a Bourne (sh) back-end, meaning that the same functionality can be achieved on a minimalist desktop or even a command-line only system
![Page 4: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/4.jpg)
Introduction
These utilities proved to also be useful for server installation and administration
This presentation introduces the following utilities which ease the deployment of servers:
TrueOS: a FreeBSD command line server plus the CLI versions of PC-BSD utils and some extra tools designed to ease the learning curve for Linux sysadmins (e.g. bash, sudo, nano, rsync, screen, smartmontools)
![Page 5: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/5.jpg)
Introduction
pc-sysinstall: fully scriptable, CLI version of the installer, specifically designed for customized installations and automated deployments
thin client: script to easily create an installation server for automated installs over PXE
Warden: utility for deploying and managing FreeBSD and Linux jails (light-weight, virtualized operating systems)
![Page 6: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/6.jpg)
TrueOS Features
Easy to install, CLI-only FreeBSD server using graphical installer or an automated script
Supports ZFS configuration during install: mirror, RAIDZ, RAIDZ2, RAIDZ3, datasets, and properties (e.g. compression, atime, exec, canmount)
Installation sets the login user account, optionally enables SSH, and sets root password (SSH root logins are denied by default)
![Page 7: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/7.jpg)
ZFS in GUI Installer
![Page 8: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/8.jpg)
ZFS in GUI Installer
![Page 9: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/9.jpg)
TrueOS Features
If install with ZFS, beadm(1) can be used to take a snapshot of the boot environment before performing an upgrade
If the upgrade fails, simply activate that snapshot to boot into the previous boot environment
![Page 10: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/10.jpg)
Upcoming Features
9.2 will include utilities to schedule automatic ZFS scrubs, create and manage ZFS snapshots, and create beadm snapshots--these can be performed now using zfs(8) and beadm(1)
Once the necessary boot changes have been made to FreeBSD, a utility will be created to make it easy to select from beadm snapshots at system boot
![Page 11: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/11.jpg)
Automated Deployment
The backend to the graphical installer is a script named pc-sysinstall. Its syntax is similar to sysinstall(8), making it easy to convert existing custom deployments
Adds directives to layout disks with ZFS
Examples can be found in /usr/share/examples/pc-sysinstall/
The graphical installer saves its config to /root/pc-sysinstall.cfg, making it easy to customize a complex installation
![Page 12: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/12.jpg)
Sample Config
![Page 13: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/13.jpg)
Automated Deployment
To automatically rollout a custom configuration over PXE, use the thinclient script to create an installation server
This script installs and configures a DHCP server, TFTP server, and NFS server
A sample installation script can be found in /usr/home/thinclient/installscripts/pc-sysinstall.example
Install clients automatically boot into a menu:
![Page 14: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/14.jpg)
PXE Client Menu
![Page 15: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/15.jpg)
Warden Features
Since 2000, FreeBSD has provided light-weight OS virtualization using jail(8)
Ideally suited for deploying servers who host network services as services are isolated from both the host system and any other jails
Warden makes it easy to deploy and manage jails, start/stop services within jails, and install/upgrade software within jails
![Page 16: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/16.jpg)
Warden Features
Warden supports 3 types of jails:
1.1. Ports Jail: used to safely install and use ports/packages (software) without affecting underlying OS and its software2.3.2. Traditional Jail: used to securely deploy network services4.5.3. Linux Jail: used to securely deploy Linux servers (currently Gentoo and Debian Squeeze)
![Page 17: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/17.jpg)
Warden GUI
![Page 18: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/18.jpg)
Warden Features
If the host's filesystem is ZFS, Warden can be used to schedule and manage ZFS snapshots, even for Linux jails
Snapshots can be deployed to another system
Jails can be exported (all of its software, configuration, and files) and imported to another jail or system
![Page 19: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/19.jpg)
Managing Snapshots in Warden
![Page 20: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/20.jpg)
CLI Version of Warden
![Page 21: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/21.jpg)
Upcoming Warden Features
Ability to create named jails (not just IP)
IP addresses and aliases can be changed on the fly
Templates allow you to select any version of FreeBSD (from 4.1 to HEAD) to deploy
Vnet support provides each jail its own networking stack, loopback address, IPsec, etc.
![Page 22: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/22.jpg)
Additional Resources
Documentation: http://wiki.pcbsd.org
IRC: #pcbsd on Freenode
Automating the deployment of FreeBSD & PC-BSD systems: http://www.bsdcan.org/2013/schedule/attachments/248_bsdcan2013.pdf
![Page 23: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/23.jpg)
Additional Resources
The Warden - FreeBSD and Linux Jail Management:http://www.youtube.com/watch?v=2WEX_W7nH3Y
Improvements to Jail Management via the Warden: http://bsdmag.org/magazine/1838-jails-firewall-with-pf(page 16-17)
![Page 24: Tlf2013](https://reader033.vdocuments.net/reader033/viewer/2022060110/555a71bcd8b42a972b8b4ffb/html5/thumbnails/24.jpg)
Questions?
Contact:
URL to Slides:
http://slideshare.net/dlavigne/tlf2013