- What is Purser?
- Features
- Setup and Installation
- Uninstalling
- API Documentation
- Additional Documentation
- Community, Discussion, Contribution and Support
Purser is an extension to Kubernetes tasked at providing an insight into cluster topology, costing, capacity allocations and resource interactions along with the provision of logical grouping of resources for Kubernetes based cloud native applications in a cloud neutral manner, with the focus on catering to a multitude of users ranging from Sys Admins, to DevOps to Developers.
It comprises of three components: a controller, a plugin and a UI dashboard.
The controller component deployed inside the cluster watches for K8s native and custom resources associated with the application, thereby, periodically building not just an inventory but also performing discovery by generating and storing the interactions among the resources such as containers, pods and services.
The plugin component is a CLI tool interfacing with the kubectl
that helps query costs, savings defined at a level of control of the application level components rather than at the infrastructure level.
The UI dashboard is a robust application that renders the Purser UI for providing visual representation to the complete cluster metrics in a single pane of glass.
Purser with it's robust CLI and UI capabilities provides a set of features including, but not limited to the list below.
-
Capability to provide visibility into the following aspects of the K8s cluster
- workload cost associated with the native/custom resources
- savings opportunities associated with storage and compute requirements
- single pane view of the complete cluster hierarchy
- capacity allocations for CPU, memory, disk space and other resources
- interactions among associated resources such as pods and services
-
Capability of user defined logical grouping of resources based on
K8s CRD
implementation for enhanced filtering. -
A plugin extension to
kubectl
along with the UI for developer centric usage. -
Capability to subscribe to inventory changes via web-hook implementation.
Follow the instructions below to set up Purser in your environment.
- Kubernetes version 1.9 or greater.
kubectl
installed and configured. For details see here.
Purser has three components to install.
The following steps will install Purser in your cluster at namespace purser
.
Creation of this namespace is needed because purser needs to create a service-account which requires namespace.
Also, the frontend will use kubernetes DNS to call backend for data and this DNS contains a field for namespace.
# Namespace setup
kubectl create ns purser
# DB setup
curl https://raw.githubusercontent.com/vmware/purser/master/cluster/purser-database-setup.yaml -O
kubectl --namespace=purser create -f purser-database-setup.yaml
# Purser controller setup
curl https://raw.githubusercontent.com/vmware/purser/master/cluster/purser-controller-setup.yaml -O
kubectl --namespace=purser create -f purser-controller-setup.yaml
# Purser UI setup
curl https://raw.githubusercontent.com/vmware/purser/master/cluster/purser-ui-setup.yaml -O
kubectl --namespace=purser create -f purser-ui-setup.yaml
NOTE: If you don't have curl
installed you can download purser-database-setup.yaml
from here, purser-controller-setup.yaml
from here and purser-ui-setup.yaml
from here.
Then kubectl create -f purser-database-setup.yaml
,
kubectl create -f purser-controller-setup.yaml
and kubectl create -f purser-ui-setup.yaml
will setup purser in your cluster.
The following settings can be customized before Controller installation:
- Change the default log level, dgraph url and dgraph port by editing
args
field in the purser-controller-setup.yaml. (Default:--log=info
,--dgraphURL=purser-db
,--dgraphPort=9080
) - Enable/Disable resource interactions capability by editing
args
field in the purser-controller-setup.yaml and uncommentingpods/exec
rule from purser-permissions. (Default:disabled
) - Enable subscription to inventory changes capability by creating an object of custom resource kind
Subscriber
. (Refer: example-subscriber.yaml) - Enable customized logical grouping of resources by creating an object of custom resource kind
Group
. (Refer: docs for custom group installation and usage)
NOTE: Use flag --kubeconfig=<absolute path to config>
if your cluster configuration is not at the default location.
# Binary installation
wget -q https://github.com/vmware/purser/blob/master/build/purser-binary-install.sh && sh purser-binary-install.sh
Enter your cluster's configuration path when prompted. The plugin binary needs to be in your PATH
environment variable, so once the download of the binary is finished the script tries to move it to /usr/local/bin
. This may need your sudo permission.
For installation on Windows follow the steps in the manual installation guide.
For other installation methods such as manual installation or installation from source code refer guides in docs.
kubectl --namespace=purser delete -f purser-database-setup.yaml
kubectl --namespace=purser delete -f purser-controller-setup.yaml
kubectl --namespace=purser delete -f purser-ui-setup.yaml
kubectl --namespace=purser delete pvc datadir-purser-dgraph-0
NOTE: Use flag --kubeconfig=<absolute path to config>
if your cluster configuration is not at the default location.
wget -q https://github.com/vmware/purser/blob/master/build/purser-binary-uninstall.sh && sh purser-binary-uninstall.sh
The project uses Swagger to document API's endpoints. The documentation is available at Swagger Hub.
Additional documentation can be found below:
- Manual Installation Guide
- Source Code Installation Guide
- Purser Architecture and Workflow
- Purser Plugin Usage
- Developers Guide
- Purser Deployment Guide
- Purser UI Development Guide
Issues: Have an issue with Purser, please log it.
Contributing: Would you like to contribute to our project, refer How to contribute, Developers Guide and Code of Conduct docs.