diff options
author | alexv-smirnov <alexv-smirnov@yandex-team.ru> | 2022-02-25 21:29:49 +0300 |
---|---|---|
committer | alexv-smirnov <alexv-smirnov@yandex-team.ru> | 2022-02-25 21:29:49 +0300 |
commit | 9913f35e87c0e8e0d4a766c3754036e1f13a1615 (patch) | |
tree | 163be7a7ee6d9ddf5e8f5a2ee3971daa7b02cabb | |
parent | c1469a8822602f9675da49468a019175f34bc756 (diff) | |
download | ydb-9913f35e87c0e8e0d4a766c3754036e1f13a1615.tar.gz |
local_binary deployment scripts and configs
ref:6e316508c30303466d70fa3ce5b71d180eee7305
-rw-r--r-- | ydb/deploy/local_binary/cfg_disk.yaml | 83 | ||||
-rw-r--r-- | ydb/deploy/local_binary/cfg_ram.yaml | 83 | ||||
-rw-r--r-- | ydb/deploy/local_binary/exclude_err.txt | 3 | ||||
-rw-r--r-- | ydb/deploy/local_binary/start.sh | 43 | ||||
-rw-r--r-- | ydb/deploy/local_binary/stop.sh | 1 |
5 files changed, 213 insertions, 0 deletions
diff --git a/ydb/deploy/local_binary/cfg_disk.yaml b/ydb/deploy/local_binary/cfg_disk.yaml new file mode 100644 index 0000000000..a7012b25c1 --- /dev/null +++ b/ydb/deploy/local_binary/cfg_disk.yaml @@ -0,0 +1,83 @@ +static_erasure: none +host_configs: +- drive: + - path: ydb.data + type: SSD + host_config_id: 1 +hosts: +- host: localhost + host_config_id: 1 + port: 19001 + walle_location: + body: 1 + data_center: '1' + rack: '1' +domains_config: + domain: + - name: Root + storage_pool_types: + - kind: ssd + pool_config: + box_id: 1 + erasure_species: none + kind: ssd + pdisk_filter: + - property: + - type: SSD + vdisk_kind: Default + state_storage: + - ring: + node: + - 1 + nto_select: 1 + ssid: 1 +actor_system_config: + executor: + - name: System + spin_threshold: 0 + threads: 2 + type: BASIC + - name: User + spin_threshold: 0 + threads: 3 + type: BASIC + - name: Batch + spin_threshold: 0 + threads: 2 + type: BASIC + - name: IO + threads: 1 + time_per_mailbox_micro_secs: 100 + type: IO + - name: IC + spin_threshold: 10 + threads: 1 + time_per_mailbox_micro_secs: 100 + type: BASIC + scheduler: + progress_threshold: 10000 + resolution: 256 + spin_threshold: 0 +blob_storage_config: + service_set: + groups: + - erasure_species: none + rings: + - fail_domains: + - vdisk_locations: + - node_id: 1 + path: ydb.data + pdisk_category: SSD +channel_profile_config: + profile: + - channel: + - erasure_species: none + pdisk_category: 0 + storage_pool_kind: ssd + - erasure_species: none + pdisk_category: 0 + storage_pool_kind: ssd + - erasure_species: none + pdisk_category: 0 + storage_pool_kind: ssd + profile_id: 0 diff --git a/ydb/deploy/local_binary/cfg_ram.yaml b/ydb/deploy/local_binary/cfg_ram.yaml new file mode 100644 index 0000000000..e58913297e --- /dev/null +++ b/ydb/deploy/local_binary/cfg_ram.yaml @@ -0,0 +1,83 @@ +static_erasure: none +host_configs: +- drive: + - path: SectorMap:1:64 + type: SSD + host_config_id: 1 +hosts: +- host: localhost + host_config_id: 1 + port: 19001 + walle_location: + body: 1 + data_center: '1' + rack: '1' +domains_config: + domain: + - name: Root + storage_pool_types: + - kind: ssd + pool_config: + box_id: 1 + erasure_species: none + kind: ssd + pdisk_filter: + - property: + - type: SSD + vdisk_kind: Default + state_storage: + - ring: + node: + - 1 + nto_select: 1 + ssid: 1 +actor_system_config: + executor: + - name: System + spin_threshold: 0 + threads: 2 + type: BASIC + - name: User + spin_threshold: 0 + threads: 3 + type: BASIC + - name: Batch + spin_threshold: 0 + threads: 2 + type: BASIC + - name: IO + threads: 1 + time_per_mailbox_micro_secs: 100 + type: IO + - name: IC + spin_threshold: 10 + threads: 1 + time_per_mailbox_micro_secs: 100 + type: BASIC + scheduler: + progress_threshold: 10000 + resolution: 256 + spin_threshold: 0 +blob_storage_config: + service_set: + groups: + - erasure_species: none + rings: + - fail_domains: + - vdisk_locations: + - node_id: 1 + path: SectorMap:1:64 + pdisk_category: SSD +channel_profile_config: + profile: + - channel: + - erasure_species: none + pdisk_category: 1 + storage_pool_kind: ssd + - erasure_species: none + pdisk_category: 1 + storage_pool_kind: ssd + - erasure_species: none + pdisk_category: 1 + storage_pool_kind: ssd + profile_id: 0 diff --git a/ydb/deploy/local_binary/exclude_err.txt b/ydb/deploy/local_binary/exclude_err.txt new file mode 100644 index 0000000000..1cafcc6670 --- /dev/null +++ b/ydb/deploy/local_binary/exclude_err.txt @@ -0,0 +1,3 @@ +No Keys in KeyConfig! Encrypted group DsProxies will not start +No Keys in PDiskKeyConfig! Encrypted pdisks will not start +GRpc memory quota temporarily disabled due to issues with grpc quoter
\ No newline at end of file diff --git a/ydb/deploy/local_binary/start.sh b/ydb/deploy/local_binary/start.sh new file mode 100644 index 0000000000..052518717d --- /dev/null +++ b/ydb/deploy/local_binary/start.sh @@ -0,0 +1,43 @@ +if [[ $1 != "disk" && $1 != "ram" ]]; then + echo Please specify 'disk' or 'ram' as the parameter + exit +fi +if [[ $1 = "disk" ]]; then + if [ ! -f ydb.data ]; then + echo Data file ydb.data not found, creating ... + fallocate -l 64G ydb.data + if [[ $? -ge 1 ]]; then + echo Error creating data file + exit + fi + fi + cfg=cfg_disk.yaml +else + cfg=cfg_ram.yaml +fi +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pwd`/ydbd-master-linux-amd64/lib" +echo Starting storage process... +./ydbd-master-linux-amd64/bin/ydbd server --yaml-config ./$cfg --node 1 --grpc-port 2135 --ic-port 19001 --mon-port 8765 --log-file-name node_storage.log > node_storage_run.log 2>node_storage_err.log & +sleep 3 +grep node_storage_err.log -v -f exclude_err.txt +if [[ $? -eq 0 ]]; then + echo Errors found when starting storage process, cancelling start script + exit +fi +echo Initializing storage ... +./ydbd-master-linux-amd64/bin/ydbd admin blobstorage config init --yaml-file ./$cfg > init_storage.log 2>&1 +echo Registering database ... +./ydbd-master-linux-amd64/bin/ydbd admin database /Root/test create ssd:1 > database_create.log 2>&1 +if [[ $? -ge 1 ]]; then + echo Errors found when registering database, cancelling start script + exit +fi +echo Starting database process... +./ydbd-master-linux-amd64/bin/ydbd server --yaml-config ./$cfg --tenant /Root/test --node-broker localhost:2135 --grpc-port 31001 --ic-port 31003 --mon-port 31002 --log-file-name node_db.log > node_db_run.log 2>node_db_err.log & +sleep 3 +grep node_db_err.log -v -f exclude_err.txt +if [[ $? -eq 0 ]]; then + echo Errors found when starting database process, cancelling start script + exit +fi +echo Database started diff --git a/ydb/deploy/local_binary/stop.sh b/ydb/deploy/local_binary/stop.sh new file mode 100644 index 0000000000..f3d50e22aa --- /dev/null +++ b/ydb/deploy/local_binary/stop.sh @@ -0,0 +1 @@ +ps -aux | grep "./ydbd-master-linux-amd64/bin/ydbd server" | grep -v "grep" | awk '{print $2}' | while read line;do kill $line;done
\ No newline at end of file |