This is a simple set up to run Pinot in Kubernetes, so that it can easily be deployed locally or on your favorite cloud service.
- Install Docker
- Install Kubernetes and
minikube
- Configure
minikube
to allocate more memory:minikube config set memory 8192
- Start
minikube
to create a local Kubernetes cluster:minikube start
- Open the Kubernetes dashboard:
minikube dashboard
- Deploy ZK and Pinot (one Zookeeper, one Pinot controller, one Pinot server and one Pinot broker):
kubectl apply -f minikube
- Wait until all components are started (it should take a couple of minutes until all persistent volumes are bound and components are successfully started)
- Open the Pinot controller interface:
minikube service pinot-controller-headless
- Congrats, enjoy your Pinot! :)
Do not use this yet in prod, there are no persistent volumes so your data will go away!
- Install the Azure 2.0 CLI tools
- Login into azure:
az login
- Double check that your account is set to "Pay as you go," as the limits for free trial accounts are too low. See https://azure.microsoft.com/en-us/offers/ms-azr-0003p/
- Create a resource group, either through the Azure web interface or through the command line:
az group create --name=pinot-test --location=westus
- Create a Kubernetes cluster:
az acs create --orchestrator-type=kubernetes --resource-group pinot-test --name=pinot-test-cluster --generate-ssh-keys
- Download your Kubernetes cluster credentials:
az acs kubernetes get-credentials --resource-group=pinot-test --name=pinot-test-cluster
- Open the Kubernetes web interface:
kubectl proxy
and then go to http://localhost:8001/ui - Deploy ZK and Pinot on Azure (three Zookeepers in an ensemble, one Pinot controller, two Pinot brokers and three Pinot servers) :
kubectl apply -f azure
- Wait until the Kubernetes deployment is complete (should take several minutes to create Azure disk volumes, bind them to persistent volumes and start all components)
- Wait for the load balancer to grab a public IP address:
watch 'kubectl get svc'
- Once you get a public IP address, go to the Pinot console
- Enjoy your Pinot!
- Configure a Kubernetes cluster using
kops
: https://github.com/kubernetes/kops/blob/master/docs/aws.md - Wait until your kubernetes cluster is ready:
kops validate cluster
- Install the dashboard
kops
addon:kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/kubernetes-dashboard/v1.7.1.yaml
- Open the dashboard to monitor the configuration:
kubectl proxy kubernetes-dashboard
- Apply the Azure configuration:
kubectl apply -f azure
- Enjoy your Pinot!
In theory, you should be able to deploy the Azure configuration directly on GKE or GCP with kops
. We haven't tested this.
- Configure a Kubernetes cluster, either through GKE (https://cloud.google.com/kubernetes-engine/docs/quickstart) or
kops
(https://github.com/kubernetes/kops/blob/master/docs/tutorial/gce.md) - Apply the Azure configuration:
kubectl apply -f azure
- First, get a nice glass of your favorite
Pinot (Noir|Grigio)
- Deploy Pinot on either locally, on Azure, AWS, or GCP as described above.
- Proxy the controller API locally:
kubectl port-forward pinot-controller-0 9001:9000
- Open the controller landing page in your browser: http://localhost:9001/
- Create a schema:
bin/pinot-admin.sh AddSchema -schemaFile sample_data/airlineStats_schema.json -exec -controllerHost 127.0.0.1 -controllerPort 9001
- Create a table:
bin/pinot-admin.sh AddTable -filePath sample_data/airlineStats_offline_table_config.json -exec -controllerHost 127.0.0.1 -controllerPort 9001
- Upload data (TODO)
docker login
docker build -t jfim/pinot:latest -f Dockerfile-pinot .
docker build -t jfim/pinot-server:latest -f Dockerfile-server .
docker build -t jfim/pinot-broker:latest -f Dockerfile-broker .
docker build -t jfim/pinot-controller:latest -f Dockerfile-controller .
docker push jfim/pinot:latest
docker push jfim/pinot-server:latest
docker push jfim/pinot-broker:latest
docker push jfim/pinot-controller:latest
- Persistent volumes aren't configured at all, so stopping any of the instances will eat your data.
- Kubernetes Pinot instances aren't configured with memory/CPU requirements so the deployment might overcommit resources