Installation : Deploying Applications : Deploying Applications on Another Instance
 
Deploying Applications on Another Instance
 
How Does it Work?
Generate the Application Package
Install the Application Package
Deploy Plugins or Resources Without CV apps Packager
The CV Apps Packager helps you packaging and deploying application packages onto a Exalead CloudView platform. A package bundles any Exalead CloudView configuration together with its resources into a single zip file.
How Does it Work?
Generate the Application Package
Install the Application Package
Deploy Plugins or Resources Without CV apps Packager
How Does it Work?
This is for a single-host deployment of the master Exalead CloudView instance only. This packager does not handle heavily customized Mashup UIs that require a WAR file generation.
Why Use it?
This is very useful when going from test to production mode for your applications such as:
vertical Exalead CloudView-based applications such as OneCall and OnePart
Search-based applications
What Does CV apps Packager Do?
Extracts the config + plugins (core, widgets, themes) + resources (resource manager) directories from the generated package.
Handles password re-encryption (because each password stored in the configuration is encrypted with a per-DATADIR/instance private key).
Auto-detects the host/port on the destination machine. Some configuration values of the application may be specific to the instance on which it was developed. The installation includes a variable replacement process that will overwrite these values with those of the instance on which the application is being deployed. The variables considered are the:
DATADIR – the data directory.
INSTALLDIR – the installation directory.
BASEPORT – the base port.
HOSTNAME – the host name.
install (in Deployment.xml) – the instance name.
You can specify different variable values other than those of the Exalead CloudView instance.
Includes third-party files (optional include argument in the cvadmin tool).
Generate the Application Package
You can create a zip file for the application you want to deploy. You can also include or exclude folders with the arguments provided.
The final package includes the following folders and files by default:
Folder/ File
Contains
config
Files from the DATADIR\config folder
webapps
Files from the DATADIR\webapps folder.
360-plugins
Contains packaged 360-plugins detected on the instance.
plugins
Contains core plugins detected on the instance.
resources
Contains custom resources (ontologies, etc.).
added_files
Contains files added by user with the include argument.
javabin
Contains the files from DATADIR\javabin folder. This folder is created only if files were found in javabin at packaging time.
cvapps.prop
A summary file of the packaged application.
1. Make sure that the Exalead CloudView instance is running.
2. Go to <DATADIR>/bin/ and run cvadmin.
3. Launch the following command:
cvadmin apps generate [args]
For example,
cvadmin apps generate apps-file=onecall_app_v.xxx.zip
Where the args are:
[apps-file]: File path for the application archive file. (type: STRING)
[exclude]: Files or folders to exclude from your archive. Use semicolons as separators. (type: ENUM)
[include]: Absolute file path for additional files or folders to include in your archive. Use semicolons as separators. (type: ENUM)
When deploying the application, files that were in the original DATADIR will be copied to the targeted instance's DATADIR.
Install the Application Package
Install the application package on an existing Exalead CloudView instance running the same version, that is, having the same hotfixes installed.
This instance is typically the Exalead CloudView instance in production. By default, the installer uses the variables defined in the configuration of the target/production Exalead CloudView instance.
Install the Application Package
Make sure that the target Exalead CloudView instance is running, and has the same version that was used to generate the package.
1. Go to <DATADIR>/bin/ and run cvadmin.
2. To deploy an application on your running instance, run the following command:
cvadmin apps install [args]
For example,
cvadmin apps install apps-file=onecall_app_v.xxx.zip
Where the args are:
cvadmin apps install arguments
Option
Description
[apps-file]
Path to the archive file containing the application you want to install. (Value type: FILE)
[datadir]
Override DATADIR variable. (Value type: FILE)
[hostname]
Override HOSTNAME variable. (Value type: STRING)
[installdir]
Override INSTALLDIR variable. (Value type: FILE)
[instance]
Override instance name variable. (Value type: STRING)
[port]
Override port number variable. (Value type: PORT)
[propertyFile]
Path to properties file containing variable mapping. (Value type: STRING).
Once you have generated an application package using the cvadmin cvapps generate command, unzip the package to define the placeholders for the variables you want to use. You can define placeholders in any file in the config directory.
You can use the following placeholders:
${MYPARAMETER} - If your property file contains a key named MYPARAMETER, the value will be replaced without any transformation. If it does not contain any key, there will be no replacement.
${MYPARAMETER_CRYPTED} - If your property file contains a key named MYPARAMETER_CRYPTED, the value will be replaced without any transformation. If it does not contain this key, a second lookup will be run to find the MYPARAMETER key. If that key is found, the value will be first ciphered using the security key of the targeted DATADIR and then replaced. If it does not contain any key, there will be no replacement.
${VAR_+X} - Calculates a new value using a well-formed integer variable as base. For example, if ${VAR_+1} is found in your property file, it searches the VAR value and replaces ${VAR_+1} with VAR value + 1. This is typically useful when you want to increment port numbers.
Get Help
1. Go to <DATADIR>/bin/.
2. Run the cvadmin tool with the apps help command to view the help.
cvadmin apps help
Deploy Plugins or Resources Without CV apps Packager
Using CV apps packager is the best solution to copy a single host installation from one host to another. If you only need to replicate core plugins or mashup plugins, you can also use the following procedures.
Deploy Exalead CloudView Core Plugins to Another Host
You might want to deploy your custom core components only, packaged as CVplugins, to another host.
These components can be:
Connectors
Document Processors
Meta Processors
Prefix Handlers
Push API Filters
Query Processors
Security Sources
For more information, see "Packaging Custom Components as Plugins" in the Exalead CloudView Programmer's Guide.
Deploy Mashup Plugins to Another Host
You might also want to deploy your custom Mashup UI components, packaged as mashup plugins, to another host.
These components can be:
Widgets
Feeds
Feed Triggers
Mashup Triggers
Pre-Request Triggers
MEL Functions
Security Providers
Deploy All Mashup Plugins
You can generate a standalone .war file (embedding the 360 mashup configuration) as you want to deploy the Mashup UI outside of the Exalead CloudView environment, on another server.
For more information, see "Generate WAR Files for Heavy Customization" in the Exalead CloudView Mashup Programmer's Guide.
Deploy a Specific Mashup Plugin
You can use the plugin-cli.sh script located in <INSTALLDIR>/sdk/java-mashupui/project.
For example, to install a myplugin.zip file on the <DATADIR> located in mydatadir, for the default application on the mu0 mashup-ui service:
./plugin-cli.sh --cmd install --app-id default --data-dir /mydatadir/
--mashup-ui-service mu0 myplugin.zip
Run this command on all the hosts on which you want to deploy the plugin.