Strategies for Landing an Oracle DBA Job as a Fresher
systemd and configuration management
1. systemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config managementsystemd and config management
Julien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien Pivotto
systemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.confsystemd.conf
November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015November 6, 2015
2. user-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.sliceuser-1000.slice
Julien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien Pivotto
• Sysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.euSysadmin at inuits.eu
• FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004FLOSS user since 2004
• systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010systemd user since 2010
EEEEEEEEEEEEEEEEExherbo Linux
• DevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believer
• @roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie@roidelapluie on irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/githubon irc/twitter/github
5. The DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movementThe DevOps movement
• DDDDDDDDDDDDDDDDDevOps is a movement born in 2009
• CCCCCCCCCCCCCCCCCollaboration between Developers and
Operations
• NNNNNNNNNNNNNNNNNothing new, just common sense
• DDDDDDDDDDDDDDDDDevOpsDays, a serie of conferences all
around the world
7. The A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMSThe A of C(L)AMS
• AAAAAAAAAAAAAAAAAutomation reduces human mistakes
• CCCCCCCCCCCCCCCCContinuous Integration/Delivery
• RRRRRRRRRRRRRRRRReproducable build
• RRRRRRRRRRRRRRRRReproducable infrastructure
• Infrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as Code
8. Infrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as CodeInfrastructure as Code
• AAAAAAAAAAAAAAAAAutomate your infrastructure with code
• MMMMMMMMMMMMMMMMModel your infrastructure
• MMMMMMMMMMMMMMMMMonitoring, security, applications and
backups are part of the process
• SSSSSSSSSSSSSSSSScripts are not IaC
9. IaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practicesIaC best practices
• RRRRRRRRRRRRRRRRRun tests against that code
• PPPPPPPPPPPPPPPPPut it under version control
• DDDDDDDDDDDDDDDDDeploy with CI/CD: dev, uat, prod
environments…
11. Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?Which world is this?
• bbbbbbbbbbbbbbbbbare-metal
• vvvvvvvvvvvvvvvvvirtualization
• cccccccccccccccccloud
• ……………………………………………
12. Heterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environmentsHeterogeneous environments
• LLLLLLLLLLLLLLLLLinux distributions are different
• IIIIIIIIIIIIIIIIInit systems, File hierarchy
• EEEEEEEEEEEEEEEEEven between different releases of the same
distro
• CCCCCCCCCCCCCCCCConfiguration manegement tools try to
abstract that
13. systemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picturesystemd in that picture
14. what people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people seewhat people see
• bbbbbbbbbbbbbbbbbefore: distinction between distributions
• nnnnnnnnnnnnnnnnnow: distinction between distributions and
systemd or not
• tttttttttttttttttomorrow: it will be hard to provide the all
the features of systemd to old distros
15. systemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distrossystemd hit majors distros
• RRRRRRRRRRRRRRRRReaching Debian Stable and RHEL 7
• CCCCCCCCCCCCCCCCConfig management needs to learn it
• IIIIIIIIIIIIIIIIIt brings lots of new patterns
16. Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)Terminology (puppet, simplified)
• rrrrrrrrrrrrrrrrresource: description of a small piece (file,
service) with desired state
• mmmmmmmmmmmmmmmmmodule: collection of resources (e.g. a
module to setup Mysql)
20. Changing old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scriptsChanging old init scripts
• WWWWWWWWWWWWWWWWWhy? Solve bugs, ajust niceness, change
command…
• CCCCCCCCCCCCCCCCChange the full file!
• TTTTTTTTTTTTTTTTTemplate OS and version dependant
23. Here is the rule:
Packaged files go in /lib. Config
management tools override in /etc.
24. No conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor filesNo conflict with vendor files
• CCCCCCCCCCCCCCCCCan be overriden in /etc/systemd/system
• NNNNNNNNNNNNNNNNNot afraid of package updates
• PPPPPPPPPPPPPPPPPartial override possible
28. daemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppetdaemon-reload in Puppet
file {
'/etc/systemd/system/mariadb.service.d/niceness.conf ':
ensure => present ,
content => template('systemd/niceness.erb '),
notify => [ Exec['systemctl−daemon−reload '],
Service['mariadb '], ]
}
exec {
'systemctl−daemon−reload ':
command => '/usr/bin/systemctl reload−daemon ',
refreshonly => true ,
}
service {
'mariadb ':
ensure => running ,
require => Exec['systemctl−daemon−reload '],
}
33. Prevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to startPrevent a service to start
• CCCCCCCCCCCCCCCCClassic init allows to disable services
• CCCCCCCCCCCCCCCCConfigmgmt tools do not care
• ccccccccccccccccchmod 000 /etc/init.d/mysqld
35. masking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppetmasking in Puppet
file {
'/etc/systemd/system/mariadb.service ':
ensure => link ,
target => '/dev/null ',
notify => Exec['systemctl daemon−reload '],
}
37. tmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemdtmpfiles before systemd
Several techniques: tmpfs, tmpwatch
#! /bin/sh
flags=−umc
/usr/sbin/tmpwatch "$flags" −x /tmp/.X11−unix −x /tmp/.
XIM−unix
−x /tmp/.font−unix −x /tmp/.ICE−unix −x /tmp/.
Test−unix
−X '/tmp/hsperfdata_*' 10d /tmp
/usr/sbin/tmpwatch "$flags" 30d /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/
cat?}; do
if [ −d "$d" ]; then
/usr/sbin/tmpwatch "$flags" −f 30d "$d"
fi
done
38. tmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemd
systemd-tmpfiles
v /tmp 1777 root root 10d
v /var/tmp 1777 root root 30d
39. tmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemdtmpfiles with systemd
• AAAAAAAAAAAAAAAAAgain, simple text files
• CCCCCCCCCCCCCCCCCan be overwritten in /etc
• YYYYYYYYYYYYYYYYYet another command to launch
40. tmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppettmpfiles with systemd and Puppet
augeas {
"tmpfiles.d−${path}":
context => "/files/etc/tmpfiles.d/my.conf/*[path = '
${path}']",
changes => [
"set type 'd'",
"set gid '${group}'",
"set uid '${owner}'",
"set mode '${mode}'",
],
}
exec {"systemd−tmpfiles−${path}":
command => '/usr/bin/systemd−tmpfiles −−create ',
creates => $path ,
requires => Augeas["tmpfiles.d−${path}"],
}
43. What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?What's wrong?
• NNNNNNNNNNNNNNNNNo one reads those mails
• DDDDDDDDDDDDDDDDDo not keep track of exit code
• HHHHHHHHHHHHHHHHHard to read that crontab
• HHHHHHHHHHHHHHHHHow to reproduce the script?
44. The systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timersThe systemd approach: timers
• DDDDDDDDDDDDDDDDDescribe the job in a service file
• AAAAAAAAAAAAAAAAAdd a timer file
• EEEEEEEEEEEEEEEEEnable/start the timer service
45. Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?Why is it better?
• EEEEEEEEEEEEEEEEEasy to reproduce (launch the service unit)
• LLLLLLLLLLLLLLLLLogs go to the journal, isolated by unit
• AAAAAAAAAAAAAAAAAll the advantages of systemd units
49. systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…systemd is complex…
• IIIIIIIIIIIIIIIIIt drags in a bunch of new pattern
• IIIIIIIIIIIIIIIIIt supports a lot of scenarios
• IIIIIIIIIIIIIIIIIt can do really advanced things
50. …but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks…but based on simple bricks
• IIIIIIIIIIIIIIIIIni-like file format
• EEEEEEEEEEEEEEEEEasy to read, to change
• CCCCCCCCCCCCCCCCConfig management tools have all the base
bricks to manage that
51. There are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprisesThere are surprises
• sssssssssssssssssystemctl daemon-reload
• sssssssssssssssssystemd-tmpfiles
• tttttttttttttttttimers
52. You need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rulesYou need to know the rules
• TTTTTTTTTTTTTTTTTake time to learn how this works
• TTTTTTTTTTTTTTTTThere is a gap between systemd devs and
sysadmins
• TTTTTTTTTTTTTTTTThere are new non-obvious patterns for
sysadmins
• BBBBBBBBBBBBBBBBBut at the end eveyone can win
54. A Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gapsA Story of gaps
• Gap between systemd and configmgmt
tools
• Gap between systemd community and
cfgmgmt tools community
• Together we can close those gaps