Skip to content

Commit 5e139b1

Browse files
authored
docs: stage guide updates (#1801)
* Update 00-deploying-local.md * Update 00-what-is-stage.md
1 parent 27c6138 commit 5e139b1

File tree

2 files changed

+14
-137
lines changed

2 files changed

+14
-137
lines changed

docs/en/guides/10-deploy/01-deploy/01-non-production/00-deploying-local.md

Lines changed: 5 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
11
---
2-
title: Docker & Local Deployments
2+
title: Deploying on Docker
33
---
44

55
import StepsWrap from '@site/src/components/StepsWrap';
66
import StepContent from '@site/src/components/Steps/step-content';
77

8-
To quickly access Databend features and gain practical expertise, you have the following deployment options:
9-
10-
- [Deploying with Docker](#deploying-databend-on-docker): You can deploy Databend along with [MinIO](https://min.io/) on Docker for a containerized setup.
11-
- [Deploying on Local Machine](#deploying-a-local-databend): You can opt for a local deployment and use the file system as storage if object storage is unavailable.
12-
13-
:::note non-production use only
14-
15-
- Object storage is a requirement for production use of Databend. The file system should only be used for evaluation, testing, and non-production scenarios.
16-
- The MinIO deployment covered in this chapter is only suitable for development and demonstration. Due to the limited resources in a single-machine environment, it is not recommended for production environments or performance testing.
17-
:::
18-
19-
## Deploying on Docker
20-
218
In this guide, you will deploy Databend along with [MinIO](https://min.io/) using [Docker](https://www.docker.com/) for a containerized setup on an [Amazon EC2](https://aws.amazon.com/ec2/) Ubuntu virtual machine.
229

23-
![Alt text](/img/deploy/docker-deploy.png)
10+
:::note non-production use only
11+
The MinIO deployment covered in this guide is only suitable for development and demonstration. Due to the limited resources in a single-machine environment, it is not recommended for production environments or performance testing.
12+
:::
2413

2514
<StepsWrap>
2615
<StepContent number="1">
@@ -268,119 +257,4 @@ SELECT
268257
```
269258
270259
</StepContent>
271-
</StepsWrap>
272-
273-
## Deploying on Local Machine
274-
275-
Follow the instructions below to deploy Databend on your local machine.
276-
277-
<StepsWrap>
278-
279-
<StepContent number="1">
280-
281-
### Download Databend
282-
283-
1. Download the installation package suitable for your platform from the [Download](https://www.databend.com/download) page.
284-
285-
2. Extract the installation package to a local directory.
286-
287-
</StepContent>
288-
289-
<StepContent number="2">
290-
291-
### Start Databend
292-
293-
1. Configure an admin user. You will utilize this account to connect to Databend. For more information, see [Configuring Admin Users](../../04-references/01-admin-users.md). For this example, uncomment the following lines to choose this account:
294-
295-
```sql title="databend-query.toml"
296-
[[query.users]]
297-
name = "root"
298-
auth_type = "no_password"
299-
```
300-
301-
2. Open a terminal and navigate to the folder where the extracted files and folders are stored.
302-
303-
3. Run the script **start.sh** in the folder **scripts**:
304-
MacOS might prompt an error saying "_databend-meta can't be opened because Apple cannot check it for malicious software._". To proceed, open **System Settings** on your Mac, select **Privacy & Security** on the left menu, and click **Open Anyway** for databend-meta in the **Security** section on the right side. Do the same for the error on databend-query.
305-
306-
```shell
307-
./scripts/start.sh
308-
```
309-
310-
:::tip
311-
In case you encounter the subsequent error messages while attempting to start Databend:
312-
313-
```shell
314-
==> query.log <==
315-
: No getcpu support: percpu_arena:percpu
316-
: option background_thread currently supports pthread only
317-
Databend Query start failure, cause: Code: 1104, Text = failed to create appender: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }.
318-
```
319-
320-
Run the following commands and try starting Databend again:
321-
322-
```shell
323-
sudo mkdir /var/log/databend
324-
sudo mkdir /var/lib/databend
325-
sudo chown -R $USER /var/log/databend
326-
sudo chown -R $USER /var/lib/databend
327-
```
328-
329-
:::
330-
331-
3. Run the following command to verify Databend has started successfully:
332-
333-
```shell
334-
ps aux | grep databend
335-
336-
---
337-
eric 12789 0.0 0.0 408495808 1040 s003 U+ 2:16pm 0:00.00 grep databend
338-
eric 12781 0.0 0.5 408790416 38896 s003 S 2:15pm 0:00.05 bin/databend-query --config-file=configs/databend-query.toml
339-
eric 12776 0.0 0.3 408654368 24848 s003 S 2:15pm 0:00.06 bin/databend-meta --config-file=configs/databend-meta.toml
340-
```
341-
342-
</StepContent>
343-
344-
<StepContent number="3">
345-
346-
### Connect to Databend
347-
348-
To establish a connection with Databend, you'll use the BendSQL CLI tool in this step. For instructions on how to install and operate BendSQL, see [BendSQL](../../../30-sql-clients/00-bendsql/index.md).
349-
350-
1. To establish a connection with a local Databend, execute the following command:
351-
352-
```shell
353-
eric@Erics-iMac ~ % bendsql
354-
Welcome to BendSQL 0.13.2-4419bda(2024-02-02T04:21:46.064145000Z).
355-
Connecting to localhost:8000 as user root.
356-
Connected to DatabendQuery v1.2.252-nightly-193ed56304(rust-1.75.0-nightly-2023-12-12T22:07:25.371440000Z)
357-
358-
root@localhost:8000/default>
359-
```
360-
361-
2. Query the Databend version to verify the connection:
362-
363-
```sql
364-
root@localhost> SELECT VERSION();
365-
366-
SELECT
367-
VERSION()
368-
369-
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
370-
│ version() │
371-
│ String │
372-
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
373-
│ DatabendQuery v1.1.75-nightly-59eea5df495245b9475f81a28c7b688f013aac05(rust-1.72.0-nightly-2023-06-28T01:04:32.054683000Z) │
374-
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
375-
1 row in 0.024 sec. Processed 1 rows, 1B (41.85 rows/s, 42B/s)
376-
```
377-
378-
</StepContent>
379-
</StepsWrap>
380-
381-
## Next Steps
382-
383-
After deploying Databend, you might need to learn about the following topics:
384-
385-
- [Load & Unload Data](/guides/load-data): Manage data import/export in Databend.
386-
- [Visualize](/guides/visualize): Integrate Databend with visualization tools for insights.
260+
</StepsWrap>

docs/en/guides/40-load-data/00-stage/00-what-is-stage.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ Utilizing a stage for loading data also improves the efficiency of uploading, ma
1010

1111
Based on the actual storage location and accessibility, stages can be categorized into these types: Internal Stage, External Stage, and User Stage. The following table summarizes the characteristics of different stage types in Databend, including their storage locations, accessibility, and recommended usage scenarios:
1212

13-
| Stage Type | Storage Location | Accessibility | When to Choose |
14-
| -------------- | ---------------------------------- | ----------------------------------------------- | ------------------------------------------------- |
15-
| Internal Stage | Object storage where Databend sits | Accessible to all users within the organization | Suitable for shared data within the organization |
16-
| External Stage | External object storage | Accessible to all users within the organization | Ideal for integrating with external data sources |
17-
| User Stage | Object storage where Databend sits | Accessible only to the respective user | Perfect for personal data files or temporary data |
18-
13+
| | User Stage | Internal Stage | External Stage |
14+
|----------------------|------------------------------------|--------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
15+
| **Storage Location** | Internal object storage (Databend) | Internal object storage (Databend) | External object storage (e.g., S3, Azure) |
16+
| **Creation Method** | Automatically created | Manually created via: `CREATE STAGE stage_name;` | Manually created via: `CREATE STAGE stage_name` `'s3://bucket/prefix/'` `CONNECTION=(endpoint_url='x', ...);` |
17+
| **Access Control** | Only accessible by the user | Can be shared with other users or roles | Can be shared with other users or roles |
18+
| **Drop Stage** | Not allowed | Deletes the stage and clears files in it | Deletes only the stage; files in the external location are retained |
19+
| **File Upload** | Must upload files to Databend | Must upload files to Databend | No upload needed; used to read or unload data from/to external storage |
20+
| **Usage Scenario** | Personal/private data | Team/shared data | External data integration or unloading |
21+
| **Path Format** | `@~/` | `@stage_name/` | `@stage_name/` |
1922
### Internal Stage
2023

2124
Files in an internal stage are actually stored in the object storage where Databend resides. An internal stage is accessible to all users within your organization, allowing each user to utilize the stage for their data loading or export tasks. Similar to creating a folder, specifying a name is necessary when creating a stage. Below is an example of creating an internal stage with the [CREATE STAGE](/sql/sql-commands/ddl/stage/ddl-create-stage) command:

0 commit comments

Comments
 (0)