Skip to content

Commit e544f37

Browse files
committed
add mkdocs
1 parent 8b71b19 commit e544f37

9 files changed

Lines changed: 1129 additions & 3 deletions

File tree

.github/workflows/markdownlint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on: [push, pull_request]
2+
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-24.04
6+
steps:
7+
- uses: actions/checkout@v6
8+
- uses: DavidAnson/markdownlint-cli2-action@v22
9+
with:
10+
globs: |
11+
*.md
12+
!test/*.md

docs/.gitkeep

Whitespace-only changes.

docs/faq.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: FAQ
3+
---
4+
5+
# FAQ

docs/index.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Genesis Core
3+
---
4+
5+
Welcome to Genesis Core!
6+
7+
The Genesis Core is an open source software that offers a one turnkey solution to deal with infrastructure at all levels - from bare metal and virtual machines to applications and services.
8+
9+
Refer to the [wiki](https://github.com/infraguys/genesis_core/wiki) for more detailed information.
10+
11+
12+
# 📦 Installation
13+
14+
There are several ways to install Genesis Core and depend on your purpose you can choose one of them.
15+
16+
## Try it out
17+
**NOTE: Under development**
18+
19+
If you want to try Genesis Core in a few minutes, download the `all-in-one` [stand](https://github.com/infraguys/gci_dev_all_in_one). It's a ready-to-go virtual machine image with preinstalled Genesis Core and ability to get full functionality such as creating inner(nested) virtual machines, installation elements and many others.
20+
This stand may be used for development purposes as well if you are focusing on a new element development.
21+
22+
## Basic usage
23+
24+
In a case you would like to run Genesis Core on your own infrastructure, you can use the [basic guide](https://github.com/infraguys/genesis_core/wiki/BasicUsage) for more details.
25+
26+
# 🚀 Development
27+
28+
**Ubuntu:**
29+
```bash
30+
sudo apt-get install build-essential python3.12-dev python3.12-venv \
31+
tox libev-dev libvirt-dev
32+
```
33+
34+
**Fedora:**
35+
```bash
36+
sudo dnf install tox gcc libev-devel libvirt-devel
37+
```
38+
39+
Initialize virtual environment:
40+
41+
```bash
42+
tox -e develop
43+
source .tox/develop/bin/activate
44+
```
45+
46+
Follow the development guide [here](https://github.com/infraguys/genesis_core/wiki/DevelopmentGuide) for more details.
47+
48+
# ⚙️ Tests
49+
**NOTE:** Python version 3.12 is supposed to be used, but you can use other versions
50+
51+
```bash
52+
# Unit tests
53+
tox -e py312
54+
55+
# Functional tests
56+
tox -e py312-functional
57+
```
58+
59+
## Functional tests environment
60+
61+
To run functional tests, export the following environment variables:
62+
63+
```bash
64+
export DATABASE_URI="postgresql://genesis_core:genesis_core@127.0.0.1:5432/genesis_core"
65+
export ADMIN_PASSWORD="admin"
66+
export DEFAULT_CLIENT_SECRET="GenesisCoreSecret"
67+
export GLOBAL_SALT="FOy/2kwwdn0ig1QOq7cestqe"
68+
export HS256_KEY="secret"
69+
```
70+
71+
# 🔗 Related projects
72+
73+
- Genesis SDK is a set of tools for developing Genesis elements. You can find it [here](https://github.com/infraguys/gcl_sdk).
74+
- Genesis DevTools it's a set oftools to manager life cycle of genesis projects. You can find it [here](https://github.com/infraguys/genesis_devtools).
75+
76+
77+
# 💡 Contributing
78+
79+
Contributing to the project is highly appreciated! However, some rules should be followed for successful inclusion of new changes in the project:
80+
- All changes should be done in a separate branch.
81+
- Changes should include not only new functionality or bug fixes, but also tests for the new code.
82+
- After the changes are completed and **tested**, a Pull Request should be created with a clear description of the new functionality. And add one of the project maintainers as a reviewer.
83+
- Changes can be merged only after receiving an approve from one of the project maintainers.

docs/onepager.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: 🧩 Genesis Core
3+
---
4+

mkdocs.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
site_name: genesis_core
2+
site_url: https://github.com/infraguys/
3+
repo_name: genesis_core
4+
repo_url: https://github.com/infraguys/genesis_core
5+
edit_uri: browse/docs/
6+
7+
theme:
8+
name: material
9+
language: ru
10+
features:
11+
- search.suggest
12+
- search.highlight
13+
- navigation.tabs
14+
- toc.integrate
15+
palette:
16+
- scheme: default
17+
toggle:
18+
icon: material/lightbulb-outline
19+
name: Switch to dark mode
20+
- scheme: slate
21+
toggle:
22+
icon: material/lightbulb
23+
name: Switch to light mode
24+
25+
plugins:
26+
- search:
27+
lang:
28+
- en
29+
- ru
30+
- glightbox
31+
32+
extra:
33+
repo_icon: github
34+
35+
markdown_extensions:
36+
- meta
37+
- admonition
38+
- footnotes
39+
- attr_list
40+
- codehilite:
41+
guess_lang: false
42+
- toc:
43+
slugify: !!python/name:pymdownx.slugs.uslugify
44+
permalink: '#'
45+
- pymdownx.arithmatex
46+
- pymdownx.betterem:
47+
smart_enable: all
48+
- pymdownx.keys
49+
- pymdownx.emoji:
50+
emoji_index: !!python/name:pymdownx.emoji.gemoji
51+
emoji_generator: !!python/name:pymdownx.emoji.to_svg
52+
- pymdownx.caret
53+
- pymdownx.critic
54+
- pymdownx.details
55+
- pymdownx.inlinehilite
56+
- pymdownx.magiclink
57+
- pymdownx.mark
58+
- pymdownx.smartsymbols
59+
- pymdownx.superfences:
60+
preserve_tabs: true
61+
custom_fences:
62+
- name: mermaid
63+
class: mermaid
64+
format: !!python/name:pymdownx.superfences.fence_code_format
65+
- pymdownx.tasklist:
66+
custom_checkbox: true
67+
- pymdownx.tilde
68+
- pymdownx.tabbed:
69+
alternate_style: true
70+
71+
nav:
72+
- Software:
73+
- Общее: index.md
74+
- Лендинг: onepager.md
75+
- Network:
76+
- Load Balancer as a Service API: network/load_balancer.md
77+
- Service:
78+
- Service as a Service API: element_manager/service.md
79+
- FAQ: faq.md

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ ruff = [
7676
shellcheck = [
7777
"shellcheck-py",
7878
]
79+
docs = [
80+
"mkdocs-material==9.1.0",
81+
"mkdocs-glightbox",
82+
]
7983

8084
[tool.ruff]
8185
exclude = [

tox.ini

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,22 @@ commands = ruff check .
4343
extras =
4444
ruff
4545
runner = uv-venv-lock-runner
46-
commands = ruff format
46+
commands =
47+
ruff format
48+
ruff check .
4749

4850
[testenv:mypy]
4951
extras =
5052
mypy
5153
runner = uv-venv-lock-runner
5254
commands = mypy -p genesis_core
5355

56+
[testenv:docs]
57+
extras =
58+
docs
59+
runner = uv-venv-lock-runner
60+
commands = mkdocs serve --dev-addr 0.0.0.0:8181 --livereload
61+
5462
[testenv:develop]
5563
runner = uv-venv-lock-runner
5664
extras =

0 commit comments

Comments
 (0)