ydbops
utility is used to perform various ad-hoc and maintenance operations on YDB clusters.
Soon an official documentation on ydb.tech will be available.
For now, please use the below info for reference only, it might be slightly outdated.
- Go 1.21
Ginkgo testing library is used. Do:
ginkgo test -vvv ./tests
- [NON-CRITICAL FEATURE] Yandex IAM authorization with SA account key file is currently unsupported. However, you can always issue the token yourself and put it inside the
YDB_TOKEN
variable:export YDB_TOKEN=$(ycp --profile <profile> iam create-token)
Please browse the ydbops --help
first. Then read along for examples (substitute your own values, of course).
ydbops restart --storage \
--endpoint grpc://<cluster-fqdn> \
--ssh-args=pssh,-A,-J,<bastion-fqdn>,--ycp-profile,prod,--no-yubikey \
--verbose --hosts=<node1-fqdn>,<node2-fqdn>,<node3-fqdn>
ydbops restart --storage \
--endpoint grpc://<cluster-fqdn> \
--ssh-args=pssh,-A,-J,<bastion-fqdn>,--ycp-profile,prod,--no-yubikey \
--verbose
ydbops run \
--endpoint grpc://<cluster-fqdn> \
--availability-mode strong --verbose --hosts=7,8 \
--payload ./tests/payloads/payload-echo-helloworld.sh
ydbops run \
--endpoint grpc://<cluster-fqdn> \
--availability-mode strong --verbose --hosts=5,6 \
--payload ./tests/payloads/payload-restart-ydbd.sh
An example of authenticating with static credentials:
export YDB_PASSWORD=password_123
ydbops restart --storage \
--endpoint grpc://<cluster-fqdn> \
--availability-mode strong --verbose --hosts=7,8 \
--user jorres --kubeconfig ~/.kube/config