Remove rkt tutorials, docs, and scripts

* rkt achieved its mission creating the OCI standard,
pluggable runtimes, and prevented Docker world
domination. We can now proceed with disarmament
* Few, if any, developers still use rkt locally
This commit is contained in:
Dalton Hubble
2019-10-06 22:22:10 -07:00
parent 0b56acf884
commit a0b24a9596
14 changed files with 23 additions and 262 deletions

View File

@@ -8,14 +8,12 @@ set -u
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
EXAMPLE=${2:-}
# Local Container Runtime (docker or rkt)
# Local Container Runtime (docker)
CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-docker}"
BRIDGE=metal0
ASSETS_DIR="${ASSETS_DIR:-$PWD/examples/assets}"
CONFIG_DIR="${CONFIG_DIR:-$PWD/examples/etc/matchbox}"
COREOS_CHANNEL=stable
COREOS_VERSION=1967.3.0
MATCHBOX_ARGS=""
if [ "$EUID" -ne 0 ]
@@ -49,7 +47,6 @@ function usage {
function create {
case "$CONTAINER_RUNTIME" in
"rkt") rkt_create;;
"docker") docker_create;;
*) docker_create;;
esac
@@ -57,7 +54,6 @@ function create {
function status {
case "$CONTAINER_RUNTIME" in
"rkt") rkt_status;;
"docker") docker_status;;
*) docker_status;;
esac
@@ -65,92 +61,11 @@ function status {
function destroy {
case "$CONTAINER_RUNTIME" in
"rkt") rkt_destroy;;
"docker") docker_destroy;;
*) docker_destroy;;
esac
}
function rkt_check {
# SELinux, if present, it cannot be in Enforcing mode
if [ $(getenforce) == 'Enforcing' ]; then
echo "SELinux must be in permissive mode: 'setenforce Permissive'"
exit 1
fi
if [ ! -d $ASSETS_DIR/coreos/$COREOS_VERSION ]; then
echo "Most examples use CoreOS $COREOS_CHANNEL $COREOS_VERSION. You may wish to download it with './scripts/get-coreos $COREOS_CHANNEL $COREOS_VERSION'."
fi
}
function rkt_create {
rkt_check
if [ -z "$EXAMPLE" ]; then
echo "Starting matchbox"
else
echo "Starting matchbox configured to boot $EXAMPLE"
fi
if [ -z "$EXAMPLE" ]; then
# Mount a data volume with assets and enable gRPC
MATCHBOX_ARGS="-rpc-address=0.0.0.0:8081"
DATA_MOUNT="--volume data,kind=host,source=$(mktemp -d) \
--mount volume=assets,target=/var/lib/matchbox/assets \
--volume assets,kind=host,source=$ASSETS_DIR,readOnly=true"
else
# Mount the given EXAMPLE
DATA_MOUNT="--volume data,kind=host,source=$PWD/examples \
--mount volume=groups,target=/var/lib/matchbox/groups \
--volume groups,kind=host,source=$DIR/../examples/groups/$EXAMPLE \
--mount volume=assets,target=/var/lib/matchbox/assets \
--volume assets,kind=host,source=$ASSETS_DIR,readOnly=true"
fi
rkt rm --uuid-file=/var/run/matchbox-pod.uuid > /dev/null 2>&1
systemd-run --unit=dev-matchbox \
rkt run \
--uuid-file-save=/var/run/matchbox-pod.uuid \
--trust-keys-from-https \
--net=metal0:IP=172.18.0.2 \
--mount volume=config,target=/etc/matchbox \
--volume config,kind=host,source=$CONFIG_DIR,readOnly=true \
--mount volume=data,target=/var/lib/matchbox \
$DATA_MOUNT \
quay.io/poseidon/matchbox:v0.8.0 -- -address=0.0.0.0:8080 -log-level=debug $MATCHBOX_ARGS
echo "Starting dnsmasq to provide DHCP/TFTP/DNS services"
rkt rm --uuid-file=/var/run/dnsmasq-pod.uuid > /dev/null 2>&1
systemd-run --unit=dev-dnsmasq \
rkt run \
--uuid-file-save=/var/run/dnsmasq-pod.uuid \
--trust-keys-from-https \
--net=metal0:IP=172.18.0.3 \
--dns=host \
--mount volume=config,target=/etc/dnsmasq.conf \
--volume config,kind=host,source=$DIR/../contrib/dnsmasq/metal0.conf \
quay.io/poseidon/dnsmasq:f4623c508ff3fbc467285de1ede61126624b91ac \
--caps-retain="CAP_NET_ADMIN,CAP_NET_BIND_SERVICE"
status
}
function rkt_status {
echo ""
systemctl status dev-matchbox --lines=0 --no-pager
systemctl status dev-dnsmasq --lines=0 --no-pager
echo ""
echo "Use 'systemctl status dev-matchbox' or 'systemctl status dev-dnsmasq' to check individual statuses."
echo "Use 'journalctl -f -u dev-matchbox', etc. to tail the logs."
}
function rkt_destroy {
rkt stop --uuid-file=/var/run/matchbox-pod.uuid
rkt stop --uuid-file=/var/run/dnsmasq-pod.uuid
systemctl reset-failed dev-matchbox > /dev/null 2>&1
systemctl reset-failed dev-dnsmasq > /dev/null 2>&1
}
function docker_create {
if [ -z "$EXAMPLE" ]; then
echo "Starting matchbox"