Skip to content

Caching Remote Buckets (User Guide)

Guy Margalit edited this page Jul 8, 2020 · 13 revisions

This is a user guide for using the namespace cache feature to cache remote buckets using local storage resources.

For more information on caching use cases and design please refer to - TODO.

Prerequisites

  1. noobaa installed to kubernetes - see https://github.com/noobaa/noobaa-core#deploy-to-kubernetes
  2. noobaa cli - get from https://github.com/noobaa/noobaa-operator/releases
  3. account credentials to Hub

Step 1 - Connect to the Hub

noobaa api account_api check_external_connection '{
  "endpoint_type": "S3_COMPATIBLE",
  "endpoint": "s3.noobaa.svc",
  "identity": "123",
  "secret": "abc"
}'

noobaa api account_api add_external_connection '{
  "name": "hub",
  "endpoint_type": "S3_COMPATIBLE",
  "endpoint": "s3.noobaa.svc",
  "identity": "123",
  "secret": "abc"
}'

Step 3 - Create a Cache Bucket

For every remote bucket create a namespace resource and a bucket with cache policy:

noobaa api pool_api create_namespace_resource '{
  "name": "bucket1",
  "connection": "hub",
  "target_bucket": "bucket1"
}'

noobaa api bucket_api create_bucket '{
  "name": "bucket1-local",
  "namespace":{
    "write_resource": "bucket1",
    "read_resources": ["bucket1"],
    "caching": { "ttl_ms": 60000 }
  }
}'

Step 4 - Create application accounts

noobaa api account_api create_account '{ TODO }'

Troubleshooting

noobaa api system_api read_system
noobaa api bucket_api list_buckets
kubectl logs noobaa-core-0
Clone this wiki locally