Compare commits

...

13 Commits
master ... wip

Author SHA1 Message Date
Nico Schottelius 5dae663343 ++ umask 2019-10-12 21:42:08 +02:00
Nico Schottelius c845966dc9 Add sample for ssh keys 2019-10-12 21:27:57 +02:00
Nico Schottelius 6f711d69ae add path to /ucloud-core 2019-10-12 19:20:25 +02:00
Nico Schottelius f6dd2a8e43 ++ main link 2019-10-12 19:16:33 +02:00
Nico Schottelius c0b16fbb45 Begin documenation for configuration 2019-10-12 19:13:36 +02:00
Nico Schottelius 7e4e2f0a22 begin adding doc for ucloud-pay 2019-10-12 18:40:08 +02:00
Nico Schottelius 97f80e4f0c ++ notes for arch linux 2019-10-12 18:12:53 +02:00
Nico Schottelius 5ded2ea11c ++ update 2019-10-12 17:16:06 +02:00
Nico Schottelius b9bbdb6a9b Add a small introduction 2019-10-10 18:46:54 +02:00
Nico Schottelius 32e59d667f begin install part 2019-10-10 18:39:15 +02:00
Nico Schottelius 0e9bdc0a6f add basic lektor project 2019-10-10 18:27:42 +02:00
ahmadbilalkhalid b38c49022a a 2019-09-17 14:00:43 +05:00
ahmadbilalkhalid 3e0f99b4d0 a 2019-09-16 22:20:03 +05:00
16 changed files with 401 additions and 28 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
ucloud-docs-build/

17
Makefile Normal file
View File

@ -0,0 +1,17 @@
BUILDDIR=ucloud-docs-build
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/ucloud/
all: publish
pull:
git pull
publish: pull build permissions
rsync -av --exclude .lektor/ $(BUILDDIR)/ $(DESTINATION)
permissions: build
find $(BUILDDIR) -type f -exec chmod 0644 {} \;
find $(BUILDDIR) -type d -exec chmod 0755 {} \;
build:
cd lektor && lektor build -O ../$(BUILDDIR)

View File

@ -1,3 +1,9 @@
## ucloud docs
Are stored in lektor/ and use
[lektor](https://www.getlektor.com/).
## ucloud flows
Stuff that we want to do with ucloud
@ -26,7 +32,7 @@ digraph{
ucloudsomething->cephcluster [ label=" Link/copy image "]
cephcluster -> { ceph1, ceph2, ceph3}
}
```
@ -37,7 +43,7 @@ digraph{
digraph {
subgraph g1 {
node [ shape="box"]
user [ label="User" shape="circle"]
user -> cli [ label=" uses "]
@ -49,14 +55,14 @@ digraph {
api -> uotp [label="Verify token [2]" dir="both"]
api -> etcd [label="Create (VM Entry and \nA Request to Schedule VM) [3]"];
}
subgraph cluster_otp {
uotp [shape="diamond" label="ungleich otp"]
}
subgraph cluster_etcd {
etcd
}
}
```
@ -80,7 +86,7 @@ digraph {
```graphviz
digraph {
node [ shape="box"];
subgraph cluster_etcd {
etcd
}
@ -90,13 +96,13 @@ digraph {
host -> start_vm [label="[9]"]
start_vm
}
start_vm -> etcd [label=" Set VM Status to Running"]
start_vm -> ceph_cluster [label=" If VM isn't created already then Copy VM's base image\n to uservms pool and rename it to match VM's uuid [9a]"]
ceph_cluster -> start_vm [label="VM Created [9b]"]
start_vm -> ceph_cluster [label="Start VM [10]"]
subgraph cluster_ceph {
ceph_cluster [label="CEPH Cluster"]
}
@ -142,7 +148,7 @@ digraph {
label="Create VM with ucloud"
cli->api->etcd->ucloudnetwork;
}
```
@ -150,14 +156,14 @@ digraph {
* Network is usable for user directly
* When VM is started, network might be created on host
* Status: 90% done,
* Status: 90% done,
```graphviz
digraph {
label="Create VM with ucloud"
cli;
createnetwork [ label="Create VXLAN on device, create bridge"]
createonhost [ label="Create VM on host"]
@ -168,27 +174,27 @@ digraph {
ucloudhost->ucloudhost [ label="Wait until network exists"]
ucloudnetwork->etcd [ label="Check for new networks"]
ucloudhost->createonhost [ label="Create VM in network(s)"]
ucloudnetwork->network [ label="Check whether network exists locally"]
network->createnetwork [ label="no"];
network->noop [ label="yes"]
subgraph cluster_anywhere {
api
etcd
}
subgraph cluster_host {
ucloudhost;
ucloudnetwork;
host;
network;
createnetwork;
createnetwork;
createonhost;
noop;
}
}
```
@ -201,12 +207,12 @@ Extending the flow from the case for managing networks
digraph {
label="Create VM with ucloud"
newvxlan [ label="Assign new VXLAN ID"]
newnet [ label="Assign new /64 IPv6 network"]
needsnet [ label="Needs IPAM?"]
radvd [ label="Create RA instance (radvd)"]
etcd->ucloudnetworkmanager [ label="New network requests"]
ucloudnetworkmanager->newvxlan;
newvxlan->needsnet;
@ -222,7 +228,7 @@ digraph {
label="Router";
radvd;
}
}
```
@ -259,7 +265,7 @@ We can use this case as a base for development. We might add VM migration (w/ co
## From zero to fully functional ucloud cluster (ceph, production)
```bash=
# We assume that the ceph configuration files are already in place
# We assume that the ceph configuration files are already in place
# i.e under /etc/ceph/
// Only needed on alpine linux

View File

@ -1,8 +1,15 @@
# ucloud User Guide
## Introduction
After years of using OpenNebula, we've seen its beauty, and also its limitations. We couldnt do everything we wanted with OpenNebula because of its limits, and we were often questioned if we should go for Openstack. As a team of curious and open geeks, we had a look at Openstack - and it looked HUGE, or in other words: very complex. We are UNIX company and we adhere to KISS, so it looked like not really compatible with our philosophy of how we do things.
In general what we want is something easy, portable, light, and simple.
For more details, See [Lets challenge OpenStack and OpenNebula](https://ungleich.ch/en-us/cms/blog/2019/06/24/lets-challenge-openstack-and-opennebula/)
## Pre-requisite
1. You need to have an Account at [accounts.ungleich.ch](https://account.ungleich.ch). If you don't have it create one.
1. You need to have an Account at [accounts.ungleich.ch](https://account.ungleich.ch). If you don't have it create one [here](https://account.ungleich.ch).
2. Login and click on **SHOW SEEDS** button. On the next page it will show you your seed mentioned next to your user realm.
@ -10,24 +17,31 @@
To install `ucloud-cli` you need to execute the following commands. Make sure you have [Python 3.7](https://www.python.org/) and [pipenv](https://pypi.org/project/pipenv/) installed.
1. Clone `ucloud-cli` git repository. `ucloud-cli` is needed to talk with ucloud backend i.e create/deleteTO_BE_/start/stop VM, attach network to VM etc.
1. Clone `ucloud-setup` git repository.
```bash
git clone https://code.ungleich.ch/ungleich-public/ucloud-cli.git
git clone https://code.ungleich.ch/ucloud/ucloud-setup.git
```
2. Change your directory to recently cloned repository.
```bash
cd ucloud-cli
cd ucloud-setup
```
3. Install dependencies of `ucloud-cli`
3. Install dependencies of `ucloud-setup`
```bash
pipenv install
```
4. Activate `ucloud-cli`
4. Execute the following command to install ucloud
```bash
pipenv run python ucloud-setup.py cli setup --path ../ --api_server $api_server_url --name $username --realm $realm --seed $seed
```
It will setup ucloud in the parent directory of `ucloud-setup`
5. Go to `ucloud-cli`
```bash
cd ../ucloud-cli
pipenv install
pipenv shell
```
5. Run the following command to ensure that you have successfully installed `ucloud-cli`
6. Run the following command to ensure that you have successfully installed `ucloud-cli`
```bash
python ucloud.py
```

View File

@ -0,0 +1,42 @@
body {
font-family: 'Verdana', sans-serif;
margin: 50px 25px;
}
a {
color: #2a99b6;
}
a:hover {
color: #33bbdf;
}
header, footer, div.page {
width: 760px;
margin: 0 auto;
background: #daeef3;
padding: 20px 30px;
}
header h1 {
color: #169bbd;
margin: 0;
font-weight: normal;
font-size: 42px;
}
header nav ul {
list-style: none;
margin: 0;
padding: 0;
}
header nav ul li {
display: inline;
margin: 0 8px 0 0;
padding: 0;
}
div.page {
background: #f1fbfe;
}

View File

@ -0,0 +1,7 @@
title: About this Website
---
body:
This is a website that was made with the Lektor quickstart.
And it does not contain a lot of information.

View File

@ -0,0 +1,52 @@
title: How to configure ucloud
---
body:
**THIS SITE IS UNDER CONSTRUCTION**
![under construction](/underconstruction.jpg)
## Introduction
In ucloud **etcd** is the main storage backend. All ucloud components
need to be able to access etcd.!
## Base configuration
The main configuration is **/etc/ucloud/ucloud.json**.
```
{
"etcd": {
...
}
}
```
* The etcd
object contains the host, port and other configurations. Lookup
the [python-etcd3
documentation](https://python-etcd3.readthedocs.io/en/latest/usage.html)
for details.
Example configuration:
## etcd based configuration REFERENCE
### /ucloud-core/
Contains:
* OTP_SERVER=https://the-otp-server/ungleichotp/
* OTP_AUTH_NAME=xxxxxxxx
* OTP_AUTH_SEED=xxxxxxxx
* OTP_AUTH_REALM=xxxxxxxx
(needs to be modified to fit etcd format / maybe json?)
### /ucloud-pay/stripe-private-key
Contains the private key for communication with stripe.

View File

@ -0,0 +1,26 @@
title: Welcome to ucloud!
---
body:
## Introduction
ucloud is an easy to use cloud management system. It allows you to
create, schedule, migrate and destroy virtual machines.
It is an alternative to
[OpenStack](https://www.openstack.org/),
[OpenNebula](https://opennebula.org/) or
[Cloudstack](https://cloudstack.apache.org/).
ucloud is the first cloud management system that
puts **IPv6 first**. ucloud also has an integral **ordering** process
that we missed in existing solutions.
Checkout how the [development of ucloud started](https://redmine.ungleich.ch/issues/6869).
## Documentation that we are working on right now
* [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,61 @@
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:
```
# Thanks to @LeahNeukirchen
umask 077
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

@ -0,0 +1,68 @@
title: How to install ucloud
---
body:
**THIS SITE IS UNDER CONSTRUCTION**
![under construction](/underconstruction.jpg)
## Introduction
To operate ucloud, you need the following components:
* etcd: an easy to use, distributed data base
* uotp: an easy to use **o**ne **t**ime **p**assword implementation
* ucloud-api: allows to communicate with ucloud and is the only public
entrance point
* ucloud-scheduler: schedules VMs to hosts
* ucloud-pay: ordering/billing handling
## Installation steps for system requirements
### etcd
The installation and configuration of a production grade etcd cluster
is out of scope of this manual. For testing purposes, you can just
install etcd and run it as follows:
```
etcd
```
Arch Linux:
Install etcd from AUR, for instance via yaourt:
```
yaourt -S etcd
```
### pipenv
Arch Linux:
```
sudo pacman -Syu python-pipenv
```
## Installation steps for ucloud components
### uotp
TBD
### ucloud-api
```
git clone https://code.ungleich.ch/ucloud/ucloud-api
cd ucloud-api
pipenv install
pipenv shell
python main.py
```
### ucloud-scheduler
```
git clone https://code.ungleich.ch/ucloud/ucloud-scheduler
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

11
lektor/models/page.ini Normal file
View File

@ -0,0 +1,11 @@
[model]
name = Page
label = {{ this.title }}
[fields.title]
label = Title
type = string
[fields.body]
label = Body
type = markdown

View File

@ -0,0 +1,45 @@
<!doctype html>
<head>
<!-- Google analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-62285904-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<meta charset="utf-8">
<link rel="stylesheet" href="{{ '/static/style.css'|url }}">
<title>{% block title %}Welcome{% endblock %} — ucloud</title>
</head>
<body>
<header>
<h1>ucloud</h1>
<nav>
<ul class="nav navbar-nav">
<li{% if this._path == '/' %} class="active"{% endif
%}><a href="{{ '/'|url }}">Welcome</a></li>
{% for href, title in [
['/install', 'Installation'],
['/configure', 'Configuration']
] %}
<li{% if this.is_child_of(href) %} class="active"{% endif
%}><a href="{{ href|url }}">{{ title }}</a></li>
{% endfor %}
</ul>
</nav>
</header>
<div class="page">
{% block body %}{% endblock %}
</div>
<footer>
&copy; Copyright by ungleich.
</footer>
</body>

View File

@ -0,0 +1,15 @@
{% macro render_pagination(pagination) %}
<div class="pagination">
{% if pagination.has_prev %}
<a href="{{ pagination.prev|url }}">&laquo; Previous</a>
{% else %}
<span class="disabled">&laquo; Previous</span>
{% endif %}
| {{ pagination.page }} |
{% if pagination.has_next %}
<a href="{{ pagination.next|url }}">Next &raquo;</a>
{% else %}
<span class="disabled">Next &raquo;</span>
{% endif %}
</div>
{% endmacro %}

View File

@ -0,0 +1,6 @@
{% extends "layout.html" %}
{% block title %}{{ this.title }}{% endblock %}
{% block body %}
<h2>{{ this.title }}</h2>
{{ this.body }}
{% endblock %}

View File

@ -0,0 +1,2 @@
[project]
name = ucloud