You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import StepsWrap from '@site/src/components/StepsWrap';
6
-
import StepContent from '@site/src/components/Steps/step-content';
7
-
8
-
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.
5
+
This guide walks you through deploying Databend with [MinIO](https://min.io/) using [Docker](https://www.docker.com/) for a fully containerized setup on your local machine.
9
6
10
7
:::note non-production use only
11
8
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
9
:::
13
10
14
-
<StepsWrap>
15
-
<StepContentnumber="1">
16
-
17
-
### Set up Environment
18
-
19
-
Before you start, launch an instance on Amazon EC2 and install the Docker engine.
20
-
21
-
1. Log into the [Amazon EC2 console](https://console.aws.amazon.com/ec2/), and launch an Ubuntu instance with a memory capacity of at least 8 GiB. Once the instance is up, you can find the public IP address and the private IP address assigned to the instance on the instance details page.
22
-
23
-

11
+
### Before You Start
24
12
25
-
2. Create a security group, and add an inbound rule to allow access to your instance through port `9001`, then add the security group to the instance.
13
+
Before you start, ensure you have the following prerequisites in place:
26
14
27
-

28
-
29
-
3. Connect to your instance. There are many ways to connect to your instance from a local machine. For more information, see [https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connect-to-linux-instance.html](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connect-to-linux-instance.html).
30
-
31
-
4. Follow the [Docker User Manual](https://docs.docker.com/engine/install/ubuntu/) to install the Docker engine on your instance.
32
-
33
-
</StepContent>
34
-
<StepContentnumber="2">
15
+
- Ensure that [Docker](https://www.docker.com/) is installed on your local machine.
16
+
- Ensure that BendSQL is installed on your machine. See [Installing BendSQL](/guides/sql-clients/bendsql/#installing-bendsql) for instructions on how to install BendSQL using various package managers.
35
17
36
18
### Deploy MinIO
37
19
@@ -44,167 +26,170 @@ Before you start, launch an instance on Amazon EC2 and install the Docker engine
44
26
:::
45
27
46
28
```shell
47
-
mkdir -p ${HOME}/minio/data
48
-
49
-
docker run -d \
50
-
--name minio \
51
-
--user $(id -u):$(id -g) \
52
-
--net=host \
53
-
-e "MINIO_ROOT_USER=ROOTUSER" \
54
-
-e "MINIO_ROOT_PASSWORD=CHANGEME123" \
55
-
-v ${HOME}/minio/data:/data \
56
-
minio/minio server /data --console-address ":9001"
29
+
docker run -d --name minio \
30
+
-e "MINIO_ACCESS_KEY=ROOTUSER" \
31
+
-e "MINIO_SECRET_KEY=CHANGEME123" \
32
+
-p 9000:9000 \
33
+
-p 9001:9001 \
34
+
minio/minio server /data \
35
+
--address :9000 \
36
+
--console-address :9001
57
37
```
58
38
59
39
2. Run the command `docker logs minio` to find the MinIO API and console (WebUI) addresses in the log message:
60
40
61
41
```shell
62
42
docker logs minio
43
+
```
63
44
64
-
Formatting 1st pool, 1 set(s), 1 drives per set.
65
-
WARNING: Host local has more than 0 drives of set. A host failure will result in data becoming unavailable.
45
+
```
46
+
INFO: WARNING: MINIO_ACCESS_KEY and MINIO_SECRET_KEY are deprecated.
47
+
Please use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD
48
+
INFO: Formatting 1st pool, 1 set(s), 1 drives per set.
49
+
INFO: WARNING: Host local has more than 0 drives of set. A host failure will result in data becoming unavailable.
66
50
MinIO Object Storage Server
67
-
Copyright: 2015-2024 MinIO, Inc.
68
-
License: GNU AGPLv3 [https://www.gnu.org/licenses/agpl-3.0.html](https://www.gnu.org/licenses/agpl-3.0.html)
You are running an older version of MinIO released 5 days before the latest release
61
+
Update: Run `mc admin update ALIAS`
80
62
```
81
63
82
-
3. Open your web browser on your local machine and visit the MinIO console using the WebUI address shown in the logs above (replace the IP address with your instance's public IP address). For example, if your instance's public IP address is `3.142.131.212`, then your MinIO console address would be `http://3.142.131.212:9001`.
64
+
3. Open your web browser on your local machine and visit the MinIO console using the WebUI address shown (`http://127.0.0.1:9001`) in the logs above.
83
65
84
66

85
67
86
68
4. Log into the MinIO console with the credentials `ROOTUSER`/`CHANGEME123`, and create a bucket named `databend`.
87
69
88
70

89
71
90
-
</StepContent>
91
-
92
-
<StepContentnumber="3">
93
-
94
72
### Deploy Databend
95
73
96
74
1. Pull and run the Databend image as a container with the following command:
97
75
98
76
:::note
99
77
100
-
- Replace the `AWS_S3_ENDPOINT` value with your MinIO API address as shown in the MinIO log message returned by `docker logs minio`.
101
78
- When starting the Databend Docker container, you can specify the username and password using the environment variables `QUERY_DEFAULT_USER` and `QUERY_DEFAULT_PASSWORD`. If these variables are not provided, a default root user will be created without a password.
102
79
- The command below also creates a SQL user (`databend`/`databend`) which you will need to use to connect to Databend later. If you make changes to the SQL user at this point, ensure that you maintain consistency throughout the entire process.
usage: curl -u${USER} -p${PASSWORD}: --request POST '0.0.0.0:8000/v1/query/' --header 'Content-Type: application/json' --data-raw '{"sql": "SELECT avg(number) FROM numbers(100000000)"}'
220
205
```
221
206
222
-
</StepContent>
223
-
224
-
<StepContent number="4">
225
-
226
207
### Connect to Databend
227
208
228
-
In this step, you'll connect to Databend using [BendSQL](../../../30-sql-clients/00-bendsql/index.md) from your local machine.
229
-
230
-
1. Install BendSQL to your local machine. For instructions, see [Installing BendSQL](../../../30-sql-clients/00-bendsql/index.md#installing-bendsql).
231
-
232
-
2. Launch a terminal on your local machine, then run the command `bendsql -h <instance_public_ip> -u databend -p databend` to establish a connection with Databend. For example, if your instance's public IP address is `3.142.131.212`, the command would be `bendsql -h 3.142.131.212 -u databend -p databend`.
209
+
Launch a terminal on your local machine, then run the following command to connect to Databend:
233
210
234
211
```shell
235
-
bendsql -h 3.142.131.212 -u databend -p databend
212
+
bendsql -u databend -p databend
213
+
```
236
214
237
-
Welcome to BendSQL 0.16.0-homebrew.
238
-
Connecting to 3.142.131.212:8000 as user databend.
239
-
Connected to Databend Query v1.2.410-4b8cd16f0c(rust-1.77.0-nightly-2024-04-08T12:20:44.288903419Z)
215
+
```shell
216
+
Welcome to BendSQL 0.24.1-f1f7de0(2024-12-04T12:31:18.526234000Z).
217
+
Connecting to localhost:8000 as user databend.
218
+
Connected to Databend Query v1.2.697-d40f88cc51(rust-1.85.0-nightly-2025-02-14T11:30:59.842308760Z)
219
+
Loaded 1411 auto complete keywords from server.
220
+
Started web server at 127.0.0.1:8080
240
221
```
241
222
242
223
You're all set! Now, you can execute a simple query to verify the deployment:
0 commit comments