diff --git a/doc/source/index.rst b/doc/source/index.rst index 07fa23a..3139339 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -13,6 +13,7 @@ Contents: readme architecture + examples installation usage contributing diff --git a/doc/source/schemas/ceph_ds.yaml b/doc/source/schemas/ceph_ds.yaml new file mode 100644 index 0000000..8b94cf1 --- /dev/null +++ b/doc/source/schemas/ceph_ds.yaml @@ -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") diff --git a/doc/source/schemas/multiple_disk.yaml b/doc/source/schemas/multiple_disk.yaml new file mode 100644 index 0000000..0f0ea97 --- /dev/null +++ b/doc/source/schemas/multiple_disk.yaml @@ -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 diff --git a/doc/source/schemas/simple_os_ds.yaml b/doc/source/schemas/simple_os_ds.yaml new file mode 100644 index 0000000..ad7f437 --- /dev/null +++ b/doc/source/schemas/simple_os_ds.yaml @@ -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 diff --git a/doc/source/schemas/single_disk.yaml b/doc/source/schemas/single_disk.yaml new file mode 100644 index 0000000..95d54ce --- /dev/null +++ b/doc/source/schemas/single_disk.yaml @@ -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