Make sure you have a folder called keys at the root of this project, with a single file: "key.json" -- which is the google application credentials keys.
Also make sure you have the .env file at the root of the project. This is currently the SAME for both botserver and replybot, so symlink one to the other!
Make sure you install the following on your machine:
Now setup minikube and kubectl:
minikube start
kubectl use-context minikube
Now, initialize helm in you minikube cluster and install Kafka using helm:
helm --kube-context minikube init
helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
helm --kube-context minikube install --name spinaltap --values kafka-values-dev.yaml incubator/kafka
Run this in the shell you will be using
eval $(minikube docker-env)
To reload or start an app (both botserver and replybot), inside the folder run:
NOTE: You will receive warnings the first time due to the fact that the script tries to delete the deployment, which will error if the deployment does not exist. That's ok.
./dev.sh
You should now see the pods running at:
kubectl get po
And you can get logs for an individual pod via:
kubectl logs [POD_NAME]
Or, handily, you can setup the following script (as kube-logs.sh, for example) and alias it to something useful on your computer:
NAME=$1
NUM=$2
kubectl logs $(kubectl get pods -l "app=${NAME}" -o jsonpath="{.items[${NUM}].metadata.name}")
Which you can then run:
alias kubelog=kube-logs.sh
kubelog gbv-replybot 1