Skip to content

Commit 040085e

Browse files
committed
docs: add usage patterns skeleton
Signed-off-by: Xe Iaso <[email protected]>
1 parent cf083a4 commit 040085e

File tree

3 files changed

+149
-1
lines changed

3 files changed

+149
-1
lines changed

docs/blueprints/geesefs-linux.mdx

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Mount a Tigris bucket with geesefs
2+
3+
[geesefs](https://github.com/yandex-cloud/geesefs) lets you mount S3 buckets to
4+
your local Linux system. This tool works with Tigris too, letting you mount any
5+
Tigris bucket as if it was a normal Linux filesystem.
6+
7+
- Install geesefs
8+
- Configure credentials
9+
- systemd service to start geesefs on boot
10+
- Reboot test
11+
12+
Prerequisites:
13+
14+
- A Tigris account
15+
- A bucket you want to mount into your system (`mybucket`)
16+
- A target location you want to mount your bucket to (`~/data`)
17+
18+
:::note
19+
20+
geesefs uses
21+
[FUSE](https://www.kernel.org/doc/html/latest/filesystems/fuse.html) to mount
22+
buckets into the filesystem. FUSE has limitations involving multiple users
23+
accessing the same mountpoint. If you need multiple users (human or service) to
24+
access the same bucket, consider creating multiple systemd services mounting the
25+
bucket in each user's home directory.
26+
27+
:::
28+
29+
## Installing geesefs
30+
31+
Download the latest release for your machine from
32+
[the list of geesefs releases](https://github.com/yandex-cloud/geesefs/releases)
33+
to `/usr/local/bin`:
34+
35+
<details>
36+
<summary>amd64 Linux</summary>
37+
38+
```text
39+
sudo wget -O /usr/local/bin/geesefs https://github.com/yandex-cloud/geesefs/releases/download/v0.42.0/geesefs-linux-amd64
40+
```
41+
42+
</details>
43+
<details>
44+
<summary>arm64/aarch64 Linux</summary>
45+
46+
```text
47+
sudo wget -O /usr/local/bin/geesefs https://github.com/yandex-cloud/geesefs/releases/download/v0.42.0/geesefs-linux-arm64
48+
```
49+
50+
</details>
51+
52+
Then mark it as executable:
53+
54+
```
55+
sudo chmod +x /usr/local/bin/geesefs
56+
```
57+
58+
## Configure credentials
59+
60+
Create a new access key with edit permissions on your target bucket. Edit
61+
`~/.aws/credentials` with a text editor:
62+
63+
```
64+
[default]
65+
aws_access_key_id = <paste access key starting with tid_>
66+
aws_secret_access_key = <paste secret access key starting with tsec_>
67+
```
68+
69+
## Mount bucket on login with systemd
70+
71+
Make a folder for the geesefs service:
72+
73+
```text
74+
mkdir -p ~/.local/share/systemd/user
75+
```
76+
77+
Then copy this unit into `~/.local/share/systemd/user/mount-data.service`:
78+
79+
```text
80+
[Unit]
81+
Description=Mount Tigris bucket mybucket to ~/data
82+
After=network.target
83+
84+
[Service]
85+
Type=forking
86+
WorkingDirectory=%h
87+
ExecStart=/usr/local/bin/geesefs --endpoint https://fly.storage.tigris.dev mybucket %h/data
88+
89+
[Install]
90+
WantedBy=default.target
91+
```
92+
93+
Make sure to adjust `mybucket` and `%h/data` as needed. In systemd units, `%h`
94+
refers to your home directory, so this mounts bucket `mybucket` to `~/data`.
95+
96+
Enable the unit with `systemctl daemon-reload` and `systemctl enable`:
97+
98+
```text
99+
systemctl --user daemon-reload
100+
systemctl --user enable --now mount-data.service
101+
```
102+
103+
## Reboot test
104+
105+
Reboot your system and log back in. Run the mount command and you should see
106+
information about geesefs mounting your bucket:
107+
108+
```text
109+
$ mount | grep geesefs
110+
mybucket on /home/opc/data type fuse.geesefs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000,default_permissions)
111+
```
112+
113+
You did it!

docs/usage-patterns/index.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Usage patterns
2+
3+
Tigris gives you globally distributed object storage so that your data loads
4+
fast anywhere on the planet. Here are the patterns that let you use Tigris the
5+
best ways.
6+
7+
## Run compute anywhere
8+
9+
If you put your language models, docker images, or other weights in Tigris, they
10+
download fast everywhere on the planet. This means you can put serverless
11+
compute near your users without having to waste time waiting for things to
12+
download. There's no need to waste money maintaining local storage for your
13+
weights when they download in seconds.
14+
15+
## Global distribution
16+
17+
Tigris is a CDN out of the box. If your users upload images in Seattle, their
18+
friends in Seattle grab the images from Seattle. No need to funnel everything
19+
through Northern Virginia or configure bucket replication rules. When you create
20+
artifacts from your AI models in Tigris, they're always close to your users so
21+
they load as fast as possible. There's no need to make a new CDN config when
22+
your storage system is your CDN!
23+
24+
## Multi-cloud native
25+
26+
Configure a bucket with [shadow bucket replication](/docs/migration/) and all
27+
your data is upgraded into Tigris on demand. Configure off-site backups with any
28+
tool that works with S3. Mount your buckets into your Kubernetes workloads with
29+
[csi-s3](https://github.com/yandex-cloud/k8s-csi-s3) or into your Linux systems
30+
with [geesefs](/docs/blueprints/geesefs-linux).

sidebars.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,15 @@ const sidebars = {
106106
"sdks/s3/aws-net-sdk",
107107
],
108108
},
109+
{
110+
type: "category",
111+
label: "Usage patterns",
112+
items: ["usage-patterns/index"],
113+
},
109114
{
110115
type: "category",
111116
label: "Blueprints",
112-
items: ["blueprints/docker-registry"],
117+
items: ["blueprints/docker-registry", "blueprints/geesefs-linux"],
113118
},
114119
{
115120
type: "doc",

0 commit comments

Comments
 (0)