Tim,

For moving between registries the approach you described sounds
correct, admittedly it would be nice if there was an easier way.

In your case it is only two levels, but in general you'd have to start
at the lowest level, and work your way up the levels, applying the
correct ids from the level below.

-Bryan


On Fri, Feb 1, 2019 at 11:44 AM Tim Dean <[email protected]> wrote:
>
> Thanks Bryan -
>
> If I use a nested versioned process group, it appears that the parent group 
> will reference its child process groups by ID. If I am populating my registry 
> in a new environment using the API, those IDs will be dynamically generated 
> as I make the API calls, correct?
>
> In that case, do I need to POST the child process groups first, get their 
> bucket and flow IDs back from the registry API, and then manipulate the JSON 
> for the parent process group to replace the contents of the 
> “versionedFlowCoordinates” JSON object’s identifiers with the new IDs?
>
> Or is there a better way to insert parent and child process groups via my 
> scripts?
>
> -Tim
>
> On Jan 31, 2019, at 6:25 PM, Bryan Bende <[email protected]> wrote:
>
> Hi Tim,
>
> I think the second option is the correct approach. The higher level versioned 
> PG is the way of saying that the lower level PGs work together as a cohesive 
> unit.
>
> -Bryan
>
> On Thu, Jan 31, 2019 at 7:00 PM Tim Dean <[email protected]> wrote:
>>
>> I am trying to automate deployment of a NiFi flow with several versioned 
>> process groups using the NiFi APIs. The basic setup I have is this:
>>
>> I have a dozen or so process groups, each of which has been versioned within 
>> a NiFi registry
>> My root process group contains each of those process groups, with various 
>> connections between their ports as well as a few variable definitions and 
>> controller service instances.
>>
>>
>> My goal is to deploy this flow, including the root process group that links 
>> the versioned PGs as well as the versioned PGs themselves. So far, I’ve 
>> managed to use the registry API to create a bucket and to add the versioned 
>> flows into the registry. Now I’m trying to use the NiFi APIs to instantiate 
>> the root PG and link together all the versioned PGs that I have just 
>> inserted into the registry.
>>
>> The approach I have been trying is to capture my root PG as a template, and 
>> then use the NiFi APIs to import and then instantiate that template. I have 
>> gotten this much working, but unfortunately that leaves the PGs disconnected 
>> from the versioned flows in the registry. I was hoping there was a way to 
>> transform the template to insert the appropriate bucket and flow IDs but I 
>> have been unable to figure out if this is possible.
>>
>> Alternatively, I suspect I could create an intermediate process group to 
>> contain all my “real” PGs, and then version that intermediate PG. I could 
>> then use the APIs to instantiate a new PG at the root level that is imported 
>> from the intermediate PG. I suspect that this could work, but it is less 
>> than ideal because I’m creating an artificial intermediate PG to contain all 
>> of my real contents, which will be a distraction for users who come into the 
>> NiFi data flow manager to monitor this process.
>>
>> Am I looking at this approach correctly? Are there other options I should be 
>> considering?
>>
>> Thanks in advance,
>>
>> -Tim
>
> --
> Sent from Gmail Mobile
>
>

Reply via email to