Skip to content

Upgrading to 0.8.0

Frank Rosner edited this page Apr 27, 2018 · 8 revisions

Templates

meta.json => template.conf

The meta.json file is no longer supported. You need to provide a template.conf file instead, which uses HOCON syntax instead of JSON. However, JSON is a subset of HOCON so you don't have to change the content of the file, just rename it to template.conf and you're good to go.

Parameters and Types

As we are changing the way templates are rendered, supporting different parameter types and Jinja2-like syntax using Jinjava, the following breaking changes happened:

  • It is now mandatory to specify every parameter and at least its type in the template.conf.
  • All parameter identifiers have to be valid in Jinjava, i.e. my-parameter will be interpreted as my minus parameter.

Thus, old instances which have been created from templates without explicit parameter types in template.conf have to be converted. You can use script/instances-0.7.0-to-0.8.0.py to upgrade those legacy instances and script/templates-0.7.0-to-0.8.0.py to upgrade templates, respectively. The script also converts variables with dashes to underscores. Please create a back-up of your files before running the scripts. Keep in mind that those scripts only work for the filesystem instance storage.

Configuration Changes

  • broccoli.auth.session.allowMultiLogin is now called
    broccoli.auth.session.allow-multi-login
  • broccoli.auth.allowedFailedLogins is now called
    broccoli.auth.allowed-failed-logins
  • broccol.auth.conf.accounts[].instanceRegex is now called
    broccol.auth.conf.accounts[].instance-regex

It is possible to set Jinjava config settings through Broccoli. The default values are kept the same as in Jinjava, unless stated otherwise. For documentation on those parameters please refer to the original project https://github.com/HubSpot/jinjava.

  • broccoli.templates.jinjava.trim-blocks (defaults to false)
  • broccoli.templates.jinjava.lstrip-blocks (defaults to false)
  • broccoli.templates.jinjava.max-render-depth (defaults to 10)
  • broccoli.templates.jinjava.read-only-resolver (defaults to true)
  • broccoli.templates.jinjava.enable-recursive-macro-calls (defaults to false)
  • broccoli.templates.jinjava.fail-on-unknown-tokens (defaults to true)
  • broccoli.templates.jinjava.max-output-size (defaults to 0)
  • broccoli.templates.jinjava.nested-interpretation-enabled (defaults to true)
Clone this wiki locally