Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8973

PAL API for compiling serialized AST to a catalog

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 6.0.0
    • Component/s: None
    • Labels:
      None
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      Not really releasing this yet - consider the feature experimental.
    • QA Risk Assessment:
      Needs Assessment

      Description

      It should generate a whole catalog from the AST, rather then allow interaction with a catalog object. We expect to apply the catalog directly with a custom Ruby script invoking Puppet.

      Need to be able to

      • inject variables and facts
      • specify the modulepath
      • specify or unset $environment
      • supply other Puppet overrides, like bolt_pdb_client

      Our datatypes need to be exposed. Believe this should work if they're in modules in the modulepath.

      An initial effort exists at https://github.com/puppetlabs/bolt/blob/8d15b7120c58ecbdbcc6acc55e011b390f57f02d/lib/bolt/catalog.rb. It expects a request formatted as

      { "code_ast": "JSON serialized Puppet AST",
        "code_string": "String of code, ignored if AST is provided,
        "modulepath": "Array of directories to use as the modulepath for catalog compilation.
        "target": {
          "name": "the name of the node usually fqdn fro url",
          "facts": "Hash of facts to use for the node",
          "variables": "Hash of variables to use for compilation"
        }}
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  michael.smith Michael Smith
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: