Skip to content

Commit 8e53416

Browse files
committed
add mkdocs
1 parent 8b71b19 commit 8e53416

13 files changed

Lines changed: 1342 additions & 40 deletions

File tree

.github/workflows/markdownlint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
fix: true
11+
globs: |
12+
*.md
13+
!test/*.md

.markdownlint.yaml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
default: false
2+
3+
# MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md001.md
4+
MD001: true
5+
6+
# MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md003.md
7+
MD003:
8+
style: "consistent"
9+
10+
# MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md004.md
11+
MD004:
12+
style: "consistent"
13+
14+
# MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md005.md
15+
MD005: true
16+
17+
# MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md007.md
18+
MD007:
19+
indent: 4
20+
21+
# MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md009.md
22+
MD009: true
23+
24+
# MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md010.md
25+
MD010: true
26+
27+
# MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md011.md
28+
MD011: true
29+
30+
# MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md012.md
31+
MD012: true
32+
33+
# MD013/line-length Line length https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md013.md
34+
MD013: false
35+
36+
# MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md014.md
37+
MD014: true
38+
39+
# MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md018.md
40+
MD018: true
41+
42+
# MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md019.md
43+
MD019: true
44+
45+
# MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md020.md
46+
MD020: true
47+
48+
# MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md021.md
49+
MD021: true
50+
51+
# MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md022.md
52+
MD022: true
53+
54+
# MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md023.md
55+
MD023: true
56+
57+
# MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md024.md
58+
MD024:
59+
siblings_only: true
60+
61+
# MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md025.md
62+
MD025: true
63+
64+
# MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md026.md
65+
MD026: true
66+
67+
# MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md027.md
68+
MD027: true
69+
70+
# MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md028.md
71+
MD028: true
72+
73+
# MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md029.md
74+
MD029:
75+
style: "ordered"
76+
77+
# MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md030.md
78+
MD030:
79+
ul_single: 1
80+
ol_single: 1
81+
ul_multi: 3
82+
ol_multi: 2
83+
84+
# MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md031.md
85+
MD031: true
86+
87+
# MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md032.md
88+
MD032: true
89+
90+
# MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md034.md
91+
MD034: true
92+
93+
# MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md035.md
94+
MD035: true
95+
96+
# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md036.md
97+
MD036: true
98+
99+
# MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md037.md
100+
MD037: true
101+
102+
# MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md038.md
103+
MD038: true
104+
105+
# MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md039.md
106+
MD039: true
107+
108+
# MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md040.md
109+
MD040: true
110+
111+
# MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md042.md
112+
MD042: true
113+
114+
# MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md045.md
115+
MD045: true
116+
117+
# MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md046.md
118+
MD046:
119+
style: "fenced"
120+
121+
# MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md047.md
122+
MD047: true
123+
124+
# MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md048.md
125+
MD048:
126+
style: "backtick"
127+
128+
# MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md049.md
129+
MD049:
130+
style: "asterisk"
131+
132+
# MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md050.md
133+
MD050:
134+
style: "consistent"
135+
136+
# MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md051.md
137+
MD051: true
138+
139+
# MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md053.md
140+
MD053: true
141+
142+
# MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md054.md
143+
MD054: true
144+
145+
# MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md055.md
146+
MD055:
147+
style: "no_leading_or_trailing"
148+
149+
# MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md056.md
150+
MD056: true

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ The Genesis Core is an open source software that offers a one turnkey solution t
1111

1212
Refer to the [wiki](https://github.com/infraguys/genesis_core/wiki) for more detailed information.
1313

14-
15-
# 📦 Installation
14+
# 📦 Installation
1615

1716
There are several ways to install Genesis Core and depend on your purpose you can choose one of them.
1817

1918
## Try it out
19+
2020
**NOTE: Under development**
2121

2222
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.
@@ -29,6 +29,7 @@ In a case you would like to run Genesis Core on your own infrastructure, you can
2929
# 🚀 Development
3030

3131
**Ubuntu:**
32+
3233
```bash
3334
sudo apt-get install build-essential python3.12-dev python3.12-venv \
3435
libev-dev libvirt-dev curl
@@ -38,6 +39,7 @@ uv tool install tox --with tox-uv
3839
```
3940

4041
**Fedora:**
42+
4143
```bash
4244
sudo dnf install gcc libev-devel libvirt-devel curl
4345
curl -LsSf https://astral.sh/uv/install.sh | sh
@@ -55,6 +57,7 @@ source .tox/develop/bin/activate
5557
Follow the development guide [here](https://github.com/infraguys/genesis_core/wiki/DevelopmentGuide) for more details.
5658

5759
# ⚙️ Tests
60+
5861
**NOTE:** Python version 3.12 is supposed to be used, but you can use other versions
5962

6063
```bash
@@ -82,12 +85,11 @@ export HS256_KEY="secret"
8285
- Genesis SDK is a set of tools for developing Genesis elements. You can find it [here](https://github.com/infraguys/gcl_sdk).
8386
- 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).
8487

85-
8688
# 💡 Contributing
8789

8890
Contributing to the project is highly appreciated! However, some rules should be followed for successful inclusion of new changes in the project:
91+
8992
- All changes should be done in a separate branch.
9093
- Changes should include not only new functionality or bug fixes, but also tests for the new code.
9194
- 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.
9295
- Changes can be merged only after receiving an approve from one of the project maintainers.
93-

docs/.gitkeep

Whitespace-only changes.

docs/element_manager/service.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ The Service resource provides a REST-based API for creating and managing systemd
5555
### Service
5656

5757
The main service entity that manages:
58+
5859
- **Status**: NEW, IN_PROGRESS, ACTIVE, ERROR
5960
- **Target Status**: enabled, disabled
6061
- **Name**: Service identifier (alphanumeric, underscores, hyphens)
@@ -63,12 +64,12 @@ The main service entity that manages:
6364

6465
### Service Types
6566

66-
| Type | Description | Use Case |
67-
|------|-------------|----------|
68-
| `simple` | Regular service with configurable instance count | Long-running services like web servers |
69-
| `oneshot` | One-time execution service | Initialization scripts, migrations |
70-
| `monopoly` | Only one instance across all nodes | Singleton services like schedulers |
71-
| `monopoly_oneshot` | One-time execution, only one instance | One-time initialization tasks |
67+
| Type | Description | Use Case |
68+
|--------------------|--------------------------------------------------|----------------------------------------|
69+
| `simple` | Regular service with configurable instance count | Long-running services like web servers |
70+
| `oneshot` | One-time execution service | Initialization scripts, migrations |
71+
| `monopoly` | Only one instance across all nodes | Singleton services like schedulers |
72+
| `monopoly_oneshot` | One-time execution, only one instance | One-time initialization tasks |
7273

7374
### Target Types
7475

@@ -79,9 +80,9 @@ The main service entity that manages:
7980

8081
Services can define dependencies that run before or after the main service:
8182

82-
- **CmdShell**: Execute a shell command
83-
- `command`: The shell command to execute
84-
- **ServiceTarget** (TBD): Reference another service for ordering (currently disabled, service relationships are being reworked)
83+
- **CmdShell**: Execute a shell command
84+
- `command`: The shell command to execute
85+
- **ServiceTarget** (TBD): Reference another service for ordering (currently disabled, service relationships are being reworked)
8586

8687
## API Structure
8788

@@ -227,25 +228,30 @@ Services can define dependencies that run before or after the main service:
227228
## Validation Rules
228229

229230
### Service Name Validation
231+
230232
- Must match regex `^[A-Za-z0-9_-]{0,100}$`
231233
- Alphanumeric characters, underscores, and hyphens only
232234
- Maximum 100 characters
233235

234236
### Path Validation
237+
235238
- Required field
236239
- Minimum 1 character, maximum 255 characters
237240
- Should be an absolute path to executable
238241

239242
### Target Validation
243+
240244
- Must specify either `node` or `node_set` target
241245
- Target node/node_set must exist
242246

243247
### Service Type Validation
248+
244249
- Must be one of: `simple`, `oneshot`, `monopoly`, `monopoly_oneshot`
245250
- `simple` and `monopoly` types support `count` parameter
246251
- `monopoly` types enforce count=1 across all nodes
247252

248253
### Dependency Validation
254+
249255
- `before` and `after` are required arrays (can be empty)
250256
- Each dependency must have a valid `kind`: `shell` or `service`
251257
- Shell dependencies require a `command` field
@@ -382,9 +388,11 @@ resources:
382388
## Permissions
383389

384390
The Service resource uses the following IAM policies:
391+
385392
- **Service**: `em.service`
386393

387394
Available actions:
395+
388396
- `create`: Create new services
389397
- `read`: View service details
390398
- `update`: Modify existing services

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: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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+
# 📦 Installation
12+
13+
There are several ways to install Genesis Core and depend on your purpose you can choose one of them.
14+
15+
## Try it out
16+
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+
30+
```bash
31+
sudo apt-get install build-essential python3.12-dev python3.12-venv \
32+
tox libev-dev libvirt-dev
33+
```
34+
35+
**Fedora:**
36+
37+
```bash
38+
sudo dnf install tox gcc libev-devel libvirt-devel
39+
```
40+
41+
Initialize virtual environment:
42+
43+
```bash
44+
tox -e develop
45+
source .tox/develop/bin/activate
46+
```
47+
48+
Follow the development guide [here](https://github.com/infraguys/genesis_core/wiki/DevelopmentGuide) for more details.
49+
50+
# ⚙️ Tests
51+
52+
**NOTE:** Python version 3.12 is supposed to be used, but you can use other versions
53+
54+
```bash
55+
# Unit tests
56+
tox -e py312
57+
58+
# Functional tests
59+
tox -e py312-functional
60+
```
61+
62+
## Functional tests environment
63+
64+
To run functional tests, export the following environment variables:
65+
66+
```bash
67+
export DATABASE_URI="postgresql://genesis_core:genesis_core@127.0.0.1:5432/genesis_core"
68+
export ADMIN_PASSWORD="admin"
69+
export DEFAULT_CLIENT_SECRET="GenesisCoreSecret"
70+
export GLOBAL_SALT="FOy/2kwwdn0ig1QOq7cestqe"
71+
export HS256_KEY="secret"
72+
```
73+
74+
# 🔗 Related projects
75+
76+
- Genesis SDK is a set of tools for developing Genesis elements. You can find it [here](https://github.com/infraguys/gcl_sdk).
77+
- 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).
78+
79+
# 💡 Contributing
80+
81+
Contributing to the project is highly appreciated! However, some rules should be followed for successful inclusion of new changes in the project:
82+
83+
- All changes should be done in a separate branch.
84+
- Changes should include not only new functionality or bug fixes, but also tests for the new code.
85+
- 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.
86+
- Changes can be merged only after receiving an approve from one of the project maintainers.

0 commit comments

Comments
 (0)