This is a polyglot demo app for showcasing Tanzu Observability.
- Add UI repo link
- 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
- 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
cd deploy
-
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 the01-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
- The yaml file are split into the
deploy
,namespace
adnservices
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!
- 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 .
Please let use know how we can improve!