|
1 | 1 | --- |
2 | | -title: Docker & Local Deployments |
| 2 | +title: Deploying on Docker |
3 | 3 | --- |
4 | 4 |
|
5 | 5 | import StepsWrap from '@site/src/components/StepsWrap'; |
6 | 6 | import StepContent from '@site/src/components/Steps/step-content'; |
7 | 7 |
|
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 | | - |
21 | 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. |
22 | 9 |
|
23 | | - |
| 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 | +::: |
24 | 13 |
|
25 | 14 | <StepsWrap> |
26 | 15 | <StepContent number="1"> |
@@ -268,119 +257,4 @@ SELECT |
268 | 257 | ``` |
269 | 258 |
|
270 | 259 | </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> |
0 commit comments