Add examples with schemas
This commit is contained in:
parent
5661ea5945
commit
690018818e
@ -13,6 +13,7 @@ Contents:
|
||||
|
||||
readme
|
||||
architecture
|
||||
examples
|
||||
installation
|
||||
usage
|
||||
contributing
|
||||
|
38
doc/source/schemas/ceph_ds.yaml
Normal file
38
doc/source/schemas/ceph_ds.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
- id: os
|
||||
type: vg
|
||||
contains:
|
||||
- id: swap
|
||||
- id: root
|
||||
|
||||
- id: root
|
||||
type: lv
|
||||
size: 5000
|
||||
mount: /
|
||||
fs_type: ext4
|
||||
|
||||
- id: swap
|
||||
type: lv
|
||||
size: |
|
||||
yaql=let(ram => $.get(ram, 1024)) ->
|
||||
selectCase(
|
||||
$ram <= 2048,
|
||||
$ram > 2048 and $ram < 8192,
|
||||
$ram > 8192 and $ram < 65536).
|
||||
switchCase(
|
||||
$ram * 2,
|
||||
$ram,
|
||||
$ram / 2,
|
||||
4096)
|
||||
fs_type: swap
|
||||
|
||||
- id: ceph
|
||||
type: partition
|
||||
fs_type: ext4
|
||||
min_size: 1000
|
||||
best_with_disks: |
|
||||
yaql=$.disks.where($.type = "hdd").skip(1)
|
||||
|
||||
- id: ceph-journal
|
||||
type: partition
|
||||
best_with_disks: |
|
||||
yaql=$.disks.where($.type = "ssd")
|
31
doc/source/schemas/multiple_disk.yaml
Normal file
31
doc/source/schemas/multiple_disk.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
ram: 1024
|
||||
|
||||
disks:
|
||||
|
||||
- id: sda
|
||||
path: /dev/disk/by-path/path-for-sda
|
||||
dev: /dev/sda
|
||||
type: hdd
|
||||
vendor: Hitachi
|
||||
size: 10000
|
||||
|
||||
- id: sdb
|
||||
path: /dev/disk/by-path/path-for-sdb
|
||||
dev: /dev/sdb
|
||||
type: hdd
|
||||
vendor: Hitachi
|
||||
size: 10000
|
||||
|
||||
- id: sdc
|
||||
path: /dev/disk/by-path/path-for-sdc
|
||||
dev: /dev/sdc
|
||||
type: hdd
|
||||
vendor: Hitachi
|
||||
size: 10000
|
||||
|
||||
- id: sde
|
||||
path: /dev/disk/by-path/path-for-sde
|
||||
dev: /dev/sde
|
||||
type: ssd
|
||||
vendor: Hitachi
|
||||
size: 2048
|
50
doc/source/schemas/simple_os_ds.yaml
Normal file
50
doc/source/schemas/simple_os_ds.yaml
Normal file
@ -0,0 +1,50 @@
|
||||
- id: os
|
||||
type: vg
|
||||
contains:
|
||||
- id: swap
|
||||
- id: root
|
||||
|
||||
- id: root
|
||||
type: lv
|
||||
size: 5000
|
||||
mount: /
|
||||
fs_type: ext4
|
||||
|
||||
- id: swap
|
||||
type: lv
|
||||
size: |
|
||||
yaql=let(ram => $.get(ram, 1024)) ->
|
||||
selectCase(
|
||||
$ram <= 2048,
|
||||
$ram > 2048 and $ram < 8192,
|
||||
$ram > 8192 and $ram < 65536).
|
||||
switchCase(
|
||||
$ram * 2,
|
||||
$ram,
|
||||
$ram / 2,
|
||||
4096)
|
||||
best_with_disks: |
|
||||
yaql=$.disks.where($.type = "ssd")
|
||||
fs_type: swap
|
||||
|
||||
- id: logs
|
||||
type: vg
|
||||
contains:
|
||||
- id: log
|
||||
|
||||
- id: log
|
||||
type: lv
|
||||
mount: /var/log
|
||||
fs_type: ext4
|
||||
size: 1000
|
||||
|
||||
- id: data
|
||||
type: vg
|
||||
contains:
|
||||
- id: data_var_lib
|
||||
|
||||
- id: data_var_lib
|
||||
type: lv
|
||||
fs_type: ext4
|
||||
min: 1000
|
||||
mount: /var/lib
|
9
doc/source/schemas/single_disk.yaml
Normal file
9
doc/source/schemas/single_disk.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
ram: 1024
|
||||
|
||||
disks:
|
||||
- id: sda
|
||||
path: /dev/disk/by-path/path-for-sda
|
||||
dev: /dev/sda
|
||||
type: hdd
|
||||
vendor: Hitachi
|
||||
size: 10000
|
Loading…
Reference in New Issue
Block a user