Add examples with schemas

This commit is contained in:
Evgeniy L 2016-01-14 18:27:37 +03:00
parent 5661ea5945
commit 690018818e
5 changed files with 129 additions and 0 deletions

View File

@ -13,6 +13,7 @@ Contents:
readme
architecture
examples
installation
usage
contributing

View 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")

View 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

View 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

View 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