Skip to content

Instantly share code, notes, and snippets.

@balamurugana
balamurugana / actions\index.js
Created September 19, 2016 18:19
bucket policy
import * as types from '../constants/ActionTypes'
export function addPolicy(bucket, prefix, policy) {
return { type: types.ADD_POLICY, bucket, prefix, policy }
}
export function removePolicy(bucket, prefix) {
return { type: types.REMOVE_POLICY, bucket, prefix }
}
@balamurugana
balamurugana / running-minio-in-minikube.md
Last active August 2, 2023 05:32
Running minio in minikube

Prerequisites:

  • Run minikube with kvm driver by $ minikube start --vm-driver kvm

Minio FS mode:

  1. Deploy minio in fs mode with below yaml in a file like $ kubectl create -f my-minio-fs.yaml
## Create persistent volume claim for minio to store data.
apiVersion: v1
kind: PersistentVolumeClaim

Web server listens for github PR events.

  1. Follow https://developer.github.com/webhooks/
  2. While creating webhook for question Which events would you like to trigger this webhook? select Let me select individual events. then check Pull request
  3. Below is a sample python web hook server for github events
#!/usr/bin/env python

"""
Github webhook server for mint automation.
"""

Service Side Encryption (SSE) in AWS S3:

Three types of SSE supported.

  • SSE-C - client provides data encryption key for every get/put object calls. AWS S3 does not store client provided data encryption key. Client provided data encryption key may be generated by AWS KMS for every get/put object calls. It is user responsibility to securely save/map data encryption keys generated by KMS and AWS S3 does not store any data encryption key.
  • SSE-S3 - client does not provide any encryption key for any get/put object calls. AWS S3 uses one single key (generated at first time) to encrypt/decrypt objects. Accordingly AWS docs, this key is stored along with object data.
  • SSE-KMS - client provides Customer Master Key (CMK) for any get/put object calls. AWS S3 uses client's provided CMK to generate data keys using KMS to encrypt/decrypt objects. This data key is encrypted using KMS and is stored along with object data.

Below bucket policy prevents uploading unencrypted objects (even by owner/auth user).

  • S

Setup information

minio version

$ ./minio version
Version: 2018-08-07T08:28:02Z
Release-Tag: DEVELOPMENT.2018-08-07T08-28-02Z
Commit-ID: d1a1347d4564e4f73086a77311615bab1ce96daa

Setup information

minio version

+ minio version
Version: 2018-08-10T10:26:45Z
Release-Tag: DEVELOPMENT.2018-08-10T10-26-45Z
Commit-ID: 8fa104f4287549dc2df5aa50c0fd0316e7186886

Setup information

minio version

+ minio version
Version: 2018-08-10T10:26:45Z
Release-Tag: DEVELOPMENT.2018-08-10T10-26-45Z
Commit-ID: 8fa104f4287549dc2df5aa50c0fd0316e7186886

Servers

Server1: minio server --address localhost:9001 https://localhost:9001/tmp/minio01/disk0{1..4} https://localhost:9002/tmp/minio02/disk0{1..4} https://localhost:9003/tmp/minio03/disk0{1..4} https://localhost:9004/tmp/minio04/disk0{1..2} https://localhost:9005/tmp/minio05/disk0{1..2}
Server2: minio server --address localhost:9002 https://localhost:9001/tmp/minio01/disk0{1..4} https://localhost:9002/tmp/minio02/disk0{1..4} https://localhost:9003/tmp/minio03/disk0{1..4} https://localhost:9004/tmp/minio04/disk0{1..2} https://localhost:9005/tmp/minio05/disk0{1..2}
Server3: minio server --address localhost:9003 https://localhost:9001/tmp/minio01/disk0{1..4} https://localhost:9002/tmp/minio02/disk0{1..4} https://localhost:9003/tmp/minio03/disk0{1..4} https://localhost:9004/tmp/minio04/disk0{1..2} https://localhost:9005/tmp/minio05/disk0{1..2}
Server4: minio server --address localhost:9004 https://localhost:9001/tmp/minio01/disk0{1..4} https://localhost:9002/tmp/minio02/disk0{1..4} https://localhost:9003

Setup Information:

  • 8 servers of t1.small.x86
  • minio version
Version: 2018-08-22T12:25:38Z
Release-Tag: DEVELOPMENT.2018-08-22T12-25-38Z
Commit-ID: 8601f29d95f2ad2055613bedcc917e692ffab5fd
  • mc version

DataStore

A lock-free storage which supports to upload, download and delete data using Get, Put and Delete respectively. Every Put uses tmp directory as interim storage and every Delete is staged and actual removal is done once all Get are finished.

DataStore
|-- data/