Add sample for ssh keys

This commit is contained in:
Nico Schottelius 2019-10-12 21:27:57 +02:00
parent 6f711d69ae
commit c845966dc9
4 changed files with 67 additions and 4 deletions

View file

@ -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/

View file

@ -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)

View file

@ -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
```

View file

@ -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
```