You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by yw...@apache.org on 2019/10/31 01:36:09 UTC

[bigtop] branch cnb updated: BIGTOP-3267: Standalone Minio as default

This is an automated email from the ASF dual-hosted git repository.

ywkim pushed a commit to branch cnb
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/cnb by this push:
     new 0e47463  BIGTOP-3267: Standalone Minio as default
0e47463 is described below

commit 0e474633d53e916bb3c29e216894deed9cf61d68
Author: Youngwoo Kim <yw...@apache.org>
AuthorDate: Wed Oct 30 17:06:37 2019 +0900

    BIGTOP-3267: Standalone Minio as default
---
 README.md                                  |  13 +++-
 storage/local-path/README.md               |  14 ++++
 storage/local-path/local-path-storage.yaml | 105 +++++++++++++++++++++++++++++
 storage/minio/README.md                    |   5 ++
 storage/minio/values.yaml                  |  16 ++---
 storage/rook/minio/object-store.yaml       |   5 +-
 6 files changed, 146 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md
index 6b980a4..f4b93fc 100755
--- a/README.md
+++ b/README.md
@@ -100,7 +100,7 @@ Minikube is the easiest tool to run a single-node Kubernetes cluster.
 
 ```
 $ cd $BIGTOP_HOME
-$ minikube start --cpus 8 --memory 8196 --container-runtime=cri-o 
+$ minikube start --cpus 8 --memory 8196 --disk-size=80g --container-runtime=cri-o 
 $ kubectl cluster-info
 
 ```
@@ -252,21 +252,30 @@ $ kubectl create -f dl/rook-1.1.2/cluster/examples/kubernetes/minio/operator.yam
 $ kubectl -n rook-minio-system get pod
 ```
 
-Create object store:
+Create standalone Minio object store:
 ```
 $ kubectl create -f storage/rook/minio/object-store.yaml
 $ kubectl -n rook-minio get objectstores.minio.rook.io
 $ kubectl -n rook-minio get pod -l app=minio,objectstore=bigtop-rook-minio
 ```
+If you want to deploy Distributed Minio cluster, Increase the ```nodeCount``` in object-store.yaml file. e.g., ```nodeCount: 4``` 
 
 ### Minio
 
+Standalone Minio:
 ```
 $ cd $BIGTOP_HOME
 $ helm install --name bigtop-minio --namespace bigtop -f storage/minio/values.yaml stable/minio
 
 ```
 
+Distributed Minio:
+```
+$ cd $BIGTOP_HOME
+$ helm install --name bigtop-minio --namespace bigtop --set mode=distributed,replicas=4 -f storage/minio/values.yaml stable/minio
+
+```
+
 ```
 Minio can be accessed via port 9000 on the following DNS name from within your cluster:
 bigtop-minio.bigtop.svc.cluster.local
diff --git a/storage/local-path/README.md b/storage/local-path/README.md
new file mode 100644
index 0000000..ce5707c
--- /dev/null
+++ b/storage/local-path/README.md
@@ -0,0 +1,14 @@
+## Use HostPath for persistent local storage with Kubernetes
+
+https://github.com/rancher/local-path-provisioner
+
+```
+$ kubectl create -f $BIGTOP_HOME/storage/local-path/local-path-storage.yaml
+$ kubectl get sc
+
+```
+
+Mark ```local-path``` StorageClass as default:
+```
+kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
+```
diff --git a/storage/local-path/local-path-storage.yaml b/storage/local-path/local-path-storage.yaml
new file mode 100644
index 0000000..3022c0a
--- /dev/null
+++ b/storage/local-path/local-path-storage.yaml
@@ -0,0 +1,105 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: local-path-storage
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: local-path-provisioner-service-account
+  namespace: local-path-storage
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+  name: local-path-provisioner-role
+rules:
+- apiGroups: [""]
+  resources: ["nodes", "persistentvolumeclaims"]
+  verbs: ["get", "list", "watch"]
+- apiGroups: [""]
+  resources: ["endpoints", "persistentvolumes", "pods"]
+  verbs: ["*"]
+- apiGroups: [""]
+  resources: ["events"]
+  verbs: ["create", "patch"]
+- apiGroups: ["storage.k8s.io"]
+  resources: ["storageclasses"]
+  verbs: ["get", "list", "watch"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: local-path-provisioner-bind
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: local-path-provisioner-role
+subjects:
+- kind: ServiceAccount
+  name: local-path-provisioner-service-account
+  namespace: local-path-storage
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: local-path-provisioner
+  namespace: local-path-storage
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: local-path-provisioner
+  template:
+    metadata:
+      labels:
+        app: local-path-provisioner
+    spec:
+      serviceAccountName: local-path-provisioner-service-account
+      containers:
+      - name: local-path-provisioner
+        image: rancher/local-path-provisioner:v0.0.11
+        imagePullPolicy: IfNotPresent
+        command:
+        - local-path-provisioner
+        - --debug
+        - start
+        - --config
+        - /etc/config/config.json
+        volumeMounts:
+        - name: config-volume
+          mountPath: /etc/config/
+        env:
+        - name: POD_NAMESPACE
+          valueFrom:
+            fieldRef:
+              fieldPath: metadata.namespace
+      volumes:
+        - name: config-volume
+          configMap:
+            name: local-path-config
+---
+apiVersion: storage.k8s.io/v1
+kind: StorageClass
+metadata:
+  name: local-path
+provisioner: rancher.io/local-path
+volumeBindingMode: WaitForFirstConsumer
+reclaimPolicy: Delete
+---
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: local-path-config
+  namespace: local-path-storage
+data:
+  config.json: |-
+        {
+                "nodePathMap":[
+                {
+                        "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES",
+                        "paths":["/opt/local-path-provisioner"]
+                }
+                ]
+        }
+
diff --git a/storage/minio/README.md b/storage/minio/README.md
new file mode 100644
index 0000000..aa3861a
--- /dev/null
+++ b/storage/minio/README.md
@@ -0,0 +1,5 @@
+## MinIO Helm Chart
+
+https://github.com/helm/charts/tree/master/stable/minio
+
+
diff --git a/storage/minio/values.yaml b/storage/minio/values.yaml
index a463a66..589127f 100644
--- a/storage/minio/values.yaml
+++ b/storage/minio/values.yaml
@@ -6,7 +6,7 @@ clusterDomain: cluster.local
 ##
 image:
   repository: minio/minio
-  tag: RELEASE.2019-08-07T01-59-21Z
+  tag: RELEASE.2019-10-12T01-39-57Z 
   pullPolicy: IfNotPresent
 
 ## Set default image, imageTag, and imagePullPolicy for the `mc` (the minio
@@ -14,14 +14,13 @@ image:
 ##
 mcImage:
   repository: minio/mc
-  tag: RELEASE.2019-08-07T23-14-43Z
+  tag: latest
   pullPolicy: IfNotPresent
 
 ## minio server mode, i.e. standalone or distributed.
 ## Distributed Minio ref: https://docs.minio.io/docs/distributed-minio-quickstart-guide
 ##
-#mode: standalone
-mode: distributed
+mode: standalone
 
 ## Additional arguments to pass to minio binary
 extraArgs: []
@@ -47,8 +46,8 @@ priorityClassName: ""
 ## Distributed Minio ref: https://docs.minio.io/docs/distributed-minio-quickstart-guide
 ##
 existingSecret: ""
-accessKey: "minio"
-secretKey: "minio123"
+accessKey: "AKIAIOSFODNN7EXAMPLE"
+secretKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
 configPath: "/root/.minio/"
 configPathmc: "/root/.mc/"
 mountPath: "/export"
@@ -84,7 +83,6 @@ persistence:
   ## If the PV uses a different storage class, specify that here.
   # storageClass: standard
   # VolumeName: ""
-
   accessMode: ReadWriteOnce
   size: 10Gi
 
@@ -170,9 +168,9 @@ resources:
 ## Create a bucket after minio install
 ##
 defaultBucket:
-  enabled: true
+  enabled: false
   ## If enabled, must be a string with length > 0
-  name: testbucket
+  name: bucket
   ## Can be one of none|download|upload|public
   policy: none
   ## Purge if bucket exists already
diff --git a/storage/rook/minio/object-store.yaml b/storage/rook/minio/object-store.yaml
index 3bc6710..b53589f 100644
--- a/storage/rook/minio/object-store.yaml
+++ b/storage/rook/minio/object-store.yaml
@@ -22,7 +22,10 @@ metadata:
   namespace: rook-minio
 spec:
   scope:
-    nodeCount: 4
+    # Standalone Minio
+    nodeCount: 1
+    # Distributed Minio
+    #nodeCount: 4
     # You can have multiple PersistentVolumeClaims in the volumeClaimTemplates list.
     # Be aware though that all PersistentVolumeClaim Templates will be used for each intance (see nodeCount).
     volumeClaimTemplates: