Salesforce

Project Deployment (Magic xpi 4.5)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Project Deployment (Magic xpi 4.5)

Projects Folder Location

It is recommended that you deploy Magic xpi projects to a shared folder, accessible by all application servers. Although a shared folder is potentially a single point-of-failure, with today’s storage systems this type of resource is usually highly redundant by itself.

Deploying a Project

Deploying a project involves copying each project’s folder from the development/staging environment to the designated shared folder location. For projects with connections to external resources (such as databases or enterprise systems), it might be necessary to edit the configuration using the Settings dialog box's Resources or Services sections with the relevant server connections and credentials.

Configuring Projects to Start Automatically

You can create a file called projectsStartup.xml that tells Magic xpi to automatically start your projects and servers when the Magic xpi service deploys the Magic Space.

The structure of the projectsStartup.xml file is identical to the structure of the start.xml created under each project.

  1. Make a copy of the start.xml file or the projectsStartup.xml.example file, which is located in the config folder.

  2. Make the changes that you want, name it projectsStartup.xml and save it to the config folder.

The startup sequence of the grid is as follows:

  1. The Grid Service Agent (GSA) is started as a service on each application server that is part of the grid. The Grid Service Agent starts the core grid infrastructure to connect all application servers together.

  2. One of the GSAs that started successfully deploys the Magic Space. This Magic Space contains all Magic-related objects that are shared across the grid.

  3. The same GSA also deploys the projectsStartup.xml information into the Magic Space, creating a ServerData object for each of the servers. This enables projects to start automatically.

  4. The GSA receives a command from the Space to run the Magic xpi engines. This is based on the list of ServerData objects that were created in the Space as part of the deployment and automatic startup process.

  5. For each project that is deployed, the first Magic xpi server that starts is responsible for initiating the project's metadata objects in the Magic Space to enable the projects to start.

Example projectsStartup.xml File

Click here to see an example of a projectsStartup.xml file that defines the startup configuration of a sample project called Demo1.

This example file configures the following settings:

  • The project’s shared folder is \\10.1.1.6\projects.

  • The project folder is \\10.1.1.6\projects\Demo1.

  • Each application server will start one server process/instance.

  • APP1 will start 5 workers, and will run all the triggers, the Autostart, and the Scheduler.

  • APP2 will start 3 workers, without loading any triggers, without running any Autostart flows, and without running the Scheduler.

  • APP3 will start 5 workers with triggers, but without the Autostart or the Scheduler.

  • Each application server will set its alternateHosts property to point to the two other application servers. This is done to ensure that if one of the hosts is unavailable, the server defined to run on this host will start on one of the other defined hosts.

The shared projects folder is configured using the ProjectsDirPath attribute. Note that you can define the same folder for all application servers, or have each server access a local projects folder.

Note:

You can also define where each trigger will run and split the triggers between the engines.Since version: 4.1

Configuring the GigaSpaces Settings to the Magic Monitor

The Magic Monitor locates the Space using the settings defined in the runwebmonitor.bat file, which is located under the <Magic xpi installation>\Runtime\RTView\magicmonitor folder.

Starting Projects from the Command Line (Optional)

Projects can be started from the command line. To start a project from the command line:

  1. Go the Start link in the project’s folder.

  2. Right-click and select the Properties option.

  3. Find the Target field. The text in the field will look something like this:

    "D:\Magic xpi\Magic xpi 4 GS 11_12\MgxpiCmdl.bat" start-servers -startup-config-file "D:\Magic xpi\Magic xpi 4 GS 11_12\projects\Project1\start.xml" -Space-name "MAGIC_SPACE" -group "Magicxpi-4.0.0_AVIW-7-LP" -locators ""

  4. This path points to a specific start.xml file that is residing under the project. Change the path to load a different start.xml file whose configurations can load several projects.

  5. Click OK.

Running the Same Project Under Different Names

Magic xpi lets you run the same project under different names and with different configuration files. For example, you can manually configure each project instance so that they run with a set of logical names that point to different customer databases.

To do this, follow these steps:

  1. Create a folder named after the second project as a sibling of the original project folder.

  2. Copy and paste the following files from the original project folder to the newly created folder:

    • ifs.ini

    • start.xml

  1. In the start.xml file’s Name attribute, enter the second project’s name.

  2. In the ifs.ini file, enter the second project’s name in the following entries:

    • [MAGIC_ENV]ApplicationPublicName = <second project’s name>

    • [MAGIC_ENV]GeneralErrorLog =* %log%<second project’s name>_error.log

  1. In the ifs.ini file, enter the original project name in the following entries:

    • [MAGIC_LOGICAL_NAMES]currentprojectdir=%projects%<original project name>%sl%

    • [MAGIC_LOGICAL_NAMES]currentproject=%projects%<original project name>%sl%<original project name>.IBP

Note:

The currentprojectdir= and currentproject= entries always point to the original project folder.

Since version: 4.1

Reference
Attachment 
Attachment