FreeBSD Unified Configuration

Preview:

DESCRIPTION

The talk focuses on a new unified approach to deploying and managing modern versions of FreeBSD across a wide variety of technical and administrative circumstances: different countries, data centers, hardware, access policies, boot methods, networking, support contracts, machine roles, etc. While avoiding any popular Linux-centric CM systems, such as Puppet, Chef, and CFEngine, we achieve very low complexity by leveraging rc(8), loader(8), glabel(8) and other existing instruments, such as pkgng, to their potential as necessary. The cornerstone is keeping configuration and deployment versioned and unified — same across all cases, with no duplication of common parts and very simple specification of per-role/per-case peculiarities. The approach spans everything from installation and booting to managing third-party and custom site-specific software. The method is being actively developed and applied in production environment of a popular online music service.

Citation preview

FreeBSD UnifiedConfigurationAndrew Pantyukhin

infofarmer@FreeBSD.org

www.princexml.com
Prince - Non-commercial License
This document was created with Prince, a great way of getting web content onto paper.

once upon a timea private cloud

petabytes of datadozens of gigabits of transfers

teraflops of processing

4 countries10 cities

13 data centers

11 service providers15 support contracts

5 SLA types

~100 machines~20 hardware configurations

~1000 hard drives

30 local networks5 network types

7 out-of-band console types

1 operating system(potentially more)

5 boot types

1 systems engineer1 network engineer

1 field engineer

initial tacticsowned -> cluster

leased -> setup & forget

briefly consideredpuppet, chef, cfengine

scripted per-node management

prioritiesextremely low ops load and

complexityextremely high performance and

flexibility

solutionunified configuration management

unified deployment

unified?exactly same root fs everywhereexactly same configs everywhere

/.git/usr/local/project/.git

/usr/home/*/.git

fully distributedflexible semi-auto master-master

syncno symlinking, copying (almost)

concentratedcomplexity

smarter specializationrole-aware configs

rolespasswd, group

aware.map

role-aware bootwho am I? what are my MACs?

MAC -> aware.map -> host -> roles

rc.conf - role-awareshell script

intricate evaluation

ntpd_enable="YES"role.www() { nginx_enable="YES"

}role.host1() { hack_enable="YES"

}

for i in $myrolesrole.$i

nginx.conf role-compatible

{ server_name www1; }{ server_name www2; }

syslog.conf role-unaware

syslog.conf - most nodessyslog.conf.collect - log collector

rc.conf-based work-around

role.logcol() {syslog_flags="-c

syslog.conf.collect" }

fstab role-unaware#empty

loader.conf, scripts

boot drive/dev/ufs/root1 - 10G/dev/ufs/root2 - 10G

boot drive/dev/gpt/swapserial - 4G/dev/ufs/serial - leftover

loader.confvfs.mountroot

falls back to NFS root

deploymentaware.map, configs adjustment

dhcp, etc

deploymentfind & partition a suitable driveuntar recent image into root1

full upgradeuntar new image into root2

pivot root1<->root2 (kernel!!)

full upgradersync? pkgng?

freebsd-update?

pkg upgradepkgng

continuous upgradegit pull

edit on any boxcommit, push

powerful conflict resolution

pretty scalable

git is awfulrsync is lacking

need more smart configs

pretty simplefool-proof

single-view cloud-wide config

Q&A

Recommended