Skip to content

Graphman configuration bundles

graju256 edited this page Sep 16, 2024 · 1 revision

Graphman bundles are collections of zero or more Layer7 Gateway configuration entities. You can combine any entities together, no matter their type. They are always grouped into sections (entity types). Here is an example bundle containing a cluster-wide property and a jdbc connection:

{
  "clusterProperties": [
    {
      "goid": "e0440d109ed4d6f931cefd84b506c962"
      "name": "some-cluster-property",
      "checksum": "e0aa4e7fb2a69405c8aec3e242a8f7c99e4c9a76",
      "description": "a custom property",
      "hiddenProperty": false,
      "value": "hello"
    }
  ],
  "jdbcConnections": [
    {
      "goid": "915f526e3a756f8d16eaff3058a25613"
      "name": "mydb",
      "checksum": "15059c05def480b53e4a0b022da2b23e3881c500",
      "enabled": true,
      "driverClass": "com.l7tech.jdbc.mysql.MySQLDriver",
      "jdbcUrl": "jdbc://mydb/mydb",
      "username": "hello",
      "password": "${secpass.mydb.plaintext}",
      "minPoolSize": 3,
      "maxPoolSize": 15,
      "properties": [
        {
          "name": "EnableCancelTimeout",
          "value": "true"
        }
      ]
    }
  ]
}

Graphman configuration bundles are exported as JSON files but also have an 'exploded' representation where each configuration entity is separated in its own individual JSON file organized in a folder structure.

To create an 'exploded' representation of a Graphman bundle, use this command:

graphman.sh explode --input mybundle.json --output mybundle-exploded

This will create a directory structure under the mybundle-exploded directory, which contains each configuration entity in its own file.

Tip

Use level of explosion to separate binary data or code from the entity configuration

--options.level 1 to explode cert, key and wsdl resources into separate files

--options.level 2 to explode policy code into separate files

You manipulate the configuration in this directory structure directly (changing JSON file properties, delete some files, copy others, etc) and repackage it as a single bundle JSON by doing this reverse command.

graphman.sh implode --input mybundle-exploded --output mynewbundle.json

Clone this wiki locally