Add 2013 CentOS Dojo Aldershot talk.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 8 Jul 2013 10:51:01 +0000 (11:51 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 11 Jul 2013 10:00:39 +0000 (11:00 +0100)
34 files changed:
2013-centos-dojo/.gitignore [new file with mode: 0644]
2013-centos-dojo/0000-introduction.html [new file with mode: 0644]
2013-centos-dojo/0500-definitions-libvirt.html [new file with mode: 0644]
2013-centos-dojo/0501-definitions-cloud.html [new file with mode: 0644]
2013-centos-dojo/0502-definitions-disk-image.html [new file with mode: 0644]
2013-centos-dojo/1000-laptop-guests.term [new file with mode: 0755]
2013-centos-dojo/1000.d/.gitignore [new file with mode: 0644]
2013-centos-dojo/2000-overlay-disk.html [new file with mode: 0644]
2013-centos-dojo/2000-overlay-disk.svg [new file with mode: 0644]
2013-centos-dojo/2100-overlay-disk.term [new file with mode: 0755]
2013-centos-dojo/2100.d/.gitignore [new file with mode: 0644]
2013-centos-dojo/2200-differences.term [new file with mode: 0755]
2013-centos-dojo/2200.d/.gitignore [new file with mode: 0644]
2013-centos-dojo/2300-sysprep.term [new file with mode: 0755]
2013-centos-dojo/2300.d/.gitignore [new file with mode: 0644]
2013-centos-dojo/2400-set-root-password.term [new file with mode: 0755]
2013-centos-dojo/2400.d/set-root-password.pl [new file with mode: 0755]
2013-centos-dojo/6000-libvirt.html [new file with mode: 0644]
2013-centos-dojo/7000-libguestfs.html [new file with mode: 0644]
2013-centos-dojo/8000-openstack.html [new file with mode: 0644]
2013-centos-dojo/9000-ovirt.html [new file with mode: 0644]
2013-centos-dojo/9900-qanda.html [new file with mode: 0644]
2013-centos-dojo/README [new file with mode: 0644]
2013-centos-dojo/bashrc [new file with mode: 0644]
2013-centos-dojo/centos-bg.png [new file with mode: 0644]
2013-centos-dojo/centos-logo.png [new file with mode: 0644]
2013-centos-dojo/cleanup [new file with mode: 0755]
2013-centos-dojo/code.js [new file with mode: 0644]
2013-centos-dojo/functions [new file with mode: 0644]
2013-centos-dojo/highlight [new file with mode: 0755]
2013-centos-dojo/notes.txt [new file with mode: 0644]
2013-centos-dojo/redhat.png [new file with mode: 0644]
2013-centos-dojo/run [new file with mode: 0755]
2013-centos-dojo/style.css [new file with mode: 0644]

diff --git a/2013-centos-dojo/.gitignore b/2013-centos-dojo/.gitignore
new file mode 100644 (file)
index 0000000..ceb0adb
--- /dev/null
@@ -0,0 +1,2 @@
+bindings
+history
diff --git a/2013-centos-dojo/0000-introduction.html b/2013-centos-dojo/0000-introduction.html
new file mode 100644 (file)
index 0000000..dd27dcb
--- /dev/null
@@ -0,0 +1,21 @@
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<div id="titlepage">
+<p class="title">
+  Programming libvirt &amp; the virt tools <br/>
+</p>
+<p><author>
+  Richard W.M. Jones <br/>
+  <small>rjones @ redhat.com</small>
+</author></p>
+<p class="subtitle">
+  <b>After the short talk, we have 20 minutes for Q&amp;A.</b> <br/>
+  Ask me anything about: <br/>
+  virtualization with KVM in CentOS, <br/>
+  libvirt, libguestfs, virt-* tools, virsh, <br/>
+  OpenStack, oVirt, RHEV-M, RHEL 7 &#x2026;
+</p>
+</div>
+
+<img id="centoslogo" src="centos-logo.png" />
diff --git a/2013-centos-dojo/0500-definitions-libvirt.html b/2013-centos-dojo/0500-definitions-libvirt.html
new file mode 100644 (file)
index 0000000..48592d3
--- /dev/null
@@ -0,0 +1,11 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Some definitions</h1>
+
+<ul>
+<li> virtualization
+<li> hypervisor
+<li> libvirt
+</ul>
diff --git a/2013-centos-dojo/0501-definitions-cloud.html b/2013-centos-dojo/0501-definitions-cloud.html
new file mode 100644 (file)
index 0000000..2ceaec5
--- /dev/null
@@ -0,0 +1,11 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Some definitions</h1>
+
+<ul>
+<li> cloud
+<li> self-service vs managed
+<li> public vs private
+</ul>
diff --git a/2013-centos-dojo/0502-definitions-disk-image.html b/2013-centos-dojo/0502-definitions-disk-image.html
new file mode 100644 (file)
index 0000000..a08b319
--- /dev/null
@@ -0,0 +1,10 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Some definitions</h1>
+
+<ul>
+<li> disk image
+<li> libguestfs
+</ul>
diff --git a/2013-centos-dojo/1000-laptop-guests.term b/2013-centos-dojo/1000-laptop-guests.term
new file mode 100755 (executable)
index 0000000..523b5b5
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash -
+
+source functions
+
+# History.
+remember 'sudo virsh list --all'
+remember 'sudo virsh dumpxml f18x64 | highlight | less -r'
+
+echo "Locally installed guests"
+
+cd 1000.d
+terminal
diff --git a/2013-centos-dojo/1000.d/.gitignore b/2013-centos-dojo/1000.d/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/2013-centos-dojo/2000-overlay-disk.html b/2013-centos-dojo/2000-overlay-disk.html
new file mode 100644 (file)
index 0000000..cecc8b0
--- /dev/null
@@ -0,0 +1,7 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Creating an overlay disk</h1>
+
+<img src="2000-overlay-disk.svg" height="800"/>
diff --git a/2013-centos-dojo/2000-overlay-disk.svg b/2013-centos-dojo/2000-overlay-disk.svg
new file mode 100644 (file)
index 0000000..5ae09b5
--- /dev/null
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="New document 1">
+  <defs
+     id="defs4">
+    <marker
+       inkscape:stockid="Arrow1Lstart"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Lstart"
+       style="overflow:visible">
+      <path
+         id="path3785"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
+         transform="scale(0.8) translate(12.5,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Lend"
+       style="overflow:visible;">
+      <path
+         id="path3788"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
+         transform="scale(0.8) rotate(180) translate(12.5,0)" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.70710678"
+     inkscape:cx="198.5"
+     inkscape:cy="753.10156"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1285"
+     inkscape:window-height="720"
+     inkscape:window-x="0"
+     inkscape:window-y="31"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:#999c99;fill-opacity:1;stroke:#000000;stroke-width:0.99921262;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect2985"
+       width="441.42856"
+       height="213.57143"
+       x="100"
+       y="51.647896" />
+    <text
+       xml:space="preserve"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="134"
+       y="120.36218"
+       id="text2987"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan2989"
+         x="134"
+         y="120.36218">20 GB</tspan><tspan
+         sodipodi:role="line"
+         x="134"
+         y="155.36218"
+         id="tspan2991">raw</tspan><tspan
+         sodipodi:role="line"
+         x="134"
+         y="190.36218"
+         id="tspan2993">backing disk</tspan><tspan
+         sodipodi:role="line"
+         x="134"
+         y="225.36218"
+         id="tspan2995">readonly</tspan></text>
+    <rect
+       y="319.64789"
+       x="190"
+       height="149.57141"
+       width="180.42859"
+       id="rect2997"
+       style="fill:#999c99;fill-opacity:1;stroke:#000000;stroke-width:0.99921262;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+    <text
+       sodipodi:linespacing="125%"
+       id="text2999"
+       y="369.36218"
+       x="224"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       xml:space="preserve"><tspan
+         y="369.36218"
+         x="224"
+         id="tspan3001"
+         sodipodi:role="line">20 GB</tspan><tspan
+         id="tspan3003"
+         y="404.36218"
+         x="224"
+         sodipodi:role="line">qcow2</tspan><tspan
+         id="tspan3007"
+         y="439.36218"
+         x="224"
+         sodipodi:role="line">overlay</tspan></text>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:none;marker-start:url(#Arrow1Lstart)"
+       d="m 278,318.36218 -1,-53"
+       id="path3011"
+       inkscape:connector-curvature="0" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path4225"
+       d="m 278,524.36218 -1,-53"
+       style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:none;marker-start:url(#Arrow1Lstart)" />
+    <rect
+       style="fill:#dc9c99;fill-opacity:1;stroke:#000000;stroke-width:0.99921262000000000;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect4227"
+       width="180.42859"
+       height="149.57141"
+       x="190"
+       y="525.64789"
+       ry="19" />
+    <text
+       xml:space="preserve"
+       style="font-size:28px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="206"
+       y="583.36218"
+       id="text4229"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         x="206"
+         y="583.36218"
+         id="tspan4235">hypervisor</tspan><tspan
+         sodipodi:role="line"
+         x="206"
+         y="618.36218"
+         id="tspan4241">(KVM)</tspan></text>
+  </g>
+</svg>
diff --git a/2013-centos-dojo/2100-overlay-disk.term b/2013-centos-dojo/2100-overlay-disk.term
new file mode 100755 (executable)
index 0000000..af83345
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash -
+
+source functions
+
+# History.
+remember 'qemu-img create -f qcow2 -b /dev/fedora/f18x64 /tmp/overlay.qcow2'
+remember 'qemu-img info /tmp/overlay.qcow2'
+remember 'virt-install --import --disk path=/tmp/overlay.qcow2,bus=virtio,format=qcow2 -n dojo -r 2048'
+remember 'virt-viewer dojo'
+remember 'virsh list'
+remember 'virsh dumpxml dojo | highlight | less -r'
+remember 'qemu-img info /tmp/overlay.qcow2'
+
+echo "Set up an overlay disk"
+
+cd 2100.d
+terminal
diff --git a/2013-centos-dojo/2100.d/.gitignore b/2013-centos-dojo/2100.d/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/2013-centos-dojo/2200-differences.term b/2013-centos-dojo/2200-differences.term
new file mode 100755 (executable)
index 0000000..1ff2f9f
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash -
+
+source functions
+
+# History.
+remember 'virt-ls -lR /dev/fedora/f18x64 / | sort -k4 > old-files'
+remember 'virt-ls -lR /tmp/overlay.qcow2 / | sort -k4 > new-files'
+remember 'diff -ur old-files new-files | less'
+
+echo "Differences"
+
+cd 2200.d
+terminal
diff --git a/2013-centos-dojo/2200.d/.gitignore b/2013-centos-dojo/2200.d/.gitignore
new file mode 100644 (file)
index 0000000..9ff65df
--- /dev/null
@@ -0,0 +1,2 @@
+new-files
+old-files
diff --git a/2013-centos-dojo/2300-sysprep.term b/2013-centos-dojo/2300-sysprep.term
new file mode 100755 (executable)
index 0000000..a72929a
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash -
+
+source functions
+
+# History.
+remember 'virt-sysprep --hostname dojo.example.com -d dojo'
+
+echo "Sysprep the guest"
+
+cd 2300.d
+terminal
diff --git a/2013-centos-dojo/2300.d/.gitignore b/2013-centos-dojo/2300.d/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/2013-centos-dojo/2400-set-root-password.term b/2013-centos-dojo/2400-set-root-password.term
new file mode 100755 (executable)
index 0000000..270d9a8
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash -
+
+source functions
+
+# History.
+remember 'ls -l'
+remember 'emacs -nw set-root-password.pl'
+remember './set-root-password.pl'
+remember 'virsh start dojo'
+remember 'virt-viewer dojo'
+
+echo "Set root password"
+
+cd 2400.d
+terminal
diff --git a/2013-centos-dojo/2400.d/set-root-password.pl b/2013-centos-dojo/2400.d/set-root-password.pl
new file mode 100755 (executable)
index 0000000..6511cfb
--- /dev/null
@@ -0,0 +1,27 @@
+#!/usr/bin/perl -w
+
+use strict;
+#use Sys::Virt;
+use Sys::Guestfs;
+
+my $vm = "dojo";
+my $newpw = "1234567";
+
+my $salt;
+my @chars = ("A".."Z", "a".."z", "0".."9", ".", "/");
+$salt .= $chars[rand @chars] for 1..16;
+my $crypted = crypt ($newpw, '$5$' . $salt . '$');
+
+my $g = Sys::Guestfs->new ();
+$g->set_trace (1);
+$g->add_domain ($vm, libvirturi => "qemu:///session");
+$g->launch ();
+$g->mount ("/dev/fedora/root", "/");
+
+my @shadow = $g->read_lines ("/etc/shadow");
+s/^root:.*?:/root:$crypted:/ foreach @shadow;
+
+$g->write ("/etc/shadow", join ("\n", @shadow) . "\n");
+$g->chmod (0, "/etc/shadow");
+
+$g->touch ("/.autorelabel");
diff --git a/2013-centos-dojo/6000-libvirt.html b/2013-centos-dojo/6000-libvirt.html
new file mode 100644 (file)
index 0000000..6357886
--- /dev/null
@@ -0,0 +1,16 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Some things you can do with libvirt ...</h1>
+
+<ul>
+<li> cross-hypervisor control of VMs including containers
+<li> remote management
+<li> migration
+<li> storage and network management
+<li> snapshots
+<li> secrets
+<li> handle SANs, iSCSI, gluster
+<li> multiple language bindings
+</ul>
diff --git a/2013-centos-dojo/7000-libguestfs.html b/2013-centos-dojo/7000-libguestfs.html
new file mode 100644 (file)
index 0000000..22be535
--- /dev/null
@@ -0,0 +1,27 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Some things you can do with libguestfs ...</h1>
+
+<div id="twocolumns">
+<ul>
+<li> differences between guests
+<li> sysprep
+<li> add users, change passwords
+<li> security audits
+<li> resize disk images
+<li> creating templates &amp; clone
+<li> sparsify
+<li> monitor
+<li> dump filesystem contents (eg to tar)
+<li> injecting files
+<li> edit single files
+<li> what's in a disk image?
+<li> run stuff at next boot
+<li> edit Windows registry
+<li> edit Linux configuration
+<li> multiple language bindings
+<li> see: <a href="http://libguestfs.org/guestfs-recipes.1.html">guestfs-recipes(1)</a>
+</ul>
+</div>
diff --git a/2013-centos-dojo/8000-openstack.html b/2013-centos-dojo/8000-openstack.html
new file mode 100644 (file)
index 0000000..f7dab04
--- /dev/null
@@ -0,0 +1,13 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Some things you can do with OpenStack ...</h1>
+
+<ul>
+<li> public or private cloud
+<li> self-service
+<li> import from VMware (RHEL 7)
+<li> import from physical machines (RHEL 7)
+<li> heavily backed by Red Hat (~20 developers, top contributor)
+</ul>
diff --git a/2013-centos-dojo/9000-ovirt.html b/2013-centos-dojo/9000-ovirt.html
new file mode 100644 (file)
index 0000000..09abaee
--- /dev/null
@@ -0,0 +1,14 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Some things you can do with oVirt ...</h1>
+
+<ul>
+<li> centralized management
+<li> high availability
+<li> load balancing
+<li> Virtual Desktops (VDI)
+<li> import from VMware (RHEL 6)
+<li> import from physical machines (RHEL 6)
+</ul>
diff --git a/2013-centos-dojo/9900-qanda.html b/2013-centos-dojo/9900-qanda.html
new file mode 100644 (file)
index 0000000..e5f1da5
--- /dev/null
@@ -0,0 +1,44 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>Q &amp; A</h1>
+
+<table width="95%">
+<tr>
+<td valign="top" width="50%">
+<ul>
+<li> <a href="http://libvirt.org">libvirt.org</a>
+<li> <a href="http://libguestfs.org">libguestfs.org</a>
+<li> <a href="http://openstack.org">openstack.org</a>
+<li> <a href="http://openstack.redhat.com">openstack.redhat.com</a>
+<li> <a href="http://ovirt.org">ovirt.org</a>
+</ul>
+
+<p>
+<small>Presentation software:</small> <b>Tech Talk PSE</b>
+</p>
+<p>
+<small>Download the presentation and/or the presentation software from</small>
+<a href="http://git.annexia.org">git.annexia.org</a>
+</p>
+
+</td>
+<td valign="top" width="50%">
+<p>
+Ask me anything about:
+</p>
+<ul>
+<li> virtualization with KVM in CentOS
+<li> libvirt
+<li> libguestfs
+<li> virt-* tools
+<li> virsh
+<li> OpenStack
+<li> oVirt/RHEV-M
+<li> RHEL 7
+<li> &#x2026;
+</ul>
+</td>
+</tr>
+</table>
diff --git a/2013-centos-dojo/README b/2013-centos-dojo/README
new file mode 100644 (file)
index 0000000..b2f6332
--- /dev/null
@@ -0,0 +1,12 @@
+This is a general libvirt/virtualization/libguestfs talk given at the
+2013 CentOS Dojo in Aldershot.
+
+http://wiki.centos.org/Events/Dojo/Aldershot2013
+
+The whole talk is designed to take around 15-20 minutes, with an open
+Q&A about virtualization at the end lasting another 20 minutes.
+
+To run the talk you'll need Tech Talk PSE >= 1.1.0.  If you don't have
+Tech Talk then just open up the HTML slides in a web browser.
+
+To start the talk, use `./run'.
diff --git a/2013-centos-dojo/bashrc b/2013-centos-dojo/bashrc
new file mode 100644 (file)
index 0000000..4c6a3c6
--- /dev/null
@@ -0,0 +1,17 @@
+# -*- shell-script -*-
+
+# Colour ls.
+if [ -f /etc/profile.d/colorls.sh ]; then . /etc/profile.d/colorls.sh; fi
+
+# Fancy prompt colours (see
+# https://wiki.archlinux.org/index.php/Color_Bash_Prompt)
+promptcol='\e[0;32m'      ;# colour for the prompt
+commandcol='\e[1;31m'     ;# colour for the typed command
+outputcol='\e[0m'         ;# colour for command output
+
+export PS1="\n\[$promptcol\]\$ \[$commandcol\]"
+
+trap 'echo -ne "$outputcol"' DEBUG
+
+# Load key bindings (if any).
+bind -f $talkdir/bindings
diff --git a/2013-centos-dojo/centos-bg.png b/2013-centos-dojo/centos-bg.png
new file mode 100644 (file)
index 0000000..afee2f1
Binary files /dev/null and b/2013-centos-dojo/centos-bg.png differ
diff --git a/2013-centos-dojo/centos-logo.png b/2013-centos-dojo/centos-logo.png
new file mode 100644 (file)
index 0000000..90b0b11
Binary files /dev/null and b/2013-centos-dojo/centos-logo.png differ
diff --git a/2013-centos-dojo/cleanup b/2013-centos-dojo/cleanup
new file mode 100755 (executable)
index 0000000..6b7ab33
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash -
+
+virsh destroy dojo
+virsh undefine dojo
+
+rm /tmp/overlay.qcow2
diff --git a/2013-centos-dojo/code.js b/2013-centos-dojo/code.js
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/2013-centos-dojo/functions b/2013-centos-dojo/functions
new file mode 100644 (file)
index 0000000..7baaed0
--- /dev/null
@@ -0,0 +1,40 @@
+# -*- shell-script -*-
+# This creates some standard functions.  See also $talkdir/bashrc
+# which runs in the same bash context as the terminal.
+
+# Place any local environment variables and settings in "local".
+if [ -f local ]; then source local; fi
+
+# Environment variables.
+export HISTFILE=$talkdir/history
+export PATH=$talkdir:$PATH
+export EDITOR="emacs -nw"
+
+# remember <command> <args ...>
+#
+# This function does two things: (1) It adds the command and arguments
+# to the shell history, so that commands can be recalled using up
+# arrow or reverse search.  (2) It makes a function key recall the
+# command.  The first command is assigned to F2, the second to F3 and
+# so forth.
+
+rm -f $HISTFILE
+touch $HISTFILE
+rm -f $talkdir/bindings
+touch bindings
+
+fnum=2
+keys=(- OP OQ OR OS '[15~' '[17~' '[18~' '[19~' '[20~' '[21~')
+
+remember ()
+{
+    echo "$@" >> $HISTFILE
+    echo \"\\e${keys[$fnum]}\":\"\\C-k \\C-u"$@"\" >> $talkdir/bindings
+    ((fnum++))
+}
+
+terminal ()
+{
+    chmod -w $HISTFILE
+    /bin/bash --rcfile $talkdir/bashrc "$@"
+}
diff --git a/2013-centos-dojo/highlight b/2013-centos-dojo/highlight
new file mode 100755 (executable)
index 0000000..e36a1ec
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh -
+source-highlight -s xml -o STDOUT -f esc
diff --git a/2013-centos-dojo/notes.txt b/2013-centos-dojo/notes.txt
new file mode 100644 (file)
index 0000000..d2d4163
--- /dev/null
@@ -0,0 +1,82 @@
+*** BEFORE THE TALK ***
+
+./cleanup
+./run
+
+*** 1000 guests installed on my laptop for testing ***
+
+virsh list .. showing guests
+
+virsh dumpxml ... showing individual guests
+
+XML vs the world?
+
+*** 2000 create an overlay disk ***
+
+Because I don't want to change my test guests ...
+
+Create overlay disk
+  diagram
+
+  qemu-img create -f qcow2 -b /dev/fedora/f18x64 /tmp/f18.qcow2
+  qemu-img info /tmp/f18.qcow2
+  virt-install --import --disk path=/tmp/f18.qcow2,bus=virtio,format=qcow2 -n temp -r 2048
+  virt-viewer --connect qemu:///session temp
+  virsh list
+  virsh dumpxml temp
+
+Run 'shutdown' inside the guest.
+
+  qemu-img info /tmp/f18.qcow2
+#  virsh undefine temp
+
+*** 2200 differences between backing and overlay disk ***
+
+  differences between guests
+
+*** 2300 sysprep overlay disk ***
+
+  sysprep it
+
+*** 2400 set root password ***
+
+  set root password using some perl
+
+*** 6000 Mention some other things we can do with libvirt ... ***
+
+*** 7000 with libguestfs ... ***
+
+*** 8000 with Open Stack ... ***
+
+  mostly equivalent in features to Amazon EC2
+
+*** 9000 with oVirt ... ***
+
+  comparable to Virtual Center
+
+*** 9900 Q&A ***
+
+--- If there are no immediate questions, then:
+
+* How many people are using virtualization at all?
+
+* How many people have virtualized some of their servers?
+
+* How many people are using Amazon EC2 or another public cloud?
+
+* How many people are running a public VPS or public cloud?
+
+* How many people are running a private cloud or cloud-like service
+  within their company?
+
+* How many people are running VMware?
+
+* How many people are running Xen?
+
+* How many people are running KVM?
+
+* What would stop you from moving away from VMware?
+
+* What would stop you from moving to libvirt?
+
+* What would stop you from moving to Open Stack or oVirt?
diff --git a/2013-centos-dojo/redhat.png b/2013-centos-dojo/redhat.png
new file mode 100644 (file)
index 0000000..f50076a
Binary files /dev/null and b/2013-centos-dojo/redhat.png differ
diff --git a/2013-centos-dojo/run b/2013-centos-dojo/run
new file mode 100755 (executable)
index 0000000..666ad7e
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash -
+# Run the talk.
+
+# Avoid GNOME keyring stupidity
+export GNOME_KEYRING_CONTROL=
+export GNOME_KEYRING_PID=
+
+# Clean up everything.
+find -name '*~' -delete
+
+# Get everything into the cache.
+guestfish -a /dev/null run > /dev/null
+
+if [ "`hostname`" = "choo.home.annexia.org" ]; then
+  # SELinux permissive(!)  This is because of a libvirt bug.
+  sudo setenforce Permissive
+
+  # Make sure the disk images are owned by root.disk.
+  sudo chown root.disk /dev/fedora/{archlinux20121201x64,f18*,f20*,ubuntu*,win*}
+fi
+
+# Run techtalk.
+techtalk-pse
diff --git a/2013-centos-dojo/style.css b/2013-centos-dojo/style.css
new file mode 100644 (file)
index 0000000..19f6aa9
--- /dev/null
@@ -0,0 +1,97 @@
+/* Red Hat red is rgb(204,0,0). */
+
+body {
+    background: url(redhat.png) no-repeat;
+    background-position: 98% 0;
+    font-size: 24pt; /* For max */
+    /* font-size: 20pt; */ /* For 1024x768 */
+    /* font-family: liberation, helvetica; */
+    font-family: helvetica;
+}
+
+body td { /* why?? */
+    /*font-size: 28pt;*/
+    font-size: 20pt;
+}
+
+h1 {
+    color: rgb(204,0,0);
+    /*font-size: 48px;*/
+    font-size: 40px;
+    top: 8;
+    left: 0;
+    border-bottom: 2px solid rgb(204,0,0);
+}
+
+b {
+    color: rgb(204,0,0);
+}
+
+/* Title page */
+div#titlepage {
+    margin-top: 100px;
+    text-align: center;
+}
+
+div#titlepage p.title {
+    color: rgb(204,0,0);
+    font-weight: bold;
+    font-size: 48px;
+}
+
+div#titlepage p.subtitle {
+    color: black;
+    font-weight: bold;
+    font-size: 36px;
+}
+
+div#titlepage p.subtitle b {
+    color: rgb(204,0,0);
+    font-weight: bold;
+    font-size: 36px;
+}
+
+div#titlepage author {
+    font-size: 36px;
+}
+
+/* CentOS logo on title page. */
+img#centoslogo {
+  position: absolute;
+  bottom: 25px;
+  left: 76px;
+  background-image: url('centos-bg.png');
+  padding-left: 20px;
+  padding-right: 100px;
+}
+
+/* Multi-column */
+div#twocolumns {
+  -moz-column-count: 2;
+  -webkit-column-count: 2;
+  column-count: 2;
+}
+
+/* Code */
+pre.code {
+    margin-left: 1em;
+    background: #eee;
+}
+
+code {
+    color: rgb(204,0,0);
+}
+
+/* Bullet points */
+li {
+    padding-bottom: 16px;
+}
+
+/* Logo */
+img#fish {
+    position: absolute;
+    top: 128px;
+    right: 32px;
+    width: 200px;
+    /*height: 256px;*/
+}
\ No newline at end of file