In the context of SpringSource dm Server, deploying refers to installing an artifact to the server and then starting it to make it available to users. Typically, when you install an artifact, dm Server automatically starts it as long as the server is able to successfully resolve all its dependencies. For this reason, the terms deploying and installing are often used interchangeably.
You deploy artifacts to SpringSource dm Server using either the hot-deploy directory on the file system or by using the Admin Console. The artifacts that you can deploy to dm Server are:
To hot deploy an artifact, copy it into the pickup directory (by default
prompt$ cd /home/applications prompt$ cp helloWorld.war $SERVER_HOME/pickup
When the artifact is hot deployed, messages similar to the following appear in the log file:
[2009-12-10 06:41:01.021] fs-watcher <HD0001I> Hot deployer processing 'CREATED' event for file 'helloWorld.war'. [2009-12-10 06:41:01.087] fs-watcher <DE0000I> Installing bundle 'helloWorld' version '0.0.0'. [2009-12-10 06:41:01.274] fs-watcher <DE0001I> Installed bundle 'helloWorld' version '0.0.0'. [2009-12-10 06:41:01.397] fs-watcher <DE0004I> Starting bundle 'helloWorld' version '0.0.0'. [2009-12-10 06:41:01.414] Thread-3 <WE0000I> Starting web bundle 'helloWorld' version '0.0.0' with context path '/helloWorld'. [2009-12-10 06:41:01.537] Thread-3 <WE0001I> Started web bundle 'helloWorld' version '0.0.0' with context path '/helloWorld'. [2009-12-10 06:41:01.550] start-signalling-1 <DE0005I> Started bundle 'helloWorld' version '0.0.0'.
If there is a problem with the deployment, such as the server being unable to resolve all dependencies, the console and log both show an error message to help you with troubleshooting.
If there are no problems, dm Server automatically starts the artifact so that it is immediately available to users.
The Admin Console allows you to upload a file, which will be deployed automatically, from your local file system to the SpringSource dm Server. As soon as SpringSource dm Server deploys the artifact, it appears in the list of artifacts in the Admin Console. Note that the GUI for uploading varies according to the browser and operating system you use.
When you deploy an artifact, either using hot-deployment or the Admin Console, dm Server copies the file to its work directory (
SERVER_HOME/work) and registers it in its internal registry.
The server then checks any dependencies the artifact might have to see if
deployment can go ahead, and if all dependencies are resolved, SpringSource dm Server starts the artifact.
Because of all these additional internal activities, you should NOT simply copy the artifact into the
work directory and assume it will be deployed, because SpringSource dm Server will not do so.
When deploying bundles that have dependencies, it is important that you deploy them in the correct order. SpringSource dm Server honors this ordering when it redeploys the artifacts on startup.
If you use hot deployment to deploy your artifacts, be sure to copy the corresponding files into the pickup
directory one-by-one. Copying the files in one group, for example by using a single
cp command. provides no guarantees of ordering.