You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2019/11/04 15:43:17 UTC

[incubator-pinot] 01/01: Adding example for azure

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

xiangfu pushed a commit to branch azure-quickstart
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit a76db8eee62307c839a2c55392ec226a21df289a
Author: Xiang Fu <fx...@gmail.com>
AuthorDate: Mon Nov 4 07:42:42 2019 -0800

    Adding example for azure
---
 kubernetes/examples/helm/README.md      | 80 +++++++++++++++++++++++++++++++++
 kubernetes/examples/helm/helm-rbac.yaml | 18 ++++++++
 2 files changed, 98 insertions(+)

diff --git a/kubernetes/examples/helm/README.md b/kubernetes/examples/helm/README.md
index 2499488..2c8c280 100644
--- a/kubernetes/examples/helm/README.md
+++ b/kubernetes/examples/helm/README.md
@@ -70,6 +70,55 @@ GCLOUD_CLUSTER=pinot-quickstart
 gcloud container clusters get-credentials ${GCLOUD_CLUSTER} --zone ${GCLOUD_ZONE} --project ${GCLOUD_PROJECT}
 ```
 
+
+## (Optional) Setup a Kubernetes cluster on Microsoft Azure
+
+### (Optional) Create a new k8s cluster on Azure
+
+- Install Azure CLI (<https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest>)
+- Login to your Azure account.
+
+```bash
+az login
+```
+
+- Create Resource Group
+
+```bash
+AKS_RESOURCE_GROUP=pinot-demo
+AKS_RESOURCE_GROUP_LOCATION=eastus
+az group create --name ${AKS_RESOURCE_GROUP} --location ${AKS_RESOURCE_GROUP_LOCATION}
+```
+
+- Create an AKS cluster
+
+```bash
+AKS_RESOURCE_GROUP=pinot-demo
+AKS_CLUSTER_NAME=pinot-quickstart
+az aks create --resource-group ${AKS_RESOURCE_GROUP}  --name ${AKS_CLUSTER_NAME} --node-count 3
+```
+
+(Optional) Please register default provider if above command failed for error: `MissingSubscriptionRegistration`
+
+```bash
+az provider register --namespace Microsoft.Network
+```
+
+### (Optional) How to connect to an existing cluster
+
+Simply run below command to get the credential for the cluster you just created or your existing cluster.
+
+```bash
+AKS_RESOURCE_GROUP=pinot-demo
+AKS_CLUSTER_NAME=pinot-quickstart
+az aks get-credentials --resource-group ${AKS_RESOURCE_GROUP} --name ${AKS_CLUSTER_NAME}
+```
+
+To verify the connection, you can run
+```bash
+kubectl get nodes
+```
+
 ## How to setup a Pinot cluster for demo
 
 ### Update helm dependency
@@ -84,6 +133,37 @@ helm dependency update
 helm install --namespace "pinot-quickstart" --name "pinot" .
 ```
 
+#### Troubleshooting
+Error: Please run below command if encountering issue:
+
+```
+Error: could not find tiller".
+```
+
+Resolution:
+
+```bash
+kubectl -n kube-system delete deployment tiller-deploy
+kubectl -n kube-system delete service/tiller-deploy
+helm init --service-account tiller
+```
+
+Error: Please run below command if encountering permission issue:
+
+```Error: release pinot failed: namespaces "pinot-quickstart" is forbidden: User "system:serviceaccount:kube-system:default" cannot get resource "namespaces" in API group "" in the namespace "pinot-quickstart"```
+
+Resolution:
+
+```bash
+kubectl apply -f helm-rbac.yaml
+```
+
+#### To check deployment status
+
+```bash
+kubectl get all -n pinot-quickstart
+```
+
 ### Pinot Realtime QuickStart
 
 #### Bring up a Kafka Cluster for realtime data ingestion
diff --git a/kubernetes/examples/helm/helm-rbac.yaml b/kubernetes/examples/helm/helm-rbac.yaml
new file mode 100644
index 0000000..1fcf47d
--- /dev/null
+++ b/kubernetes/examples/helm/helm-rbac.yaml
@@ -0,0 +1,18 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: tiller
+  namespace: kube-system
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: tiller
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: cluster-admin
+subjects:
+  - kind: ServiceAccount
+    name: tiller
+    namespace: kube-system


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org