Shared Hosting Workshop OSSCOM 2016 Managing shared hosting with FreeBSD, nginx, MariaDB, Salt, and ZFS
FreeBSD in a nutshell Freely available, POSIX compliant Unix-like operating system Runs on x86, Alpha, Sparc64, IA-64, AMD64 architectures Over 25,000 software packages available Many commercial users Thousands of developers around the world contributing to it Used as an operating systems research platform So far, so Linux... Talal Abu-Ghazaleh Organization
Where it differs from Linux Inherits code from 4.4BSD-Lite, not a clone A “Base” system with 3rd party components Userland tools are not GNU (bsdtar vs gnutar) /bin/sh is really /bin/sh Liberal BSD license Don't claim that you wrote the code Don't blame us if the code doesn't work Apart from that, do anything you want with the code Two supported OS update methods Binary (freebsd-update) Source (make world; make installworld) CLI administration. X is not installed by default, all settings are tunable via CLI Services: Configuration files are located in /etc and /usr/local/etc Services are enabled and configured through rc.conf.d files
Why FreeBSD? Security Reliability Network performance Storage Patch/Audit tools for both system updates and 3rd part “ports” Set UID 0 alerts on new software Jails Reliability Stable ABI POLA Proven under heavy load Netflix Yahoo! NASA Network performance 40Gbps performance is now possible with research being done for 100Gpbs Storage UFS Solid 64bit filesystem 15+ years old Snapshots ZFS 'nuff said Flexibility Ports, mix and match different software versions, no dependency hell Linux Compatibility Documentation Complete, rich man pages FreeBSD.org’s documentation is very active and has great relevant information BSD License
Nginx Nginx (pronounced "engine x") is software to provide a web server. It can act as a reverse proxy server for TCP, UDP, HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache. Low memory print Very high performance Simple and versatile configuration file syntax Does not support Apache’s .htaccess files
ZFS ZFS is a combined file system and logical volume manager designed by Sun Microsystems. The features of ZFS include protection against data corruption, support for high storage capacities, efficient data compression, integration of the concepts of filesystem and volume management, snapshots and copy-on-write clones, continuous integrity checking and automatic repair, RAID-Z and native NFSv4 ACLs.
Salt Salt is a Python-based open-source configuration management software and remote execution engine. Supporting the "Infrastructure as Code" approach to deployment and cloud management, it competes primarily with Puppet, Chef, and Ansible.