diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-11-13 17:37:22 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-11-13 18:01:15 +0300 |
commit | 4adb48ccbdd0373aa949f90e1c7aa5d6cee7938a (patch) | |
tree | 57a965d14e3da453dacddf654980eeb3e0834bcb | |
parent | 5df3d5d2ca0e4f3f8c2d1c760ca68cf3a5a06b3f (diff) | |
download | ydb-4adb48ccbdd0373aa949f90e1c7aa5d6cee7938a.tar.gz |
Docs CI
40 files changed, 634 insertions, 0 deletions
diff --git a/ydb/docs/.yfm b/ydb/docs/.yfm new file mode 100644 index 0000000000..9536353193 --- /dev/null +++ b/ydb/docs/.yfm @@ -0,0 +1,32 @@ +allowHTML: true +langs: ['en','ru'] +apply-presets: true +allowCustomResources: true +resources: + script: + - _assets/gtm.js + +docs-viewer: + project-name: ydb + # no-index: true # Remove this after the public release + langs: ['en','ru'] + themes: ['light'] + metrika: 88962303 + favicon-src: https://storage.yandexcloud.net/ydb-www-prod-site-assets/favicon/favicon.ico + + github-url-prefix: https://github.com/ydb-platform/ydb/tree/main/ydb/docs + + logo-options: + url: + en: https://ydb.tech/ + default: https://ydb.tech/{lang} + src: https://storage.yandexcloud.net/ydb-www-prod-site-assets/logo-full-site-header.svg + src-mobile: https://storage.yandexcloud.net/ydb-www-prod-site-assets/logo-full-site-header.svg + img-has: + width: 80px + offset: true + + index-page: + title: YDB Open Source + description: Горизонтально масштабируемая распределённая отказоустойчивая СУБД + hidden: true diff --git a/ydb/docs/.yfmlint b/ydb/docs/.yfmlint new file mode 100644 index 0000000000..ed1cde173c --- /dev/null +++ b/ydb/docs/.yfmlint @@ -0,0 +1,2 @@ +log-levels: + YFM001: 'disabled' diff --git a/ydb/docs/_assets/gtm.js b/ydb/docs/_assets/gtm.js new file mode 100644 index 0000000000..0e934d75e3 --- /dev/null +++ b/ydb/docs/_assets/gtm.js @@ -0,0 +1,24 @@ +// Define dataLayer and the gtag function. +window.dataLayer = window.dataLayer || []; +function gtag(){dataLayer.push(arguments);} + +// Default analytics_storage to 'denied'. +window.gtag = window.gtag || gtag; + +const hasAnalyticsConsent = window?.localStorage.getItem('hasAnalyticsConsent'); + +window.gtag('consent', 'default', { + 'analytics_storage': hasAnalyticsConsent === 'true' ? 'granted' : 'denied', + 'wait_for_update': hasAnalyticsConsent === 'true' ? 0 : Infinity, +}); + +dataLayer.push({ + 'event': 'default_consent' +}); + +function loadGtm(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': +new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], +j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= +'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);}; + +loadGtm(window, document, 'script', 'dataLayer', 'GTM-W7ZBL4X') diff --git a/ydb/docs/_assets/logo.svg b/ydb/docs/_assets/logo.svg new file mode 100644 index 0000000000..0a81321530 --- /dev/null +++ b/ydb/docs/_assets/logo.svg @@ -0,0 +1,4 @@ +<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg"> +<circle cx="64" cy="64" r="64" fill="#2399FF"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M36.9605 31.9503C27.2976 31.9503 19.4644 34.7009 19.4644 39.8607V66.6667C19.4644 71.8266 27.2976 74.5772 36.9605 74.5772C40.3464 74.5772 43.5076 74.2395 46.1859 73.5787V95.933C46.1859 101.093 54.0192 103.843 63.682 103.843C73.3449 103.843 81.1781 101.093 81.1781 95.933V73.4132C83.986 74.183 87.3817 74.5772 91.0396 74.5772C100.702 74.5772 108.536 71.8266 108.536 66.6667V39.8607C108.536 34.7009 100.702 31.9503 91.0396 31.9503C81.3768 31.9503 73.5435 34.7009 73.5435 39.8607V49.7645H54.4566V39.8607C54.4566 34.7009 46.6233 31.9503 36.9605 31.9503ZM81.1781 70.8985L90.7217 58.0354H83.7233L78.7553 64.7567C80.2948 65.9331 81.1781 67.3942 81.1781 69.127V70.8985ZM73.5435 62.3805V55.4905H54.4566V62.215C57.1349 61.5542 60.2961 61.2165 63.682 61.2165C67.3399 61.2165 70.7357 61.6107 73.5435 62.3805ZM48.609 64.7565L43.6412 58.0354H36.6428L46.1859 70.8979V69.127C46.1859 67.3941 47.0694 65.9329 48.609 64.7565ZM79.8368 36.9698C77.0781 38.1699 76.7249 39.3421 76.7249 39.9031C76.7249 40.464 77.0781 41.6363 79.8368 42.8363C82.4751 43.984 86.4067 44.6747 91.0399 44.6747C95.673 44.6747 99.6046 43.984 102.243 42.8363C105.002 41.6363 105.355 40.464 105.355 39.9031C105.355 39.3421 105.002 38.1699 102.243 36.9698C99.6046 35.8221 95.673 35.1314 91.0399 35.1314C86.4067 35.1314 82.4751 35.8221 79.8368 36.9698ZM22.6457 39.9031C22.6457 39.3421 22.999 38.1699 25.7576 36.9698C28.396 35.8221 32.3275 35.1314 36.9607 35.1314C41.5939 35.1314 45.5254 35.8221 48.1638 36.9698C50.9224 38.1699 51.2757 39.3421 51.2757 39.9031C51.2757 40.4641 50.9224 41.6363 48.1638 42.8363C45.5254 43.984 41.5939 44.6747 36.9607 44.6747C32.3275 44.6747 28.396 43.984 25.7576 42.8363C22.999 41.6363 22.6457 40.4641 22.6457 39.9031ZM52.4788 66.2361C49.7202 67.4361 49.3669 68.6083 49.3669 69.1693C49.3669 69.7303 49.7202 70.9025 52.4788 72.1026C55.1172 73.2503 59.0487 73.941 63.6819 73.941C68.3151 73.941 72.2466 73.2503 74.885 72.1026C77.6436 70.9025 77.9969 69.7303 77.9969 69.1693C77.9969 68.6083 77.6436 67.4361 74.885 66.2361C72.2466 65.0884 68.3151 64.3976 63.6819 64.3976C59.0487 64.3976 55.1172 65.0884 52.4788 66.2361Z" fill="white"/> +</svg> diff --git a/ydb/docs/_assets/ydb-promo-video.png b/ydb/docs/_assets/ydb-promo-video.png Binary files differnew file mode 100644 index 0000000000..d938de797a --- /dev/null +++ b/ydb/docs/_assets/ydb-promo-video.png diff --git a/ydb/docs/_includes/go/auth-static-database-sql.md b/ydb/docs/_includes/go/auth-static-database-sql.md new file mode 100644 index 0000000000..9f3173dcbc --- /dev/null +++ b/ydb/docs/_includes/go/auth-static-database-sql.md @@ -0,0 +1,18 @@ +```go +package main + +import ( + "context" + + _ "github.com/ydb-platform/ydb-go-sdk/v3" +) + +func main() { + db, err := sql.Open("ydb", "grpcs://login:password@localohost:2135/local") + if err != nil { + panic(err) + } + defer db.Close() + ... +} +``` diff --git a/ydb/docs/_includes/go/auth-static-with-database-sql.md b/ydb/docs/_includes/go/auth-static-with-database-sql.md new file mode 100644 index 0000000000..cb773bf8ec --- /dev/null +++ b/ydb/docs/_includes/go/auth-static-with-database-sql.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "context" + "os" + + "github.com/ydb-platform/ydb-go-sdk/v3" +) + +func main() { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + nativeDriver, err := ydb.Open(ctx, + os.Getenv("YDB_CONNECTION_STRING"), + ydb.WithStaticCredentials("user", "password"), + ) + if err != nil { + panic(err) + } + defer nativeDriver.Close(ctx) + connector, err := ydb.Connector(nativeDriver) + if err != nil { + panic(err) + } + db := sql.OpenDB(connector) + defer db.Close() + ... +} +``` diff --git a/ydb/docs/_includes/go/auth-static-with-native.md b/ydb/docs/_includes/go/auth-static-with-native.md new file mode 100644 index 0000000000..0102f8984e --- /dev/null +++ b/ydb/docs/_includes/go/auth-static-with-native.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "context" + "os" + + "github.com/ydb-platform/ydb-go-sdk/v3" +) + +func main() { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + db, err := ydb.Open(ctx, + os.Getenv("YDB_CONNECTION_STRING"), + ydb.WithStaticCredentials("user", "password"), + ) + if err != nil { + panic(err) + } + defer db.Close(ctx) + ... +} +``` diff --git a/ydb/docs/_includes/nodejs/auth-access-token.md b/ydb/docs/_includes/nodejs/auth-access-token.md new file mode 100644 index 0000000000..b3dcf825a8 --- /dev/null +++ b/ydb/docs/_includes/nodejs/auth-access-token.md @@ -0,0 +1,15 @@ +```typescript +import { Driver, TokenAuthService } from 'ydb-sdk'; + +export async function connect(endpoint: string, database: string, accessToken: string) { + const authService = new TokenAuthService(accessToken); + const driver = new Driver({endpoint, database, authService}); + const timeout = 10000; + if (!await driver.ready(timeout)) { + console.log(`Driver has not become ready in ${timeout}ms!`); + process.exit(1); + } + console.log('Driver connected') + return driver +} +``` diff --git a/ydb/docs/_includes/nodejs/auth-anonymous.md b/ydb/docs/_includes/nodejs/auth-anonymous.md new file mode 100644 index 0000000000..2741bd3a6d --- /dev/null +++ b/ydb/docs/_includes/nodejs/auth-anonymous.md @@ -0,0 +1,15 @@ +```typescript +import { Driver, AnonymousAuthService } from 'ydb-sdk'; + +export async function connect(endpoint: string, database: string) { + const authService = new AnonymousAuthService(); + const driver = new Driver({endpoint, database, authService}); + const timeout = 10000; + if (!await driver.ready(timeout)) { + console.log(`Driver has not become ready in ${timeout}ms!`); + process.exit(1); + } + console.log('Driver connected') + return driver +} +``` diff --git a/ydb/docs/_includes/nodejs/auth-env.md b/ydb/docs/_includes/nodejs/auth-env.md new file mode 100644 index 0000000000..ef828d85eb --- /dev/null +++ b/ydb/docs/_includes/nodejs/auth-env.md @@ -0,0 +1,15 @@ +```typescript +import { Driver, getCredentialsFromEnv } from 'ydb-sdk'; + +export async function connect(endpoint: string, database: string) { + const authService = getCredentialsFromEnv(); + const driver = new Driver({endpoint, database, authService}); + const timeout = 10000; + if (!await driver.ready(timeout)) { + console.log(`Driver has not become ready in ${timeout}ms!`); + process.exit(1); + } + console.log('Driver connected') + return driver +} +``` diff --git a/ydb/docs/_includes/nodejs/auth-metadata.md b/ydb/docs/_includes/nodejs/auth-metadata.md new file mode 100644 index 0000000000..49ad89741b --- /dev/null +++ b/ydb/docs/_includes/nodejs/auth-metadata.md @@ -0,0 +1,15 @@ +```typescript +import { Driver, MetadataAuthService } from 'ydb-sdk'; + +export async function connect(endpoint: string, database: string) { + const authService = new MetadataAuthService(); + const driver = new Driver({endpoint, database, authService}); + const timeout = 10000; + if (!await driver.ready(timeout)) { + console.log(`Driver has not become ready in ${timeout}ms!`); + process.exit(1); + } + console.log('Driver connected') + return driver +} +``` diff --git a/ydb/docs/_includes/nodejs/auth-sa-data.md b/ydb/docs/_includes/nodejs/auth-sa-data.md new file mode 100644 index 0000000000..c9a75197ed --- /dev/null +++ b/ydb/docs/_includes/nodejs/auth-sa-data.md @@ -0,0 +1,22 @@ +```typescript +import { Driver, IamAuthService } from 'ydb-sdk'; +import { IIamCredentials } from 'ydb-sdk/build/cjs/src/credentials'; + +export async function connect(endpoint: string, database: string) { + const saCredentials: IIamCredentials = { + serviceAccountId: 'serviceAccountId', + accessKeyId: 'accessKeyId', + privateKey: Buffer.from('-----BEGIN PRIVATE KEY-----\nyJ1yFwJq...'), + iamEndpoint: 'iam.api.cloud.yandex.net:443', + }; + const authService = new IamAuthService(saCredentials); + const driver = new Driver({endpoint, database, authService}); + const timeout = 10000; + if (!await driver.ready(timeout)) { + console.log(`Driver has not become ready in ${timeout}ms!`); + process.exit(1); + } + console.log('Driver connected') + return driver +} +``` diff --git a/ydb/docs/_includes/nodejs/auth-sa-file.md b/ydb/docs/_includes/nodejs/auth-sa-file.md new file mode 100644 index 0000000000..2531dd0365 --- /dev/null +++ b/ydb/docs/_includes/nodejs/auth-sa-file.md @@ -0,0 +1,16 @@ +```typescript +import { Driver, getSACredentialsFromJson, IamAuthService } from 'ydb-sdk'; + +export async function connect(endpoint: string, database: string, serviceAccountFilename: string) { + const saCredentials = getSACredentialsFromJson(serviceAccountFilename); + const authService = new IamAuthService(saCredentials); + const driver = new Driver({endpoint, database, authService}); + const timeout = 10000; + if (!await driver.ready(timeout)) { + console.log(`Driver has not become ready in ${timeout}ms!`); + process.exit(1); + } + console.log('Driver connected') + return driver +} +``` diff --git a/ydb/docs/_includes/nodejs/auth-static.md b/ydb/docs/_includes/nodejs/auth-static.md new file mode 100644 index 0000000000..932d2d2814 --- /dev/null +++ b/ydb/docs/_includes/nodejs/auth-static.md @@ -0,0 +1,17 @@ +```typescript +import { Driver, StaticCredentialsAuthService } from 'ydb-sdk'; + +export async function connect(endpoint: string, database: string, user: string, password: string) { + const authService = new StaticCredentialsAuthService(user, password, endpoint, { + tokenExpirationTimeout: 20000, + }) + const driver = new Driver({endpoint, database, authService}); + const timeout = 10000; + if (!await driver.ready(timeout)) { + console.log(`Driver has not become ready in ${timeout}ms!`); + process.exit(1); + } + console.log('Driver connected') + return driver +} +``` diff --git a/ydb/docs/_includes/python/async/auth-access-token.md b/ydb/docs/_includes/python/async/auth-access-token.md new file mode 100644 index 0000000000..22c7f3ba03 --- /dev/null +++ b/ydb/docs/_includes/python/async/auth-access-token.md @@ -0,0 +1,16 @@ +```python +import os +import ydb +import asyncio + +async def ydb_init(): + async with ydb.aio.Driver( + endpoint=os.environ["YDB_ENDPOINT"], + database=os.environ["YDB_DATABASE"], + credentials=ydb.credentials.AccessTokenCredentials(os.environ["YDB_TOKEN"]), + ) as driver: + await driver.wait() + ... + +asyncio.run(ydb_init()) +``` diff --git a/ydb/docs/_includes/python/async/auth-anonymous.md b/ydb/docs/_includes/python/async/auth-anonymous.md new file mode 100644 index 0000000000..1e2b118a34 --- /dev/null +++ b/ydb/docs/_includes/python/async/auth-anonymous.md @@ -0,0 +1,16 @@ +```python +import os +import ydb +import asyncio + +async def ydb_init(): + async with ydb.aio.Driver( + endpoint=os.environ["YDB_ENDPOINT"], + database=os.environ["YDB_DATABASE"], + credentials=ydb.credentials.AnonymousCredentials(), + ) as driver: + await driver.wait() + ... + +asyncio.run(ydb_init()) +``` diff --git a/ydb/docs/_includes/python/async/auth-env.md b/ydb/docs/_includes/python/async/auth-env.md new file mode 100644 index 0000000000..9d3e9141e4 --- /dev/null +++ b/ydb/docs/_includes/python/async/auth-env.md @@ -0,0 +1,16 @@ +```python +import os +import ydb +import asyncio + +async def ydb_init(): + async with ydb.aio.Driver( + endpoint=os.environ["YDB_ENDPOINT"], + database=os.environ["YDB_DATABASE"], + credentials=ydb.credentials_from_env_variables(), + ) as driver: + await driver.wait() + ... + +asyncio.run(ydb_init()) +``` diff --git a/ydb/docs/_includes/python/async/auth-metadata.md b/ydb/docs/_includes/python/async/auth-metadata.md new file mode 100644 index 0000000000..21e89e6090 --- /dev/null +++ b/ydb/docs/_includes/python/async/auth-metadata.md @@ -0,0 +1,17 @@ +```python +import os +import ydb +import ydb.iam +import asyncio + +async def ydb_init(): + async with ydb.aio.Driver( + endpoint=os.environ["YDB_ENDPOINT"], + database=os.environ["YDB_DATABASE"], + credentials=ydb.iam.MetadataUrlCredentials(), + ) as driver: + await driver.wait() + ... + +asyncio.run(ydb_init()) +``` diff --git a/ydb/docs/_includes/python/async/auth-service-account.md b/ydb/docs/_includes/python/async/auth-service-account.md new file mode 100644 index 0000000000..6c814bdbf3 --- /dev/null +++ b/ydb/docs/_includes/python/async/auth-service-account.md @@ -0,0 +1,19 @@ +```python +import os +import asyncio +import ydb +import ydb.iam + +async def ydb_init(): + async with ydb.aio.Driver( + endpoint=os.environ["YDB_ENDPOINT"], + database=os.environ["YDB_DATABASE"], + # service account key should be in the local file, + # and SA_KEY_FILE environment variable should point to it + credentials=ydb.iam.ServiceAccountCredentials.from_file(os.environ["SA_KEY_FILE"]), + ) as driver: + await driver.wait() + ... + +asyncio.run(ydb_init()) +``` diff --git a/ydb/docs/_includes/python/async/auth-static.md b/ydb/docs/_includes/python/async/auth-static.md new file mode 100644 index 0000000000..a21744d9ae --- /dev/null +++ b/ydb/docs/_includes/python/async/auth-static.md @@ -0,0 +1,23 @@ +```python +import os +import ydb +import asyncio + +config = ydb.DriverConfig( + endpoint=os.environ["YDB_ENDPOINT"], + database=os.environ["YDB_DATABASE"], +) + +credentials = ydb.StaticCredentials( + driver_config=config, + user=os.environ["YDB_USER"], + password=os.environ["YDB_PASSWORD"], +) + +async def ydb_init(): + async with ydb.aio.Driver(driver_config=config, credentials=credentials) as driver: + await driver.wait() + ... + +asyncio.run(ydb_init()) +``` diff --git a/ydb/docs/_includes/python/auth-access-token.md b/ydb/docs/_includes/python/auth-access-token.md new file mode 100644 index 0000000000..51840722fd --- /dev/null +++ b/ydb/docs/_includes/python/auth-access-token.md @@ -0,0 +1,11 @@ +```python +import os +import ydb + +with ydb.Driver( + connection_string=os.environ["YDB_CONNECTION_STRING"], + credentials=ydb.credentials.AccessTokenCredentials(os.environ["YDB_TOKEN"]), +) as driver: + driver.wait(timeout=5) + ... +``` diff --git a/ydb/docs/_includes/python/auth-anonymous.md b/ydb/docs/_includes/python/auth-anonymous.md new file mode 100644 index 0000000000..80cd59fe0d --- /dev/null +++ b/ydb/docs/_includes/python/auth-anonymous.md @@ -0,0 +1,11 @@ +```python +import os +import ydb + +with ydb.Driver( + connection_string=os.environ["YDB_CONNECTION_STRING"], + credentials=ydb.credentials.AnonymousCredentials(), +) as driver: + driver.wait(timeout=5) + ... +``` diff --git a/ydb/docs/_includes/python/auth-env.md b/ydb/docs/_includes/python/auth-env.md new file mode 100644 index 0000000000..94dd0945c1 --- /dev/null +++ b/ydb/docs/_includes/python/auth-env.md @@ -0,0 +1,11 @@ +```python +import os +import ydb + +with ydb.Driver( + connection_string=os.environ["YDB_CONNECTION_STRING"], + credentials=ydb.credentials_from_env_variables(), +) as driver: + driver.wait(timeout=5) + ... +``` diff --git a/ydb/docs/_includes/python/auth-metadata.md b/ydb/docs/_includes/python/auth-metadata.md new file mode 100644 index 0000000000..48c7e7d9c6 --- /dev/null +++ b/ydb/docs/_includes/python/auth-metadata.md @@ -0,0 +1,12 @@ +```python +import os +import ydb +import ydb.iam + +with ydb.Driver( + connection_string=os.environ["YDB_CONNECTION_STRING"], + credentials=ydb.iam.MetadataUrlCredentials(), +) as driver: + driver.wait(timeout=5) + ... +``` diff --git a/ydb/docs/_includes/python/auth-service-account.md b/ydb/docs/_includes/python/auth-service-account.md new file mode 100644 index 0000000000..f2f32fdcdb --- /dev/null +++ b/ydb/docs/_includes/python/auth-service-account.md @@ -0,0 +1,14 @@ +```python +import os +import ydb +import ydb.iam + +with ydb.Driver( + connection_string=os.environ["YDB_CONNECTION_STRING"], + # service account key should be in the local file, + # and SA_KEY_FILE environment variable should point to it + credentials=ydb.iam.ServiceAccountCredentials.from_file(os.environ["SA_KEY_FILE"]), +) as driver: + driver.wait(timeout=5) + ... +``` diff --git a/ydb/docs/_includes/python/auth-static.md b/ydb/docs/_includes/python/auth-static.md new file mode 100644 index 0000000000..c486d9c4b5 --- /dev/null +++ b/ydb/docs/_includes/python/auth-static.md @@ -0,0 +1,19 @@ +```python +import os +import ydb + +config = ydb.DriverConfig( + endpoint=os.environ["YDB_ENDPOINT"], + database=os.environ["YDB_DATABASE"], +) + +credentials = ydb.StaticCredentials( + driver_config=config, + user=os.environ["YDB_USER"], + password=os.environ["YDB_PASSWORD"] +) + +with ydb.Driver(driver_config=config, credentials=credentials) as driver: + driver.wait(timeout=5) + ... +``` diff --git a/ydb/docs/a.yaml b/ydb/docs/a.yaml new file mode 100644 index 0000000000..b998f41020 --- /dev/null +++ b/ydb/docs/a.yaml @@ -0,0 +1,55 @@ +title: YDB OSS docs +service: kikimr + +arcanum: + review: + min_approvers_count: 1 + ignore_self_ship: true + disable_sticky_ships: true + auto_assign: false + groups: + - name: kikimr + roles: + - "kikimr:@scope=development" + - "kikimr:@scope=administration" + - "kikimr:@scope=projects_management" + - "edition_90_ydb_cs:@scope=content" + rules: + - reviewers: + name: kikimr + ship: 1 + +ci: + secret: sec-01g3rbfrx24zvmxgqq6yb0ye1b # id секрета, созданного на шаге 1 + runtime: + # Sandbox-группа (https://sandbox.yandex-team.ru/admin/groups), + # в которую должен входить ваш робот + # Создать группу можно по инструкции https://docs.yandex-team.ru/sandbox/groups + sandbox: + owner: YDB-DOCS-CI + # Настройки уведомлений при падении сборки (https://docs.yandex-team.ru/ci/runtime) + notifications: + - statuses: FAILURE + transport: email # доступные транспорты: telegram, email, jabber, q + # логины сотрудников, Sandbox-группы, рассылки (рассылки только для email уведомлений) и др. + recipients: YDB-DOCS-CI + actions: + # определение экшена, который будет вызван при пулл-реквесте, + # затрагивающим вашу документацию + docs: + title: Deploy docs + flow: deploy-pr-docs + triggers: + - on: pr + + flows: + deploy-pr-docs: + jobs: + deploy: + title: Deploy docs + task: common/docs/deploy + input: + targets: ydb/docs + arcanum_review_id: ${context.launch_pull_request_info.pull_request.id} + notify: true # отставлять комментарий к ПР с ссылкой на выложенную документацию + diff --git a/ydb/docs/build.sh b/ydb/docs/build.sh new file mode 100755 index 0000000000..c47c0eb8e6 --- /dev/null +++ b/ydb/docs/build.sh @@ -0,0 +1,47 @@ +# Use this script to build YDB docs with Open Source tools and start HTTP server +# You may specify output directory as a parameter. If omitted, docs will be generated to a TEMP subdirectory +# + +echo Checking YFM installed... +yfm --version +if [[ $? -ge 1 ]]; then + echo + echo "You need to have YFM builder (https://ydocs.tech/en/tools/docs/) installed to run this script, exiting" + exit +fi + +echo Checking Python3 installed... +python3 --version + +if [[ $? -ge 1 ]]; then + echo + echo "You need to have Python3 (https://www.python.org/) installed to run this script, exiting" + exit +fi + +DIR=${1:-"$TMPDIR"docs} + +echo Starting YFM builder +echo Output directory: $DIR + +yfm -i . -o $DIR --allowHTML + +if [[ $? -ge 1 ]]; then + echo + echo ================================ + echo YFM build completed with ERRORS! + echo ================================ +fi + +echo +echo Starting HTTP server, open the links in your browser: +echo +echo "- http://localhost:8888/en (English)" +echo "- http://localhost:8888/ru (Russian)" +echo +echo Press Ctrl+C in this window to stop the HTTP server. +echo + +python3 -m http.server 8888 -d $DIR + + diff --git a/ydb/docs/en/overlay/toc_p.yaml b/ydb/docs/en/overlay/toc_p.yaml new file mode 100644 index 0000000000..b3bc4402e0 --- /dev/null +++ b/ydb/docs/en/overlay/toc_p.yaml @@ -0,0 +1,4 @@ +title: YDB +href: index.yaml +items: +- include: { mode: link, path: toc_i.yaml }
\ No newline at end of file diff --git a/ydb/docs/en/presets.yaml b/ydb/docs/en/presets.yaml new file mode 100644 index 0000000000..fb77c1ff9b --- /dev/null +++ b/ydb/docs/en/presets.yaml @@ -0,0 +1,3 @@ +default: + lang: en +# link-console-main: https://console.cloud.yandex.com diff --git a/ydb/docs/en/toc.yaml b/ydb/docs/en/toc.yaml new file mode 100644 index 0000000000..a16b8c9b3c --- /dev/null +++ b/ydb/docs/en/toc.yaml @@ -0,0 +1,3 @@ +title: YDB +items: +- include: { mode: merge, path: core/toc_m.yaml }
\ No newline at end of file diff --git a/ydb/docs/file.tmp b/ydb/docs/file.tmp new file mode 100644 index 0000000000..c46929b72b --- /dev/null +++ b/ydb/docs/file.tmp @@ -0,0 +1 @@ +post slonn-vm http:// diff --git a/ydb/docs/presets.yaml b/ydb/docs/presets.yaml new file mode 100644 index 0000000000..807f8c2f6d --- /dev/null +++ b/ydb/docs/presets.yaml @@ -0,0 +1,50 @@ +default: + tech: false # Include technical info for developers of services supporting YQL (like YDB), not for users of those services. For instance, debug pragmas. + backend_name: YDB + backend_name_lower: ydb + ydb: true + example_cluster: ydbtest + feature_secondary_index: true + feature_changefeed: true + feature_replace: true + feature_upsert: true + feature_join: true + feature_map_tables: true + feature_group_by_rollup_cube: true + feature_window_functions: true + feature_user_and_group: true + feature_olap_tables: true + feature_topic_control_plane: true + feature_federated_queries: true +# feature_topic_settings_reset: true +# feature_logbroker: true + ydb-full-name: YDB + ydb-short-name: YDB + yandex-cloud: Yandex.Cloud + ydb-name: YDB + objstorage-full-name: Yandex Object Storage + sf-name: Cloud Functions + concept_secondary_index: ../../../../concepts/secondary_indexes + concept_table: ../../../../concepts/datamodel/table + ydb-binaries-url: https://binaries.ydb.tech + ydbd-install-url: https://install.ydb.tech + ydb-cli-install-url: https://install.ydb.tech/cli + ydb-stable-binary-archive: ydbd-stable-linux-amd64.tar.gz + ydb_local_docker_image: cr.yandex/yc/yandex-docker-local-ydb + ydb_local_docker_image_tag: latest + managed-k8s-full-name: Yandex Managed Service for Kubernetes + managed-k8s-name: Managed Service for Kubernetes + s3-storage-host: s3.mds.yandex.net + objstorage-name: Object Storage + ydb-cli: ydb + k8s: Kubernetes + quickstart-path: ../../../../getting_started/quickstart.md + oss: true + feature_not_null_for_pk: true + ydb_non_deterministic_functions: true + + ydb-doc-repo: https://github.com/ydb-platform/ydb/tree/main/ydb/docs + + corporate-paste: https://www.paste.example.com + corporate-yt: https://www.yt.example.com + corporate-yt-cluster: example-cluster diff --git a/ydb/docs/redirects.yaml b/ydb/docs/redirects.yaml new file mode 100644 index 0000000000..fd37150a4b --- /dev/null +++ b/ydb/docs/redirects.yaml @@ -0,0 +1,23 @@ +common: + - from: /reference/ydb-cli/table-ttl-drop.md + to: /reference/ydb-cli/table-ttl-reset.md + - from: changelog.md + to: changelog-server.md + - from: /administration/quickstart.md + to: /getting_started/quickstart.md + - from: /getting_started/create_db.md + to: /getting_started/quickstart.md + - from: /getting_started/auth.md + to: /concepts/auth.md + - from: /getting_started/cli.md + to: /reference/ydb-cli/index.md + - from: /getting_started/sdk.md + to: /reference/ydb-sdk/index.md + - from: /ops/devslice-user-guide-k8s-baremetal-host.md + to: /ops/devslice-setup-kikimr-slice.md + +ru: + - from: /concepts/column-table.md + to: /concepts/datamodel/table.md + - from: /postgresql/index.md + to: /postgresql/intro.md diff --git a/ydb/docs/ru/overlay/toc_p.yaml b/ydb/docs/ru/overlay/toc_p.yaml new file mode 100644 index 0000000000..760216782b --- /dev/null +++ b/ydb/docs/ru/overlay/toc_p.yaml @@ -0,0 +1,4 @@ +title: YDB +href: index.yaml +items: +- include: { mode: link, path: toc_i.yaml } diff --git a/ydb/docs/ru/presets.yaml b/ydb/docs/ru/presets.yaml new file mode 100644 index 0000000000..b569fea50a --- /dev/null +++ b/ydb/docs/ru/presets.yaml @@ -0,0 +1,3 @@ +default: + lang: ru + # link-console-main: https://console.cloud.yandex.ru diff --git a/ydb/docs/ru/toc.yaml b/ydb/docs/ru/toc.yaml new file mode 100644 index 0000000000..a16b8c9b3c --- /dev/null +++ b/ydb/docs/ru/toc.yaml @@ -0,0 +1,3 @@ +title: YDB +items: +- include: { mode: merge, path: core/toc_m.yaml }
\ No newline at end of file diff --git a/ydb/docs/ya.make b/ydb/docs/ya.make new file mode 100644 index 0000000000..493c39597a --- /dev/null +++ b/ydb/docs/ya.make @@ -0,0 +1,3 @@ +DOCS() + +END() diff --git a/ydb/ya.make b/ydb/ya.make index a670842997..cc6811569e 100644 --- a/ydb/ya.make +++ b/ydb/ya.make @@ -5,6 +5,7 @@ RECURSE( public services tests + docs docs/ru/core docs/en/core ) |