Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Harshavardhana harshavardhana

💭
I may be slow to respond.
View GitHub Profile
View functional_tests.go
// +build ignore
/*
* MinIO Go Library for Amazon S3 Compatible Cloud Storage
* Copyright 2015-2017 MinIO, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
View vault-secrets-minio.yaml
## Create headless service to StatefulSet to work.
apiVersion: v1
kind: Service
metadata:
name: minio-headless
labels:
app: minio-headless
spec:
ports:
- port: 9000
View minio-service.yaml
## Create service of minio dist xl StatefulSet.
apiVersion: v1
kind: Service
metadata:
name: minio
spec:
type: NodePort
ports:
- port: 9000
selector:
View ingress.yml
apiVersion: networking.k8s.io/v1beta1 # for versions before 1.14 use extensions/v1beta1
kind: Ingress
metadata:
name: minio-ingress
annotations:
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/proxy-body-size: 0
nginx.ingress.kubernetes.io/proxy-buffering: "off"
nginx.ingress.kubernetes.io/configuration-snippet: |
View lookup.go
package main
import (
"fmt"
"log"
"net"
"os"
"github.com/minio/minio-go/v6/pkg/set"
)
View calico.yaml
---
# Source: calico/templates/calico-config.yaml
# This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap
apiVersion: v1
metadata:
name: calico-config
namespace: kube-system
data:
# Typha is disabled.
@harshavardhana
harshavardhana / hash-set.py
Last active Mar 3, 2020
Shows given key name and set count, what is the set index used.
View hash-set.py
#!/usr/bin/env python3
import argparse
import binascii, sys
parser = argparse.ArgumentParser(description='Set indexer')
parser.add_argument('key', metavar='KEY', type=str, help='key name for the hash index')
parser.add_argument('setcount', metavar='SET', type=int, help='total set counts')
args = parser.parse_args()
@harshavardhana
harshavardhana / nuxeo-web-ui.diff
Last active Feb 16, 2020
Nuxeo patches to support MinIO - AssumeRole
View nuxeo-web-ui.diff
diff --git a/addons/amazon-s3-online-storage/index.js b/addons/amazon-s3-online-storage/index.js
index ce3b044e..6105b299 100644
--- a/addons/amazon-s3-online-storage/index.js
+++ b/addons/amazon-s3-online-storage/index.js
@@ -98,6 +98,8 @@ class S3Provider {
AWS.config.update({
credentials: new AWS.Credentials(options.awsSecretKeyId, options.awsSecretAccessKey, options.awsSessionToken),
region: options.region,
+ endpoint: options.endpoint,
+ s3ForcePathStyle: options.pathstyleAccessEnabled || false,
View mc-snowball.md

Configure mc (snowball)

Amazon Snowball implements restricted S3 APIs. New release of mc automatically detects if its a snowball endpoint and turns-on legacy APIs.

Before we begin get the snowball credentials as mentioned here https://docs.aws.amazon.com/snowball/latest/developer-guide/using-client-commands.html#client-credentials

Secured (recommended)

Before you configure to use HTTPS endpoint make sure to obtain the current Snowball Edge certificate following this document https://docs.aws.amazon.com/snowball/latest/developer-guide/using-client-commands.html#snowball-edge-certificates-cli, once obtained same the certificate as shown below

View set-drive.py
#!/usr/bin/env python3
import argparse
# initiate the parser
parser = argparse.ArgumentParser()
parser.add_argument("-V", "--version", help="0.0.1", action="store_true")
parser.add_argument("--total_disks", "-t", type=int, help="set total disks in a MinIO deployment")
parser.add_argument("--storage-parity", "-p", type=int, help="set total partity per sets")
You can’t perform that action at this time.