You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

This article describes how the runtime can be deployed to a cloud environment. When this is done, several points require configuring.

Java Runtime in the cloud

Reading the configuration

Out of the box the runtime uses an embedded cloudconfig server to retrieve the values of property files.
This server reads all property files it finds in the assigned folder, and the runtime asks the server for the value of the property it needs.

If you wish to run the cloud config server on its own, that is also possible. In a cloud environment you want to be sure that all nodes run under the same configuration so that the all show the same behavior. Having a local configuration on each node is difficult to maintain as any change to the configuration should be made to the configuration of each node at the same time. Therefore it is better to lead each node read the configuration from one central position. This is what the spring cloudconfig server can do.


To accomplish this, some changes must be made:

  • In the bootstrap.properties you must place the url to reach the server (example:spring.cloud.config.uri=http://ipadress:portnumber)
  • Add the following annotation on the standalone config server:

 

@Configuration
@EnableAutoConfiguration
@EnableConfigServer
public class Application {

public static void main(String[] args) {
         SpringApplication.run(ConfigServerApplication.class, args);
         }
}

Also see: Reading properties from file system [editor]

Creating documents

To generate a document the runtime uses an IBEX renderer. This renderer requires two adjustments by the customer before being usable.

(1) No physical paths can be used in a cloud environment. Therefore, the folder containing the xsl files (required to generate documents) must be inside the WAR. To do this you must unpack the WAR and add the folder to the WEB-INF/classes/ folder inside the unpacked WAR and repack the WAR.
When doing so, the property blueriq.documents.base-folder must be given the value "classpath:/", using this value the runtime uses the documents folders inside the WAR.

(2) The IBEX renderer also uses windows fonts when creating a pdf-A file. These fonts also should not be read from the file system, as they might be missing on one of the cloud nodes. It is not possible for us to include these fonts due to copyright limitations. Therefor, it is required for customers to add them to the WAR themselves. To do this the WAR has to be unpacked and the windows fonts should be added to the WEB-INF/classes/ folder inside the unpacked WAR and repack the WAR.

 

MW

When creating documents with the runtime in the cloud, it is not reliable that the resources needed for creating documents, are available on the hard drive where the runtime is running.

This means that the documents folder used by the documents renderer cannot be located in the spring.config.location, instead the property blueriq.documents.base-folder needs to be used.

With this property it is possible to assign the location of the documents folder with an absolute path. Using the absolute path is not reliable in a cloud enviroment. We advice to package the documents folder inside the WAR. When doing so the property blueriq.documents.base-folder must be given the value classpath:/. With this value the runtime uses the documents folders inside the WAR.

Usage of exports

When using the spring cloud config server embedded, all the exports can be placed in the exports folder in the aquima.home folder.
However if config server is running standalone, these exports must be explicitly named with the full path to each file in the application.properties file.
Resulting in a line like: blueriq.exports.files=D:\exports\example.zip, D:\exports\example2.zip, etc.
These exports must be on the same server as the runtime is running on.

 

.NET runtime in the cloud

 

.NET Runtime can be started without setting a configuration location that points to a directory on disk that contains resources needed for startup and other functionalities : 

  • Blueriq License 
  • templates used for document rendering and message.properties file
  • exports folder

In order to make the Runtime work without specifing a configuration location, these settings need to be made:

1. Blueriq License

In web.config, a new section has been added :

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
   ...
    <section name="blueriqLicenseSection" type="Aquima.WebApplication.Foundation.Configuration.FallbackLicenseConfigurationSection"/>
  </configSections>
...
  <blueriqLicenseSection blueriqLicense=""/>
...
</configuration>


The "blueriqLicense" attribute expects a string (Base64) that represents the content of the license.aql file, which has to be filled in by the user.
In case the license key is not filled in, the Runtime will start, but projects cannot be run.

2. Resources needed for document generation and message.properties file

In order to use these resources, no additional settings need to be done.

3. Exports folder

Previously, the exports folder location was a relative path from the configuration location, and therefore, dependent on the configuration location.
Now, an absolute path can be set for the exports folder:

...
<dataSource name="xml" prefix="export" type="xml">
	<parameters>
		<parameter name="folder" value="file:///C:/Exports/"/>
	</parameters>
</dataSource>
...

 

 

 

 

 

 

  • No labels