I have a need to do some enhancements on a module in my project that follows business process management standard, have couple of options available(free & open-source) , camunda is one of them, so want to give a try and have some brief ideas on the usage of this out-of-box bpm solution.
Have database ready for use
I’m using postgresql database, will put DB configuration in a deployment file later, for more details on running postgresql inside a kubernetes cluster, follow below article.
Partial DB connection configuration I used in my deployment.yml file as below.
- name: DB_URL
value: jdbc:postgresql://postgres:5432/camunda
- name: DB_USERNAME
value: camunda
- name: DB_PASSWORD
value: password
Prepare kubernetes deployment config file
Once DB connection tested and ready to use, start to draft kubernetes service config file, here’s an example
---
apiVersion: v1
kind: Service
metadata:
name: camunda
spec:
selector:
app: camunda
ports:
- protocol: TCP
port: 8080
nodePort: 30088
type: NodePort
Above is a kubernetes service configuration for camunda container, using 30088 as the node port.
Next draft a deployment config
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: camunda
spec:
selector:
matchLabels:
app: camunda
revisionHistoryLimit: 0
template:
metadata:
labels:
app: camunda
spec:
containers:
- name: camunda
image: camunda/camunda-bpm-platform:tomcat-7.20.0
ports:
- containerPort: 8080
resources:
requests:
memory: 1Gi
cpu: 500m
limits:
memory: 4Gi
cpu: 2
env:
- name: DB_CONN_MAXACTIVE
value: "20"
- name: DB_CONN_MAXIDLE
value: "20"
- name: DB_CONN_MINIDLE
value: "5"
- name: DB_DRIVER
value: org.postgresql.Driver
- name: DB_URL
value: jdbc:postgresql://postgres:5432/camunda
- name: DB_USERNAME
value: camunda
- name: DB_PASSWORD
value: password
- name: WAIT_FOR
value: postgres:5432
In this example, I used the “camunda/camunda-bpm-platform:tomcat-7.20.0” docker image, container port is set to default: 8080, allocate resources for this container and pass all environment variables that used to connect to postgres DB
Run deployment commands on kubernetes cluster
Above service and deployment config can be merged into one file, then use below command to deploy the camunda app
kubectl apply -f deployment.yaml
Check camunda pod status if everything running correctly
NAME READY STATUS RESTARTS AGE
camunda-788778747-wzjs7 1/1 Running 0 54m
Verify deployment & login to camunda
The camunda instance should be able to access at: http://your-server-IP:30088, default username and password for admin is: demo/demo