From 4a32b0cd59b9f063f072f447111d99ff31992f78 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Mon, 23 Oct 2017 13:49:09 -0700 Subject: [PATCH] scripts: Switch default tutorial from rkt to docker --- Documentation/getting-started-docker.md | 12 +++++----- Documentation/getting-started-rkt.md | 5 ++-- README.md | 16 ++++++------- scripts/dev/build-aci | 32 ------------------------- scripts/devnet | 2 +- scripts/libvirt | 2 +- 6 files changed, 19 insertions(+), 50 deletions(-) delete mode 100755 scripts/dev/build-aci diff --git a/Documentation/getting-started-docker.md b/Documentation/getting-started-docker.md index 17dd2b56..4388acb4 100644 --- a/Documentation/getting-started-docker.md +++ b/Documentation/getting-started-docker.md @@ -48,14 +48,13 @@ Run the `matchbox` and `dnsmasq` services on the `docker0` bridge. `dnsmasq` wil The `devnet` convenience script can start these services and accepts the name of any example cluster in [examples](../examples). ```sh -$ export CONTAINER_RUNTIME=docker -$ sudo -E ./scripts/devnet create etcd3 +$ sudo ./scripts/devnet create etcd3 ``` Inspect the logs. ``` -$ sudo -E ./scripts/devnet status +$ sudo ./scripts/devnet status ``` Take a look at the [etcd3 groups](../examples/groups/etcd3) to get an idea of how machines are mapped to Profiles. Explore some endpoints exposed by the service, say for QEMU/KVM node1. @@ -78,13 +77,14 @@ $ sudo docker run --name dnsmasq --cap-add=NET_ADMIN -v $PWD/contrib/dnsmasq/doc Create QEMU/KVM VMs which have known hardware attributes. The nodes will be attached to the `docker0` bridge, where Docker containers run. ```sh -$ sudo ./scripts/libvirt create-docker +$ sudo ./scripts/libvirt create ``` -You can connect to the serial console of any node. If you provisioned nodes with an SSH key, you can SSH after bring-up. +You can connect to the serial console of any node (ctrl+] to exit). If you provisioned nodes with an SSH key, you can SSH after bring-up. ```sh $ sudo virsh console node1 +$ ssh core@node1.example.com ``` You can also use `virt-manager` to watch the console. @@ -115,7 +115,7 @@ $ etcdctl get /message Clean up the containers and VM machines. ```sh -$ sudo -E ./scripts/devnet destroy +$ sudo ./scripts/devnet destroy $ sudo ./scripts/libvirt destroy ``` diff --git a/Documentation/getting-started-rkt.md b/Documentation/getting-started-rkt.md index 43299dd1..12905d1a 100644 --- a/Documentation/getting-started-rkt.md +++ b/Documentation/getting-started-rkt.md @@ -129,13 +129,14 @@ $ sudo rkt gc --grace-period=0 Create QEMU/KVM VMs which have known hardware attributes. The nodes will be attached to the `metal0` bridge, where your pods run. ```sh -$ sudo ./scripts/libvirt create +$ sudo ./scripts/libvirt create-rkt ``` -You can connect to the serial console of any node. If you provisioned nodes with an SSH key, you can SSH after bring-up. +You can connect to the serial console of any node (ctrl+] to exit). If you provisioned nodes with an SSH key, you can SSH after bring-up. ```sh $ sudo virsh console node1 +$ ssh core@node1.example.com ``` You can also use `virt-manager` to watch the console. diff --git a/README.md b/README.md index 77b33253..29338a09 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ * [Profiles](Documentation/matchbox.md#profiles) * [Groups](Documentation/matchbox.md#groups) * Config Templates - * [Container Linux Config][cl-config] - * [Cloud-Config][cloud-config] + * [Container Linux Config][cl-config] + * [Cloud-Config][cloud-config] * [Configuration](Documentation/config.md) * [HTTP API](Documentation/api.md) / [gRPC API](https://godoc.org/github.com/coreos/matchbox/matchbox/client) * [Background: Machine Lifecycle](Documentation/machine-lifecycle.md) @@ -17,17 +17,17 @@ ### Installation * Installation - * Installing on [Container Linux / other distros](Documentation/deployment.md) - * Installing on [Kubernetes](Documentation/deployment.md#kubernetes) - * Running with [rkt](Documentation/deployment.md#rkt) / [docker](Documentation/deployment.md#docker) + * Installing on [Container Linux / other distros](Documentation/deployment.md) + * Installing on [Kubernetes](Documentation/deployment.md#kubernetes) + * Running with [rkt](Documentation/deployment.md#rkt) / [docker](Documentation/deployment.md#docker) * [Network Setup](Documentation/network-setup.md) ### Tutorials -* [Getting Started](Documentation/getting-started.md) - provision Container Linux machines (beginner) +* [Getting Started](Documentation/getting-started.md) - provision physical machines with Container Linux * Local QEMU/KVM - * [matchbox with rkt](Documentation/getting-started-rkt.md) - * [matchbox with Docker](Documentation/getting-started-docker.md) + * [matchbox with Docker](Documentation/getting-started-docker.md) + * [matchbox with rkt](Documentation/getting-started-rkt.md) * Clusters * [etcd3](Documentation/getting-started-rkt.md) - Install a 3-node etcd3 cluster * [Kubernetes](Documentation/bootkube.md) - Install a 3-node Kubernetes v1.8.1 cluster diff --git a/scripts/dev/build-aci b/scripts/dev/build-aci deleted file mode 100755 index 1420f03b..00000000 --- a/scripts/dev/build-aci +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -set -e - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -GIT_SHA=$($DIR/git-version) - -# Start with an empty ACI -acbuild --debug begin - -# In the event of the script exiting, end the build -trap "{ export EXT=$?; acbuild --debug end && exit $EXT; }" EXIT - -# Name the ACI -acbuild --debug set-name coreos.com/matchbox - -# Add a version label -acbuild --debug label add version $GIT_SHA - -# Add alpine base dependency -acbuild --debug dep add quay.io/coreos/alpine-sh - -# Copy the static binary -acbuild --debug copy bin/matchbox /matchbox - -# Add a port for HTTP traffic -acbuild --debug port add www tcp 8080 - -# Set the exec command -acbuild --debug set-exec -- /matchbox - -# Save and overwrite any older matchbox ACI -acbuild --debug write --overwrite matchbox.aci diff --git a/scripts/devnet b/scripts/devnet index b1f8587c..902033b1 100755 --- a/scripts/devnet +++ b/scripts/devnet @@ -9,7 +9,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" EXAMPLE=${2:-} # Local Container Runtime (docker or rkt) -CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-rkt}" +CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-docker}" BRIDGE=metal0 ASSETS_DIR="${ASSETS_DIR:-$PWD/examples/assets}" CONFIG_DIR="${CONFIG_DIR:-$PWD/examples/etc/matchbox}" diff --git a/scripts/libvirt b/scripts/libvirt index 5c3ba434..5e99f085 100755 --- a/scripts/libvirt +++ b/scripts/libvirt @@ -11,7 +11,7 @@ fi function main { case "$1" in - "create") create_rkt;; + "create") create_docker;; "create-docker") create_docker;; "create-rkt") create_rkt;; "create-uefi") create_uefi;;