Home >Technology >Getting the maximum out of systemd

Getting the maximum out of systemd

Date post:13-Apr-2017
Category:
View:7,429 times
Download:1 times
Share this document with a friend
Transcript:
  • Getting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemdGetting the maximum out of systemd

    Julien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien PivottoJulien Pivotto

    FLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceFLOSS UK Spring ConferenceMarch 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016March 16, 2016

  • whoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiwhoamiJulien 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

    I EEEEEEEEEEEEEEEEExherbo Linux

    DevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believerDevOps believer @[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@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

  • inuits.eu

  • systemdsystemdsystemdsystemdsystemdsystemdsystemdsystemdsystemdsystemdsystemdsystemdsystemdsystemdsystemdsystemdsystemd

    AAAAAAAAAAAAAAAAAn init system IIIIIIIIIIIIIIIIImprove the Linux init process SSSSSSSSSSSSSSSSStarting more in parallel MMMMMMMMMMMMMMMMMaking better decisions TTTTTTTTTTTTTTTTTakes advantages of Linux features

  • systemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoptionsystemd adoption

    22222222222222222011: Fedora, Exherbo 22222222222222222012: Mageia, openSUSE, Arch Linux 22222222222222222013: CoreOS 22222222222222222014: RHEL, CentOS 22222222222222222015: Ubuntu, Debian

  • AlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternativesAlternatives

    SSSSSSSSSSSSSSSSSystem V: legacy UUUUUUUUUUUUUUUUUpstart: Ubuntu < 2015 and EL6 OOOOOOOOOOOOOOOOOpenRC: mainly Gentoo

  • Talk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibilityTalk compatibility

    CCCCCCCCCCCCCCCCContent of this talk runs on CentOS 7.2 sssssssssssssssssystemd 219 SSSSSSSSSSSSSSSSShould work on any other distro

  • UnitsUnitsUnitsUnitsUnitsUnitsUnitsUnitsUnitsUnitsUnitsUnitsUnitsUnitsUnitsUnitsUnitsLicensed under a Creative Commons Attribution 2.0 Licensehttps://www.flickr.com/photos/dbackmansfo/10939296845

  • systemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd unitssystemd units

    BBBBBBBBBBBBBBBBBase bricks of systemd systems OOOOOOOOOOOOOOOOOne unit = one resource mmmmmmmmmmmmmmmmmountpoint, service, device, timer, socket,

  • nnnnnnnnnnnnnnnnnetwork.target mmmmmmmmmmmmmmmmmariadb.service ssssssssssssssssshaarli.socket pppppppppppppppppuppet-run.timer hhhhhhhhhhhhhhhhhome.mount sssssssssssssssssession-1.scope

  • Unit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configurationUnit configuration

    IIIIIIIIIIIIIIIIIni-style text files LLLLLLLLLLLLLLLLList: systemctl list-units --all RRRRRRRRRRRRRRRRRead: systemctl cat

  • Unit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit exampleUnit example

    [Unit]Description=nscd

    [Service]Type=forkingPIDFile=/run/nscd/nscd.pidExecStart=/usr/host/bin/nscdExecStop=/usr/host/bin/nscd shutdown

    [Install]WantedBy=multiuser.target

  • Where?Where?Where?Where?Where?Where?Where?Where?Where?Where?Where?Where?Where?Where?Where?Where?Where?

    /////////////////etc/systemd/system/* /////////////////run/systemd/system/* /////////////////usr/lib/systemd/system/*

  • Here is the rule:Packaged files go in /usr/lib.

    Humans (or Config managementtools) override in /etc.

  • Overriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsOverriding unitsLicensed under a Creative Commons Attribution 2.0 License

    https://www.flickr.com/photos/alovesdc/3468924493

  • Overriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: whyOverriding units: why

    AAAAAAAAAAAAAAAAAdd/Remove/Change parameters AAAAAAAAAAAAAAAAAdapt them to your needs SSSSSSSSSSSSSSSSSet ulimits, user, FFFFFFFFFFFFFFFFFix bugs

  • Changing services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemdChanging services before systemd

    RRRRRRRRRRRRRRRRReplace /etc/init.d scripts /////////////////etc/default, /etc/sysconfig SSSSSSSSSSSSSSSSSpaghetti code

  • Overriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemdOverriding units: with systemd

    OOOOOOOOOOOOOOOOOverride completely a unit JJJJJJJJJJJJJJJJJust add/change one parameter """""""""""""""""Patch" vendor units

  • Complete overrideComplete overrideComplete overrideComplete overrideComplete overrideComplete overrideComplete overrideComplete override

Click here to load reader

Embed Size (px)
Recommended