I just wanted to mention you also have manage rest api to setup CPF: http://docs.marklogic.com/REST/management/content-processing-framework-(cpf )
Which is leveraged by ml-gradle for deployment of CPF: https://github.com/marklogic-community/ml-gradle/tree/625e3aaadeb58dfa9f040 46a31234b33724b4134/examples/cpf-project Another option is the code library that Roxy uses to deploy CPF: https://github.com/marklogic-community/roxy/blob/master/deploy/lib/xquery/c pf.xqy It comes with an XML configuration for pipelines, and such: https://github.com/marklogic-community/roxy/blob/master/deploy/sample/pipel ine-config.sample.xml Cheers On 1/23/18, 12:49 AM, "general-boun...@developer.marklogic.com on behalf of Eliot Kimber" <general-boun...@developer.marklogic.com on behalf of ekim...@contrext.com> wrote: >I've taken the Admin install CPF script and reworked it as a function >library and removed the code related to default domains (I don't want >default domains in any case). > >What's left includes code to set up the pipelines and triggers, as >described in the CPF Configuration chapter. > >*But* > >It also includes the loading of schemas that are used by the pipelines >and I didn't see anything that does that (or mentions it) in the CPF API. > >So unless I'm missing something (which is quite possible), I still need >to do the schema loading. > >What I've extracted from the Admin code seems like a convenient way to >just get CPF in place so that you can then set up your custom domains. > >It could be optimized for the needs of FlexRep, namely only bothering to >even install the change and FlexRep pipelines but seems likely that other >servers that will need automatic conversion might use other pipelines and >there's no particular harm in having unused pipelines lying about. > >Note my requirement is simply to have CPF available so that I can then >configure FlexRep. The lack of a quick-and-easy way to programmatically >install CPF is simply a roadblock to the real configuration I need to do, > namely configure FlexRep, which is otherwise easy enough to do (once one >has understood how all the FlexRep parts fit together, which was a little >harder than it should have been, but I think I've already commented on >the FlexRep docs...). > >So I was really looking for a "call this one function to get CPF >installed so you can continue on with your real task of getting FlexRep >configured via a script" and I'm not seeing that out of the box. > >Or said more directly: there's a one-button task in the Admin UI to get >CPF installed for a database. There should be a corresponding single-call >function to do it programmatically and the FlexRep docs should make >reference to that function at the same time they refer to the manual CPF >installation process. > >Cheers, > >E. > >-- >Eliot Kimber >http://contrext.com > > > >On 1/22/18, 5:32 PM, "general-boun...@developer.marklogic.com on behalf >of Mary Holstege" <general-boun...@developer.marklogic.com on behalf of >mary.holst...@marklogic.com> wrote: > > > There isn't a single API that orchestrates all the pieces, but there >are > APIs do do all the necessary parts in the pipelines and domains >modules. > These should be executed against your triggers database. If you share >a > triggers database, you don't need to do it all over again. > > p:insert to put a pipeline XML into the right collections etc. > dom:configuration-create to create the overall configuration object >that > defines your restart user etc. > You need to do this before you create domains or things will go > horribly wrong. > dom:create to define your domains > dom:add-pipeline to attach pipelines if you didn't put them in the >domain > in dom:create > > All default pipelines are in the Installer directory. > > The thing in the admin GUI makes some default assumptions about some >of > this that aren't always the appropriate thing to do. > > I'd suggest making a script that creates the domains you want and >loads > and attaches the appropriate pipelines. > > //Mary > > On Mon, 22 Jan 2018 14:09:23 -0800, Eliot Kimber ><ekim...@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@developer.marklogic.com > > Manage your subscription at: > > http://developer.marklogic.com/mailman/listinfo/general > > > -- > Using Opera's revolutionary email client: http://www.opera.com/mail/ > _______________________________________________ > General mailing list > General@developer.marklogic.com > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > > > >_______________________________________________ >General mailing list >General@developer.marklogic.com >Manage your subscription at: >http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general