diff options
author | Vincent Ambo <tazjin@google.com> | 2019-12-21T00·26+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2019-12-21T00·26+0000 |
commit | 10f9c4c20886c0eb19c2513290779dde511e8af2 (patch) | |
tree | 6bc030a8f452929df962666f1c08d69d4dbecb6c /presentations/systemd-2016/demo | |
parent | c0b28fb866560566c35804a8f14875290a601d99 (diff) | |
parent | 8db37e39599943c33dab76e7cb390b0988e03839 (diff) |
merge(systemd-presentation): Merge at //presentations/systemd-2016 r/256
I figured that adding old presentations in here might actually be a useful thing to do, no matter what format they're in.
Diffstat (limited to 'presentations/systemd-2016/demo')
-rw-r--r-- | presentations/systemd-2016/demo/demo-error.service | 7 | ||||
-rw-r--r-- | presentations/systemd-2016/demo/demo-limits.slice | 7 | ||||
-rw-r--r-- | presentations/systemd-2016/demo/demo-notify@.service | 6 | ||||
-rw-r--r-- | presentations/systemd-2016/demo/demo-path.path | 6 | ||||
-rw-r--r-- | presentations/systemd-2016/demo/demo-stress.service | 6 | ||||
-rw-r--r-- | presentations/systemd-2016/demo/demo-timer.timer | 12 | ||||
-rw-r--r-- | presentations/systemd-2016/demo/demo.service | 6 | ||||
-rw-r--r-- | presentations/systemd-2016/demo/notes.md | 27 |
8 files changed, 77 insertions, 0 deletions
diff --git a/presentations/systemd-2016/demo/demo-error.service b/presentations/systemd-2016/demo/demo-error.service new file mode 100644 index 000000000000..b2d4c9d34799 --- /dev/null +++ b/presentations/systemd-2016/demo/demo-error.service @@ -0,0 +1,7 @@ +[Unit] +Description=Demonstrate failing units +OnFailure=demo-notify@%n.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/false diff --git a/presentations/systemd-2016/demo/demo-limits.slice b/presentations/systemd-2016/demo/demo-limits.slice new file mode 100644 index 000000000000..998185d26177 --- /dev/null +++ b/presentations/systemd-2016/demo/demo-limits.slice @@ -0,0 +1,7 @@ +[Unit] +Description=Limited resources demo +DefaultDependencies=no +Before=slices.target + +[Slice] +CPUQuota=10% diff --git a/presentations/systemd-2016/demo/demo-notify@.service b/presentations/systemd-2016/demo/demo-notify@.service new file mode 100644 index 000000000000..e25524b4e230 --- /dev/null +++ b/presentations/systemd-2016/demo/demo-notify@.service @@ -0,0 +1,6 @@ +[Unit] +Description=Demonstrate systemd templating by sending a notification + +[Service] +Type=oneshot +ExecStart=/usr/bin/notify-send 'Systemd notification' '%i' diff --git a/presentations/systemd-2016/demo/demo-path.path b/presentations/systemd-2016/demo/demo-path.path new file mode 100644 index 000000000000..87f1342da995 --- /dev/null +++ b/presentations/systemd-2016/demo/demo-path.path @@ -0,0 +1,6 @@ +[Unit] +Description=Demonstrate systemd path units + +[Path] +DirectoryNotEmpty=/tmp/hackeriet +Unit=demo.service diff --git a/presentations/systemd-2016/demo/demo-stress.service b/presentations/systemd-2016/demo/demo-stress.service new file mode 100644 index 000000000000..7e14f13e29d9 --- /dev/null +++ b/presentations/systemd-2016/demo/demo-stress.service @@ -0,0 +1,6 @@ +[Unit] +Description=Stress test CPU + +[Service] +Slice=demo.slice +ExecStart=/usr/bin/stress -c 5 diff --git a/presentations/systemd-2016/demo/demo-timer.timer b/presentations/systemd-2016/demo/demo-timer.timer new file mode 100644 index 000000000000..34eccb98b02a --- /dev/null +++ b/presentations/systemd-2016/demo/demo-timer.timer @@ -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 diff --git a/presentations/systemd-2016/demo/demo.service b/presentations/systemd-2016/demo/demo.service new file mode 100644 index 000000000000..fcc710ad933f --- /dev/null +++ b/presentations/systemd-2016/demo/demo.service @@ -0,0 +1,6 @@ +[Unit] +Description=Demo unit for systemd + +[Service] +Type=oneshot +ExecStart=/usr/bin/echo "Systemd unit activated. Hello Hackeriet." diff --git a/presentations/systemd-2016/demo/notes.md b/presentations/systemd-2016/demo/notes.md new file mode 100644 index 000000000000..b4866b1642bb --- /dev/null +++ b/presentations/systemd-2016/demo/notes.md @@ -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 |