PuppetCamp SEA 1 - Puppet & FreeBSD

Post on 19-Jun-2015

1,083 views 3 download

Tags:

description

Edward Tan gave a great presentation (slides in vim!) on using puppet on FreeBSD. He introduced FreeBSD and showed us how puppet interacts with the system.

transcript

The Daemon in Puppets

by Edward Tan

(... next)

1/25

Disclaimer

I only represent myself and no one/company/entity else.

I solemnly, sincerely and truly declare and affirm that I will tell the truth, the whole truth and nothing but the truth.

(... next)

2/25

Before Starting

* How many of you heard about FreeBSD? * How many admins here? * BSD? * Linux? * Other unix? * windows??? :p gotta ask

(... next)

3/25

Who're you?

* Blogger (psybermonkey.net & AboutBSD.net) * Author (BSDMag, second article coming out) * Speaker (of this talk, The Daemon in Puppets)

(... next)

4/25

What are you doing?

* Full time System Administrator * network related * DNS * Radius * Apache * LDAP * Cacti * Nagios * -- snip -- (the list is getting too long) * shells * perl * bourne & again shell * Rest of the time * FreeBSD

(... next)

5/25

FreeBSD? What's that?

* Unix variant * started from 386BSD, 1993 * advance, complex, sophisticated * OS comes with : * ZFS * PF (packet filter) * 10gbps * IPv6 ready (since y2k) * use by : * companies Apple Cisco Juniper * web Yahoo! Apache Netcraft

(... next)

6/25

* a true operating system * not just a kernel, but a base comes with it of tools & programs * ports * flexibility of source code * simplicity of package management tools * more then 23,000 applications waiting to be install by mere : "make install"

(... next)

7/25

* and yet simple directory structured * / root * /dev device nodes * /boot bootstrap needed programs & files * /etc configurations * /usr user land utilities & apps * /usr/ports The FreeBSD ports collection * /usr/local local executables & libraries * /usr/local/share/doc documentations aka doc * /var variable files * /bin user utilities & apps * /sbin system utilities & apps * /mnt directory for mount points * /tmp temporary directory

* these clearly defined directories eases organization of information on the disk

(... next)

8/25

Linus Torvalds once said :

"If 386BSD had been available when I started on Linux, Linux would probably never had happened."

(... next)

9/25

Okay, why is there anything to do with Puppet?

* I'm taking care of more then 60 servers * 80% of it is FreeBSD * new deployment & migration of these servers are happening * new projects needs new services * hardware refreshment & virtulization is moving these servers around * disaster recovery * automated * redundancy * automated setup of new server requires minimum documentation * policies can be applied automatically * ntpd * sshd * sudoers * resolv.conf * syslogd * etc

(... next)

10/25

Wow, you need to manage your configs more efficiently.

* Some alternative * svn * still required certain amount of work after svn export * OS integration is minimum * e.g. create user configure network card static * doesn't do templating & file line editing * e.g. file_line in stdlib

(... next)

11/25

* cssh * cool * reduced repetitious work across servers when deployment * but still back to square one when customizing servers

(... next)

12/25

* Bcfg2/etch * never like HTML

(... next)

13/25

* Chef * wolf in disguise * not free, at least for modules (... next)

14/25

* cfEngine * looks promising * puppet just sound better

(... next)

15/25

Why Puppet?

* excellent documentation * step by step guide * tutorial with Virtual Machine provided * surprisingly easy DSL * client server model * manages other platform also * linux * windows * cisco? * it works with FreeBSD * system * ports installation * user creation * service start/stop/restart * file system * file creation * ownership * available through ports * cd /usr/ports/sysutils/puppet; make install

(... next)

16/25

But I thought you mention Lazy, Impatience & Hubris?

* Lazy * The manifest & modules needs to be setup once and can use many times * Impatience * Puppet's excellent DSL & docs give gradual learning curve * only learn what you need to know and implement * Hubris * Manifest & modules are the essence of using (showing off) Puppet

(... next)

17/25

How do I install Puppet on FreeBSD?

* use ports * it requires * ruby * portupgrade * others ...

(... next)

18/25

Enough said, can you show me?

* expect these : * "Puppetless" installation & configuration of FreeBSD * apache22 * vhost * test page * Puppet master FreeBSD installation * installation Puppet * dependency installation * Puppet master configuration * client installation * requirement installations * first sign up of puppet with puppet master * show off manifest of * installation of ports * user environment settings * bash * vim * ssh * tmux * sudoers * apache22 * vhost * test page

(... next)

19/25

(you're suppose to be showing off Puppet on FreeBSD)

(... next)

20/25

* conclusion after demo * for linux admin, puppet just works * for freebsd admin, puppet just works * for freebsd wannatry, puppet just works

(... next)

21/25

What I hope to see Puppet in FreeBSD

* portmaster instead of portupgrade * new & shiny * patches are active * simple dependency, /bin/sh only

(... next)

22/25

Question?

* Blog : http://psybermonkey.net

* Email : edward@psybermonkey.net

(... next)

23/25

The End ...

(... next)

24/25

Errata

* On slide 14, stating Chef is not Free wasn't true. This was a last minute learning that, there are open source Chef's modules which can be download and use freely. My mistake.

Credits

* History of FreeBSD - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/history.html

* Quote of Linus Torvalds - http://en.wikiquote.org/wiki/Linus_Torvalds

* Quote "Lazy, Impatience & Hubris" was taken from Larry Wall, the creator of Perl - http://en.wikipedia.org/wiki/Larry_Wall

The End, seriously this time. :)

25/25