Hello. This is a web service to allow anyone with a
bundle.yaml file to have it translated into an SVG as you would see in the Juju GUI or Charm Store
Enter a bundle.yaml URL and format type to get started:
This service only accepts one of two formatted bundles. The preferred bundle format is a "flat" bundle, one which only consists of "services", "relations", and optionally a "series" key. An example of this follows.
services: mediawiki: charm: cs:trusty/mediawiki num_units: 3 options: debug: true annotations: gui-x: "750" gui-y: "500" mariadb: charm: cs:trusty/mariadb num_units: 1 annotations: gui-x: "500" gui-y: "250" series: trusty relations: - - wordpress:db - mariadb:database
This, older, format is also accepted, but you can only present ONE deployment routine.
my-blog: services: mediawiki: charm: cs:trusty/mediawiki num_units: 3 options: debug: true annotations: gui-x: "750" gui-y: "500" mariadb: charm: cs:trusty/mariadb num_units: 1 annotations: gui-x: "500" gui-y: "250" series: trusty relations: - - wordpress:db - mariadb:database
There are two ways to get a bundle generated. One is using a GET request and one is using a POST.
For the GET requests two quereis are supported. You can either send a
bundle key, which will use the Juju Charm Store to fetch the details or a
bundle-file which needs to be an HTTP addressed URL to the raw source of the bundle's YAML. Here are some examples:
The second way to generate a bundle is to POST the contents of the bundle to the web service. An example in various languages has been included for your convience.
curl -X POST --data "$(cat bundle.yaml)" http://svg.juju.solutions
import requests with open('bundle.yaml') as f: bundle = f.read() r = requests.post('http://svg.juju.solutions', bundle) # r.content holds SVG, mimetype image/svg+xml
This webservice is still under active development. There's bound to be a few issues. I'll document long standing ones here.
Support for non-annotated bundles is avaiable. However, it's binary support. Either you have annotations for all services or no services. In the case where no annotations are found, networkx will be used to render the bundle to the best of it's ability (thanks @bcsaller). Initial support is only for the circular plan, but in the future this may become configurable.