mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-17 18:24:14 +02:00
Documentation
Outline
Redis Sentinel Configuration
-
Create base64 encoded Redis configuation
echo -n '{"db":15,"sentinels":[{"host":"redis-node-0.redis-headless.default.svc.cluster.local","port":26379},{"host":"redis-node-1.redis-headless.default.svc.cluster.local","port":26379},{"host":"redis-node-2.redis-headless.default.svc.cluster.local","port":26379}],"name":"redis-master"}' \ | base64 -w 0
-
Use this base64 encoded string in the Kubernetes secret
REDIS_URL: ioredis://eyJkYiI6MTUsInNlbnRpbmVscyI6W3siaG9zdCI6InJlZGlzLW5vZGUtMC5yZWRpcy1oZWFkbGVzcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwicG9ydCI6MjYzNzl9LHsiaG9zdCI6InJlZGlzLW5vZGUtMS5yZWRpcy1oZWFkbGVzcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwicG9ydCI6MjYzNzl9LHsiaG9zdCI6InJlZGlzLW5vZGUtMi5yZWRpcy1oZWFkbGVzcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwicG9ydCI6MjYzNzl9XSwibmFtZSI6InJlZGlzLW1hc3RlciJ9
S3 Configuration
-
Create
~/.mc/config.json
{ "version": "10", "aliases": { "minio": { "url": "https://s3.<domain>", "accessKey": "<access-key>", "secretKey": "<secret-key>", "api": "S3v4", "path": "auto" } } }
-
Create the outline user and password
mc admin user add minio outline <super-secret-password>
-
Create the outline bucket
mc mb minio/outline
-
Create
outline-user-policy.json
{ "Version": "2012-10-17", "Statement": [ { "Action": [ "s3:ListBucket", "s3:PutObject", "s3:GetObject", "s3:DeleteObject" ], "Effect": "Allow", "Resource": ["arn:aws:s3:::outline/*", "arn:aws:s3:::outline"], "Sid": "" } ] }
-
Create
bucket-policy.json
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": ["*"] }, "Action": ["s3:GetBucketLocation"], "Resource": ["arn:aws:s3:::outline"] }, { "Effect": "Allow", "Principal": { "AWS": ["*"] }, "Action": ["s3:ListBucket"], "Resource": ["arn:aws:s3:::outline"], "Condition": { "StringEquals": { "s3:prefix": ["avatars", "public"] } } }, { "Effect": "Allow", "Principal": { "AWS": ["*"] }, "Action": ["s3:GetObject"], "Resource": [ "arn:aws:s3:::outline/avatars*", "arn:aws:s3:::outline/public*" ] } ] }
-
Apply the bucket policies
mc admin policy add minio outline-private outline-user-policy.json
-
Associate private policy with the user
mc admin policy set minio outline-private user=outline
-
Associate public policy with the bucket
mc anonymous set-json bucket-policy.json minio/outline