main
commit
4316f0c036
|
@ -0,0 +1,50 @@
|
|||
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?
|
|
@ -0,0 +1,47 @@
|
|||
type: update
|
||||
id: s3storage
|
||||
name: S3 Storage Backend - Standalone (Beta)
|
||||
description: Mount a S3-compatible storage backend to your application node for native remote file offloading.
|
||||
envName: ${settings.envName}
|
||||
|
||||
targetNodes:
|
||||
nodeGroup: cp
|
||||
|
||||
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:
|
||||
- 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
|
||||
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
|
Loading…
Reference in New Issue