Tanzu Build Service (TBS) based on BuildPack(CNB) and kPack : Use Cases and Solutions

What is Tanzu Build Service (TBS)?

Tanzu Build Service automates container creation, management, and governance at enterprise scale

https://tanzu.vmware.com/build-service

It’s an automated tool based on open sources BuildPack (CNB) and kPack, which builds portable OCI docker images from the source code and push to the image registry (Docker-Hub/Registry/jFrog etc.). It also keep on refreshing image registry with the latest builds. It boost security and reduce risk from CVE and follow cloud native model. It auto injects dependent libraries, OS image config with source code without maintaining docker files. It scans source code configuration files and build scripts and auto inject/download required libraries to run on any platform.

Why Tanzu Build Service( TBS)?

  1. Save time to re-build, re-test and re-deploy during patching hundreds of containers.
  2. It auto scans source code configuration and language and inject dependencies into docker image that will be required to compile and/or run the app on container/K8s.
  3. Faster build and patching on hundreds of containers.
  4. Faster developer productivity by setting local build on developer’s machine and sync with source code repo like GutHub etc.
  5. Manage common project dependencies for dev teams and sync all developers code with single git branch to avoid any code conflict/sync issues.
  6. Maintain latest image in image registry.
  7. OCI docker image support, build and run anywhere!

In this blog, I will cover a couple of TBS use cases and real challenges which can be solved using this :

TBS use cases

  • Build OCI secure image from the source code automatically
  • Save time to re-build, re-test and re-deploy when patching hundreds of containers and build images
  • Boost developer/operator productivity
  • Maintain latest and greatest docker images in image registry
  • CI/CD build and deploy pipeline integration with Concourse ( in-build support) and Jenkin ( need additional configuration)
  • Better experience when promote apps between Non-PROD and PROD environments
  • Support for polyglot applications for multiple programming languages. Currently, Tanzu Build Service (TBS) v1.0 GA supports these languages:
    • Java
    • NodeJS
    • .NET Core (supports Windows DotNet App)
    • Python
    • Golang
    • PHP
    • HTTPD
    • NGINX
  • Hard to build, update and manage many OCI compliant secure docker images
  • Manual dependency of dependent libraries
  • Dependency on OS bases images
  • Common security vulnerabilities and exposures (CVE) issues in docker image
  • Use build-packs in my local dev environment

Refer my this blog to install and use TBS with your Kubernetes cluster

https://cloudificationzone.com/2020/06/15/build-docker-image-using-tanzu-build-service-on-kubernetes-using-dockerhub/

References

TBS Demo Video

Setup K8s Admin Dashboard UI – Octant and Proxy

A. Setup Octant K8s Dashboard UI

To visualize, monitor and inspect TKG Kubernetes clusters. Install Octant UI dashboard. Octant should immediately launch your default web browser on http://127.0.0.1:7777/#/cluster-overview

$ octant

Note: Or to run it on a specific host and fixed port:

OCTANT_LISTENER_ADDR=0.0.0.0:8900 octant

B. Setup K8s Proxy dashboard UI

This blog will cover popular Proxy K8s admin dashboards.

Run this command:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml

Then, run this command on CLI-

kubectl proxy

Hit this URL on browser –

http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/overview?namespace=default

Note: You need to provide user token of your K8s cluster from .kube/config file from your home K8s path Or path of this K8s config file.