chore(systemd-presentation): Prepare for depot merge
This commit is contained in:
parent
91d7f03000
commit
8db37e3959
16 changed files with 1 additions and 0 deletions
7
presentations/systemd-2016/demo/demo-error.service
Normal file
7
presentations/systemd-2016/demo/demo-error.service
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=Demonstrate failing units
|
||||
OnFailure=demo-notify@%n.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/false
|
||||
7
presentations/systemd-2016/demo/demo-limits.slice
Normal file
7
presentations/systemd-2016/demo/demo-limits.slice
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=Limited resources demo
|
||||
DefaultDependencies=no
|
||||
Before=slices.target
|
||||
|
||||
[Slice]
|
||||
CPUQuota=10%
|
||||
6
presentations/systemd-2016/demo/demo-notify@.service
Normal file
6
presentations/systemd-2016/demo/demo-notify@.service
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Demonstrate systemd templating by sending a notification
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/notify-send 'Systemd notification' '%i'
|
||||
6
presentations/systemd-2016/demo/demo-path.path
Normal file
6
presentations/systemd-2016/demo/demo-path.path
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Demonstrate systemd path units
|
||||
|
||||
[Path]
|
||||
DirectoryNotEmpty=/tmp/hackeriet
|
||||
Unit=demo.service
|
||||
6
presentations/systemd-2016/demo/demo-stress.service
Normal file
6
presentations/systemd-2016/demo/demo-stress.service
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Stress test CPU
|
||||
|
||||
[Service]
|
||||
Slice=demo.slice
|
||||
ExecStart=/usr/bin/stress -c 5
|
||||
12
presentations/systemd-2016/demo/demo-timer.timer
Normal file
12
presentations/systemd-2016/demo/demo-timer.timer
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Demonstrate systemd timers
|
||||
|
||||
[Timer]
|
||||
OnActiveSec=2
|
||||
OnUnitActiveSec=5
|
||||
AccuracySec=5
|
||||
Unit=demo.service
|
||||
# OnCalendar=Thu,Fri 2016-*-1,5 11:12:13
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
6
presentations/systemd-2016/demo/demo.service
Normal file
6
presentations/systemd-2016/demo/demo.service
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Demo unit for systemd
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/echo "Systemd unit activated. Hello Hackeriet."
|
||||
27
presentations/systemd-2016/demo/notes.md
Normal file
27
presentations/systemd-2016/demo/notes.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# simple oneshot
|
||||
|
||||
Run `demo-notify@hello.service`
|
||||
|
||||
# simple timer
|
||||
|
||||
Run `demo-timer.timer`, show both
|
||||
|
||||
# enabling
|
||||
|
||||
Enable `demo-timer.timer`, go to symlink folder, disable
|
||||
|
||||
# OnError
|
||||
|
||||
Show & run `demo-error.service`
|
||||
|
||||
# cgroups demo
|
||||
|
||||
Start `demo-stress.service` without, show in htop, stop
|
||||
Show slice unit, start slice unit
|
||||
Add Slice=demo-limits.slice
|
||||
daemon-reload
|
||||
Start stress again
|
||||
|
||||
# Proper service
|
||||
|
||||
Look at nginx unit
|
||||
Loading…
Add table
Add a link
Reference in a new issue