diff options
author | alextarazanov <alextarazanov@yandex-team.com> | 2022-08-11 07:13:51 +0300 |
---|---|---|
committer | alextarazanov <alextarazanov@yandex-team.com> | 2022-08-11 07:13:51 +0300 |
commit | 365880f102bebf3ad8a04ae773998b81615467db (patch) | |
tree | 99b5d3d1c6e2d2358a8a4dd01b367f70d6e53af3 | |
parent | f095e6c29c19517a7e255160085c765d76fc9673 (diff) | |
download | ydb-365880f102bebf3ad8a04ae773998b81615467db.tar.gz |
[review] Check translate Minimum storage size in different use-cases
6 files changed, 215 insertions, 224 deletions
diff --git a/ydb/docs/en/core/_includes/storage-device-requirements.md b/ydb/docs/en/core/_includes/storage-device-requirements.md index 7b81b49aad6..91fc6ada035 100644 --- a/ydb/docs/en/core/_includes/storage-device-requirements.md +++ b/ydb/docs/en/core/_includes/storage-device-requirements.md @@ -1,11 +1,9 @@ -It is recommended to use physical disks (not virtual of any kind) as block devices with more than 800GB capacity for efficiency. +For YDB to work efficiently, we recommend using physical (not virtual) disks larger than 800 GB as block devices. -Minimal disk capacity must be at least 80 GB. It is recommended to use such disks only for testing, proper functioning is not guaranteed. - -Configurations with storage devices less than 800 GB are supposed for introductory purposes. +The minimum disk size must be at least 80 GB, otherwise the node won't be able to use the block store volume. Correct and uninterrupted operation with minimum-size disks is not guaranteed. We recommend using such disks exclusively for informational purposes. {% note warning %} -Configurations with storage devices smaller than 800 GB or virtual storage devices must not be used for services in production or for performance benchmarks. +Configurations with disks less than 800 GB or any types of storage system virtualization cannot be used for production services or system performance testing. {% endnote %} diff --git a/ydb/docs/en/core/cluster/system-requirements.md b/ydb/docs/en/core/cluster/system-requirements.md index 7b3d52715c8..5920601df5a 100644 --- a/ydb/docs/en/core/cluster/system-requirements.md +++ b/ydb/docs/en/core/cluster/system-requirements.md @@ -20,10 +20,12 @@ The number of servers and disks is determined by the fault-tolerance requirement A {{ ydb-short-name }} server can run on servers with any disk type (HDD/SSD/NVMe). However, we recommend using SSD/NVMe disks for better performance. - The minimum disk size must be at least 80 GB, otherwise the node won't be able to use the block store volume. Correct and uninterrupted operation with minimum-size disks is not guaranteed. We recommend using such disks exclusively for testing purposes. For YDB to work efficiently, we recommend using disks larger than 800 GB as block devices. + {% include [_includes/storage-device-requirements.md](../_includes/storage-device-requirements.md) %} {{ ydb-short-name }} does not use a file system to store data and accesses disk volumes directly. Don't mount a file system or perform other operations with a partition that uses {{ ydb-short-name }}. We also do not recommend sharing the block device with other processes because this can lead to significant performance degradation. + {{ ydb-short-name }} health and performance weren't tested on any types of virtual or network storage devices. + ## Software configuration {#software} A {{ ydb-short-name }} server can run on servers with Linux kernel 4.4 or higher. diff --git a/ydb/docs/en/core/deploy/manual/deploy-ydb-on-premises.md b/ydb/docs/en/core/deploy/manual/deploy-ydb-on-premises.md index ab8c2b0adb5..7bec6fd2453 100644 --- a/ydb/docs/en/core/deploy/manual/deploy-ydb-on-premises.md +++ b/ydb/docs/en/core/deploy/manual/deploy-ydb-on-premises.md @@ -1,38 +1,36 @@ -# Deploy YDB On-Premises +# Deploying a YDB cluster on virtual or physical servers This document describes how to deploy a multi-tenant YDB cluster on multiple servers. -## Before you start {#before-start} +## Before you begin {#before-start} ### Prerequisites {#requirements} Make sure you have SSH access to all servers. This is necessary to install artifacts and run the YDB binary file. Your network configuration must allow TCP connections on the following ports (by default): - * 2135, 2136: GRPC for client-cluster interaction. -* 19001, 19002 - Interconnect for intra-cluster node interaction. +* 19001, 19002: Interconnect for intra-cluster node interaction. * 8765, 8766: The HTTP interface for cluster monitoring. <!--Check out the [Production checklist](../production_checklist.md) and the recommended cluster topology;--> -Select the servers and disks to be used for data storage: +Select the servers and disks for storing data: -* Use the `block-4-2` fault tolerance model for cluster deployment in one availability zone (AZ). To survive the loss of 2 nodes, use at least 8 nodes. +* Use the `block-4-2 `fault tolerance model for cluster deployment in one availability zone (AZ). To survive the loss of 2 nodes, use at least 8 nodes. * Use the `mirror-3-dc` fault tolerance model for cluster deployment in three availability zones (AZ). To survive the loss of 1 AZ and 1 node in another AZ, use at least 9 nodes. The number of nodes in each AZ should be the same. Run each static node on a separate server. -## Create a system user and a group to run {{ ydb-short-name }} under {#create-user} +For more information about hardware requirements, see [{#T}](../../cluster/system-requirements.md). +## Create a system user and a group to run {{ ydb-short-name }} under {#create-user} On each server where YDB will be running, execute: - ```bash sudo groupadd ydb sudo useradd ydb -g ydb ``` To make sure the {{ ydb-short-name }} server has access to block store disks to run, add the user to start the process under to the disk group. - ```bash sudo usermod -aG disk ydb ``` @@ -47,7 +45,6 @@ We don't recommend using disks that are used by other processes (including the O {% include [_includes/storage-device-requirements.md](../../_includes/storage-device-requirements.md) %} - 1. Create a partition on the selected disk {% note alert %} @@ -64,11 +61,12 @@ sudo parted /dev/nvme0n1 name 1 ydb_disk_ssd_01 sudo partx --u /dev/nvme0n1 ``` -As a result, a disk labeled as `/dev/disk/by-partlabel/ydb_disk_ssd_01` will appear in the system. +As a result, a disk labeled `/dev/disk/by-partlabel/ydb_disk_ssd_01` will appear in the system. + If you plan to use more than one disk on each server, specify a label that is unique for each of them instead of `ydb_disk_ssd_01`. You'll need to use these disks later in the configuration files. -Download an archive with the `ydbd` executable file and the libraries necessary for working with YDB: +Download and unpack an archive with the `ydbd` executable file and the libraries necessary for working with {{ ydb-short-name }}: ```bash mkdir ydbd-stable-linux-amd64 @@ -83,7 +81,6 @@ sudo chown -R ydb:ydb /opt/ydb ``` 3. Copy the binary file, libraries, and configuration file to the appropriate directories: - ```bash sudo cp -i ydbd-stable-linux-amd64/bin/ydbd /opt/ydb/bin/ sudo cp -i ydbd-stable-linux-amd64/lib/libaio.so /opt/ydb/lib/ @@ -92,11 +89,9 @@ sudo cp -i ydbd-stable-linux-amd64/lib/libidn.so /opt/ydb/lib/ ``` 3. Format the disk with the built-in command - ```bash sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib /opt/ydb/bin/ydbd admin bs disk obliterate /dev/disk/by-partlabel/ydb_disk_ssd_01 ``` - Perform this operation for each disk that will be used for data storage. Prepare the configuration files: @@ -105,104 +100,101 @@ Prepare the configuration files: - Unprotected mode - In this mode, traffic between cluster nodes and between client and cluster uses an unencrypted connection. Use this mode for testing purposes. + In this mode, traffic between cluster nodes and between client and cluster uses an unencrypted connection. Use this mode for testing purposes. - {% include [prepare-configs.md](_includes/prepare-configs.md) %} + {% include [prepare-configs.md](_includes/prepare-configs.md) %} - Save the {{ ydb-short-name }} configuration file as `/opt/ydb/cfg/config.yaml` + Save the {{ ydb-short-name }} configuration file as `/opt/ydb/cfg/config.yaml` - Protected mode - In this mode, traffic between cluster nodes and between the client and cluster is encrypted using the TLS protocol. - - {% include [generate-ssl.md](_includes/generate-ssl.md) %} + In this mode, traffic between cluster nodes and between the client and cluster is encrypted using the TLS protocol. - Create directories for certificates on each node + {% include [generate-ssl.md](_includes/generate-ssl.md) %} - ```bash - sudo mkdir /opt/ydb/certs - sudo chown -R ydb:ydb /opt/ydb/certs - sudo chmod 0750 /opt/ydb/certs - ``` + Create directories for certificates on each node + ```bash + sudo mkdir /opt/ydb/certs + sudo chown -R ydb:ydb /opt/ydb/certs + sudo chmod 0750 /opt/ydb/certs + ``` - Copy the node certificates and keys + Copy the node certificates and keys + ```bash + sudo -u ydb cp certs/ca.crt certs/node.crt certs/node.key /opt/ydb/certs/ + ``` - ```bash - sudo -u ydb cp certs/ca.crt certs/node.crt certs/node.key /opt/ydb/certs/ - ``` + {% include [prepare-configs.md](_includes/prepare-configs.md) %} - {% include [prepare-configs.md](_includes/prepare-configs.md) %} - 3. In the `interconnect_config` and `grpc_config` sections, specify the path to the certificate, key, and CA certificates: + 3. In the `interconnect_config` and `grpc_config` sections, specify the path to the certificate, key, and CA certificates: + ```text + interconnect_config: + start_tcp: true + encryption_mode: OPTIONAL + path_to_certificate_file: "/opt/ydb/certs/node.crt" + path_to_private_key_file: "/opt/ydb/certs/node.key" + path_to_ca_file: "/opt/ydb/certs/ca.crt" - ```text - interconnect_config: - start_tcp: true - encryption_mode: OPTIONAL - path_to_certificate_file: "/opt/ydb/certs/node.crt" - path_to_private_key_file: "/opt/ydb/certs/node.key" - path_to_ca_file: "/opt/ydb/certs/ca.crt" - - grpc_config: - cert: "/opt/ydb/certs/node.crt" - key: "/opt/ydb/certs/node.key" - ca: "/opt/ydb/certs/ca.crt" - ``` - - Save the configuration file as `/opt/ydb/cfg/config.yaml` + grpc_config: + cert: "/opt/ydb/certs/node.crt" + key: "/opt/ydb/certs/node.key" + ca: "/opt/ydb/certs/ca.crt" + ``` + Save the configuration file as `/opt/ydb/cfg/config.yaml` {% endlist %} -## Start static nodes {#start-storage} + +## Start static nodes {# start-storage} {% list tabs %} -- Manual - 1. Run {{ ydb-short-name }} storage on each node: +- Manually - ```bash - sudo su - ydb - cd /opt/ydb - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib - /opt/ydb/bin/ydbd server --log-level 3 --syslog --tcp --yaml-config /opt/ydb/cfg/config.yaml \ - --grpc-port 2135 --ic-port 19001 --mon-port 8765 --node static - ``` + 1. Run {{ ydb-short-name }} storage on each node: + ```bash + sudo su - ydb + cd /opt/ydb + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib + /opt/ydb/bin/ydbd server --log-level 3 --syslog --tcp --yaml-config /opt/ydb/cfg/config.yaml \ + --grpc-port 2135 --ic-port 19001 --mon-port 8765 --node static + ``` - Using systemd - 1. On each node, create a configuration file named `/etc/systemd/system/ydbd-storage.service` with the following content: - - ```text - [Unit] - Description=YDB storage node - After=network-online.target rc-local.service - Wants=network-online.target - StartLimitInterval=10 - StartLimitBurst=15 - - [Service] - Restart=always - RestartSec=1 - User=ydb - PermissionsStartOnly=true - StandardOutput=syslog - StandardError=syslog - SyslogIdentifier=ydbd - SyslogFacility=daemon - SyslogLevel=err - Environment=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib - ExecStart=/opt/ydb/bin/ydbd server --log-level 3 --syslog --tcp --yaml-config /opt/ydb/cfg/config.yaml --grpc-port 2135 --ic-port 19001 --mon-port 8765 --node static - LimitNOFILE=65536 - LimitCORE=0 - LimitMEMLOCK=3221225472 - - [Install] - WantedBy=multi-user.target - ``` - 2. Run {{ ydb-short-name }} storage on each node: - - ```bash - sudo systemctl start ydbd-storage - ``` + 1. On each node, create a configuration file named `/etc/systemd/system/ydbd-storage.service` with the following content: + ```text + [Unit] + Description=YDB storage node + After=network-online.target rc-local.service + Wants=network-online.target + StartLimitInterval=10 + StartLimitBurst=15 + + [Service] + Restart=always + RestartSec=1 + User=ydb + PermissionsStartOnly=true + StandardOutput=syslog + StandardError=syslog + SyslogIdentifier=ydbd + SyslogFacility=daemon + SyslogLevel=err + Environment=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib + ExecStart=/opt/ydb/bin/ydbd server --log-level 3 --syslog --tcp --yaml-config /opt/ydb/cfg/config.yaml --grpc-port 2135 --ic-port 19001 --mon-port 8765 --node static + LimitNOFILE=65536 + LimitCORE=0 + LimitMEMLOCK=3221225472 + + [Install] + WantedBy=multi-user.target + ``` + + 2. Run {{ ydb-short-name }} storage on each node: + ```bash + sudo systemctl start ydbd-storage + ``` {% endlist %} ## Initialize a cluster {#initialize-cluster} @@ -218,67 +210,63 @@ The command execution code should be null. ## Creating the first database {#create-fist-db} To work with tables, you need to create at least one database and run a process serving this database (a dynamic node). - ```bash LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib /opt/ydb/bin/ydbd admin database /Root/testdb create ssd:1 ``` ## Start the DB dynamic node {#start-dynnode} - {% list tabs %} +- Manually -- Manual - 1. Start the {{ ydb-short-name }} dynamic node for the /Root/testdb database: + 1. Start the {{ ydb-short-name }} dynamic node for the /Root/testdb database: + ```bash + sudo su - ydb + cd /opt/ydb + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib + /opt/ydb/bin/ydbd server --grpc-port 2136 --ic-port 19002 --mon-port 8766 --yaml-config /opt/ydb/cfg/config.yaml \ + --tenant /Root/testdb --node-broker <node1.ydb.tech>:2135 --node-broker <node2.ydb.tech>:2135 --node-broker <node3.ydb.tech>:2135 + ``` + Where `<nodeN.ydb.tech>` is the FQDN of the servers running the static nodes. - ```bash - sudo su - ydb - cd /opt/ydb - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib - /opt/ydb/bin/ydbd server --grpc-port 2136 --ic-port 19002 --mon-port 8766 --yaml-config /opt/ydb/cfg/config.yaml \ - --tenant /Root/testdb --node-broker <node1.ydb.tech>:2135 --node-broker <node2.ydb.tech>:2135 --node-broker <node3.ydb.tech>:2135 - ``` - Where `<nodeX.ydb.tech>` is the FQDN of the server running the static nodes. - - Run additional dynamic nodes on other servers to ensure database availability. + Run additional dynamic nodes on other servers to ensure database availability. - Using systemd - 1. Create a configuration file named `/etc/systemd/system/ydbd-testdb.service` with the following content: - - ```text - [Unit] - Description=YDB testdb dynamic node - After=network-online.target rc-local.service - Wants=network-online.target - StartLimitInterval=10 - StartLimitBurst=15 - - [Service] - Restart=always - RestartSec=1 - User=ydb - PermissionsStartOnly=true - StandardOutput=syslog - StandardError=syslog - SyslogIdentifier=ydbd - SyslogFacility=daemon - SyslogLevel=err - Environment=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib - ExecStart=/opt/ydb/bin/ydbd server --grpc-port 2136 --ic-port 19002 --mon-port 8766 --yaml-config /opt/ydb/cfg/config.yaml --tenant /Root/testdb --node-broker <node1.ydb.tech>:2135 --node-broker <node2.ydb.tech>:2135 --node-broker <node3.ydb.tech>:2135 - LimitNOFILE=65536 - LimitCORE=0 - LimitMEMLOCK=32212254720 - - [Install] - WantedBy=multi-user.target - ``` - Where `<nodeX.ydb.tech>` is the FQDN of the server running the static nodes. - - 2. Start the {{ ydb-short-name }} dynamic node for the /Root/testdb database: - - ```bash - sudo systemctl start ydbd-testdb - ``` - 3. Run additional dynamic nodes on other servers to ensure database availability. + + 1. Create a configuration file named `/etc/systemd/system/ydbd-testdb.service` with the following content: + ```text + [Unit] + Description=YDB testdb dynamic node + After=network-online.target rc-local.service + Wants=network-online.target + StartLimitInterval=10 + StartLimitBurst=15 + + [Service] + Restart=always + RestartSec=1 + User=ydb + PermissionsStartOnly=true + StandardOutput=syslog + StandardError=syslog + SyslogIdentifier=ydbd + SyslogFacility=daemon + SyslogLevel=err + Environment=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib + ExecStart=/opt/ydb/bin/ydbd server --grpc-port 2136 --ic-port 19002 --mon-port 8766 --yaml-config /opt/ydb/cfg/config.yaml --tenant /Root/testdb --node-broker <node1.ydb.tech>:2135 --node-broker <node2.ydb.tech>:2135 --node-broker <node3.ydb.tech>:2135 + LimitNOFILE=65536 + LimitCORE=0 + LimitMEMLOCK=32212254720 + + [Install] + WantedBy=multi-user.target + ``` + Where `<nodeN.ydb.tech>` is the FQDN of the servers running the static nodes. + + 2. Start the {{ ydb-short-name }} dynamic node for the /Root/testdb database: + ```bash + sudo systemctl start ydbd-testdb + ``` + 3. Run additional dynamic nodes on other servers to ensure database availability. {% endlist %} @@ -287,9 +275,8 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ydb/lib /opt/ydb/bin/ydbd admin database / 1. Install the YDB CLI as described in [Installing the YDB CLI](../../reference/ydb-cli/install.md) 2. Create a `test_table`: -```bash -ydb -e grpc://<node.ydb.tech>:2136 -d /Root/testdb scripting yql \ ---script 'CREATE TABLE `testdir/test_table` (id Uint64, title Utf8, PRIMARY KEY (id));' -``` - -Where `<node.ydb.tech>` is the FQDN of the server running the dynamic nodes that support the `/Root/testdb` database. + ```bash + ydb -e grpc://<node.ydb.tech>:2136 -d /Root/testdb scripting yql \ + --script 'CREATE TABLE `testdir/test_table` (id Uint64, title Utf8, PRIMARY KEY (id));' + ``` + Where `<node.ydb.tech>` is the FQDN of the server running the dynamic node that supports the `/Root/testdb` database. diff --git a/ydb/docs/en/core/deploy/orchestrated/_includes/ydb-kubernetes-operator.md b/ydb/docs/en/core/deploy/orchestrated/_includes/ydb-kubernetes-operator.md index 12d6ee9dae1..cbcc623a84d 100644 --- a/ydb/docs/en/core/deploy/orchestrated/_includes/ydb-kubernetes-operator.md +++ b/ydb/docs/en/core/deploy/orchestrated/_includes/ydb-kubernetes-operator.md @@ -8,24 +8,25 @@ Install {{ ydb-short-name }} in the standard configuration: - CLI - Run the command: + Run the command: - ```bash - helm install ydb-operator ydb/operator - ``` - * `ydb-operator`: The release name. - * `ydb/operator`: The name of the chart in the repository you added earlier. + ```bash + helm install ydb-operator ydb/operator + ``` - Output: + * `ydb-operator`: The release name. + * `ydb/operator`: The name of the chart in the repository you added earlier. - ```text - NAME: ydb-operator - LAST DEPLOYED: Thu Aug 12 19:32:28 2021 - NAMESPACE: default - STATUS: deployed - REVISION: 1 - TEST SUITE: None - ``` + Result: + + ```text + NAME: ydb-operator + LAST DEPLOYED: Thu Aug 12 19:32:28 2021 + NAMESPACE: default + STATUS: deployed + REVISION: 1 + TEST SUITE: None + ``` {% endlist %} @@ -37,22 +38,22 @@ Apply the manifest for creating a {{ ydb-short-name }} cluster: - CLI - Run the command: + Run the command: - ```bash - kubectl apply -f samples/storage.yaml - ``` + ```bash + kubectl apply -f samples/storage.yaml + ``` - This command creates a StatefulSet object that describes a set of containers with stable network IDs and disks assigned to them, as well as Service and ConfigMap objects that are required for the cluster to work. + This command creates a StatefulSet object that describes a set of containers with stable network IDs and disks assigned to them, as well as Service and ConfigMap objects that are required for the cluster to work. - You can check the progress of {{ ydb-short-name }} cluster creation using the following commands: + You can check the progress of {{ ydb-short-name }} cluster creation using the following commands: - ```bash - kubectl get storages.ydb.tech - kubectl describe storages.ydb.tech - ``` + ```bash + kubectl get storages.ydb.tech + kubectl describe storages.ydb.tech + ``` - Wait until the status of the Storage resource changes to `Ready`. + Wait until the status of the Storage resource changes to `Ready`. {% endlist %} @@ -62,7 +63,7 @@ The cluster configuration is static. The controller won't process any changes wh {% endnote %} -The standard configuration includes the minimum required 9 storage nodes, 80 GB each. We recommend using disks of at least 80 GB to ensure the stable operation of {{ ydb-short-name }} clusters. +The standard configuration includes the minimum required 9 storage nodes, 80 GB each. {% include [_includes/storage-device-requirements.md](../../../_includes/storage-device-requirements.md) %} @@ -74,43 +75,44 @@ Apply the manifest for creating a database: - CLI - Run the command: + Run the command: + + ```bash + kubectl apply -f samples/database.yaml + ``` - ```bash - kubectl apply -f samples/database.yaml - ``` - {% note info %} + {% note info %} - The `.spec.storageClusterRef.name` key value must match the name of the storage resource of the cluster part. + The `.spec.storageClusterRef.name` key value must match the name of the storage resource of the cluster part. - {% endnote %} + {% endnote %} - After processing the manifest, a StatefulSet object that describes a set of dynamic nodes is created. The created database will be accessible from inside the {{ k8s }} cluster by the `database-sample` DNS name or the `database-sample.<namespace>.svc.cluster.local` FQDN, where `namespace` indicates the namespace that the release was installed in. The database is connected to through port `2135`. + After processing the manifest, a StatefulSet object that describes a set of dynamic nodes is created. The created database will be accessible from inside the {{ k8s }} cluster by the `database-sample` DNS name or the `database-sample.<namespace>.svc.cluster.local` FQDN, where `namespace` indicates the namespace that the release was installed. The database is connected to through port `2135`. - View the status of the created resource: + View the status of the created resource: - ```bash - kubectl describe database.ydb.tech + ```bash + kubectl describe database.ydb.tech - Name: database-sample - Namespace: default - Labels: <none> - Annotations: <none> - API Version: ydb.tech/v1alpha1 - Kind: Database - ... - Status: - State: Ready - Events: - Type Reason Age From Message - ---- ------ ---- ---- ------- - Normal Provisioning 8m10s ydb-operator Resource sync is in progress - Normal Provisioning 8m9s ydb-operator Resource sync complete - Normal TenantInitialized 8m9s ydb-operator Tenant /root/database-sample created - ``` + Name: database-sample + Namespace: default + Labels: <none> + Annotations: <none> + API Version: ydb.tech/v1alpha1 + Kind: Database + ... + Status: + State: Ready + Events: + Type Reason Age From Message + ---- ------ ---- ---- ------- + Normal Provisioning 8m10s ydb-operator Resource sync is in progress + Normal Provisioning 8m9s ydb-operator Resource sync complete + Normal TenantInitialized 8m9s ydb-operator Tenant /root/database-sample created + ``` - The database is ready to run. + The database is ready to run. {% endlist %} @@ -122,7 +124,7 @@ Test how {{ ydb-short-name }} works: - CLI - 1. Check that all nodes are in the `Ready` status: + 1. Check that all nodes are in the `Ready` status: ```bash kubectl get pods @@ -145,13 +147,13 @@ Test how {{ ydb-short-name }} works: storage-sample-8 1/1 Running 0 1m ``` - 1. Start a new pod using the {{ ydb-short-name }} CLI: + 1. Start a new pod using the {{ ydb-short-name }} CLI: ```bash kubectl run -it --image=cr.yandex/yc/ydb:21.4.30 --rm ydb-cli bash ``` - 1. Query the {{ ydb-short-name }} database: + 1. Query the {{ ydb-short-name }} database: ```bash ydb \ @@ -159,11 +161,12 @@ Test how {{ ydb-short-name }} works: --database /root/database-sample \ table query execute --query 'select 1;' ``` + * `--endpoint`: Database endpoint. * `--database`: The name of the created database. * `--query`: Query text. - Output: + Result: ```text ┌─────────┐ @@ -185,24 +188,25 @@ If you no longer need the created resources, delete them: - CLI - 1. To delete a {{ ydb-short-name }} database, just delete the `Database` resource mapped to it: + 1. To delete a {{ ydb-short-name }} database, just delete the `Database` resource mapped to it: ```bash kubectl delete database.ydb.tech database-sample ``` - 1. To delete a {{ ydb-short-name }} cluster, run the following commands: + 1. To delete a {{ ydb-short-name }} cluster, run the following commands: ```bash kubectl delete storage.ydb.tech storage-sample kubectl delete pvc -l app.kubernetes.io/name=ydb ``` - 1. To remove the {{ ydb-short-name }} controller from the {{ k8s }} cluster, delete the release created by Helm: + 1. To remove the {{ ydb-short-name }} controller from the {{ k8s }} cluster, delete the release created by Helm: ```bash helm delete ydb-operator ``` + * `ydb-operator`: The name of the release that the controller was installed under. {% endlist %} diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/03_start.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/03_start.md index 531c733bdea..1a44acaa12e 100644 --- a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/03_start.md +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_docker/03_start.md @@ -25,18 +25,16 @@ If started successfully, you'll see the ID of the created container. `-h` is the container host name. Be sure to pass the `localhost` value. Otherwise, the container will be started with a random hostname. -`-v` means mounting the host system directories into a container like `<host system directory>:<mount directory in the container>`. The YDB container uses the following mount directories: - +`-v`: Mount the host system directories into a container as `<host system directory>:<mount directory within the container>`. The YDB container uses the following mount directories: - `/ydb_data` for storing data. If this directory is not mounted, the container will be started without saving data to the host system disk. - `/ydb_certs` for storing certificates to establish a TLS connection. The started container will write to this directory the certificates to be used for a TLS client connection. If this directory is not mounted, you won't be able to connect via TLS due to having no certificate information. -`-e`: means setting environment variables in `<name>=<value>` format. The YDB container uses the following environment variables: - +`-e` means setting environment variables in `<name>=<value>` format. The YDB container uses the following environment variables: - `YDB_DEFAULT_LOG_LEVEL`: The logging level. Acceptable values: `CRIT`, `ERROR`, `WARN`, `NOTICE`, and `INFO`. Defaults to `NOTICE`. - `GRPC_PORT`: The port for unencrypted connections. Defaults to 2136. - `GRPC_TLS_PORT`: The port for TLS connections. Defaults to 2135. -- `MON_PORT`: The port for the built-in web UI with [monitoring and introspection tools](../../../../maintenance/embedded_monitoring/ydb_monitoring.md). Defaults to 8765. -- `YDB_PDISK_SIZE`: The size of the disk for storing data in `<NUM>GB` format (for example, `YDB_PDISK_SIZE=128GB`). Acceptable values: `80GB` and higher. Defaults to 80GB. +- `MON_PORT`: The port for the built-in web UI with [monitoring and introspection](../../../../maintenance/embedded_monitoring/ydb_monitoring.md) tools. Defaults to 8765. +- `YDB_PDISK_SIZE`: The size of the data storage disk in `<NUM>GB` format (for example, `YDB_PDISK_SIZE=128GB`). Acceptable values: `80GB` and higher. Defaults to 80GB. - `YDB_USE_IN_MEMORY_PDISKS`: Using disks in memory. Acceptable values are `true` and `false`, defaults to `false`. If enabled, the container's file system is not used for working with data, all data is only stored in the memory of a process and is lost when it's stopped. Currently, you can start the container on Apple M1 in this mode only. {% include [_includes/storage-device-requirements.md](../../../../_includes/storage-device-requirements.md) %} diff --git a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_local.md b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_local.md index efcb6a574f5..b16c1769e4c 100644 --- a/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_local.md +++ b/ydb/docs/en/core/getting_started/self_hosted/_includes/ydb_local.md @@ -28,7 +28,9 @@ You can start a local YDB server with a disk or in-memory storage: - Disk storage - - To store data on a disk, when you run the script for the first time, a 64GB `ydb.data` file is created in the working directory. Make sure there's enough disk space to create it. + - {% include [_includes/storage-device-requirements.md](../../../_includes/storage-device-requirements.md) %} + + - The first time you run the script, an 80GB `ydb.data` file will be created in the working directory. Make sure there's enough disk space to create it. - Run the following command from the working directory: |