Skip to content

Commit 2b7fb32

Browse files
authored
Merge branch 'main' into enable_MD010
2 parents 80474aa + abd8e3c commit 2b7fb32

File tree

252 files changed

+3164
-2877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+3164
-2877
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ ClickHouse/
6262
# Ignore table of contents files
6363
docs/cloud/reference/release-notes-index.md
6464
docs/whats-new/changelog/index.md
65+
docs/cloud/manage/api/api-reference-index.md

contribute/style-guide.md

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
11
# ClickHouse docs style guide
22

3-
In this document, you will find a number of style guidelines for writing documentation.
4-
The rules in this guide are intended to assist in helping us to create a high
5-
quality documentation offering on par with the quality of ClickHouse itself.
3+
In this document, you will find a number of style guidelines for writing ClickHouse
4+
documentation. As documentation is a collective effort, these guidelines are
5+
intended to help all of us ensure quality and consistency across our documentation.
66

77
## YAML front matter
88

9-
Begin every new markdown document with YAML front-matter:
9+
Begin every new Markdown document with YAML front-matter:
1010

1111
```markdown
1212
---
13-
title: Using a clickhouse-local database
14-
sidebar_label: Using clickhouse-local database
13+
title: 'Using a clickhouse-local database'
14+
sidebar_label: 'Using clickhouse-local database'
1515
slug: /chdb/guides/clickhouse-local
16-
description: Learn how to use a clickhouse-local database with chDB
17-
keywords: [chdb, clickhouse-local]
16+
description: 'Learn how to use a clickhouse-local database with chDB'
17+
keywords: ['chdb', 'clickhouse-local']
1818
---
1919
```
2020

21+
### Associated markdown rule or CI check
22+
23+
#### front-matter validation
24+
25+
There is a custom Docusaurus plugin which runs on build that makes the following
26+
checks on front-matter:
27+
28+
- title, description and slug are specified.
29+
- keywords use flow style arrays with single quoted items e.g.
30+
`keywords: ['integrations']`
31+
- single quotes are used for title, description, slug, sidebar_label
32+
- there is an empty line after the YAML frontmatter block
33+
34+
For implementation details see [plugins/frontmatter-validation](https://github.com/ClickHouse/clickhouse-docs/tree/main/plugins/frontmatter-validation)
35+
2136
## Explicit header tags
2237

2338
Due to the way our translation system works, it is necessary to add an explicit
@@ -191,4 +206,37 @@ export function Anchor(props) {
191206
```
192207
- Replace `<span id="some-id"></span>` with `Anchor id="some-id"/>`
193208

209+
### Floating pages
210+
211+
In order to prevent pages from becoming 'floating' or 'orphaned' it is
212+
necessary that you add a newly created page to `sidebars.js`. We have a [custom
213+
docusaurus plugin](plugins/checkFloatingPages.js) to catch dangling pages.
214+
215+
If there is some specific reason that you need to bypass this check, you can
216+
add an exception to `floating-pages-exceptions.txt` in the plugins directory.
217+
218+
When adding a new page from the ClickHouse/ClickHouse repo this check will fail
219+
unless the file is in a folder which [`sidebars.js`](https://github.com/ClickHouse/clickhouse-docs/blob/main/sidebars.js)
220+
uses with `type: autogenerated` to generate the navigation items from the markdown
221+
files in the folder.
222+
223+
If you've added a new page on ClickHouse/ClickHouse and this check is failing.
224+
225+
For example:
226+
227+
```text
228+
✅ All markdown files passed frontmatter validation.
229+
Loaded 3 exceptions from /opt/clickhouse-docs/plugins/floating-pages-exceptions.txt
230+
Skipping excepted page: index
231+
Skipping excepted page: integrations/language-clients/java/client-v1
232+
Skipping excepted page: integrations/language-clients/java/jdbc-v1
233+
�[31m1 floating pages found:�[0m
234+
- /opt/clickhouse-docs/docs/operations/query-condition-cache.md
235+
```
236+
237+
You will need to open a PR on docs repo to add this page to [`floating-pages-exceptions.txt`](https://github.com/ClickHouse/clickhouse-docs/blob/main/plugins/floating-pages-exceptions.txt). Once it is merged
238+
you can then rerun the docs check on the ClickHouse/ClickHouse repo which
239+
should pass. Finally open another PR on the docs repo again to remove the
240+
file from the exception list and add it to `sidebars.js` in the appropriate
241+
sidebar.
194242

docs/_snippets/_GCS_authentication_and_bucket.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,47 @@ import GCS_create_service_account_a from '@site/static/images/integrations/data-
66
import GCS_create_service_account_2 from '@site/static/images/integrations/data-ingestion/s3/GCS-create-service-account-2.png';
77
import GCS_create_service_account_3 from '@site/static/images/integrations/data-ingestion/s3/GCS-create-service-account-3.png';
88
import GCS_guide_key from '@site/static/images/integrations/data-ingestion/s3/GCS-guide-key.png';
9+
import Image from '@theme/IdealImage';
910

1011
<details>
1112
<summary>Create GCS buckets and an HMAC key</summary>
1213

1314
### ch_bucket_us_east1 {#ch_bucket_us_east1}
1415

15-
<img src={GCS_bucket_1} alt="Creating a GCS bucket in US East 1" />
16+
<Image size="md" img={GCS_bucket_1} alt="Creating a GCS bucket in US East 1" border />
1617

1718
### ch_bucket_us_east4 {#ch_bucket_us_east4}
1819

19-
<img src={GCS_bucket_2} alt="Creating a GCS bucket in US East 4" />
20+
<Image size="md" img={GCS_bucket_2} alt="Creating a GCS bucket in US East 4" border />
2021

2122
### Generate an Access key {#generate-an-access-key}
2223

2324
### Create a service account HMAC key and secret {#create-a-service-account-hmac-key-and-secret}
2425

2526
Open **Cloud Storage > Settings > Interoperability** and either choose an existing **Access key**, or **CREATE A KEY FOR A SERVICE ACCOUNT**. This guide covers the path for creating a new key for a new service account.
2627

27-
<img src={GCS_create_service_account_key} alt="Generating a service account HMAC key in GCS" />
28+
<Image size="md" img={GCS_create_service_account_key} alt="Generating a service account HMAC key in GCS" border />
2829

2930
### Add a new service account {#add-a-new-service-account}
3031

3132
If this is a project with no existing service account, **CREATE NEW ACCOUNT**.
3233

33-
<img src={GCS_create_service_account_0} alt="Adding a new service account in GCS" />
34+
<Image size="md" img={GCS_create_service_account_0} alt="Adding a new service account in GCS" border />
3435

3536
There are three steps to creating the service account, in the first step give the account a meaningful name, ID, and description.
3637

37-
<img src={GCS_create_service_account_a} alt="Defining a new service account name and ID in GCS" />
38+
<Image size="md" img={GCS_create_service_account_a} alt="Defining a new service account name and ID in GCS" border />
3839

3940
In the Interoperability settings dialog the IAM role **Storage Object Admin** role is recommended; select that role in step two.
4041

41-
<img src={GCS_create_service_account_2} alt="Selecting IAM role Storage Object Admin in GCS" />
42+
<Image size="md" img={GCS_create_service_account_2} alt="Selecting IAM role Storage Object Admin in GCS" border />
4243

4344
Step three is optional and not used in this guide. You may allow users to have these privileges based on your policies.
4445

45-
<img src={GCS_create_service_account_3} alt="Configuring additional settings for the new service account in GCS" />
46+
<Image size="md" img={GCS_create_service_account_3} alt="Configuring additional settings for the new service account in GCS" border />
4647

4748
The service account HMAC key will be displayed. Save this information, as it will be used in the ClickHouse configuration.
4849

49-
<img src={GCS_guide_key} alt="Retrieving the generated HMAC key for GCS" />
50+
<Image size="md" img={GCS_guide_key} alt="Retrieving the generated HMAC key for GCS" border />
5051

5152
</details>

docs/_snippets/_S3_authentication_and_bucket.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Image from '@theme/IdealImage';
12
import s3_1 from '@site/static/images/_snippets/s3/s3-1.png';
23
import s3_2 from '@site/static/images/_snippets/s3/s3-2.png';
34
import s3_3 from '@site/static/images/_snippets/s3/s3-3.png';
@@ -27,85 +28,85 @@ In this procedure, we'll be creating a service account user, not a login user.
2728

2829
2. In "users", select **Add users**
2930

30-
<img src={s3_1} alt="create_iam_user_0"/>
31+
<Image size="md" img={s3_1} alt="AWS IAM Management Console - Adding a new user" border force/>
3132

3233
3. Enter the user name and set the credential type to **Access key - Programmatic access** and select **Next: Permissions**
3334

34-
<img src={s3_2} alt="create_iam_user_1"/>
35+
<Image size="md" img={s3_2} alt="Setting user name and access type for IAM user" border force/>
3536

3637
4. Do not add the user to any group; select **Next: Tags**
3738

38-
<img src={s3_3} alt="create_iam_user_2"/>
39+
<Image size="md" img={s3_3} alt="Skipping group assignment for IAM user" border force/>
3940

4041
5. Unless you need to add any tags, select **Next: Review**
4142

42-
<img src={s3_4} alt="create_iam_user_3"/>
43+
<Image size="md" img={s3_4} alt="Skipping tag assignment for IAM user" border force/>
4344

4445
6. Select **Create User**
4546

4647
:::note
4748
The warning message stating that the user has no permissions can be ignored; permissions will be granted on the bucket for the user in the next section
4849
:::
4950

50-
<img src={s3_5} alt="create_iam_user_4"/>
51+
<Image size="md" img={s3_5} alt="Creating the IAM user with no permissions warning" border force/>
5152

5253
7. The user is now created; click on **show** and copy the access and secret keys.
5354
:::note
5455
Save the keys somewhere else; this is the only time that the secret access key will be available.
5556
:::
5657

57-
<img src={s3_6} alt="create_iam_user_5"/>
58+
<Image size="md" img={s3_6} alt="Viewing and copying the IAM user access keys" border force/>
5859

5960
8. Click close, then find the user in the users screen.
6061

61-
<img src={s3_7} alt="create_iam_user_6"/>
62+
<Image size="md" img={s3_7} alt="Finding the newly created IAM user in the users list" border force/>
6263

6364
9. Copy the ARN (Amazon Resource Name) and save it for use when configuring the access policy for the bucket.
6465

65-
<img src={s3_8} alt="create_iam_user_7"/>
66+
<Image size="md" img={s3_8} alt="Copying the ARN of the IAM user" border force/>
6667

6768
### Create an S3 bucket {#create-an-s3-bucket}
6869
1. In the S3 bucket section, select **Create bucket**
6970

70-
<img src={s3_9} alt="create_s3_bucket_0"/>
71+
<Image size="md" img={s3_9} alt="Starting the S3 bucket creation process" border force/>
7172

7273
2. Enter a bucket name, leave other options default
7374
:::note
7475
The bucket name must be unique across AWS, not just the organization, or it will emit an error.
7576
:::
7677
3. Leave `Block all Public Access` enabled; public access is not needed.
7778

78-
<img src={s3_a} alt="create_s3_bucket_2"/>
79+
<Image size="md" img={s3_a} alt="Configuring the S3 bucket settings with public access blocked" border force/>
7980

8081
4. Select **Create Bucket** at the bottom of the page
8182

82-
<img src={s3_b} alt="create_s3_bucket_3"/>
83+
<Image size="md" img={s3_b} alt="Finalizing S3 bucket creation" border force/>
8384

8485
5. Select the link, copy the ARN, and save it for use when configuring the access policy for the bucket.
8586

8687
6. Once the bucket has been created, find the new S3 bucket in the S3 buckets list and select the link
8788

88-
<img src={s3_c} alt="create_s3_bucket_4"/>
89+
<Image size="md" img={s3_c} alt="Finding the newly created S3 bucket in the buckets list" border force/>
8990

9091
7. Select **Create folder**
9192

92-
<img src={s3_d} alt="create_s3_bucket_5"/>
93+
<Image size="md" img={s3_d} alt="Creating a new folder in the S3 bucket" border force/>
9394

9495
8. Enter a folder name that will be the target for the ClickHouse S3 disk and select **Create folder**
9596

96-
<img src={s3_e} alt="create_s3_bucket_6"/>
97+
<Image size="md" img={s3_e} alt="Setting the folder name for ClickHouse S3 disk usage" border force/>
9798

9899
9. The folder should now be visible on the bucket list
99100

100-
<img src={s3_f} alt="create_s3_bucket_7"/>
101+
<Image size="md" img={s3_f} alt="Viewing the newly created folder in the S3 bucket" border force/>
101102

102103
10. Select the checkbox for the new folder and click on **Copy URL** Save the URL copied to be used in the ClickHouse storage configuration in the next section.
103104

104-
<img src={s3_g} alt="create_s3_bucket_8"/>
105+
<Image size="md" img={s3_g} alt="Copying the S3 folder URL for ClickHouse configuration" border force/>
105106

106107
11. Select the **Permissions** tab and click on the **Edit** button in the **Bucket Policy** section
107108

108-
<img src={s3_h} alt="create_s3_bucket_9"/>
109+
<Image size="md" img={s3_h} alt="Accessing the S3 bucket policy configuration" border force/>
109110

110111
12. Add a bucket policy, example below:
111112
```json
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Image from '@theme/IdealImage';
12
import ip_allow_list_check_list from '@site/static/images/_snippets/ip-allow-list-check-list.png';
23
import ip_allow_list_add_current_ip from '@site/static/images/_snippets/ip-allow-list-add-current-ip.png';
34

@@ -6,10 +7,10 @@ import ip_allow_list_add_current_ip from '@site/static/images/_snippets/ip-allow
67

78
From your ClickHouse Cloud services list choose the service that you will work with and switch to **Settings**. If the IP Access List does not contain the IP Address or range of the remote system that needs to connect to your ClickHouse Cloud service, then you can resolve the problem with **Add IPs**:
89

9-
<img src={ip_allow_list_check_list} class="image" alt="Check to see if the service allows traffic" />
10+
<Image size="md" img={ip_allow_list_check_list} alt="Check to see if the service allows traffic from your IP address in the IP Access List" border />
1011

1112
Add the individual IP Address, or the range of addresses that need to connect to your ClickHouse Cloud service. Modify the form as you see fit and then **Save**.
1213

13-
<img src={ip_allow_list_add_current_ip} class="image" alt="Add your current IP address" />
14+
<Image size="md" img={ip_allow_list_add_current_ip} alt="Add your current IP address to the IP Access List in ClickHouse Cloud" border />
1415

1516
</details>

docs/_snippets/_clickhouse_mysql_cloud_setup.mdx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,38 @@ import mysql_2 from '@site/static/images/_snippets/mysql2.png';
33
import mysql_3 from '@site/static/images/_snippets/mysql3.png';
44
import mysql_4 from '@site/static/images/_snippets/mysql4.png';
55
import mysql_5 from '@site/static/images/_snippets/mysql5.png';
6+
import Image from '@theme/IdealImage';
67

78
<br/>
89
1. After creating your ClickHouse Cloud Service, on the `Connect your app` screen, select MySQL from the drop down.
910
<br/>
1011

11-
<div class="eighty-percent">
12-
<img src={mysql_1} class="image" alt="Credentials screen - Prompt" />
13-
</div>
12+
<Image size="md" img={mysql_1} alt="ClickHouse Cloud credentials screen showing MySQL interface selection dropdown" border />
1413

1514

1615
2. Toggle the switch to enable the MySQL interface for this specific service. This will expose port `3306` for this service and prompt you with your MySQL connection screen that include your unique MySQL username.
1716

18-
<div class="eighty-percent">
19-
<img src={mysql_2} class="image" alt="Credentials screen - Enabled MySQL" />
20-
</div>
17+
<Image size="md" img={mysql_2} alt="ClickHouse Cloud MySQL interface enabling toggle and connection details" border />
2118
<br/>
2219

2320
Alternatively, in order to enable the MySQL interface for an existing service:
2421

2522
3. Ensure your service is in `Running` state then click on the service you want to enable the MySQL interface for. Select "Connect" from the left menu:
2623

2724
<br/>
28-
<div class="eighty-percent">
29-
<img src={mysql_3} class="image" alt="Connection screen - Prompt MySQL" />
30-
</div>
25+
<Image size="md" img={mysql_3} alt="ClickHouse Cloud service connection screen with Connect option highlighted" border />
3126
<br/>
3227

3328

3429
4. Select MySQL from the `Connect With` drop down.
3530

3631
<br/>
37-
<img src={mysql_4} class="image" alt="Connection screen - Prompt MySQL" />
32+
<Image size="md" img={mysql_4} alt="ClickHouse Cloud connection screen showing MySQL option selection" border />
3833
<br/>
3934

4035
5. Toggle the switch to enable the MySQL interface for this specific service. This will expose port `3306` for this service and prompt you with your MySQL connection screen that include your unique MySQL username.
4136

42-
<img src={mysql_5} class="image" alt="Connection screen - MySQL Enabled" />
37+
<Image size="md" img={mysql_5} alt="ClickHouse Cloud connection screen with MySQL interface enabled showing connection details" border />
4338

4439
## Creating multiple MySQL users in ClickHouse Cloud {#creating-multiple-mysql-users-in-clickhouse-cloud}
4540

docs/_snippets/_gather_your_details_http.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import cloud_connect_button from '@site/static/images/_snippets/cloud-connect-button.png';
22
import connection_details_https from '@site/static/images/_snippets/connection-details-https.png';
3+
import Image from '@theme/IdealImage';
34

45
To connect to ClickHouse with HTTP(S) you need this information:
56

@@ -11,10 +12,10 @@ To connect to ClickHouse with HTTP(S) you need this information:
1112

1213
The details for your ClickHouse Cloud service are available in the ClickHouse Cloud console. Select the service that you will connect to and click **Connect**:
1314

14-
<img src={cloud_connect_button} class="image" alt="ClickHouse Cloud service connect button" />
15+
<Image img={cloud_connect_button} size="md" alt="ClickHouse Cloud service connect button" border />
1516

1617
Choose **HTTPS**, and the details are available in an example `curl` command.
1718

18-
<img src={connection_details_https} class="image" alt="ClickHouse Cloud HTTPS connection details" />
19+
<Image img={connection_details_https} size="md" alt="ClickHouse Cloud HTTPS connection details" border/>
1920

2021
If you are using self-managed ClickHouse, the connection details are set by your ClickHouse administrator.

docs/_snippets/_gather_your_details_native.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import cloud_connect_button from '@site/static/images/_snippets/cloud-connect-button.png';
22
import connection_details_native from '@site/static/images/_snippets/connection-details-native.png';
3+
import Image from '@theme/IdealImage';
4+
35

46
To connect to ClickHouse with native TCP you need this information:
57

@@ -11,10 +13,10 @@ To connect to ClickHouse with native TCP you need this information:
1113

1214
The details for your ClickHouse Cloud service are available in the ClickHouse Cloud console. Select the service that you will connect to and click **Connect**:
1315

14-
<img src={cloud_connect_button} class="image" alt="ClickHouse Cloud service connect button" />
16+
<Image img={cloud_connect_button} size="md" alt="ClickHouse Cloud service connect button" border/>
1517

1618
Choose **Native**, and the details are available in an example `clickhouse-client` command.
1719

18-
<img src={connection_details_native} class="image" alt="ClickHouse Cloud Native TCP connection details" />
20+
<Image img={connection_details_native} size="md" alt="ClickHouse Cloud Native TCP connection details" border/>
1921

2022
If you are using self-managed ClickHouse, the connection details are set by your ClickHouse administrator.

docs/_snippets/_launch_sql_console.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import cloud_connect_to_sql_console from '@site/static/images/_snippets/cloud-connect-to-sql-console.png';
22
import createservice8 from '@site/static/images/_snippets/createservice8.png';
3+
import Image from '@theme/IdealImage';
4+
35

46
:::tip SQL console
57
If you need a SQL client connection, your ClickHouse Cloud service has an associated web based SQL console; expand **Connect to SQL console** below for details.
@@ -10,10 +12,10 @@ If you need a SQL client connection, your ClickHouse Cloud service has an associ
1012

1113
From your ClickHouse Cloud services list, click on a service.
1214

13-
<img src={cloud_connect_to_sql_console} class="image" alt="Connect to SQL Console" />
15+
<Image img={cloud_connect_to_sql_console} alt="Connect to SQL Console" size="lg" force border/>
1416

1517
This will redirect you to the SQL console.
1618

17-
<img src={createservice8} class="image" alt="SQL Console" />
19+
<Image img={createservice8} alt="SQL Console" size="lg" force border/>
1820

1921
</details>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
import Image from '@theme/IdealImage';
12
import cloud_service_action_menu from '@site/static/images/_snippets/cloud-service-actions-menu.png';
23

34
Select your service, followed by `Data souces` -> `Predefined sample data`.
45

5-
<img src={cloud_service_action_menu} class="image" alt="Cloud service Actions menu" />
6+
<Image size="md" img={cloud_service_action_menu} alt="ClickHouse Cloud service Actions menu showing Data sources and Predefined sample data options" border />

0 commit comments

Comments
 (0)