|
1 | 1 | --- |
2 | 2 | title: "Module: JUICE" |
3 | 3 | weight: 4500 |
4 | | -description: JuiceFS distributed filesystem using PostgreSQL as metadata engine, with PITR-capable shared storage. |
| 4 | +description: Use JuiceFS distributed filesystem with PostgreSQL metadata to provide shared POSIX storage. |
5 | 5 | icon: fas fa-folder-tree |
6 | 6 | module: [JUICE] |
7 | 7 | categories: [Reference] |
8 | 8 | --- |
9 | 9 |
|
10 | | -[JuiceFS](https://juicefs.com/) is a high-performance POSIX-compatible distributed filesystem that can use PostgreSQL as its metadata engine. |
| 10 | +[JuiceFS](https://juicefs.com/) is a high-performance POSIX-compatible distributed filesystem that can mount object storage or databases as a local filesystem. |
11 | 11 |
|
12 | | -Pigsty's JUICE module provides complete JuiceFS deployment and management, with multi-instance support, automated installation, monitoring integration, and filesystem PITR via PostgreSQL backup recovery. |
| 12 | +The `JUICE` module depends on [`NODE`](/docs/node) for infrastructure and package repo, and typically uses [`PGSQL`](/docs/pgsql) as the metadata engine. |
| 13 | +Data storage can be PostgreSQL or [`MINIO`](/docs/minio) / S3 object storage. Monitoring relies on [`INFRA`](/docs/infra) VictoriaMetrics. |
13 | 14 |
|
| 15 | +```mermaid |
| 16 | +flowchart LR |
| 17 | + subgraph Client["App/User"] |
| 18 | + app["POSIX Access"] |
| 19 | + end |
14 | 20 |
|
15 | | --------- |
16 | | - |
17 | | -## Features |
| 21 | + subgraph JUICE["JUICE"] |
| 22 | + jfs["JuiceFS Mount"] |
| 23 | + end |
18 | 24 |
|
19 | | -- **PostgreSQL Metadata Engine**: Uses PostgreSQL for filesystem metadata storage, with HA and PITR capability |
20 | | -- **Flexible Data Storage**: Supports PostgreSQL Large Object, MinIO, S3 and other storage backends |
21 | | -- **Multi-Instance Support**: Single node can mount multiple independent JuiceFS filesystems |
22 | | -- **PITR Capability**: Leverage PostgreSQL backup recovery for filesystem point-in-time recovery |
23 | | -- **Monitoring Integration**: Auto-integrated with VictoriaMetrics monitoring system |
| 25 | + subgraph PGSQL["PGSQL"] |
| 26 | + meta["Metadata DB"] |
| 27 | + end |
24 | 28 |
|
| 29 | + subgraph Object["Object Storage (optional)"] |
| 30 | + s3["S3 / MinIO"] |
| 31 | + end |
25 | 32 |
|
26 | | --------- |
27 | | - |
28 | | -## Config Example |
| 33 | + subgraph INFRA["INFRA (optional)"] |
| 34 | + vm["VictoriaMetrics"] |
| 35 | + end |
29 | 36 |
|
30 | | -Typical JuiceFS configuration using PostgreSQL as metadata and data storage: |
| 37 | + app --> jfs |
| 38 | + jfs --> meta |
| 39 | + jfs -.-> s3 |
| 40 | + jfs -->|/metrics| vm |
31 | 41 |
|
32 | | -```yaml |
33 | | -juice_instances: |
34 | | - jfs: |
35 | | - path : /fs |
36 | | - meta : postgres://dbuser_meta:DBUser.Meta@10.10.10.10:5432/meta |
37 | | - data : --storage postgres --bucket 10.10.10.10:5432/meta --access-key dbuser_meta --secret-key DBUser.Meta |
38 | | - port : 9567 |
| 42 | + style JUICE fill:#5B9CD5,stroke:#4178a8,color:#fff |
| 43 | + style PGSQL fill:#3E668F,stroke:#2d4a66,color:#fff |
| 44 | + style Object fill:#FCDB72,stroke:#d4b85e,color:#333 |
| 45 | + style INFRA fill:#999,stroke:#666,color:#fff |
39 | 46 | ``` |
40 | 47 |
|
41 | | -
|
42 | 48 | -------- |
43 | 49 |
|
44 | | -## Use Cases |
45 | | -
|
46 | | -JUICE module is suitable for: |
47 | | -
|
48 | | -- **AI Coding Sandbox**: Persistent storage for Code-Server, JupyterLab |
49 | | -- **Shared Storage**: Multi-node mount same filesystem for file sharing |
50 | | -- **Data Lake Storage**: Large capacity storage for data analysis, ML tasks |
51 | | -- **Backup Archive**: Low-cost data archiving using object storage backends |
| 50 | +## Features |
52 | 51 |
|
| 52 | +- **PostgreSQL metadata**: Metadata stored in PostgreSQL for easy management and backup |
| 53 | +- **Multi-instance**: One node can mount multiple independent filesystem instances |
| 54 | +- **Multiple data backends**: PostgreSQL, MinIO, S3, and more |
| 55 | +- **Monitoring integration**: Each instance exposes Prometheus / Victoria metrics port |
| 56 | +- **Simple config**: Describe instances with the [**`juice_instances`**](/docs/juice/param#juice_instances) dict |
53 | 57 |
|
54 | 58 | -------- |
55 | 59 |
|
56 | | -## Documentation |
| 60 | +## Quick Start |
57 | 61 |
|
58 | | -- [**Configuration**](config): Configure JuiceFS instances, storage backends and mount options |
59 | | -- [**Parameters**](param): JUICE module parameter reference |
60 | | -- [**Playbook**](playbook): Deployment and management playbook guide |
61 | | -- [**Administration**](admin): JuiceFS management SOPs, including scaling, PITR recovery |
62 | | -- [**Monitoring**](monitor): JuiceFS metrics and Grafana dashboards |
63 | | -- [**FAQ**](faq): Common questions about JUICE module |
| 62 | +Minimal config example (single instance): |
64 | 63 |
|
| 64 | +```yaml |
| 65 | +juice_instances: |
| 66 | + jfs: |
| 67 | + path: /fs |
| 68 | + meta: postgres://dbuser_meta:DBUser.Meta@10.10.10.10:5432/meta |
| 69 | + data: --storage postgres --bucket 10.10.10.10:5432/meta --access-key dbuser_meta --secret-key DBUser.Meta |
| 70 | + port: 9567 |
| 71 | +``` |
65 | 72 |
|
| 73 | +Deploy: |
| 74 | +
|
| 75 | +```bash |
| 76 | +./juice.yml -l <host> |
| 77 | +``` |
0 commit comments