[MarkLogic Dev General] Good Way to Automatically Install CPF

Eliot Kimber ekimber at contrext.com
Mon Jan 22 14:47:20 PST 2018


I was pointed to the Scripting Content Processing Framework (CPF) Configuration chapter, which does seem to have the guidance I seek. I was focused on scripting FlexRep configuration and didn't fully appreciate the underlying requirement on CPF. I just wanted an Easy button....

In looking more closely at the Admin code that does the CPF default installation I see that it's not actually callable as a module anyway as it expects to get values from HTTP request parameters (insert snarky comment about separation of concerns in code here).

So it looks like the answer is "cut and paste what's in the Admin installer code, fix it to be callable as functions, and use that".

Cheers,

E.
--
Eliot Kimber
http://contrext.com

On 1/22/18, 4:15 PM, "general-bounces at developer.marklogic.com on behalf of Eliot Kimber" <general-bounces at developer.marklogic.com on behalf of ekimber at contrext.com> wrote:

    Correct subject  line for this thread.
    
    Cheers,
    
    E.
    
    --
    Eliot Kimber
    http://contrext.com
     
    
    
    On 1/22/18, 4:09 PM, "general-bounces at developer.marklogic.com on behalf of Eliot Kimber" <general-bounces at developer.marklogic.com on behalf of ekimber at contrext.com> wrote:
    
        I'm putting together a script that will do all the configuration for a server all the way through defining a FlexRep app server, domains, and targets. The requirement is avoid the need for any manual intervention once the configuration is started.
        
        The one fly in this ointment is the CPF--since I'm creating new databases they of course won't have CPF installed, so I need to install the CPF into those that are involved in FlexRep.
        
        As far as I can tell there is no API for doing this API (there should be), so I'm going to attempt to simply call the Admin/database-cpf-admin-go.xqy module, which seems simple enough (I only need to specify the database name as far as I can tell).
        
        But calling an Admin module like this feels a little dirty and has some risk since it's not a published API and there's no guarantee it will not change without warning in the future (although the risk seems pretty small since it's a module that hasn't changed in ages and it's only called in one place in my code).
        
        Is there a better way to automate installation of the CPF than doing what the "confirm CPF installation" UI form does?
        
        This is in the context of setting up new servers on demand, e.g., in a Docker environment where this server has a very narrow use.
        
        Thanks,
        
        Eliot
        --
        Eliot Kimber
        http://contrext.com
         
        
        
        
        _______________________________________________
        General mailing list
        General at developer.marklogic.com
        Manage your subscription at: 
        http://developer.marklogic.com/mailman/listinfo/general
        
    
    
    _______________________________________________
    General mailing list
    General at developer.marklogic.com
    Manage your subscription at: 
    http://developer.marklogic.com/mailman/listinfo/general
    






More information about the General mailing list