Prerequisites
Kamu Node is a Kubernetes-native application and this guide assumes basic familiarity with Kubernetes. If you worked withdocker-compose before - you will see a few new tools, but shouldn’t encounter any problems.
Before we begin, you will need the following tools installed:
git- to clone thekamu-deploy-examplerepominikube- to create a local Kubernetes clusterkubectl- client for interacting with Kubernetes clusterhelm- software management tool for Kuberneteshelmfile- “infrastructure-as-code” wrapper forhelmaws-cli(optional) - needed to download example datasets
Start your cluster
First we will start by creating a local Kubernetes cluster usingminikube:
You can also specify how much resources to allocate to the cluster. For example, we can let it use all available resources as:
kubectl client can communicate with your new cluster:
Clone the example repo
While we could deploy all components by runninghelm install commands, we will use “infrastructure-as-code” approach where the entire state of our deployment is described by files in a git repository.
Go ahead and clone the kamu-deploy-example repo:
Select components
By default all components are enabled, but if, for example, you don’t need JupyterHub open:Deploy Kamu Node
Using convenience script
To get all components installed and running you can use a convenience script:Kamu Web UI URL in your browser and see the Kamu Web Platform interface.
Using helmfile
Instead of the convenience script you can usehelmfile directly to synchronize the current state the cluster with the desired state of our deployment defined in configuration files:
kamu component pods running:
Example Content
If you open theKamu Web UI URL in your browser you will see a functional but very empty platform.
To load some example data to play with use:
Superset example
We are still working on automated Superset examples setup, so to see some data follow these simple steps:- Run
port-forward.shscript - Open Superset Web UI and login
- Go to “Settings” > “Database connections”
- Select ”+ Database” using type “Other”
- Display name:
kamu - For Sqlalchemy URL use:
replacing the IP/port with the output of
port-forward.shscript forFlightSQLprotocol - Now go to
Datasetstab and create one forkamu/co.alphavantage.tickers.daily.spy - Create a
Line Chartby:- dropping
event_timeontoX-Axis - dropping
closeontoMetrics - hitting
Create chartat the bottom
- dropping
Making changes
After the initial deployment, if you modify any configuration you can easily apply your changes to the deployment using a convenience script:Under the hood
Main entry point of this repository ishelmfile.yaml which:
- Configures some basic
helmparameters (e.g. deployment timeouts) - Connects Kamu’s helm chart repository
- Defines the
minikubeenvironment - And defines a multi-layer structure for supplying configuration values to individual helm chart releases
helmfile.yaml provided in this example is simple yet very capable. It can be a good foundation for operating multiple different Kamu Node environments in production.
What’s Next?
See Architecture section for the description of all components we have installed and how they interoperate. Once you get familiar and comfortable with this local setup - proceed to the Deployment Manual for instructions on setting up a production-grade environment. Oh, and don’t forget to clean up yourminikube environment: