juicefs/manifest.yml

50 lines
1.8 KiB
YAML
Raw Permalink Normal View History

2023-07-23 04:37:33 +00:00
type: update
id: s3storage
name: S3 Storage Backend (Beta)
description: Mount any S3-compatible storage backend to your application node(s) for unlimited remote file storage with native performance.
envName: ${settings.envName}
settings:
fields:
- type: string
caption: Access Key
name: accessKey
placeholder: Your bucket storage access key
required: true
- type: string
caption: Secret Key
name: secretKey
placeholder: Your bucket storage secret key
required: true
- type: string
caption: Bucket Endpoint
name: bucketEndpoint
placeholder: e.g. https://bucketname.s3.us-east-2.amazonaws.com
required: true
- type: string
caption: Bucket Folder
name: bucketFolder
placeholder: The folder within the bucket where files should be stored
default: uploads
required: true
- type: string
caption: Mount Point
name: mountPoint
default: /var/www/webroot/ROOT/wp-content/uploads
placeholder: The full path to the folder where you want the storage backend mounted
onInstall:
#on master node
- cmd [cp]: |-
curl -sSL https://d.juicefs.com/install | sh -
cp /usr/local/bin/juicefs /sbin/mount.juicefs
echo "sqlite3:///var/www/webroot/s3storage.db ${settings.mountPoint} juicefs _netdev 0 0" >> /etc/fstab
user: root
- cmd[${nodes.cp.master.id}]:
juicefs format --storage s3 --bucket ${settings.bucketEndpoint} --access-key ${settings.accessKey} --secret-key ${settings.secretKey} sqlite3:///var/www/webroot/s3storage.db ${settings.bucketFolder}
user: root
- api [cp]: environment.control.RestartNodes
# will storing in /var/webroot/ROOT be enough to store this on the distributed filesystem (glusterfs) in clusters? Or does need stored in different directory to ensure it's shared?