Transcript
Page 1: FreeBSD Unified Configuration

FreeBSD UnifiedConfigurationAndrew Pantyukhin

[email protected]

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

once upon a timea private cloud

Page 3: FreeBSD Unified Configuration

petabytes of datadozens of gigabits of transfers

teraflops of processing

Page 4: FreeBSD Unified Configuration

4 countries10 cities

13 data centers

Page 5: FreeBSD Unified Configuration

11 service providers15 support contracts

5 SLA types

Page 6: FreeBSD Unified Configuration

~100 machines~20 hardware configurations

~1000 hard drives

Page 7: FreeBSD Unified Configuration

30 local networks5 network types

7 out-of-band console types

Page 8: FreeBSD Unified Configuration

1 operating system(potentially more)

5 boot types

Page 9: FreeBSD Unified Configuration

1 systems engineer1 network engineer

1 field engineer

Page 10: FreeBSD Unified Configuration

initial tacticsowned -> cluster

leased -> setup & forget

Page 11: FreeBSD Unified Configuration

briefly consideredpuppet, chef, cfengine

scripted per-node management

Page 12: FreeBSD Unified Configuration

prioritiesextremely low ops load and

complexityextremely high performance and

flexibility

Page 13: FreeBSD Unified Configuration

solutionunified configuration management

unified deployment

Page 14: FreeBSD Unified Configuration

unified?exactly same root fs everywhereexactly same configs everywhere

Page 15: FreeBSD Unified Configuration

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

/usr/home/*/.git

Page 16: FreeBSD Unified Configuration

fully distributedflexible semi-auto master-master

syncno symlinking, copying (almost)

Page 17: FreeBSD Unified Configuration

concentratedcomplexity

smarter specializationrole-aware configs

Page 18: FreeBSD Unified Configuration

rolespasswd, group

aware.map

Page 19: FreeBSD Unified Configuration

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

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

Page 20: FreeBSD Unified Configuration

rc.conf - role-awareshell script

intricate evaluation

Page 21: FreeBSD Unified Configuration

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

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

}

Page 22: FreeBSD Unified Configuration

for i in $myrolesrole.$i

Page 23: FreeBSD Unified Configuration

nginx.conf role-compatible

{ server_name www1; }{ server_name www2; }

Page 24: FreeBSD Unified Configuration

syslog.conf role-unaware

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

Page 25: FreeBSD Unified Configuration

rc.conf-based work-around

role.logcol() {syslog_flags="-c

syslog.conf.collect" }

Page 26: FreeBSD Unified Configuration

fstab role-unaware#empty

loader.conf, scripts

Page 27: FreeBSD Unified Configuration

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

Page 28: FreeBSD Unified Configuration

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

Page 29: FreeBSD Unified Configuration

loader.confvfs.mountroot

falls back to NFS root

Page 30: FreeBSD Unified Configuration

deploymentaware.map, configs adjustment

dhcp, etc

Page 31: FreeBSD Unified Configuration

deploymentfind & partition a suitable driveuntar recent image into root1

Page 32: FreeBSD Unified Configuration

full upgradeuntar new image into root2

pivot root1<->root2 (kernel!!)

Page 33: FreeBSD Unified Configuration

full upgradersync? pkgng?

freebsd-update?

Page 34: FreeBSD Unified Configuration

pkg upgradepkgng

Page 35: FreeBSD Unified Configuration

continuous upgradegit pull

Page 36: FreeBSD Unified Configuration

edit on any boxcommit, push

powerful conflict resolution

Page 37: FreeBSD Unified Configuration

pretty scalable

Page 38: FreeBSD Unified Configuration

git is awfulrsync is lacking

need more smart configs

Page 39: FreeBSD Unified Configuration

pretty simplefool-proof

single-view cloud-wide config

Page 40: FreeBSD Unified Configuration

Q&A


Top Related