Task: Deploy bpmn and dmn to production in camunda8
My Reference: Integrate Web Modeler into CI/CD | Camunda 8 Docs
Use Case: As per my project requirement I create bpmn and dmn using java code and store bpmn and dmn in web modeler using web modeler api:Swagger UI
Requirement: my project is a SAAS service where we get input from UI based on that in java code we created bpmn and dmn and stored in web modeler now once it stored I automatically need to CICD pipeline trigger that will read the BPMN and dmn files from web modeler and deploy it in develop and production environment.
Integrate Web Modeler into CI/CD | Camunda 8 Docs has reference of CICD pipeline code still its not complete and I am challenge to start implementing CICD. after reading few times I can understand concept however still not clear how to start implement. can anyone please share complete code from git hub with example of deploying process to production using CICD.
Hi @Raj_Kishun_Singh - I admit, I’m a bit confused about your requirements here. I’ll do my best to clarify.
There are three different ways to approach integrating a CI/CD pipeline with Camunda:
- Utilize the Web Modeler API to fetch the latest version of a model and deploy it using the Zeebe API. This would be handled inside your existing pipeline.
- Utilize Web Modeler’s Git Sync feature to push models to your repository, and use the Zeebe API inside your existing pipeline to deploy the resource.
- Manually deploy the models, either with code or using a command-line tool like zbctl or a tool like Postman.
What I’m not quire understanding is why you’re generating models with code and then storing them in Web Modeler. Do you use Web Modelers features? If not, I would recommend storing the models directly in a repository.
I don’t have a complete end-to-end example for GitHub at the moment, but here’s one of our GitLab pipeline examples and it shouldn’t be hard to port it over to GitHub. (I believe our engineers are working on a GitHub example.)
thank you.
Clarifications: we have a SAAS product where user submit a form from UI. we have microservice, that read bpmn design file from web modeler and replace user entered properties eg: kafka topic name(kafka connector start event) etc many properties are replaced and final version of bpmn is created with 1 call activity and bpmn is stored back in web modeler with mile stones. later user submit new form then same bpmn retrieved with latest mile stones and new call activity added(for each call activity separate bpmn created followed similar approach read design from web modeler replace properties and store back in web modeler). user can do it n number of time. create file and update file and we need to deploy bpmn files time to time in production. so for deployment we cannot manually start cicd and we cannot do it using merging PR. it need to happen automatically when file in stored in web modeler and mile stone in created then our cicd project should start the pipeline follow each step of cicd and deploy to production. As you mentioned there is no end to end complete example. Git lab pipeline example that you shared has basic code will check that. we use bitbucket where our cicd project will be created.
I am looking for more help on this because the steps mentioned in Integrate Web Modeler into CI/CD | Camunda 8 Docs
is challenging for me to get implemented and I have to get it done.
@Raj_Kishun_Singh - follow up question:
After the users have made all their changes and the model is ready for deployment … what triggers the deployment? Does the user click a button in your application, and that will trigger the pipeline?
Correct!! we are thinking of this option as first approach. However when user click button then how the CICD project will trigger pipeline, there should be some auto commit in bit bucket or how shall we achieve this?
@Raj_Kishun_Singh - I think I would keep this simple, but of course there may be factors that I’m not aware of. I would push the models directly from my application when they click the deploy button, rather than triggering a CI/CD pipeline in Bitbucket. If there are other artifacts that need to be deployed also, perhaps do both? My reasoning would be that it sounds like you’re not 100% comfortable wiring this up in the pipeline, so to make it easier, just deploy it from your app using an API call! If it’s a Java app, it is very simple with our Java client.
correct. However we want to follow proper CICD process for production deployment. mentioned at:Integrate Web Modeler into CI/CD | Camunda 8 Docs
so that with help of cicd we can perform unit test of bpmn and dmn and integration test them, with some input, we are trying to explore these
@Raj_Kishun_Singh - I am not sure what else I can provide, to be honest. Much of this depends on how you’ve configured your application, your pipelines, and how your repository is configured, none of which are affected by Camunda. For instance, if you need to push the model to your git repository when a user clicks a button, then that’s what you should do; Camunda has no strong recommendation here. When you mention “proper CICD process,” that is just one example Camunda has produced to illustrate what is possible. It is not intended to be a prescriptive process that you must follow.
Using the GitLab action I shared before, you can integrate that into your existing pipeline. Your action will need to grab the appropriate models and use the Zeebe DeployResource
gRPC endpoint to deploy the model. You can use lots of tools for this, but I personally would try using curl first. Before or after that step in the pipeline you can add whatever testing is needed for your application, deploy additional resources, etc.