Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OnlineWardleyMaps as service #1684

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

Heiss
Copy link
Contributor

@Heiss Heiss commented Dec 28, 2023

Hey,

this is my approach to add OnlineWardleyMaps in kroki as suggested in #179
Mostly it uses the diagramsnet logic plus some help from damonsk/onlinewardleymaps#170 and damonsk/onlinewardleymaps#75

Because i cannot build the java server (some issues with jdk or other stuff), i tested it with the following docker-compose.yml and add a smoke test for this service, too.

version: "3"
services:
  core:
    image: yuzutech/kroki
    environment:
      - KROKI_DIAGRAMSNET_HOST=onlinewardleymaps
      - KROKI_DIAGRAMSNET_PORT=8007
    ports:
      - "8000:8000"
  onlinewardleymaps:
    image: yuzutech/kroki-onlinewardleymaps
    environment:
      - LEVEL=debug
    expose:
      - "8007"
    build:
      context: onlinewardleymaps
      dockerfile: Dockerfile

Because the first results looks promising, i create the PR now before i try to finetune the svg/png output, because out of the box it looks not as expected.

The dockerfile contains 3 separate apps:

  • the kroki service (which stands mostly on diagramsnet code)
  • the onlinewardleymaps service, which gets some diff applied to get it working with kroki service.
  • the supervisord service, which runs both other services

OnlineWardleyMaps is not created to be used in this use case, but I think my approach should handle some major cases with changes upstream. But a complete rewrite would break my approach with git diffs, so there is a git commit sha in dockerfile, which should be updated from time to time.

I am happy to hear from you and get some feedback.

TODO:

  • add Tests for options with different width / height and showtitle

Have a great day.

Edit:

If someone wants to use this already without to wait to merge, use the following snippet in your docker-compose.yml

services:
  kroki:
    image: yuzutech/kroki
    depends_on:
      - ...
      - onlinewardleymaps
    environment:
      - ....
      - KROKI_ONLINEWARDLEYMAPS_HOST=onlinewardleymaps
....
  onlinewardleymaps:
    image: yuzutech/kroki-onlinewardleymaps
    build:
      context: https://github.com/Heiss/kroki.git#add-onlinewardleymaps:onlinewardleymaps
      dockerfile: Dockerfile
    expose:
      - "8007"

@ggrossetie
Copy link
Member

Hey @Heiss, thanks for your contribution!

I think this tool might be a good candidate for #1423. I still need to write a formal specification 😅

@Heiss
Copy link
Contributor Author

Heiss commented Jan 10, 2024

Hi @ggrossetie ,
thanks for replying. This means, there are major workings needed for this service as soon as you provided the spec, right?

Is there any ETA for this? I would like to use this service in my workflow with kroki and asciidoc, but i am not sitting on hot shoes. Current workaround is to export a png and include it. I am fine with this, because it does not change frequently. But i love inline code to diagrams in combination with asciidoc. ;)

@ggrossetie
Copy link
Member

This means, there are major workings needed for this service as soon as you provided the spec, right?

I wouldn't say "major workings", you will need to make some ajustements to comply with the requirements. The specification goal is to describe how companion containers communicate with the gateway/main container.

Is there any ETA for this? I would like to use this service in my workflow with kroki and asciidoc, but i am not sitting on hot shoes. Current workaround is to export a png and include it. I am fine with this, because it does not change frequently. But i love inline code to diagrams in combination with asciidoc. ;)

It's on my TODO list but I've been quite busy!
I'm currently working on a generic diagram designer / viewer in my spare time 😉

@Heiss
Copy link
Contributor Author

Heiss commented Jun 25, 2024

Hey,

any progress? Can i help?

I would like to see my changes in codebase, because i would like to promote it in my company for tech discussions.

Have a great day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants