summaryrefslogtreecommitdiffstats
path: root/share/doc/asciicast/introduction.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-06-19 09:49:36 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-07-01 09:31:10 +0000
commit6296de521aa94e5516268087e8414def33688819 (patch)
tree6e3878e2a86485398541085a89309de6a4cc8a76 /share/doc/asciicast/introduction.sh
parentAlways writing cnt.auto= default values to configuration files in debconf con... (diff)
downloadcompute-tools-6296de521aa94e5516268087e8414def33688819.tar.xz
compute-tools-6296de521aa94e5516268087e8414def33688819.zip
Adding asciicast introduction.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'share/doc/asciicast/introduction.sh')
-rwxr-xr-xshare/doc/asciicast/introduction.sh136
1 files changed, 136 insertions, 0 deletions
diff --git a/share/doc/asciicast/introduction.sh b/share/doc/asciicast/introduction.sh
new file mode 100755
index 0000000..148231d
--- /dev/null
+++ b/share/doc/asciicast/introduction.sh
@@ -0,0 +1,136 @@
+#!/bin/sh
+
+# container-tools - Manage systemd-nspawn containers
+# Copyright (C) 2014-2016 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+# Usage: sudo asciinema -c ./introduction.sh
+
+PS1="root@debian:~#"
+
+Command ()
+{
+ COMMAND="${@}"
+
+ echo
+ echo -n "${PS1} "
+ echo "${COMMAND}"
+
+ ${COMMAND}
+
+ echo "${PS1}"
+ echo
+ sleep 2
+}
+
+Text ()
+{
+ TEXT="${@}"
+
+ echo "${TEXT}"
+ sleep 2
+}
+
+# Content
+
+sleep 2
+
+Text "# Welcome to this container-tools introduction cast."
+echo
+echo
+
+Text "# 1. We're using Debian ($(lsb_release -cs))..."
+
+Command "lsb_release -a"
+
+Text "# ...and container-tools version $(cnt version)."
+
+Command "cnt version"
+
+
+Text "# 2. Let's list all available containers."
+Text "#"
+Text "# Note: there are no containers yet."
+
+Command "sudo cnt list"
+
+
+Text "# 3. Let's create an example container."
+Text "#"
+Text "# Note: creating containers with the simple debootstrap"
+Text "# container create script is slow as it doesn't cache anything."
+Text "# Using the advanced debconf container create script for"
+Text "# fast, automated, and reproducible setup of complex containers"
+Text "# will be covered in a subsequent screencast."
+Text "#"
+Text "# Note: we're using a custom mirror here and"
+Text "# a custom root password, see container-create-debootstrap(1)"
+Text "# for more information about these options."
+
+Command "sudo cnt create -n example.net -s debootstrap -- -d sid -m http://ftp.ch.debian.org/debian -p debian"
+
+
+Text "# 4. Let's list all available containers."
+Text "#"
+Text "# Note: there's one container now."
+
+Command "sudo cnt list"
+
+
+Text "# 5. Let's start the example container."
+
+Command "sudo cnt start -n example.net"
+
+
+Text "# 6. Let's check if the container was started."
+
+Command "sudo cnt list"
+
+
+Text "# 7. Let's stop the example container."
+
+Command "sudo cnt stop -n example.net"
+
+
+Text "# 8. Let's check if the container was stopped."
+
+Command "sudo cnt list"
+
+
+Text "# 9. Let's remove the example container."
+
+Command "sudo cnt remove -f -n example.net"
+
+
+Text "# 10. Let's check if the container was removed."
+
+Command "sudo cnt list"
+
+
+echo
+echo
+Text "# This concludes this introduction to container-tools."
+Text "#"
+Text "# Thanks for watching and have fun setting up"
+Text "# your own Linux containers based on systemd-nspawn"
+Text "# using container-tools from Open Infrastructure:"
+Text "#"
+Text "# https://open-infrastructure.net/software/container-tools"
+
+sleep 2
+
+exit 0