The SteamWiki project has some automation that may be helpful. It uses an xML config file to configure forests, dbs, app, roles, and users in MarkLogic. It doesn't install MarkLogic or do anything to the environment.
A config file looks like this:
<config>
<forest id="steamwiki"/>
<db id="steamwiki" forest="steamwiki"/>
<http-server id="steamwiki-http" group="Default" port="9222"
modulesdb="filesystem" root="steamwiki" creationdb="steamwiki"
rewriter="rewriter.xqy" default-user="SteamEditor"/>
<role id="steamwiki-admin" description="Admin role for Steam Wiki"
default-permissions="steamwiki-reader[read],steamwiki-editor[read,insert,update],steamwiki-admin[read,insert,update]"/>
<role id="steamwiki-editor" description="Editor role for Steam Wiki"
default-permissions="steamwiki-reader[read],steamwiki-editor[read,insert,update],steamwiki-admin[read,insert,update]"/>
<role id="steamwiki-reader" description="Reader role for Steam Wiki"
default-permissions="steamwiki-reader[read],steamwiki-editor[read,insert,update],steamwiki-admin[read,insert,update]"/>
<privilege name="steamwiki-content-uri" type="uri" action="/content/"
role-names="steamwiki-admin,steamwiki-editor"/>
<user id="SteamAdmin" password="password" description="Example Steam Admin
user" role="steamwiki-admin"/>
<user id="SteamEditor" password="password" description="Example Steam
Editor user" role="steamwiki-editor"/>
<user id="SteamReader" password="password" description="Example Steam
Reader user" role="steamwiki-reader"/>
</config>
(from
http://steamwiki.svn.sourceforge.net/viewvc/steamwiki/trunk/deployment/config.xml?revision=53&view=markup)
The code to process the config file is here:
http://steamwiki.svn.sourceforge.net/viewvc/steamwiki/trunk/deployment/
install.xqy is what you would hit on your browser to kick it off. Instructions
are here:
http://steamwiki.svn.sourceforge.net/viewvc/steamwiki/trunk/README.txt?revision=53&view=markup
It probably doesn't do everything you need but it may be helpful.
From: [email protected]
To: [email protected]
Date: Wed, 8 Jun 2011 09:54:39 -0600
Subject: Re: [MarkLogic Dev General] automating initial configuration
I gave a presentation at the Denver and NY user groups on this subject on our
implementation for configuration and deployments. Here is a link to that
presentation. You do not have my additional verbiage, but it should give you
an idea on one approach. We did the exact thing that you were doing to start
with an empty system and it creates the app servers, databases, element range
indexes, etc. http://www.meetup.com/den-mark-logic/files/ Brad Rix Senior
Developer +1 (303) 542-2172 | Office+1 (303) 915-2771 | Mobile
[email protected] http://www.flatironssolutions.com
IM: AIM: BradRix MSN: [email protected]
From: [email protected]
[mailto:[email protected]] On Behalf Of Danny Sokolsky
Sent: Wednesday, June 08, 2011 9:46 AM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] automating initial configuration Hi Gary,
Generally, you use the Admin API to create scripts to create the dbs, forests,
App Servers, and so on. This book talks about the Admin API:
http://docs.marklogic.com/4.2doc/docapp.xqy#display.xqy?fname=http://pubs/4.2doc/xml/adminAPI/title.xml
If you want to script the installation too, I know people who have done that
with curl or other command-line http tools (against the Admin Interface). Then,
you generally would create some load scripts to populate the databases with
your content. The new in 4.2 info API is a good place to start with that.
-Danny From: [email protected]
[mailto:[email protected]] On Behalf Of Gary Larsen
Sent: Wednesday, June 08, 2011 6:58 AM
To: 'General MarkLogic Developer Discussion'
Subject: [MarkLogic Dev General] automating initial configuration Hi, What is
the best technique for automatically configuring a new MarkLogic installation
with databases, forests, app servers, security, element range indexes, fields,
etc? ML will be used as an OEM database for an application so each
installation will be identical (except for host name I guess) but the solution
will need to be platform independent. Thanks for any recommendations. gary
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
<<attachment: image001.gif>>
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
