Storage

tutorial

Mender requires an S3-compatible storage backend to store artifacts. You can choose from a variety of S3-compatible storage solutions, based on your requirements and infrastructure.

Production-grade S3-compatible storage solutions include:

  • Amazon S3
  • Google Cloud Storage
  • Cloudflare R2 Storage

Mender also supports the following proprietary storage solutions:

  • Azure Blob Storage

For evaluation, development, and testing purposes, you can use self-hosted, open-source S3-compatible storage solutions. You can refer to the provider documentation for more information on how to install and configure the storage solution that best fits your needs.

Until now, MinIO has been the default storage backend documented for Mender. However, the original MinIO setup using Helm has been removed from the documentation, as it is no longer functional as documented with the version 4.1.7 of the MinIO Operator. SeaweedFS is now the new default storage backend for the full Open Source setup from the Helm Chart version 6.x and later. If you whish to continue using MinIO, please consult the official MinIO documentation for further information. If you wish to switch to SeaweedFS, we provide a short migration guide after installing SeaweedFS.

Important: The SeaweedFS setup is a community project and is not recommended for production use. The following storage backends are recommended for production: AWS S3, Cloudflare R2, Google Cloud Storage,and Azure Blob Storage.

In this guide, we provide an example of how to install SeaweedFS and integrating it into Mender.

By default, SeaweedFS is configured to run on amd64 nodes. To run it on arm64, you have to tweak the nodeSelector keys of the services. Please refer to the official SeaweedFS Helm Chart

export STORAGE_CLASS="default"
export STORAGE_BUCKET="replace-with-your-bucket-name"

cat >seaweedfs.yml <<EOF
filer:
  s3:
    enabled: true
    enableAuth: true
    createBuckets:
      - name: "${STORAGE_BUCKET}"
  storageClass: ${STORAGE_CLASS}

s3:
  enabled: true
  enableAuth: true
EOF

helm repo add seaweedfs https://seaweedfs.github.io/seaweedfs/helm
helm repo update
helm install seaweedfs --wait -f seaweedfs.yml  seaweedfs/seaweedfs

Finally, export the following environment variables, needed for installing Mender in the later steps:

export AWS_ACCESS_KEY_ID=$(kubectl get secret seaweedfs-s3-secret -o jsonpath='{.data.admin_access_key_id}' |base64 -d)
export AWS_SECRET_ACCESS_KEY=$(kubectl  get secret seaweedfs-s3-secret -o jsonpath='{.data.admin_secret_access_key}' |base64 -d)
export AWS_REGION="us-east-1"
export STORAGE_ENDPOINT="http://seaweedfs-s3:8333"

You can inspect the SeaweedFS installation by running the following:

kubectl port-forward svc/seaweedfs-s3 8333:8333 &
aws s3 ls --endpoint-url="http://localhost:8333"

Please refer to the SeaweedFS official documentation for further information about setting up a SeaweedFS deployment.

Migration from MinIO

If you are currently using MinIO as the storage backend for Mender, you can migrate to SeaweedFS by following these steps:

# export data from MinIO
export AWS_ACCESS_KEY_ID="<your minio access key>"
export AWS_SECRET_ACCESS_KEY="<your minio secret key>"

mkdir mender-artifact-storage
# Tip: make sure you have enough disk space to store the data

aws s3 cp --recursive --endpoint-url=<your minio endpoint> s3://mender-artifact-storage/ ./mender-artifact-storage/

# import data to SeaweedFS
export AWS_ACCESS_KEY_ID=$(kubectl get secret seaweedfs-s3-secret -o jsonpath='{.data.admin_access_key_id}' |base64 -d)
export AWS_SECRET_ACCESS_KEY=$(kubectl  get secret seaweedfs-s3-secret -o jsonpath='{.data.admin_secret_access_key}' |base64 -d)

kubectl port-forward svc/seaweedfs-s3 8333:8333
aws s3 cp --recursive ./mender-artifact-storage/ --endpoint-url=http://localhost:8333 s3://mender-artifact-storage/

We welcome contributions to improve this documentation. To submit a change, use the Edit link at the top of the page or email us at .