Benutzer-Werkzeuge

Webseiten-Werkzeuge


help:s3:start

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
help:s3:start [2025/02/18 13:28] – angelegt mritterhelp:s3:start [2026/05/27 12:23] (aktuell) mritter
Zeile 10: Zeile 10:
  
  
 +==== Step 2 - Configure Access Credentials and mount point ====
  
 +For Hetzner Object Storage, create access credentials in the Hetzner Cloud Console
 +
 +  - Create a credentials file: <code>
 +echo "ACCESS_KEY_ID:SECRET_ACCESS_KEY" | sudo tee /root/.passwd-s3fs > /dev/null</code>
 +  - Set proper permissions: <code>sudo chmod 600 /root/.passwd-s3fs</code>
 +  - Create the mount point <code>sudo mkdir /mnt/s3storage</code>
 +
 +
 +==== Step 3 - Mounting Options ====
 +
 +In the mount commands, replace <bucket_name> and https://nbg1.your-objectstorage.com/ with your actual bucket name and endpoint.
 +
 +If you use Hetzner Object Storage, the URL must be chosen according to the region where your Bucket was created. You can find your region in the Hetzner Cloud Console under "Object Storage". You can find a list of available regions and endpoints in their Object Storage overview. Example: If your Bucket was created in Nuremberg, use the URL https://nbg1.your-objectstorage.com in your mount commands and fstab. You cannot change the region after the Bucket was created.
 +
 +Note: An incorrect endpoint URL will result in connection errors.
 +
 +Add this line to /etc/fstab:
 +
 +<code>s3fs#<bucket_name> /mnt/s3storage fuse _netdev,allow_other,use_path_request_style,url=https://nbg1.your-objectstorage.com/,use_cache=/tmp/s3fs,multipart_size=100,parallel_count=8,big_writes,kernel_cache,umask=0022,enable_noobj_cache,retries=5,ensure_diskfree=20000,connect_timeout=180,max_dirty_data=1024,max_stat_cache_size=100000,passwd_file=/root/.passwd-s3fs 0 0</code>
 +
 +<code>s3fs#<bucket_name> /mnt/s3storage fuse _netdev,url=https://nbg1.your-objectstorage.com/,passwd_file=/root/.passwd-s3fs 0 0</code>
 +
 +
 +===== Docker Plugin =====
 +
 +The FUSE driver is a prerequisite for rclone mounting and should be installed on host:
 +<code>
 +sudo apt-get -y install fuse3
 +</code>
 +
 +
 +Create two directories required by rclone docker plugin:
 +<code>
 +sudo mkdir -p /var/lib/docker-plugins/rclone/config
 +sudo mkdir -p /var/lib/docker-plugins/rclone/cache
 +</code>
 +
 +Install the managed rclone docker plugin for your architecture (here amd64):
 +
 +<code>
 +docker plugin install rclone/docker-volume-rclone:amd64 args="-v" --alias rclone --grant-all-permissions
 +docker plugin list
 +</code>
 +
 +Run rclone config on another machine equipped with web browser and graphical user interface. Create the Google Drive remote. When done, transfer the resulting rclone.conf to the Swarm cluster and save as /var/lib/docker-plugins/rclone/config/rclone.conf on every node. By default this location is accessible only to the root user so you will need appropriate privileges. The resulting config will look like this:
 +
 +
 +<code>
 +/var/lib/docker-plugins/rclone/config/rclone.conf 
 +</code>
 +
 +insert: 
 +
 +<code>
 +[hetzner-hel]
 +type = s3
 +region = hel1
 +endpoint = hel1.your-objectstorage.com
 +provider = Other
 +env_auth = false
 +access_key_id = access_key_id
 +secret_access_key = secret_access_key
 +acl = private
 +</code>
 +
 +in Docker compose:
 +
 +<code>
 +version: '3'
 +services:
 +  heimdall:
 +    image: linuxserver/heimdall:latest
 +    ports: [8080:80]
 +    volumes: [heimdall_config:/config]
 +volumes:
 +  heimdall_config:
 +    driver: rclone
 +    driver_opts:
 +      remote: "hetzner-hel:bucket-name"
 +      allow_other: "true"
 +      vfs_cache_mode: "full" # Critical for consistency
 +      poll_interval: 0
 +
 +</code>
 +
 +===== Native =====
 +
 +<code>
 +/root/.config/rclone/rclone.conf 
 +</code>
  
help/s3/start.1739885320.txt.gz · Zuletzt geändert: von mritter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki