what
a command line tool that takes multiple output files and merges them into one single file according to some simple rules.
why
this opens the potential for systems to generate their own manifests independently, then later merge all the manifests from the different components together for time-syncing, aggregation and reporting purposes.
context
Let's say we have a set of servers whose impacts we want to measure. We could have a manifest with multiple importers pulling in data from each server into a single file, with each component represented as a separate node in the tree.
However, in many cases it will be simpler to have each component responsible for its own manifest, because the config is straightforward and less error-prone, and it's more resilient to certain components failing while others continue running.
We can imagine services auto-generating their own manifests from their monitor services and periodically sending those manifests to some central manager who uses the proposed new if-merge tool to collate them into a single file.
This would also make it much easier for multiple teams or organizations to work independently on their systems, but still interoperate and aggregate later, as they would all conform to the IF protocol rules.
pipelines, inputs and outputs from each node get added to the final manifest as tree components. Then there is a set of merging rules for the context.
The way this would be used is that you would receive N manifests and run if-merge ./folder-of-manifests then, in the resulting manifest add the aggregation config you want to execute and run again to produce aggregated values for the whole system. Perhaps later we can make the aggregation config injectable from the command line rather than having to open and modify the file.
merging rules
context:
name provide the manifest name as an argument to if-merge
tags: include all unique values from all component manifests
description: can be provided as an argument to if-merge or can be a hardcoded default, e.g. merged manifest
initialize: all the entries from all the component manifests should be added to the merged manifest intialize pipeline. If there are name-collisions, append the original manifest filename to the instance name (will also require the invocation in the node pipeline to get renamed too)
execution
do not copy over execution information into the merged manifest. When the merged manifest is executed, it can generate its own execution information.
tree
Each individual tree node from each manifest should become a tree node in the merged file. Any nesting present in the individual manifests should persist into the merged file.
what a command line tool that takes multiple output files and merges them into one single file according to some simple rules.
why this opens the potential for systems to generate their own manifests independently, then later merge all the manifests from the different components together for time-syncing, aggregation and reporting purposes.
context Let's say we have a set of servers whose impacts we want to measure. We could have a manifest with multiple importers pulling in data from each server into a single file, with each component represented as a separate node in the tree.
However, in many cases it will be simpler to have each component responsible for its own manifest, because the config is straightforward and less error-prone, and it's more resilient to certain components failing while others continue running.
We can imagine services auto-generating their own manifests from their monitor services and periodically sending those manifests to some central manager who uses the proposed new
if-merge
tool to collate them into a single file.This would also make it much easier for multiple teams or organizations to work independently on their systems, but still interoperate and aggregate later, as they would all conform to the IF protocol rules.
pipelines
,inputs
andoutputs
from each node get added to the final manifest as tree components. Then there is a set of merging rules for thecontext
.The way this would be used is that you would receive N manifests and run
if-merge ./folder-of-manifests
then, in the resulting manifest add the aggregation config you want to execute and run again to produce aggregated values for the whole system. Perhaps later we can make the aggregation config injectable from the command line rather than having to open and modify the file.merging rules
context
:name
provide the manifest name as an argument toif-merge
tags
: include all unique values from all component manifestsdescription
: can be provided as an argument toif-merge
or can be a hardcoded default, e.g.merged manifest
initialize
: all the entries from all the component manifests should be added to the merged manifestintialize
pipeline. If there are name-collisions, append the original manifest filename to the instance name (will also require the invocation in the node pipeline to get renamed too)execution
execution
information into the merged manifest. When the merged manifest is executed, it can generate its ownexecution
information.tree
Example
Given the following manifests:
If I run
if-merge manifest1.yml manifest2.yml --name merged-manifest --description "description of my manifest" -o merged-manifest.yml
Then I get the following output file: