diff options
author | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-03-11 00:45:45 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-03-11 00:45:45 +0300 |
commit | 31a6bda94bf00dca9e46d1472cea2b38d3dde8dc (patch) | |
tree | 328bd5089d461433e02928bd2742a9c9393d7a5f | |
parent | aee6e5ac7759f4f9624793762a70d16eec1b845e (diff) | |
download | ydb-31a6bda94bf00dca9e46d1472cea2b38d3dde8dc.tar.gz |
Update build doc. KIKIMR-14096
ref:5510261848645920e0fff7dad8527c3168d6ed08
-rw-r--r-- | BUILD.md | 62 | ||||
-rw-r--r-- | README.md | 16 |
2 files changed, 64 insertions, 14 deletions
diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 00000000000..9c8db3b1235 --- /dev/null +++ b/BUILD.md @@ -0,0 +1,62 @@ +## Build YDB from source + +Requirements: + - cmake 3.22+ + - clang-12 + - lld-12 + - git 2.20+ + - python2.7 + - python3.8 + - pip3 + - antlr3 + - libaio + - ninja 1.10+ + +How to build: + Currently x86_64 linux is supported. Building was tested on Ubuntu 20.04 + Note when multithreading build is on operation each instance of clang can use up to 1 GB of RAM. Linkage of binary file can use up to 16Gb ram. Please make sure system has enough memory. + + 1. Add repositories to install dependencies + Note following repositories is required for **ubuntu 20.04**. If your GNU/Linux distributive already have required build dependencies you need to skip this step. +For more information look in to your distributive instruction and https://apt.llvm.org and https://apt.kitware.com/ + ``` + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc |sudo apt-key add - + echo 'deb http://apt.kitware.com/ubuntu/ focal main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null + echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null + + sudo apt-get update + ``` + + 2. Install dependencies + ``` + sudo apt-get -y install git cmake python python3-pip ninja-build antlr3 m4 clang-12 lld-12 libaio1 libaio-dev + sudo pip3 install conan + ``` + + 3. Create work directory. Please make sure youre have at least 80Gb free space on the filesystem where your want to place this directory. Also we recomend to use SSD drive to reduce build time. + ``` + mkdir ~/ydbwork && cd ~/ydbwork + mkdir build + ``` + + 4. Checkout ydb repository. + ``` + git clone https://github.com/ydb-platform/ydb.git + ``` + + 5. Build ydb + ``` + cd build + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../ydb/clang.toolchain ../ydb + ninja + ``` + The server binary will be placed at: + ``` + ydb/apps/ydbd/ydbd + ``` + Client binart at: + ``` + ydb/apps/ydb/ydb + ``` + diff --git a/README.md b/README.md index 92c4fde5626..f0f51abd1b9 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ For development purposes we test that YDB could be built and run under latest ve ## Getting started in 5 minutes -1. Install YDB using [pre-built executables](ydb/docs/ru/core/getting_started/ydb_local.md), build it from source or [use Docker container](ydb/docs/en/core/getting_started/ydb_docker.md). +1. Install YDB using [pre-built executables](ydb/docs/ru/core/getting_started/ydb_local.md), [build it from source](BUILD.md) or [use Docker container](ydb/docs/en/core/getting_started/ydb_docker.md). 1. Install [command line interace](docs/en/core/reference/ydb-cli/index.m) tool to work with scheme and run queries. 1. Start [local cluster](ydb/docs/ru/core/getting_started/ydb_local.md) or container and run [YQL query](ydb/docs/en/core/yql/reference/index.md) via [YDB CLI](docs/en/core/reference/ydb-cli/index.md). 1. Access [Embedded UI](ydb/docs/en/core/maintenance/embedded_monitoring/ydb_monitoring.md) via browser for schema navigation, query execution and other database development related tasks. @@ -69,19 +69,7 @@ For development purposes we test that YDB could be built and run under latest ve ## How to build - -### Prerequisites - -In order to build `ydbd` you should have following tools installed on your system: - -1. Git command line tool -1. Python - -### Build process - -1. `git clone https://github.com/ydb-platform/ydb.git` -1. `cd ydb/apps/ydbd` -1. `../../../ya make -r` + [Build howto.](BUILD.md) ## How to deploy |