Compare commits

..

No commits in common. "wip" and "master" have entirely different histories.
wip ... master

16 changed files with 28 additions and 401 deletions

1
.gitignore vendored
View File

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

View File

@ -1,17 +0,0 @@
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,9 +1,3 @@
## ucloud docs
Are stored in lektor/ and use
[lektor](https://www.getlektor.com/).
## ucloud flows
Stuff that we want to do with ucloud
@ -32,7 +26,7 @@ digraph{
ucloudsomething->cephcluster [ label=" Link/copy image "]
cephcluster -> { ceph1, ceph2, ceph3}
}
```
@ -43,7 +37,7 @@ digraph{
digraph {
subgraph g1 {
node [ shape="box"]
user [ label="User" shape="circle"]
user -> cli [ label=" uses "]
@ -55,14 +49,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
}
}
```
@ -86,7 +80,7 @@ digraph {
```graphviz
digraph {
node [ shape="box"];
subgraph cluster_etcd {
etcd
}
@ -96,13 +90,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"]
}
@ -148,7 +142,7 @@ digraph {
label="Create VM with ucloud"
cli->api->etcd->ucloudnetwork;
}
```
@ -156,14 +150,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"]
@ -174,27 +168,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;
}
}
```
@ -207,12 +201,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;
@ -228,7 +222,7 @@ digraph {
label="Router";
radvd;
}
}
```
@ -265,7 +259,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,15 +1,8 @@
# 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 [here](https://account.ungleich.ch).
1. You need to have an Account at [accounts.ungleich.ch](https://account.ungleich.ch). If you don't have it create one.
2. Login and click on **SHOW SEEDS** button. On the next page it will show you your seed mentioned next to your user realm.
@ -17,31 +10,24 @@ For more details, See [Lets challenge OpenStack and OpenNebula](https://ungleich
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-setup` git repository.
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.
```bash
git clone https://code.ungleich.ch/ucloud/ucloud-setup.git
git clone https://code.ungleich.ch/ungleich-public/ucloud-cli.git
```
2. Change your directory to recently cloned repository.
```bash
cd ucloud-setup
cd ucloud-cli
```
3. Install dependencies of `ucloud-setup`
3. Install dependencies of `ucloud-cli`
```bash
pipenv install
```
4. Execute the following command to install ucloud
4. Activate `ucloud-cli`
```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
```
6. Run the following command to ensure that you have successfully installed `ucloud-cli`
5. Run the following command to ensure that you have successfully installed `ucloud-cli`
```bash
python ucloud.py
```

View File

@ -1,42 +0,0 @@
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

@ -1,7 +0,0 @@
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

@ -1,52 +0,0 @@
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

@ -1,26 +0,0 @@
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

@ -1,61 +0,0 @@
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

@ -1,68 +0,0 @@
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.

Before

Width:  |  Height:  |  Size: 29 KiB

View File

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

View File

@ -1,45 +0,0 @@
<!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

@ -1,15 +0,0 @@
{% 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

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

View File

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