feat: add GeeseFS mount service and associated scripts
This commit is contained in:
15
config/ansible/templates/geesefs-mount.service.j2
Normal file
15
config/ansible/templates/geesefs-mount.service.j2
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Mount GeeseFS object storage
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/geesefs-mount.sh
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
User=root
|
||||
Group=root
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
15
config/ansible/templates/geesefs-mount.sh.j2
Normal file
15
config/ansible/templates/geesefs-mount.sh.j2
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Export AWS credentials from 1Password
|
||||
export AWS_ACCESS_KEY_ID="$(op read "op://j7nmhqlsjmp2r6umly5t75hzb4/Hetzner Object Storage Bucket/AWS_ACCESS_KEY_ID")"
|
||||
export AWS_SECRET_ACCESS_KEY="$(op read "op://j7nmhqlsjmp2r6umly5t75hzb4/Hetzner Object Storage Bucket/AWS_SECRET_ACCESS_KEY")"
|
||||
|
||||
# Mount GeeseFS
|
||||
exec {{ geesefs_install_path }} \
|
||||
--endpoint https://hel1.your-objectstorage.com \
|
||||
--list-type=2 \
|
||||
--disable-xattr \
|
||||
--no-implicit-dir \
|
||||
--no-dir-object \
|
||||
mvl-sh \
|
||||
/mnt/object_storage
|
Reference in New Issue
Block a user