How do I deploy a kjar to kie-server?

1,661 views
Skip to first unread message

NullVoxPopuli

unread,
Apr 18, 2018, 11:25:23 AM4/18/18
to Drools Setup
I posted an issue here: https://github.com/jboss-dockerfiles/jbpm/issues/35#issuecomment-382416578
maybe not the best place, but this forum seems like the right place :-)

I've  learned that jbpm and kie-server need to share an .m2 directory for jbpm to deploy processes to.

Here is my docker-compose

version: '3.4'
services:
  jbpm:
    build:
      context: jboss/jbpm-workbench-showcase:7.7.0.Final
      dockerfile: Dockerfile
    ports:
      - '8080:8080'
      - '8081:8081'
      - '9990:9990'
    networks:
      - backoffice
    volumes:
      - type: volume
        source: jbpm-m2
        target: /opt/jboss/.m2
      - type: bind
        source: ./deployment/local/config/niogit
        target: /opt/jboss/wildfly/bin/.niogit

  kie-server:
    build:
      context: jboss/kie-server-showcase:7.7.0.Final-4
      dockerfile: Dockerfile
    ports:
      - '8180:8080'
    links:
      - jbpm:kie_wb
    networks:
      - backoffice
    volumes:
      - type: volume
        source: jbpm-m2
        target: /opt/jboss/.m2

volumes:
  jbpm-m2:

networks:
  internet:
  backoffice:


I can confirm that when I click deploy in the jbpm workbench, that the jar is placed in the shared m2 directory
(I can see it in both the jbpm container, and the kie-server container).



However, I still can't get the containers endpoint on the kie-server to show anything other than an empty list.

http://localhost:8180/kie-server/services/rest/server/containers




how do I get kie-server to pick up my jbpm process?


also, my kie-server doesn't have any UI... some of the docs implies that it should? idk. I can't find the docs I was looking at earlier, but there were also missing screenshots..
This is all very complicated. :-\

Maciej Swiderski

unread,
Apr 18, 2018, 2:31:11 PM4/18/18
to drools...@googlegroups.com
the issue with kieserver-showcase docker image is now fixed and latest does include all correct versions. So please go ahead and clear the local docker registry for kie server* images and pull them once again.
docker run -p 8180:8080 -d --name kie-server -e JAVA_OPTS="-Djava.net.preferIPv4Stack=true" --link jbpm-workbench:kie_wb jboss/kie-server-showcase:latest

Just tested all this locally and all is working as expected.

On 18 Apr 2018, at 17:25, NullVoxPopuli <lt....@gmail.com> wrote:

I posted an issue here: https://github.com/jboss-dockerfiles/jbpm/issues/35#issuecomment-382416578
maybe not the best place, but this forum seems like the right place :-)

I've  learned that jbpm and kie-server need to share an .m2 directory for jbpm to deploy processes to.

this is not true, once all works is configured properly it will fetch automatically build kjars from jbpm console.

Maciej
--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/f7d03003-3b66-4e24-9802-adec14c7421a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

NullVoxPopuli

unread,
Apr 18, 2018, 6:23:32 PM4/18/18
to Drools Setup
how do I generate the kjars?

when I deploy a project (via the deploy button), me kie-server containers endpoint always returns an empty list.

Maciej Swiderski

unread,
Apr 19, 2018, 2:14:11 AM4/19/18
to drools...@googlegroups.com

On 19 Apr 2018, at 00:23, NullVoxPopuli <lt....@gmail.com> wrote:

how do I generate the kjars?
deploy will build, install to workbench’s maven repo and deploy it to server template if there is any. So check if you have server templates in the Execution Servers perspective. There should be one automatically conencted to workbench when you start kie server showcase container.

Maciej

NullVoxPopuli

unread,
Apr 19, 2018, 10:54:16 AM4/19/18
to Drools Setup
it looks like I'm having networking issues.

there was a github issue about this here: https://github.com/jboss-dockerfiles/jbpm/issues/29 (which I've commented on as well)

I can get the kie-server to show up (under server in the workbench) if I run these commands: 


docker run -p 8080:8080 -p 8001:8001 --mount type=bind,source=$PWD/deployment/local/config/niogit,target=/opt/jboss/wildfly/bin/.niogit --name jbpm jboss/jbpm-workbench-showcase:7.7.0.Final
docker run -p 8180:8080 -d --link jbpm:kie-wb jboss/kie-server-showcase:7.7.0.Final-4
I can't seem to get this to work in docker-compose though.

here is my compose config:

version: '3.4'
services:
  jbpm:
    image: jboss/jbpm-workbench-showcase:7.7.0.Final
    ports:
      # Workbench
      - '8080:8080'
      # Git
      - '8001:8001'
    networks:
      - backoffice
    volumes:
      - type: bind
        source: ./deployment/local/config/niogit
        target: /opt/jboss/wildfly/bin/.niogit

  kie-server:
    image: jboss/kie-server-showcase:7.7.0.Final-4
    ports:
      # Rest API Server
      - '8180:8080'
    links:
      - jbpm:kie-wb
    networks:
      - backoffice

Are there environment variables I can use to that tell kie-server where the jbpm workbench is?
There should be no difference between the manually run docker commands and the docker-compose config
Reply all
Reply to author
Forward
0 new messages