From c845966dc9a8079ba722026594ca913852069072 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 12 Oct 2019 21:27:57 +0200 Subject: [PATCH] Add sample for ssh keys --- lektor/content/configure/contents.lr | 4 ++ lektor/content/contents.lr | 6 ++- lektor/content/images/contents.lr | 58 ++++++++++++++++++++++++++++ lektor/content/install/contents.lr | 3 +- 4 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 lektor/content/images/contents.lr diff --git a/lektor/content/configure/contents.lr b/lektor/content/configure/contents.lr index 6c6d7a6..64ec3b5 100644 --- a/lektor/content/configure/contents.lr +++ b/lektor/content/configure/contents.lr @@ -29,6 +29,10 @@ The main configuration is **/etc/ucloud/ucloud.json**. documentation](https://python-etcd3.readthedocs.io/en/latest/usage.html) for details. +Example configuration: + + + ## etcd based configuration REFERENCE ### /ucloud-core/ diff --git a/lektor/content/contents.lr b/lektor/content/contents.lr index 5ed8c71..079e4d6 100644 --- a/lektor/content/contents.lr +++ b/lektor/content/contents.lr @@ -20,5 +20,7 @@ Checkout how the [development of ucloud started](https://redmine.ungleich.ch/iss ## Documentation that we are working on right now -* [How to install ucloud](/install) -* [How to configure ucloud](/configure) +* [How to install ucloud](/install) (for sysadmins) +* [How to configure ucloud](/configure) (for sysadmins) +* [How to create / develop images](/images) (for developers, TBD) +* [How to use ucloud](/use) (for users, TBD) diff --git a/lektor/content/images/contents.lr b/lektor/content/images/contents.lr new file mode 100644 index 0000000..45951cc --- /dev/null +++ b/lektor/content/images/contents.lr @@ -0,0 +1,58 @@ +title: Operating System images for ucloud +--- +body: + +**THIS SITE IS UNDER CONSTRUCTION** + +![under construction](/underconstruction.jpg) + +## Introduction + +OS images for ucloud only require two settings: + +* IPv6 auto configuration support +* Using the metadata server for getting SSH keys + +There are further settings that images can or should support. + +## IPv6 auto configuration + +Networking in ucloud requires all OS images to support IPv6. Most +operating systems support IPv6 out of the box, but there might be some +tunings necessary, depending on the operating system. + +Images for ucloud need to assign themselves addresses using +**router advertisements** as described in +[RFC 4862](https://tools.ietf.org/html/rfc4862). + +Additionally they need to support setting DNS servers +based on router advertisements as described in +[RFC 6106](https://tools.ietf.org/html/rfc6106). + +## Metadata support + +On boot an image needs to be configured to allow access. For this +purpose, ucloud supports using a meta data server. The meta data +server is reachable by HTTP and can be resolved using DNS. + +The following sections list the available meta data. + +### SSH keys + +The keys that are configured by the user to access the booted OS can +be accessed on **http://metadata/ssh-keys**. A Unix alike OS could use +this information similar to the following code snippet: + +``` +tmp=$(mktemp) +curl http://metadata/ssh-keys > "${tmp}" + +# Ensure directory exists +mkdir -p ~/.ssh + +# Merge them +cat ~/.ssh/authorized_keys >> "${tmp}" + +# Create unique list of keys +sort "${tmp}" | uniq > ~/.ssh/authorized_keys +``` diff --git a/lektor/content/install/contents.lr b/lektor/content/install/contents.lr index f3220ab..866c2b7 100644 --- a/lektor/content/install/contents.lr +++ b/lektor/content/install/contents.lr @@ -64,6 +64,5 @@ python main.py ### ucloud-scheduler ``` -git clone https://code.ungleich.ch/ucloud/ucloud-api - +git clone https://code.ungleich.ch/ucloud/ucloud-scheduler ```