diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a2198dd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +ucloud-docs-build/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f4389d6 --- /dev/null +++ b/Makefile @@ -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) diff --git a/README.md b/README.md index 2d7e5a9..3a78faa 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lektor/assets/static/style.css b/lektor/assets/static/style.css new file mode 100644 index 0000000..7ff6e0b --- /dev/null +++ b/lektor/assets/static/style.css @@ -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; +} diff --git a/lektor/content/about/contents.lr b/lektor/content/about/contents.lr new file mode 100644 index 0000000..9edb4d5 --- /dev/null +++ b/lektor/content/about/contents.lr @@ -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. diff --git a/lektor/content/contents.lr b/lektor/content/contents.lr new file mode 100644 index 0000000..710f83f --- /dev/null +++ b/lektor/content/contents.lr @@ -0,0 +1,6 @@ +title: Welcome to ucloud! +--- +body: + +This is a basic demo website that shows how to use Lektor for a basic +website with some pages. diff --git a/lektor/content/projects/contents.lr b/lektor/content/projects/contents.lr new file mode 100644 index 0000000..f3658c6 --- /dev/null +++ b/lektor/content/projects/contents.lr @@ -0,0 +1,9 @@ +title: Projects +--- +body: + +This is a list of the projects: + +* Project 1 +* Project 2 +* Project 3 diff --git a/lektor/models/page.ini b/lektor/models/page.ini new file mode 100644 index 0000000..dcddfe8 --- /dev/null +++ b/lektor/models/page.ini @@ -0,0 +1,11 @@ +[model] +name = Page +label = {{ this.title }} + +[fields.title] +label = Title +type = string + +[fields.body] +label = Body +type = markdown diff --git a/lektor/templates/layout.html b/lektor/templates/layout.html new file mode 100644 index 0000000..6ffefd1 --- /dev/null +++ b/lektor/templates/layout.html @@ -0,0 +1,28 @@ + + + +{% block title %}Welcome{% endblock %} — ucloud + +
+

ucloud

+ +
+
+ {% block body %}{% endblock %} +
+ + diff --git a/lektor/templates/macros/pagination.html b/lektor/templates/macros/pagination.html new file mode 100644 index 0000000..077cc5a --- /dev/null +++ b/lektor/templates/macros/pagination.html @@ -0,0 +1,15 @@ +{% macro render_pagination(pagination) %} + +{% endmacro %} diff --git a/lektor/templates/page.html b/lektor/templates/page.html new file mode 100644 index 0000000..0430577 --- /dev/null +++ b/lektor/templates/page.html @@ -0,0 +1,6 @@ +{% extends "layout.html" %} +{% block title %}{{ this.title }}{% endblock %} +{% block body %} +

{{ this.title }}

+ {{ this.body }} +{% endblock %} diff --git a/lektor/ucloud.lektorproject b/lektor/ucloud.lektorproject new file mode 100644 index 0000000..bbf7c99 --- /dev/null +++ b/lektor/ucloud.lektorproject @@ -0,0 +1,2 @@ +[project] +name = ucloud