際際滷

際際滷Share a Scribd company logo
Automate Your Deployments
Geert Josten, Senior Development, Dayon
April 11, 2013
Geert Josten, Dayon
Automate your MarkLogic deployments
Errrr,
deployment?
Geert Josten, Dayon
Automate your MarkLogic deployments
Deployment = 
Configuring MarkLogic
 Apps, Databases, Indexes, Forests, Security, Groups, Clusters, ..
Deployment of app-specific files
 Static files, modules, schemas, initial data, install/migration scripts, ..
Running app-specific config/deploy scripts
 Including possible user interaction, orchestration of migrations, and
imports, ..
More?
(No bootstrapping)
 A.o. installing MarkLogic itself, first admin user, entering license, ..
Geert Josten, Dayon
Automate your MarkLogic deployments
Why automate?
Geert Josten, Dayon
Automate your MarkLogic deployments
Well.. have you used this before?
Geert Josten, Dayon
Automate your MarkLogic deployments
So many pages, so many options..
Geert Josten, Dayon
Automate your MarkLogic deployments
So, why automate?
Because..
 Manual work time-consuming, tedious and error-prone
 Databases, app-servers, security, uploading of files, app-specific setup, ..
 Repeat same installation on multiple machines
 DTAP, development laptops, clusters, show casing, ..
 Many updates over application life-time
 During development, project iterations, simple or complex updates, ..
And not in the least..
 You (developer) might not be running the installation
 App managers, non-MarkLogic-expert colleagues, third party, ..
In short:
Keep deployments SIMPLE! (and quick if possible)
Geert Josten, Dayon
Automate your MarkLogic deployments
Other built-in
options?
Geert Josten, Dayon
Automate your MarkLogic deployments
Configuration Manager to the rescue?
Geert Josten, Dayon
Automate your MarkLogic deployments
Not just yet..
Geert Josten, Dayon
Automate your MarkLogic deployments
Information Studio?
Geert Josten, Dayon
Automate your MarkLogic deployments
Management API?
Geert Josten, Dayon
Automate your MarkLogic deployments
How about Client API?
Geert Josten, Dayon
Automate your MarkLogic deployments
Built-in options..
Fills gaps, but partial solutions
 Still manual work
 Multiple steps
 No versioning
 No automated rollback
 Possibly different instructions each release
Unless you (developer) do a lot of scripting..
 REST apis
 Admin/security XQuery modules
Geert Josten, Dayon
Automate your MarkLogic deployments
Non-built-in
options?
Geert Josten, Dayon
Automate your MarkLogic deployments
Existing alternatives?
Here are some:
 MarkLogic Content Pump, AutoLoader and RecordLoader
 Uploading
 MarkLogic Ant tasks
 Could do all, but developer tool, and still lots of work
 Cqsh, Xmlsh
 Similar to Ant tasks
 Roxy
 Very promising! But what about versioning, rollback, etc?
 Booster
 Simple HTTP wrapper for admin and security tasks
 Depx and Expath Packaging System
 Intended for libraries, not applications. Doesnt configure MarkLogic
Geert Josten, Dayon
Automate your MarkLogic deployments
Alternatives?
Some thoughts:
 All executed outside MarkLogic
 Shell scripting could appeal to App managers
 Roxy looks promising, but why Ruby?
 Some solutions still need more or less additional scripting
 No user interfaces?
 No versioning as part of deployment
 No automated rollback (not just on failure)
Geert Josten, Dayon
Automate your MarkLogic deployments
So, what is the ideal
way?
Geert Josten, Dayon
Automate your MarkLogic deployments
I have a dream..
Simple method
 Only MarkLogic (preferably out of box)
 Simple interface
Single package
 App, database, security configuration
 Files, modules, schemas
 App-specific setup
Upload and go
 Ear-style deployment, one zip with all
 Deployments dir, or upload
 MarkLogic picks up and installs automatically
Geert Josten, Dayon
Automate your MarkLogic deployments
Demo!
Geert Josten, Dayon
Automate your MarkLogic deployments
MarkLogic package manager
Functionality
 Upload single package
 With configs, files, post-install scripts
 Keeps track of installed packages
 Reinstall, rollback
Prototype
 Relies on built-ins like Configuration Manager
 Custom code to upload files (could use Client-API?)
 App-specific configuration
 Runs at Admin-interface port
Short-comings
 No security config yet (could use/lend code from Roxy?)
 Removal of files on file-system not possible
 Storage of packages, where best?
Any Questions?
For More Information
Geert Josten, Dayon
Geert.josten@dayon.nl

More Related Content

MarkLogicWorld 2013 - Automate your deployments

  • 1. Automate Your Deployments Geert Josten, Senior Development, Dayon April 11, 2013
  • 2. Geert Josten, Dayon Automate your MarkLogic deployments Errrr, deployment?
  • 3. Geert Josten, Dayon Automate your MarkLogic deployments Deployment = Configuring MarkLogic Apps, Databases, Indexes, Forests, Security, Groups, Clusters, .. Deployment of app-specific files Static files, modules, schemas, initial data, install/migration scripts, .. Running app-specific config/deploy scripts Including possible user interaction, orchestration of migrations, and imports, .. More? (No bootstrapping) A.o. installing MarkLogic itself, first admin user, entering license, ..
  • 4. Geert Josten, Dayon Automate your MarkLogic deployments Why automate?
  • 5. Geert Josten, Dayon Automate your MarkLogic deployments Well.. have you used this before?
  • 6. Geert Josten, Dayon Automate your MarkLogic deployments So many pages, so many options..
  • 7. Geert Josten, Dayon Automate your MarkLogic deployments So, why automate? Because.. Manual work time-consuming, tedious and error-prone Databases, app-servers, security, uploading of files, app-specific setup, .. Repeat same installation on multiple machines DTAP, development laptops, clusters, show casing, .. Many updates over application life-time During development, project iterations, simple or complex updates, .. And not in the least.. You (developer) might not be running the installation App managers, non-MarkLogic-expert colleagues, third party, .. In short: Keep deployments SIMPLE! (and quick if possible)
  • 8. Geert Josten, Dayon Automate your MarkLogic deployments Other built-in options?
  • 9. Geert Josten, Dayon Automate your MarkLogic deployments Configuration Manager to the rescue?
  • 10. Geert Josten, Dayon Automate your MarkLogic deployments Not just yet..
  • 11. Geert Josten, Dayon Automate your MarkLogic deployments Information Studio?
  • 12. Geert Josten, Dayon Automate your MarkLogic deployments Management API?
  • 13. Geert Josten, Dayon Automate your MarkLogic deployments How about Client API?
  • 14. Geert Josten, Dayon Automate your MarkLogic deployments Built-in options.. Fills gaps, but partial solutions Still manual work Multiple steps No versioning No automated rollback Possibly different instructions each release Unless you (developer) do a lot of scripting.. REST apis Admin/security XQuery modules
  • 15. Geert Josten, Dayon Automate your MarkLogic deployments Non-built-in options?
  • 16. Geert Josten, Dayon Automate your MarkLogic deployments Existing alternatives? Here are some: MarkLogic Content Pump, AutoLoader and RecordLoader Uploading MarkLogic Ant tasks Could do all, but developer tool, and still lots of work Cqsh, Xmlsh Similar to Ant tasks Roxy Very promising! But what about versioning, rollback, etc? Booster Simple HTTP wrapper for admin and security tasks Depx and Expath Packaging System Intended for libraries, not applications. Doesnt configure MarkLogic
  • 17. Geert Josten, Dayon Automate your MarkLogic deployments Alternatives? Some thoughts: All executed outside MarkLogic Shell scripting could appeal to App managers Roxy looks promising, but why Ruby? Some solutions still need more or less additional scripting No user interfaces? No versioning as part of deployment No automated rollback (not just on failure)
  • 18. Geert Josten, Dayon Automate your MarkLogic deployments So, what is the ideal way?
  • 19. Geert Josten, Dayon Automate your MarkLogic deployments I have a dream.. Simple method Only MarkLogic (preferably out of box) Simple interface Single package App, database, security configuration Files, modules, schemas App-specific setup Upload and go Ear-style deployment, one zip with all Deployments dir, or upload MarkLogic picks up and installs automatically
  • 20. Geert Josten, Dayon Automate your MarkLogic deployments Demo!
  • 21. Geert Josten, Dayon Automate your MarkLogic deployments MarkLogic package manager Functionality Upload single package With configs, files, post-install scripts Keeps track of installed packages Reinstall, rollback Prototype Relies on built-ins like Configuration Manager Custom code to upload files (could use Client-API?) App-specific configuration Runs at Admin-interface port Short-comings No security config yet (could use/lend code from Roxy?) Removal of files on file-system not possible Storage of packages, where best?
  • 23. For More Information Geert Josten, Dayon Geert.josten@dayon.nl