Giter Site home page Giter Site logo

dbbaskette / demo-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vmware-archive/demo-app

0.0 1.0 0.0 111.74 MB

Demo App for DT & k8s and misc.

License: Apache License 2.0

Java 60.27% Shell 2.28% Dockerfile 0.92% Makefile 0.65% Go 7.96% C# 17.76% Python 10.15%

demo-app's Introduction

Tanzu Observability demo-app

This is a polyglot demo app for showcasing Tanzu Observability.

TODO

  1. Add UI repo link

Build, Package and Deploy


Build

  • Build the Java services - from the root folder run:
mvn package
  • Build the .Net service:
cd payments; dotnet build
  • Build the Golang service:
cd inventory; make

Package

  • Create docker images and push to registry.
  • You must set REPOSITORY_PREFIX for your repository. Example:
export REPOSITORY_PREFIX=192.168.1.8/demo-app
  • Replace 192.168.1.8/demo-app with your repository!
  • Build containers and push to your repository:
cd images; 
./all.sh

Deploy

cd deploy

Step One: Config Maps / Direct Ingestion or Wavefront Proxy

  • The config maps are configured with a script with files from the data folder.

  • Since the purpose of tacocat is to demo the power of Tanzu Observability, it can be configured to send metrics to Tanzu Observability via direct ingestion or by proxy.

  • Execute one of the following:

./cm.sh direct

or

./cm.sh proxy
  • cm.sh will regen the 01-configmap-*.yaml files.
  • If you go direct, you'll need to edit the files and add your TO (Wavefront) details.
./deploy/data/direct/inventory.conf
./deploy/data/direct/wf-config.yaml
  • If you use the proxy, you'll need to configure a Kubernetes secret with your TO API token:
kubectl apply -f namespace/.
kubectl create secret generic  wf-token -n tacocat
kubectl edit secrets wf-token  -n tacocat
  • Your secrets file should look something like this:
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
  token: YOUR BASE64 ENCODED TOKEN HERE
kind: Secret
metadata:
  creationTimestamp: "2021-03-09T15:00:09Z"
  name: wf-token
  namespace: tacocat
  resourceVersion: "231537"
type: Opaque

Step Two: Configure Yaml files with your repository:

  • The yaml file are split into the deploy, namespace adn services folders.
  • This facilitates redeploying the apps in the deploy folder without changing the k8s service or namespace (easier redeploys).
  • You'll need to edit (sed) the *.yaml files to have the location of your registry from the Package step like this:
sed -i 's|<add your repository here>|192.168.1.8/demo-app|g' *.yaml
  • Replace "192.168.1.8/demo-app" with your repository!

Step Three: Deploy to K8S

  • Initial deployment:
kubectl apply -f namespace/.
kubectl apply -f service/.
kubectl apply -f . 
  • To redeploy (but not delete the namespace or service):
kubectl delete -f . 
kubectl apply -f . 

Need to add link to UI repo


That's it!

Please let use know how we can improve!

demo-app's People

Contributors

dbbaskette avatar puckpuck avatar scrogatl avatar sushantdewan123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.