Application Deployment

Contributions are deployed to the Fabric3 server in one of three ways:

  • By packaging contribution archives and the Fabric3 runtime as a deployable image using the Fabric3 Gradle Assembly Plugin or Fabric3 Maven Assembly Plugin. This is the recommend way to deploy services in Fabric3.
  • By using the The Admin CLI which provides a command line interface and scripting API for automated deployment. This method is primarily available for legacy support. 
  • By placing contribution archives in the deploy directory of a running server instance. This method is primarily available for testing.

Directory-based Deployment for Testing

Contributions can be deployed by copying them to the server's /deploy directory. The server periodically scans the directory for new contributions and will deploy them when found. If an application is comprised of multiple contributions that depend on each other, the server will calculate the proper order the contributions must be deployed based on the import metadata contained in their manifests, including transitive dependencies. For example, if A depends on B which dependences on C, the server will deploy C, then B, followed by A.

Multiple Deployment Directories

The Fabric3 server can be configured to scan multiple deployment directories by adding a <deploy.dirctories> entry in serverConfig.xml:

<config>
   <deploy.directories>
      <deploy.directory>deploy1</deploy.directory>
      <deploy.directory>deploy2</deploy.directory>
   </deploy.directories>
</config>

Directory entries can be relative or absolute. If an entry is relative (as shown in the above example), it will be interpreted relative to the /runtime directory.

Dynamic Reloading

Fabric3 also supports dynamic reloading of contributions when their contents have changed by creating a contribution link. A contribution link is a file ending in .contribution that is placed in the /deploy directory. The file contains a single line entry pointing to an exploded directory, which is typically a Maven or IDE project directory:

/Users/f3/workspace/myproject