How to properly add admin user to existing project

Hello everyone,

I deployed a spring boot app (embedded camunda) without cockpit’s admin user. You can access the cockpit from the proper (currently open) address but there is simply no user to log in with - running query select * from act_id_user; gives me exactly 0 rows.

So I wonder, what is the best way to add cockpit’s admin user to existing and living camunda app?

As far as I understood the docs and other people’s posts I basically have two ways to achieve that:

  1. add camunda.bpm.admin-user.id=${ADMIN_USERNAME} and
    camunda.bpm.admin-user.password=${PASSWORD} to my yaml configmap and redeploy the app
  2. add that user with sql inserts (I found, probably depracted, example to start with: archive-mso/packages/root-pack-extras/config-resources/mariadb/db-sql-scripts/camunda/mysql_create_camunda_admin.sql at fd02ad4cc7f03cfbe01dba5a1e564bed63e69a11 · onap/archive-mso · GitHub)

The question is - which path should I choose? My goal would be to have an admin user in cockpit that would have access to every process instance that had been already created and to the future instances as well.

Regards
Kamil

Hello my friend!

I believe that the first option is the most conventional and the one that most resembles other use cases such as database users and passwords, which are also configured this way.

This is the way i use it in my projects! :grin:

Put this config in your Yaml file and deploy your camunda application again… and be happy \o/

William Robert Alves

1 Like

Thanks for your reply! I had a gut feeling that by doing the first option camunda will automagically create admin user in existing database and I’ll be able to monitor new and already created instances as well. However I was not sure if by doing this I’m not going to interfere with pending instances - that’s why I thought about adding it manualy via sql scripts on “living organism”.

I’ll definitly give it a try and share the results

I suggest that you place the following parameters in your processes.xml file if you don’t already have them, so that when deploying the application you can check whether there have been changes to the process definitions and only deploy a new version if any changes have occurred.

<property name="isScanForProcessDefinitions">true</property>
<property name="isDeployChangedOnly">true</property>

If this answer has resolved the issue, please let us know, and mark it as “Solution” so that other people can easily find the answer they are looking for, and so that we can finish the topic correctly.

i hope this helps!

William Robert Alves

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.