Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Guillaume Grossetie
    @Mogztter
    Hi Brian, a community member did https://niolesk.top/ (you can copy-paste the Kroki URL at the end of the URL prefixed by #)
    7 replies
    Alternatively, you can decode the diagram from the URL using the Kroki CLI or a Python one liner then use a text editor
    Akshat
    @akshatdalton
    Hi there! I'm a regular contributor @Zulip, and we are adding support to create diagrams from textual descriptions using API provided by Kroki. I want to ask if Kroki provides any Python library to get the diagram types? I want to display these diagram types in the typeahead popovers. I'm sure that these diagram types will increase in future, so I think hardcoding these is not a good option.
    Guillaume Grossetie
    @Mogztter
    Hi @akshatdalton
    We do not have a Python library to interact with Kroki but I would definitely support this idea if someone wants to create one.
    You can somehow get all the diagram types using the /_health API. But, as mentioned in yuzutech/kroki#746, this API wasn't really designed for this use case so we are considering adding a proper API to return accurate information about which diagram types and formats are available
    Akshat
    @akshatdalton
    Great! :+1:
    Akshat
    @akshatdalton

    I've been testing some examples, and I'm stuck with this:

    import requests
    
    source = """
    rackdiag {
      16U;
      1: UPS [2U];
      3: DB Server;
      4: Web Server;
      5: Web Server;
      6: Web Server;
      7: Load Balancer;
      8: L3 Switch;
    }
    """
    
    data = {
        "diagram_source": source,
        "diagram_type": "rackdiag",
        "output_format": "SVG",
    }
    
    URL = "https://kroki.io/"
    
    r = requests.post(URL, json=data)
    
    print(r.text)

    This is printing: Error 500: OK.
    So, is there any problem in my code that is causing Internal Server Error?
    I'm getting this error for few other examples as well; otherwise, it is working fine.

    Guillaume Grossetie
    @Mogztter
    @akshatdalton I upgraded kroki.io servers yesterday but yuzutech/kroki-blockdiag containers did not properly restarted
    it should work now
    Akshat
    @akshatdalton
    Ah, yes, this is working now. Thanks! :)
    Guillaume Grossetie
    @Mogztter
    ๐Ÿ‘
    Sturt Ison
    @sturtison_gitlab
    First of all, Kroki is excellent! I've been implementing it in several locally hosted implementations. The next one is to do an OpenShift deployment of Kroki. It also helps make systems more secure by placing all the diagram generation applications in one place and not distributing them across the enterprise.
    Sturt Ison
    @sturtison_gitlab
    I'm hoping I can find some hints to track down a problem that shows when Antora 2.3.3 is being used with Kroki 0.5.0. Antora kroki is installed, and we use kroki-fetch-diagram true. Upgrading to Antora 2.4/3 beta and Kroki v0.13.0 is a last option at the moment. Errors are shown for all images, "Skipping plantuml block, GET http://<internal kroki server:port>/plantuml/png/<encoded text> - error; reason: Unexpected end of JSON in put". The URL is valid - posted into the browser it works. Otherwise Kroki works just fine in Intellij / Browsers etc.
    Guillaume Grossetie
    @Mogztter
    Hi @sturtison_gitlab and thanks for your kind words
    The error message is strange: "Unexpected end of JSON in put"
    Did you copy/paste it? "in put" has a space and I'm not sure why it expects JSON since it's a GET request
    We do have integration tests for Antora.
    Which version of Asciidoctor Kroki are you using ?
    Sturt Ison
    @sturtison_gitlab
    Yes, sorry for the fat finger mistake. The message should read "Unexpected end of JSON input".
    The version of asciidoctor-kroki being used is v0.10.0
    Sturt Ison
    @sturtison_gitlab
    Further, I find that the Antora version v2.3.4, not v2.3.3.
    Guillaume Grossetie
    @Mogztter
    We've made some changes on our HTTP client library (named unxhr) between version 0.10.0, 0.11.0 and 0.12.0
    I would recommend to use the latest version of asciidoctor-kroki maybe this issue was fixed (or maybe you will get another error that would help us understand what's going on)
    Sturt Ison
    @sturtison_gitlab
    Thanks @Mogztter - that's kind of what I was thinking - Thanks very much for your consideration. I'll let you know how it goes.
    Sturt Ison
    @sturtison_gitlab
    As a followup @Mogztter it was all to do with RHEL7, podman, networking, and br_netfilter, and nothing to do with the awesome Kroki or Antora systems. I might say, that the kroki, asciidoctor and Antora communities are just fantastic. They've really been sunshine!
    Sturt Ison
    @sturtison_gitlab
    I agree with moving to zulip as Antora and Asciidoctor have.
    Guillaume Grossetie
    @Mogztter
    ๐Ÿค—
    I'm glad it's working well for you and thanks again for your kind words it means a lot ๐Ÿ‘
    If you feel that we could improve the documentation to help troubleshoot or configure Kroki using RHEL7, podman... Feel free to open an issue
    I've created a Zulip instance: https://kroki.zulipchat.com/ (not yet "official") but feel free to join ๐Ÿ˜‰
    Sturt Ison
    @sturtison_gitlab
    I've started doing that on my fork - wasn't 100% sure if you would like that and was waiting until it was a bit more polished (which it might never be). Thanks for the suggestion, I'll open an issue.
    Guillaume Grossetie
    @Mogztter
    Perfect, thanks๐Ÿ‘Œ
    Sturt Ison
    @sturtison_gitlab
    Joining https://kroki.zulipchat.com at the moment requires an invite - all in good time.
    Guillaume Grossetie
    @Mogztter
    Marcel Stรถr
    @marcelstoer
    So long, see you on Zulip then.
    Guillaume Grossetie
    @Mogztter
    :wink:
    VSGagarski
    @VSGagarski
    Hi. How to use kroki self hosted for bpmn diagrams?
    Guillaume Grossetie
    @Mogztter
    Hello @VSGagarski we have moved to https://kroki.zulipchat.com/, but to answer your question, you will need to start what we called a companion container yuzutech/kroki-bpmn using docker run or docker-compose
    the Kroki container contains a dozen of diagram libraries but some cannot be included (such as BPMN, Mermaid, Excalidraw...): https://docs.kroki.io/kroki/setup/install/#_the_kroki_container
    so if you want to use one of these diagram libraries, you will need to start additional containers
    VSGagarski
    @VSGagarski
    @Mogztter Thanks. I'll ask detailed question in zulip
    mathias4github
    @mathias4github
    Hi, anyone an idea how I can generate the folowing diagramm with kroki?
    27fd810-Picture1.png
    Guillaume Grossetie
    @Mogztter
    Hello @mathias4github , we have moved to https://kroki.zulipchat.com/,
    to answer your question you might want to use PlantUML with a component diagram: https://plantuml.com/en/component-diagram
    you can also use https://excalidraw.com/ if you are not afraid to draw
    you can also check: https://kroki.io/examples.html for inspiration
    Cosmic Sound
    @uhlhosting
    Greetings
    Guillaume Grossetie
    @Mogztter
    Hey ๐Ÿ‘‹