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/14 07:06:33 UTC

[bigtop] branch cnb updated (898259d -> 0449b74)

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

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


    from 898259d  BIGTOP-3239: Provisioning the storage on kubernetes via Rook
     new 28b8315  BIGTOP-3243: Add instructions for Helm
     new 0449b74  BIGTOP-3244: Remove Minio operator and hostpath provisioner

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 get_helm.sh                   | 245 ------------------------------------------
 helm/README.md                |  25 +++++
 minio/object-store.yaml       |  63 -----------
 minio/operator.yaml           |  99 -----------------
 storage-provisioner/README.md |  28 -----
 5 files changed, 25 insertions(+), 435 deletions(-)
 delete mode 100755 get_helm.sh
 create mode 100644 helm/README.md
 delete mode 100755 minio/object-store.yaml
 delete mode 100755 minio/operator.yaml
 delete mode 100755 storage-provisioner/README.md


[bigtop] 02/02: BIGTOP-3244: Remove Minio operator and hostpath provisioner

Posted by yw...@apache.org.
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

commit 0449b74054f6ff67d6db81bc186ac3138762f370
Author: Youngwoo Kim <yw...@apache.org>
AuthorDate: Mon Oct 14 16:00:22 2019 +0900

    BIGTOP-3244: Remove Minio operator and hostpath provisioner
---
 minio/object-store.yaml       | 63 ---------------------------
 minio/operator.yaml           | 99 -------------------------------------------
 storage-provisioner/README.md | 28 ------------
 3 files changed, 190 deletions(-)

diff --git a/minio/object-store.yaml b/minio/object-store.yaml
deleted file mode 100755
index 2afc9ce..0000000
--- a/minio/object-store.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-apiVersion: v1
-kind: Secret
-metadata:
-  name: minio-my-store-access-keys
-type: Opaque
-data:
-  # Base64 encoded string: "TEMP_DEMO_ACCESS_KEY"
-  username: bWluaW8K
-  # Base64 encoded string: "TEMP_DEMO_SECRET_KEY"
-  password: bWluaW8xMjMK
----
-apiVersion: minio.rook.io/v1alpha1
-kind: ObjectStore
-metadata:
-  name: my-store
-spec:
-  scope:
-    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:
-    - metadata:
-        name: rook-minio-data1
-      spec:
-        accessModes: [ "ReadWriteOnce" ]
-        # Set the storage class that will be used, otherwise Kubernetes' default storage class will be used.
-        #storageClassName: "my-storage-class"
-        resources:
-          requests:
-            storage: "1M"
-    #- metadata:
-    #    name: rook-minio-data2
-    #  spec:
-    #    accessModes: [ "ReadWriteOnce" ]
-    #    # Uncomment and specify your StorageClass, otherwise
-    #    # the cluster admin defined default StorageClass will be used.
-    #    #storageClassName: "your-cluster-storageclass"
-    #    resources:
-    #      requests:
-    #        storage: "8Gi"
-  # A key value list of annotations
-  annotations:
-  #  key: value
-  placement:
-    tolerations:
-    nodeAffinity:
-    podAffinity:
-    podAnyAffinity:
-  credentials:
-    name: minio-my-store-access-keys
-    namespace: rook-minio
-  clusterDomain:
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: minio-my-store
-spec:
-  type: NodePort
-  ports:
-    - port: 9000
-  selector:
-    app: minio
diff --git a/minio/operator.yaml b/minio/operator.yaml
deleted file mode 100755
index 3b347c5..0000000
--- a/minio/operator.yaml
+++ /dev/null
@@ -1,99 +0,0 @@
-apiVersion: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
-  name: objectstores.minio.rook.io
-spec:
-  group: minio.rook.io
-  names:
-    kind: ObjectStore
-    listKind: ObjectStoreList
-    plural: objectstores
-    singular: objectstore
-  scope: Namespaced
-  version: v1alpha1
----
-apiVersion: rbac.authorization.k8s.io/v1beta1
-kind: ClusterRole
-metadata:
-  name: rook-minio-operator
-rules:
-- apiGroups:
-  - ""
-  resources:
-  - namespaces
-  - secrets
-  - pods
-  - services
-  verbs:
-  - get
-  - watch
-  - create
-  - update
-- apiGroups:
-  - apps
-  resources:
-  - statefulsets
-  verbs:
-  - get
-  - create
-  - update
-- apiGroups:
-  - minio.rook.io
-  resources:
-  - "*"
-  verbs:
-  - "*"
-- apiGroups:
-  - rook.io
-  resources:
-  - "*"
-  verbs:
-  - "*"
----
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: rook-minio-operator
----
-kind: ClusterRoleBinding
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
-  name: rook-minio-operator
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: ClusterRole
-  name: rook-minio-operator
-subjects:
-- kind: ServiceAccount
-  name: rook-minio-operator
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: rook-minio-operator
-  labels:
-    app: rook-minio-operator
-spec:
-  selector:
-    matchLabels:
-      app: rook-minio-operator
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: rook-minio-operator
-    spec:
-      serviceAccountName: rook-minio-operator
-      containers:
-      - name: rook-minio-operator
-        image: rook/minio:v1.0.5
-        args: ["minio", "operator"]
-        env:
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
diff --git a/storage-provisioner/README.md b/storage-provisioner/README.md
deleted file mode 100755
index 09abdd1..0000000
--- a/storage-provisioner/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-1. The easiest way to get simple PVCs working on a one node cluster:
-
-```
-helm upgrade --install hostpath-provisioner --namespace kube-system rimusz/hostpath-provisioner
-```
-
-2. NFS is better for a real cluster, and mostly as easy as hostpath-provisioner.
-
-```
- helm install stable/nfs-server-provisioner
-```
-
-Alternatively, NFS or other proper distributed filesystems can be used
-out of the box.
-
-After installing the NFS provisioner, run:
-
-```
-
-kubectl patch storageclass nfs -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
-
-```
-
-Which will make dynamic volumes needed by ZK and so on provisioned
-via NFS.
-
-
-For Minio --- see the presto3-minio work, which includes helm instructions for minio alongside presto as well.


[bigtop] 01/02: BIGTOP-3243: Add instructions for Helm

Posted by yw...@apache.org.
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

commit 28b8315db2edb921d2a53c3c039ddbf737e5841b
Author: Youngwoo Kim <yw...@apache.org>
AuthorDate: Mon Oct 14 15:57:41 2019 +0900

    BIGTOP-3243: Add instructions for Helm
---
 get_helm.sh    | 245 ---------------------------------------------------------
 helm/README.md |  25 ++++++
 2 files changed, 25 insertions(+), 245 deletions(-)

diff --git a/get_helm.sh b/get_helm.sh
deleted file mode 100755
index ea2056c..0000000
--- a/get_helm.sh
+++ /dev/null
@@ -1,245 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright The Helm Authors.
-#
-# 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
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# The install script is based off of the MIT-licensed script from glide,
-# the package manager for Go: https://github.com/Masterminds/glide.sh/blob/master/get
-
-PROJECT_NAME="helm"
-TILLER_NAME="tiller"
-
-: ${USE_SUDO:="true"}
-: ${HELM_INSTALL_DIR:="/usr/local/bin"}
-
-# initArch discovers the architecture for this system.
-initArch() {
-  ARCH=$(uname -m)
-  case $ARCH in
-    armv5*) ARCH="armv5";;
-    armv6*) ARCH="armv6";;
-    armv7*) ARCH="arm";;
-    aarch64) ARCH="arm64";;
-    x86) ARCH="386";;
-    x86_64) ARCH="amd64";;
-    i686) ARCH="386";;
-    i386) ARCH="386";;
-  esac
-}
-
-# initOS discovers the operating system for this system.
-initOS() {
-  OS=$(echo `uname`|tr '[:upper:]' '[:lower:]')
-
-  case "$OS" in
-    # Minimalist GNU for Windows
-    mingw*) OS='windows';;
-  esac
-}
-
-# runs the given command as root (detects if we are root already)
-runAsRoot() {
-  local CMD="$*"
-
-  if [ $EUID -ne 0 -a $USE_SUDO = "true" ]; then
-    CMD="sudo $CMD"
-  fi
-
-  $CMD
-}
-
-# verifySupported checks that the os/arch combination is supported for
-# binary builds.
-verifySupported() {
-  local supported="darwin-386\ndarwin-amd64\nlinux-386\nlinux-amd64\nlinux-arm\nlinux-arm64\nlinux-ppc64le\nwindows-386\nwindows-amd64"
-  if ! echo "${supported}" | grep -q "${OS}-${ARCH}"; then
-    echo "No prebuilt binary for ${OS}-${ARCH}."
-    echo "To build from source, go to https://github.com/helm/helm"
-    exit 1
-  fi
-
-  if ! type "curl" > /dev/null && ! type "wget" > /dev/null; then
-    echo "Either curl or wget is required"
-    exit 1
-  fi
-}
-
-# checkDesiredVersion checks if the desired version is available.
-checkDesiredVersion() {
-  if [ "x$DESIRED_VERSION" == "x" ]; then
-    # Get tag from release URL
-    local latest_release_url="https://github.com/helm/helm/releases/latest"
-    if type "curl" > /dev/null; then
-      TAG=$(curl -Ls -o /dev/null -w %{url_effective} $latest_release_url | grep -oE "[^/]+$" )
-    elif type "wget" > /dev/null; then
-      TAG=$(wget $latest_release_url --server-response -O /dev/null 2>&1 | awk '/^  Location: /{DEST=$2} END{ print DEST}' | grep -oE "[^/]+$")
-    fi
-  else
-    TAG=$DESIRED_VERSION
-  fi
-}
-
-# checkHelmInstalledVersion checks which version of helm is installed and
-# if it needs to be changed.
-checkHelmInstalledVersion() {
-  if [[ -f "${HELM_INSTALL_DIR}/${PROJECT_NAME}" ]]; then
-    local version=$(helm version -c | grep '^Client' | cut -d'"' -f2)
-    if [[ "$version" == "$TAG" ]]; then
-      echo "Helm ${version} is already ${DESIRED_VERSION:-latest}"
-      return 0
-    else
-      echo "Helm ${TAG} is available. Changing from version ${version}."
-      return 1
-    fi
-  else
-    return 1
-  fi
-}
-
-# downloadFile downloads the latest binary package and also the checksum
-# for that binary.
-downloadFile() {
-  HELM_DIST="helm-$TAG-$OS-$ARCH.tar.gz"
-  DOWNLOAD_URL="https://get.helm.sh/$HELM_DIST"
-  CHECKSUM_URL="$DOWNLOAD_URL.sha256"
-  HELM_TMP_ROOT="$(mktemp -dt helm-installer-XXXXXX)"
-  HELM_TMP_FILE="$HELM_TMP_ROOT/$HELM_DIST"
-  HELM_SUM_FILE="$HELM_TMP_ROOT/$HELM_DIST.sha256"
-  echo "Downloading $DOWNLOAD_URL"
-  if type "curl" > /dev/null; then
-    curl -SsL "$CHECKSUM_URL" -o "$HELM_SUM_FILE"
-  elif type "wget" > /dev/null; then
-    wget -q -O "$HELM_SUM_FILE" "$CHECKSUM_URL"
-  fi
-  if type "curl" > /dev/null; then
-    curl -SsL "$DOWNLOAD_URL" -o "$HELM_TMP_FILE"
-  elif type "wget" > /dev/null; then
-    wget -q -O "$HELM_TMP_FILE" "$DOWNLOAD_URL"
-  fi
-}
-
-# installFile verifies the SHA256 for the file, then unpacks and
-# installs it.
-installFile() {
-  HELM_TMP="$HELM_TMP_ROOT/$PROJECT_NAME"
-  local sum=$(openssl sha1 -sha256 ${HELM_TMP_FILE} | awk '{print $2}')
-  local expected_sum=$(cat ${HELM_SUM_FILE})
-  if [ "$sum" != "$expected_sum" ]; then
-    echo "SHA sum of ${HELM_TMP_FILE} does not match. Aborting."
-    exit 1
-  fi
-
-  mkdir -p "$HELM_TMP"
-  tar xf "$HELM_TMP_FILE" -C "$HELM_TMP"
-  HELM_TMP_BIN="$HELM_TMP/$OS-$ARCH/$PROJECT_NAME"
-  TILLER_TMP_BIN="$HELM_TMP/$OS-$ARCH/$TILLER_NAME"
-  echo "Preparing to install $PROJECT_NAME and $TILLER_NAME into ${HELM_INSTALL_DIR}"
-  runAsRoot cp "$HELM_TMP_BIN" "$HELM_INSTALL_DIR"
-  echo "$PROJECT_NAME installed into $HELM_INSTALL_DIR/$PROJECT_NAME"
-  if [ -x "$TILLER_TMP_BIN" ]; then
-    runAsRoot cp "$TILLER_TMP_BIN" "$HELM_INSTALL_DIR"
-    echo "$TILLER_NAME installed into $HELM_INSTALL_DIR/$TILLER_NAME"
-  else
-    echo "info: $TILLER_NAME binary was not found in this release; skipping $TILLER_NAME installation"
-  fi
-}
-
-# fail_trap is executed if an error occurs.
-fail_trap() {
-  result=$?
-  if [ "$result" != "0" ]; then
-    if [[ -n "$INPUT_ARGUMENTS" ]]; then
-      echo "Failed to install $PROJECT_NAME with the arguments provided: $INPUT_ARGUMENTS"
-      help
-    else
-      echo "Failed to install $PROJECT_NAME"
-    fi
-    echo -e "\tFor support, go to https://github.com/helm/helm."
-  fi
-  cleanup
-  exit $result
-}
-
-# testVersion tests the installed client to make sure it is working.
-testVersion() {
-  set +e
-  HELM="$(which $PROJECT_NAME)"
-  if [ "$?" = "1" ]; then
-    echo "$PROJECT_NAME not found. Is $HELM_INSTALL_DIR on your "'$PATH?'
-    exit 1
-  fi
-  set -e
-  echo "Run '$PROJECT_NAME init' to configure $PROJECT_NAME."
-}
-
-# help provides possible cli installation arguments
-help () {
-  echo "Accepted cli arguments are:"
-  echo -e "\t[--help|-h ] ->> prints this help"
-  echo -e "\t[--version|-v <desired_version>] . When not defined it defaults to latest"
-  echo -e "\te.g. --version v2.4.0  or -v latest"
-  echo -e "\t[--no-sudo]  ->> install without sudo"
-}
-
-# cleanup temporary files to avoid https://github.com/helm/helm/issues/2977
-cleanup() {
-  if [[ -d "${HELM_TMP_ROOT:-}" ]]; then
-    rm -rf "$HELM_TMP_ROOT"
-  fi
-}
-
-# Execution
-
-#Stop execution on any error
-trap "fail_trap" EXIT
-set -e
-
-# Parsing input arguments (if any)
-export INPUT_ARGUMENTS="${@}"
-set -u
-while [[ $# -gt 0 ]]; do
-  case $1 in
-    '--version'|-v)
-       shift
-       if [[ $# -ne 0 ]]; then
-           export DESIRED_VERSION="${1}"
-       else
-           echo -e "Please provide the desired version. e.g. --version v2.4.0 or -v latest"
-           exit 0
-       fi
-       ;;
-    '--no-sudo')
-       USE_SUDO="false"
-       ;;
-    '--help'|-h)
-       help
-       exit 0
-       ;;
-    *) exit 1
-       ;;
-  esac
-  shift
-done
-set +u
-
-initArch
-initOS
-verifySupported
-checkDesiredVersion
-if ! checkHelmInstalledVersion; then
-  downloadFile
-  installFile
-fi
-testVersion
-cleanup
diff --git a/helm/README.md b/helm/README.md
new file mode 100644
index 0000000..cc755c2
--- /dev/null
+++ b/helm/README.md
@@ -0,0 +1,25 @@
+# Helm
+
+```
+$ curl -LO https://git.io/get_helm.sh
+$ chmod 700 get_helm.sh
+$ ./get_helm.sh
+
+$ helm bersion
+```
+
+Add an account for deploy tiller:
+```
+$ kubectl --namespace kube-system create serviceaccount tiller
+$ kubectl create clusterrolebinding tiller-cluster-rule \
+ --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
+$ kubectl --namespace kube-system patch deploy tiller-deploy \
+ -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
+```
+
+Initialize Helm:
+```
+$ helm init --history-max 200
+```
+
+