Initial presentation
authorMartin Pitt <martin@piware.de>
Tue, 7 Jan 2020 15:52:08 +0000 (16:52 +0100)
committerMartin Pitt <martin@piware.de>
Tue, 7 Jan 2020 16:57:19 +0000 (17:57 +0100)
Also include prep.sh for the steps that need to run before giving the
presentation, and cleanup.sh for reverting these.

.gitignore [new file with mode: 0644]
Makefile [new file with mode: 0644]
cleanup.sh [new file with mode: 0755]
cockpit-auth-anywhere.md [new file with mode: 0644]
outline.md
prep.sh [new file with mode: 0755]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..5a7ecf6
--- /dev/null
@@ -0,0 +1 @@
+cockpit-auth-anywhere.pdf
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..9e28467
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+cockpit-auth-anywhere.pdf: cockpit-auth-anywhere.md
+       pandoc -t beamer -o $@ $<
+
+clean:
+       rm -f cockpit-auth-anywhere.pdf
+
+# install the necessary tools to build this presentation
+deps:
+       sudo dnf install -y pandoc texlive-beamer texlive-latex-bin texlive-collection-fontsrecommended texlive-hyphen-german texlive-hyphen-english texlive-dehyph texlive-fancyhdr texlive-dinbrief texlive-german texlive-a4wide
+
+.PHONY: deps clean
diff --git a/cleanup.sh b/cleanup.sh
new file mode 100755 (executable)
index 0000000..450fbe7
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh -x
+sudo vgremove -f vg0
+sudo rmmod scsi_debug
+sudo rm -f /etc/cockpit.cockpit.conf
diff --git a/cockpit-auth-anywhere.md b/cockpit-auth-anywhere.md
new file mode 100644 (file)
index 0000000..fbc8f46
--- /dev/null
@@ -0,0 +1,45 @@
+---
+title: Authenticate to Cockpit from anywhere
+subtitle:
+author: Martin Pitt <<mpitt@redhat.com>>
+email: mpitt@redhat.com
+date: DevConv.CZ 2020
+theme: Singapore
+header-includes:
+ - \usepackage{wasysym}\usepackage{pgfpages}\setbeameroption{show notes}
+ - \newcommand{\fullsizeimg}[1]{\makebox[\linewidth]{\includegraphics[width=\paperwidth]{#1}}}
+...
+
+# Cockpit what?
+
+- Interactive Server admin web interface
+- Easy setup and troubleshooting for one or a few machines
+- Included in all major distros
+
+\note[item]{Conceptually: Linux session running in a web browser; technically very similar to ssh/VT/GNOME login}
+\note[item]{Aimed at admins who are new to Linux, e. g. coming from the Windows world and familiar with the concepts, but not Linux terminology}
+\note[item]{but also to experienced ones for infrequent tasks; not just setup, but also investigating “what is wrong with this machine”}
+
+
+# Extending LVM
+
+```sh
+pvcreate /dev/sdb2
+vgextend vg0 /dev/sdb2
+lvresize --extents '+100%FREE' vg0/data1
+resize2fs /dev/vg0/data1
+```
+
+\note[item]{for example, adding a new PV to an LV and resizing the file system you can spend some time coming up with these commands}
+\note[item]{lots of possibilities for screwing up}
+\note[item]{you can do it simply and safely with Cockpit like this → go to local browser}
+\note[item]{Storage page, vg0 in Devices (top right), + in Physical Volumes, add sdb2}
+\note[item]{expand data1 table line, click grow}
+
+# Contact
+
+- `#cockpit` on Freenode
+- https://cockpit-project.org
+
+\note[item]{Home page leads to mailing lists, documentation}
+\note[item]{thanks for your attention; Q+A}
index 9a265ff7b8f5cc9dc11d4aac3a34b6522083412e..726160e48e3c6ec7066c752cf7b584e3cc891254 100644 (file)
@@ -7,16 +7,7 @@ Cockpit is primarily known as a graphical, browser-based, reactive, and non-intr
 - Introduction
   + Cockpit as graphical UI to interact with your server, complementing ssh
   + Configure LVM or RAID once a year? Simpler and safer to do it like this
-    (Storage page demo) than this (shell commands below) → add PV, resize partition
-    sudo lvresize-prep.sh  and lvresize-cleanup.sh
-
-```sh
-pvcreate /dev/sdb2
-vgextend vg0 /dev/sdb2
-lvresize --extents '+100%FREE' vg0/data1
-resize2fs /dev/vg0/data1
-```
-
+    (Storage page demo) than this (shell commands) → add PV, resize partition
   + Makes server accessible from a lot more places
   + Integrates into authentication setups beyond simple user/password login page
 
diff --git a/prep.sh b/prep.sh
new file mode 100755 (executable)
index 0000000..fa38270
--- /dev/null
+++ b/prep.sh
@@ -0,0 +1,31 @@
+#!/bin/sh -ex
+printf '[Session]\nIdleTimeout=0\n' | sudo tee /etc/cockpit.cockpit.conf
+sudo systemctl stop cockpit
+
+# LV resizing demo
+sudo modprobe scsi_debug dev_size_mb=512
+# sanity check
+m=$(cat /sys/block/sdb/device/model)
+[ "${m%% *}" = scsi_debug ]
+
+cat <<EOF | sudo sfdisk /dev/sdb
+label: dos
+label-id: 0x4e3c0cf8
+device: /dev/sdb
+unit: sectors
+
+/dev/sdb1 : start=        2048, size=      524288, type=83
+/dev/sdb2 : start=      526336, size=      522240, type=83
+EOF
+sudo pvcreate /dev/sdb1
+sudo vgcreate vg0 /dev/sdb1
+sudo lvcreate -n data1 -l '100%FREE' vg0
+sudo mkfs.ext4 -L data1 /dev/vg0/data1
+
+firefox http://localhost:9090/storage
+
+cat <<EOF
+Manual steps:
+=============
+ - Log into Cockpit in browser
+EOF