Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Deployer

paxtonhare edited this page Apr 23, 2012 · 25 revisions

Roxy Deployer is a command line tool for scaffolding and deploying XQuery applications to MarkLogic Server. Help is available by running the ml command with no parameters:

> ml

##Bootstrap Roxy Deployer can automatically create all your forests, databases, app servers, users, and roles for you. You provide the settings via build.properties and (local|dev|prod).properties and the ml-config.xml file. Roxy deployer uses these values to create the necessary configuration on one or more servers.

Example of bootstrapping to your local box

> ml local bootstrap

##Wipe You can "uninstall" your application from a MarkLogic server with Roxy Deployer. All traces of your application will be removed from the server.

Example of wiping your application from the dev box

> ml dev wipe

##Deploying source code You can deploy your XQuery modules to a MarkLogic modules database. By default, all files under $roxy/src are deployed except for test files. Test files are only deployed if you have a test environment configured and only for non-production environments.

Example of deploying source code to your development box

> ml dev deploy modules

##Erasing deployed source code You can remove all the code from your modules database with a single command. Be warned that this is potentially destructive in the wrong hands.

Example of wiping clean your modules database

> ml local clean modules

##Deploying content You can deploy content to your content database. By default, all files under $roxy/data are deployed.

Example of deploying content to your local database

> ml local deploy content

##Erasing deployed content You can remove all the data from your content database with a single command. Be warned that this is potentially destructive in the wrong hands.

Example of wiping clean your content database

> ml local clean content

##Unit Testing You can invoke your Roxy Unit Tests with the Deployer.

Example of invoking unit tests on your local ML instance

> ml local test

#Scaffolding The Roxy Deployer allows you to easily create code via a handful of scaffolding methods.

##Create Controller and View You can create a controller and view with Roxy Deployer.

The syntax is as follows:

> ml create controller/function format

Both function and format are optional. If no view is provided Roxy will default to main. If no format is provided then Roxy will default to html.

You can skip view creation by specifying format as none

This command is non-destructive. If any of the specified pieces already exist they will be left alone.

Example with no view

> ml create search/main none

Example of creating a json view

> ml create users/new json