Thanks Ruth, that's very helpful.

Other than "copy and paste it into CQ", what other ways are there to run it?

In this case we have to deliver the app on a CD, so that the disc can
be given to the deployment team for a trusted internal employee to
install (not an untrusted outsider :).  After installing MarkLogic,
they will need to install the app... At the moment the process looks
like it will be:

1. run a query that creates the forest, database, http, xdbc and
webdav servers (how to run this initial query? Use CQ, or copy it the
to docs folder etc?)
2. using the webdav servers (db and modules), unzip the code and the
initial database structure
3. navigate to the app and run the remaining setup (adding
collections, triggers, permissions etc)

That seems reasonable to me, it's just that first step.. cutting and
pasting into CQ isn't the best, copying the file to the docs folder
and hitting that url is a little better imho, but is there another
way?

cheers
andrew


On 2 March 2010 17:28, Ruth Stryker <[email protected]> wrote:
> Perhaps not exactly what you're looking for, but possibly useful, the script 
> below creates a forest, creates a database, attaches the forest to the 
> database, and sets up an http app server.
>
> One way to use it is to copy and paste it into CQ, edit the forest name, edit 
> the database name, edit the http app server name, edit the port number, edit 
> the directory path, press XML to execute the code, and then see that they 
> were all set up by going into the Admin Interface (if desired).
>
> ---
>
>
> (: forest :)
>
> xquery version "1.0-ml";
>
> import module namespace admin = "http://marklogic.com/xdmp/admin"; at 
> "/MarkLogic/admin.xqy";
>
> let $config := admin:get-configuration()
>
> let $config := admin:forest-create(
>  $config,
>  "playground",
>  xdmp:host(),
>  ())
>
> return admin:save-configuration($config);
>
>
>
>
> (: database :)
>
> xquery version "1.0-ml";
>
> import module namespace admin = "http://marklogic.com/xdmp/admin"; at 
> "/MarkLogic/admin.xqy";
>
> let $config := admin:get-configuration()
>
> let $config := admin:database-create(
>  $config,
>  "playground",
>  xdmp:database("Security"),
>  xdmp:database("Schemas"))
>
> return admin:save-configuration($config);
>
>
>
>
> (: attach forest to database :)
>
>
> xquery version "1.0-ml";
>
> import module namespace admin = "http://marklogic.com/xdmp/admin"; at 
> "/MarkLogic/admin.xqy";
>
> let $config := admin:get-configuration()
>
> let $config := admin:database-attach-forest(
>  $config,
>  xdmp:database("playground"),
>  xdmp:forest("playground"))
>
> return admin:save-configuration($config);
>
>
>
> (: application server :)
>
> xquery version "1.0-ml";
>
> import module namespace admin = "http://marklogic.com/xdmp/admin"; at 
> "/MarkLogic/admin.xqy";
>
> let $config := admin:get-configuration()
>
> let $groupid := admin:group-get-id($config, "Default")
>
> let $server := admin:http-server-create(
>  $config,
>  $groupid,
>  "8041-playground",
>  "C:\mls-projects\playground",
>  8041,
>  0,
>  admin:database-get-id($config, "playground"))
>
> return admin:save-configuration($server)
>
>
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Andrew Welch
> Sent: Tuesday, March 02, 2010 8:42 AM
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] user installation using a query
>
> Hi,
>
> It seems that everything you can do through the admin screen you can
> do through a query... so rather give the customer a list of steps to
> follow (create http server, create webdav server etc), I can shield
> them from the admin screens and give them a query to run instead.
>
> The question is, what is the user-friendliest way for them to run that
> xquery, when the person installing the application is likely to know
> very little about MarkLogic?
>
> Is using the Docs dir the best way:
>
> 1) Install MarkLogic
> 2) copy the "install.xqy" to [install dir]/Docs
> 2) navigate to [hostname]:8000/install.xqy
>
> ...or is there another way?
>
>
>
> thanks
> --
> Andrew Welch
> http://andrewjwelch.com
> Kernow: http://kernowforsaxon.sf.net/
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>



-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to