Top Banner
The Daemon in Puppets by Edward Tan (... next) 1/25
25

PuppetCamp SEA 1 - Puppet & FreeBSD

Jun 19, 2015

Download

Technology

OlinData

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.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: PuppetCamp SEA 1 - Puppet & FreeBSD

The Daemon in Puppets

by Edward Tan

(... next)

1/25

Page 2: PuppetCamp SEA 1 - Puppet & FreeBSD

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

Page 3: PuppetCamp SEA 1 - Puppet & FreeBSD

Before Starting

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

(... next)

3/25

Page 4: PuppetCamp SEA 1 - Puppet & FreeBSD

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

Page 5: PuppetCamp SEA 1 - Puppet & FreeBSD

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

Page 6: PuppetCamp SEA 1 - Puppet & FreeBSD

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

Page 7: PuppetCamp SEA 1 - Puppet & FreeBSD

* 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

Page 8: PuppetCamp SEA 1 - Puppet & FreeBSD

* 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

Page 9: PuppetCamp SEA 1 - Puppet & FreeBSD

Linus Torvalds once said :

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

(... next)

9/25

Page 10: PuppetCamp SEA 1 - Puppet & FreeBSD

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

Page 11: PuppetCamp SEA 1 - Puppet & FreeBSD

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

Page 12: PuppetCamp SEA 1 - Puppet & FreeBSD

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

(... next)

12/25

Page 13: PuppetCamp SEA 1 - Puppet & FreeBSD

* Bcfg2/etch * never like HTML

(... next)

13/25

Page 14: PuppetCamp SEA 1 - Puppet & FreeBSD

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

14/25

Page 15: PuppetCamp SEA 1 - Puppet & FreeBSD

* cfEngine * looks promising * puppet just sound better

(... next)

15/25

Page 16: PuppetCamp SEA 1 - Puppet & FreeBSD

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

Page 17: PuppetCamp SEA 1 - Puppet & FreeBSD

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

Page 18: PuppetCamp SEA 1 - Puppet & FreeBSD

How do I install Puppet on FreeBSD?

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

(... next)

18/25

Page 19: PuppetCamp SEA 1 - Puppet & FreeBSD

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

Page 20: PuppetCamp SEA 1 - Puppet & FreeBSD

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

(... next)

20/25

Page 21: PuppetCamp SEA 1 - Puppet & FreeBSD

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

(... next)

21/25

Page 22: PuppetCamp SEA 1 - Puppet & FreeBSD

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

Page 23: PuppetCamp SEA 1 - Puppet & FreeBSD

Question?

* Blog : http://psybermonkey.net

* Email : [email protected]

(... next)

23/25

Page 24: PuppetCamp SEA 1 - Puppet & FreeBSD

The End ...

(... next)

24/25

Page 25: PuppetCamp SEA 1 - Puppet & FreeBSD

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