-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Custom PlantUML Server
These instructions have been tested on Debian Jessie and Ubuntu 14.04 LTS distributions.
sudo apt-get install maven graphviz openjdk-7-jdk git-core
git clone https://github.com/plantuml/plantuml-server.git
cd plantuml-server
mvn package
After building the package you can start a local server using the embedded jetty server:
mvn jetty:run
The server will then be available on http://localhost:8080/plantuml.
First you need to create a plantuml.war file from the source code:
sudo apt-get install tomcat7 graphviz openjdk-7-jdk git-core maven
git clone https://github.com/plantuml/plantuml-server.git
cd plantuml-server
mvn package
Then copy the plantuml.war file generated when building the package (mvn package) to the Tomcat applications folder:
sudo cp plantuml.war /var/lib/tomcat7/webapps/plantuml.war
sudo chown tomcat7:tomcat7 /usr/share/jetty/webapps/plantuml.war
sudo service restart tomcat7
After restarting Tomcat the application will be running on the server port 8080. You can change the port and other parameters in the /etc/tomcat7/server.xml file.
By default gollum-lib expects the PlantUML server to be located on http://localhost:8080/plantuml/png.
If the PlantUML server is on a different location you can change the default by adding the following
option configuration to the wiki_options object in your config.rb
file for gollum (do not forget to use the --config
option when starting gollum!):
Gollum::Filter::PlantUML.configure do |config|
config.url = "http://yourplantumlserver.com/plantuml/png"
end
Note: the server url must not have a trailing slash!
You can use an https PlantUML server simply by setting config.url
in the snippet above to a valid "https" url. However, this may fail if gollum can't verify your PlantUML server's SSL certificate. To work around this, either:
- (Recommended) Set the right CA files for ruby's
Net/HTTP
library to use from insideconfig.rb
. See here for an example of how to do this. - (Make sure you know what you're doing) Disable SSL certificate checking by adding the following to your
config.rb
:
Gollum::Filter::PlantUML.configure do |config|
config.url = "http://my-own-plantuml.com:8080/plantuml/png"
config.verify_ssl = false
end
PlantUML can generate diagrams in PNG, SVG and ASCII formats. The way you select which format you want is by replacing the last part of the URL path: