Here you can find the templates for the deployment of DecisionRules with Business Intelligence on Kubernetes
In general, you can follow the general Kubernetes setup described on the previous page. You will just need the two main templates slightly adjusted. In particular, during the setup use the following templates.
First, the template for services and ingress will now look like this.
ingress.yaml
apiVersion:v1kind:Servicemetadata:name:decisionrules-client-servicenamespace:decisionrulesspec:selector:app:decisionrules-clientports: - port:80---apiVersion:v1kind:Servicemetadata:name:decisionrules-server-servicenamespace:decisionrulesspec:selector:app:decisionrules-serverports: - port:8080---apiVersion:v1kind:Servicemetadata:name:decisionrules-bi-servicenamespace:decisionrulesspec:selector:app:decisionrules-biports: - port:8082---apiVersion:networking.k8s.io/v1kind:Ingressmetadata:name:decisionrules-ingressnamespace:decisionrulesannotations:nginx.ingress.kubernetes.io/rewrite-target:"/"cert-manager.io/cluster-issuer:"letsencrypt-prod"spec:ingressClassName:nginxtls: - hosts: - yourdomain.local# must be changed - api.yourdomain.local# must be changedsecretName:echo-tlsrules: - host:yourdomain.local# must be changedhttp:paths: - path:/pathType:Prefixbackend:service:name:decisionrules-client-serviceport:number:80 - host:api.yourdomain.local# must be changedhttp:paths: - path:/pathType:Prefixbackend:service:name:decisionrules-server-serviceport:number:8080 - host:bi.yourdomain.local# must be changedhttp:paths: - path:/pathType:Prefixbackend:service:name:decisionrules-bi-serviceport:number:8082
Second, the deployment template.
deployment.yaml
apiVersion:apps/v1kind:Deploymentmetadata:name:decisionrules-clientnamespace:decisionrulesspec:replicas:2selector:matchLabels:app:decisionrules-clientstrategy:type:RollingUpdaterollingUpdate:maxSurge:2maxUnavailable:0template:metadata:labels:app:decisionrules-clientspec:containers: - name:decisionrules-clientimage:decisionrules/clientresources:requests:cpu:250mmemory:128Milimits:cpu:500mmemory:256Miports: - containerPort:80env: - name:API_URLvalue:"https://api.yourdomain.local"#must be changed - name:BI_API_URLvalue:"https://bi.yourdomain.local"#must be changed---apiVersion:apps/v1kind:Deploymentmetadata:name:decisionrules-servernamespace:decisionrulesspec:replicas:2selector:matchLabels:app:decisionrules-serverstrategy:type:RollingUpdaterollingUpdate:maxSurge:2maxUnavailable:0template:metadata:labels:app:decisionrules-serverspec:containers: - name:decisionrules-serverimage:decisionrules/serverresources:requests:cpu:1000mmemory:1Gilimits:cpu:2000mmemory:2Giports: - containerPort:8080env: - name:REDIS_URLvalue:" # must be filled - name: MONGO_DB_URI value: "" # must be filled - name: CLIENT_URL value: "https://yourdomain.local/#"# must be changed and end with "/#" - name:API_URLvalue:"https://api.yourdomain.local"# this is only necessary with certain deployment models - name:LICENSE_KEYvalue:""# must be filledstartupProbe:httpGet:path:/health-checkport:8080failureThreshold:20# Application will have 5s+3s*20=65s to startinitialDelaySeconds:5periodSeconds:3livenessProbe:httpGet:path:/health-checkport:8080initialDelaySeconds:10# Is equal to periodSeconds so it does not do anythingfailureThreshold:2# Application will have 2*10s=20s to recover, otherwise it will be killedperiodSeconds:10---apiVersion:apps/v1kind:Deploymentmetadata:name:decisionrules-binamespace:decisionrulesspec:replicas:2selector:matchLabels:app:decisionrules-bistrategy:type:RollingUpdaterollingUpdate:maxSurge:2maxUnavailable:0template:metadata:labels:app:decisionrules-bispec:containers: - name:decisionrules-biimage:decisionrules/business-intelligenceresources:requests:cpu:1000mmemory:1Gilimits:cpu:2000mmemory:4Giports: - containerPort:8082env: - name:BI_MONGO_DB_URIvalue:""# must be filledlivenessProbe:httpGet:path:/health-checkport:8082initialDelaySeconds:30periodSeconds:30---apiVersion:autoscaling/v1kind:HorizontalPodAutoscalermetadata:name:decisionrules-server-autoscalingnamespace:decisionrulesspec:scaleTargetRef:apiVersion:apps/v1kind:Deploymentname:decisionrules-serverminReplicas:1maxReplicas:10targetCPUUtilizationPercentage:60
Remember to enter your own custom ULRs consistently in bot the above templates. Also, in the deployment template, you will need to fill in valid values of the environment variables for both the server and the business intelligence container. All the places in the templates that need your attention are marked by a comment.
Upon following the instructions on the previous page and using these two templates instead of the respective templates provided therein, you should be able to successfully deploy DecisionRules with the Business Intelligence container on Kubernetes.