More presentation
[talk-cockpit-auth-anywhere.git] / prep.sh
1 #!/bin/sh -ex
2 printf '[Session]\nIdleTimeout=0\n' | sudo tee /etc/cockpit.cockpit.conf
3 sudo systemctl stop cockpit
4
5 # LV resizing demo
6 sudo modprobe scsi_debug dev_size_mb=512
7 # sanity check
8 m=$(cat /sys/block/sdb/device/model)
9 [ "${m%% *}" = scsi_debug ]
10
11 cat <<EOF | sudo sfdisk /dev/sdb
12 label: dos
13 label-id: 0x4e3c0cf8
14 device: /dev/sdb
15 unit: sectors
16
17 /dev/sdb1 : start=        2048, size=      524288, type=83
18 /dev/sdb2 : start=      526336, size=      522240, type=83
19 EOF
20 sudo pvcreate /dev/sdb1
21 sudo vgcreate vg0 /dev/sdb1
22 sudo lvcreate -n data1 -l '100%FREE' vg0
23 sudo mkfs.ext4 -L data1 /dev/vg0/data1
24
25 firefox http://localhost:9090/storage
26
27 cat <<EOF
28 Manual steps:
29 =============
30  - Log into Cockpit in browser
31  - In Windows VM, open Edge and log into https://10.0.2.2:9090
32 EOF