Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions jitsu/jitsu-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: jitsu-config
labels:
app: jitsu
namespace: #namespace_name#
data:
jitsu-url: jitsu-service
51 changes: 51 additions & 0 deletions jitsu/jitsu-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jitsu
namespace: #namespace_name#
spec:
selector:
matchLabels:
app: jitsu
template:
metadata:
labels:
app: jitsu
spec:
terminationGracePeriodSeconds: 10
containers:
- name: jitsu
image: jitsucom/jitsu:1.43.0
imagePullPolicy: Always
ports:
- containerPort: 8000
name: api
env:
- name: REDIS_URL
value: redis-server
- name: DOCKER_HOST
value: tcp://localhost:2375
- name: DOCKER_TLS_CERTDIR
value: ""
# volumeMounts:
# - name: logs
# mountPath: /home/eventnative/data/logs
# - name: events
# mountPath: /home/eventnative/data/logs/events
# volumeClaimTemplates:
# - metadata:
# name: logs
# spec:
# storageClassName: longhorn
# accessModes: [ "ReadWriteOnce" ]
# resources:
# requests:
# storage: 3Gi
# - metadata:
# name: events
# spec:
# storageClassName: longhorn
# accessModes: [ "ReadWriteOnce" ]
# resources:
# requests:
# storage: 2Gi
28 changes: 28 additions & 0 deletions jitsu/jitsu-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jitsu
namespace: #namespace_name#
annotations:
kubernetes.io/ingress.class: "nginx"
# nginx.ingress.kubernetes.io/rewrite-target: /$2
# nginx.ingress.kubernetes.io/app-root: /
# nginx.ingress.kubernetes.io/use-regex: "true"
# nginx.ingress.kubernetes.io/configuration-snippet: |
# more_set_headers "X-Robots-Tag: noindex, nofollow";
# nginx.ingress.kubernetes.io/enable-cors: "true"
# nginx.ingress.kubernetes.io/cors-allow-methods: "GET, OPTIONS"
# nginx.ingress.kubernetes.io/cors-allow-origin: "*"
# nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
spec:
rules:
- host: jitsu.mybento.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jitsu
port:
number: 8000
15 changes: 15 additions & 0 deletions jitsu/jitsu-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: jitsu-service
namespace: #namespace_name#
spec:
ports:
- name: api
port: 8000
protocol: TCP
nodePort: 32301
selector:
app: jitsu
sessionAffinity: None
type: NodePort
19 changes: 19 additions & 0 deletions jitsu/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "jitsu",
"display_name": "jitsu",
"description": "jitsu",
"parameters": [],
"main": "jitsu/run.sh",
"dependencies": [
"jitsu/run.sh",
"jitsu/jitsu-configmap.yaml",
"jitsu/jitsu-service.yaml",
"jitsu/jitsu-deployment.yaml",
"jitsu/jitsu-ingress.yaml",
"jitsu/redis-configmap.yaml",
"jitsu/redis-deployment.yaml",
"jitsu/redis-service.yaml",
"jitsu/redis-storage.yaml",
"utils/cachengo.sh"
]
}
89 changes: 89 additions & 0 deletions jitsu/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
![Jitsu logo](https://jitsu.com/img/jitsu-responsive.svg "Jitsu Logo")

## What is Jitsu?

---

an open-source web- and app- event collection platform. Jitsu is designed to be a fast and easy replacement for proprietary analytics stacks such as Google Analytics and Segment.

## Features

---

Unstructured Event Collection. Jitsu can be used as event gateway for your database. Once an event is sent to Jitsu (via HTTP API or JS SDK), it take cares of the rest: table schema maintenance, batching and/or buffering events (for performance optimization or for reliability). If you want to learn more about how Jitsu works we have an article explaining Jitsu's architecture.

Data Collection (from external services). Jitsu can collect data from external services via an API and insert it in your database. We support a number of native connectors. Also Jitsu can serve as a bridge to Singer, which is an open source command-line framework for API connectors.

Transformation and event dispatching. Think of Jitsu as a network router for events. It can send events to multiple destinations based on dynamic rules. Also, it can apply transformations to incoming data streams, including geo-resolution based on IP addresses and rule-based transformations.

## Installation

---

1. Select the devices to which Jitsu will be installed from 'Devices' page.

2. Navigate to the 'App Marketplace' tab and select the 'Jitsu' application.

3. The 'Install Now' button should now appear near the top of the screen. Select this button.

4. Give your installation a name and fill all the parameters. Click 'Install Jitsu' in the bottom right corner.

## Required Parameters

---

## Additional Parameters

---

**Installation Name**

Here you will put your app name. Although the app name is Jitsu on the portal, you can personalize the name that is shown on the device's Applications.

## Using Jitsu

---


1. Setup SSH Tunneling between your device and any of your nodes using port 32301:

E.g.

```
ssh -L 8000:127.0.0.1:32301 cachengo@fde5:ef2d:1377:132e:b599:932a:3d4:d540
```

2. In your web browser, navigate to your localhost using the fowarded port. This will redirect you to Jitsu UI.

E.g.

```
http://127.0.0.1:8000/configurator

```



## OS Architectures

---

- Arm64

## Limitations / Known issues

---

N/A

## Jitsu Platform Video

---

[![Demo Image](http://img.youtube.com/vi/59cVVUxXxFU/0.jpg)](https://youtu.be/59cVVUxXxFU)

## Docs

---

For more information: <[https://github.com/jitsucom/jitsu/blob/master/README.md]>
9 changes: 9 additions & 0 deletions jitsu/redis-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-config
namespace: #namespace_name#
data:
redis-config: |
maxmemory 2mb
maxmemory-policy allkeys-lru
33 changes: 33 additions & 0 deletions jitsu/redis-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-server
namespace: #namespace_name#
spec:
replicas: 1
selector:
matchLabels:
app: redis-server
template:
metadata:
labels:
app: redis-server
name: redis-server
spec:
containers:
- name: redis-server
image: redis:latest
args: ["--appendonly", "yes"]
ports:
- name: redis-server
containerPort: 6379
volumeMounts:
- name: lv-storage
mountPath: /data
env:
- name: ALLOW_EMPTY_PASSWORD
value: "yes"
volumes:
- name: lv-storage
persistentVolumeClaim:
claimName: redis-pvc
14 changes: 14 additions & 0 deletions jitsu/redis-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: redis-server
namespace: #namespace_name#
spec:
selector:
app: redis-server
type: LoadBalancer
ports:
- name: redis-port
protocol: TCP
port: 6379
targetPort: 6379
12 changes: 12 additions & 0 deletions jitsu/redis-storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: redis-pvc
namespace: #namespace_name#
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 1Gi
70 changes: 70 additions & 0 deletions jitsu/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/bin/bash

source "utils/cachengo.sh"
source "jitsu/jitsu-configmap.yaml"
source "jitsu/jitsu-service.yaml"
source "jitsu/jitsu-deployment.yaml"
source "jitsu/jitsu-ingress.yaml"
source "jitsu/redis-configmap.yaml"
source "jitsu/redis-deployment.yaml"
source "jitsu/redis-service.yaml"
source "jitsu/redis-storage.yaml"

function do_install {
set -e
cachengo-cli updateInstallStatus "$APPID" "Installing"

if [ -n "$NAMESPACE_NAME" ]; then

kubectl create namespace $NAMESPACE_NAME
sed -i "s|#namespace_name#|$NAMESPACE_NAME|g" jitsu/jitsu-configmap.yaml
sed -i "s|#namespace_name#|$NAMESPACE_NAME|g" jitsu/jitsu-service.yaml
sed -i "s|#namespace_name#|$NAMESPACE_NAME|g" jitsu/jitsu-deployment.yaml
sed -i "s|#namespace_name#|$NAMESPACE_NAME|g" jitsu/jitsu-ingress.yaml
sed -i "s|#namespace_name#|$NAMESPACE_NAME|g" jitsu/redis-configmap.yaml
sed -i "s|#namespace_name#|$NAMESPACE_NAME|g" jitsu/redis-deployment.yaml
sed -i "s|#namespace_name#|$NAMESPACE_NAME|g" jitsu/redis-service.yaml
sed -i "s|#namespace_name#|$NAMESPACE_NAME|g" jitsu/redis-storage.yaml

else

sed -i "s|#namespace_name#|default|g" jitsu/jitsu-configmap.yaml
sed -i "s|#namespace_name#|default|g" jitsu/jitsu-service.yaml
sed -i "s|#namespace_name#|default|g" jitsu/jitsu-deployment.yaml
sed -i "s|#namespace_name#|default|g" jitsu/jitsu-ingress.yaml
sed -i "s|#namespace_name#|default|g" jitsu/redis-configmap.yaml
sed -i "s|#namespace_name#|default|g" jitsu/redis-deployment.yaml
sed -i "s|#namespace_name#|default|g" jitsu/redis-service.yaml
sed -i "s|#namespace_name#|default|g" jitsu/redis-storage.yaml

fi

kubectl apply -f jitsu/jitsu-configmap.yaml
kubectl apply -f jitsu/jitsu-service.yaml
kubectl apply -f jitsu/jitsu-deployment.yaml
kubectl apply -f jitsu/jitsu-ingress.yaml
kubectl apply -f jitsu/redis-configmap.yaml
kubectl apply -f jitsu/redis-deployment.yaml
kubectl apply -f jitsu/redis-service.yaml
kubectl apply -f jitsu/redis-storage.yaml

}

function do_uninstall {
cachengo-cli updateInstallStatus "$APPID" "Uninstalling"

kubectl delete -f jitsu/jitsu-configmap.yaml
kubectl delete -f jitsu/jitsu-service.yaml
kubectl delete -f jitsu/jitsu-deployment.yaml
kubectl delete -f jitsu/jitsu-ingress.yaml
kubectl delete -f jitsu/redis-configmap.yaml
kubectl delete -f jitsu/redis-deployment.yaml
kubectl delete -f jitsu/redis-service.yaml
kubectl delete -f jitsu/redis-storage.yaml

cachengo-cli updateInstallStatus "$APPID" "Uninstalled"
}
case "$1" in
install) do_install ;;
uninstall) do_uninstall ;;
esac