2.
|
The first screen is the Choose an Application to Deploy screen. Select the project you want to deploy and click Next.
|
3.
|
The Choose Files to Deploy screen appears. Select the files that you want to deploy. You typically choose to deploy all the files in the project. If you choose to deselect a file, make sure it is not referenced by another file in the project. Click Next.
|
4.
|
The Deployment Options screen appears:
|
•
|
Configure deployment data sources: If you used a test database for your development process, this is where you switch over to the database that you plan to use for the deployed application. For each Data Model file, you can select the appropriate data source.
|
Click Next. The
Deployment Method screen appears.
5.
|
On the Deployment Method screen, choose a method for copying the project files over to the ActiveGrid Server. You can choose to transfer the files onto a mounted directory or using FTP.
|
6.
|
Click Next. The final screen depends on the deployment method you selected:
|
•
|
If you chose FTP, the FTP Deployment screen appears. Type in the requested information for the FTP transfer and click Finish.
|
The wizard creates all the files you need for the deployed application and puts them in the location you specified on the ActiveGrid Server. To complete the deployment, run the deployment script on the server (
Running the Deployment Script).
In order to deploy an ActiveGrid application, you need to transfer all the project files from the development machine to the ActiveGrid Server. The deployment wizard does this for you either as an FTP transfer or by using a mounted fileshare.
If you prefer to transfer the files by some other means, then select the mounted directory option from the deployment wizard. For the deployment path, specify a local directory rather than a mounted remote directory. Finish the deployment wizard, then copy the entire contents of the local directory over to the ActiveGrid Server. Run the deployment script on the server to complete the deployment.
Before running the deployment script on the ActiveGrid Server, you must first create the deployment files for the project by running the deployment wizard in the ActiveGrid Studio (
Running the Deployment Wizard).
To complete the deployment, you run the deployment script (called activegrid_deploy) on the ActiveGrid Server. The deployment script generates the Apache configuration file used for application deployment.
INSTALL_DIR/bin/activegrid_deploy -f
INSTALL_DIR/local/deployments/
YOUR_PROJECT/
YOUR_PROJECT.dpl -r
APPROOT
•
|
INSTALL_DIR is the root directory of your ActiveGrid Server installation. Be sure to use the full path, rather than a relative path.
|
•
|
APPROOT is the application root for your project. After you deploy your project, your application will be available to users at:
|
The activegrid_deploy script generates the Apache configuration (
.conf) file that the ActiveGrid Server uses for application deployment.
On startup, Apache automatically loads all the configuration files located in the
INSTALL_DIR/local/deployments directory, including the configuration file for your new application. The
activegrid.conf loaded by Apache automatically load
demoapp.conf and any other
.conf files located in the
INSTALL_DIR/local/deployments directory.
The default location for deployed applications is in the INSTALL_DIR/local/deployments directory on the ActiveGrid Server. However, you can put your deployed applications anywhere on the server machine.
Ensure that Apache is working properly. Try URLs that worked before the deployment. If this is a new installation of Apache, or if the document root and subdirectories are new, simply try looking up the ActiveGrid Server welcome page:
Make sure the application behaves as expected. If the application stores data in the HTTP session, check that this data is correctly saved and recovered.
INSTALL_DIR/bin/activegrid_deploy -u
INSTALL_DIR/local/deployments/
YOUR_PROJECT/
YOUR_PROJECT.conf
•
|
INSTALL_DIR is the root directory of your ActiveGrid Server installation.
|
•
|
YOUR_PROJECT.conf is the configuration file for the project.
|
INSTALL_DIR/bin/activegridctl restart
The script option removes the .conf file for the application. On startup, Apache automatically loads all the configuration files located in the
INSTALL_DIR/local/deployments directory.
The deployment wizard encrypts the data source passwords in the .dpl and
.xacml files. It creates a file, called
.agkeystore, that contains the encryption key. The
.agkeystore file is located in the project directory.
ActiveGrid's password encryption uses a combination of XOR and MD5 to encrypt passwords in the
.dpl and
.xacml files. In order to retrieve the actual password, you need the following information:
By eliminating plain text passwords in the .dpl and
.xacml files, we reduce the risk of unauthorized access to those files. However, if you prefer, you can use plain text passwords, rather than encrypted passwords, in the
.dpl and
.xacml files. To do this, edit the deployment file directly, deleting the encrypted passwords and replacing them with the plain text passwords.
The deployment file (.dpl) provides the information that the ActiveGrid Server needs in order to correctly deploy your application. This includes where to find the files that comprise your application, how to get to any necessary databases, and basic configuration information for the application as a whole.
Deployment files (.dpl), like other ActiveGrid files, are XML files. The following table lists the elements that appear in an ActiveGrid deployment file. Each element is described in more detail in the following sections, along with their respective child elements, if any.
The deployment element encloses the other elements that comprise the deployment file. The
<ag:deployment> element is the first element in the deployment file after the
<?xml> declaration and it includes the name space declarations for the file, along with some global settings for the deployment. Here’s an example:
xmlns:ag="http://www.activegrid.com/ag.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
sessionPersistence="EXTERNAL"
sessionCleanupInterval="60"
PageFrame="PageFramexform/PageFrame"
beginOperation="petstore/begin/default"
signonForm="SignOnxform/SignOn"
externalPackage="petstore"
setupOperation="petstore/PetstorePortType/initSession"
The last line in the .dpl file is the closing tag for the deployment element:
The following table lists the available attributes for the deployment element. All the other elements in the deployment file are child elements of the
deployment element. These elements are discussed in the following sections.
The processRef element identifies the process file (.bpl) for the application. It has the following attributes:
The schemaRef element identifies a schema being used by the application. It has the following attributes:
The schemaRef element has a sub-element, called
datasourcename.
The serviceRef element identifies a service being used by the application. It has the following attributes and elements:
The serviceref has the following elements:
|
|
|
|
|
|
|
|
|
•
|
For “SOAP” and “REST” services, optional elements specify default values for parts of an input message. The “message” attribute refers to an input message of the service and the “part” attribute is the name of a part within that message. The “value” element specifies the default value.
|
|
The restService element is a required child element of the
serviceRef elements when the
serviceType attribute is set to “REST”. It describes connection attributes of the REST Web service. The
restService element has the following attribute:
The rssService element is a required child element of the
serviceRef element when the
serviceType attribute is set to “RSS”. It describes connection attributes of the RSS or Atom feed. The
rssService element has the following attributes:
The localService element is a child of the
serviceRef element when the
serviceType attribute is set to “LOCAL”. Operations in Local services may be implemented by either global functions or class functions.
This element identifies the location of the module and class used to implement the service. The
localService element has the following attributes:
The skinRef element identifies a skin file (
.skn) in use by the application. Only one skin and
skinRef are permitted per application. The
skinRef element has the following attributes:
The XFormRef element identifies a
Page (
.xform file) in use by the application. Any number of
XFormRef elements are permitted. The
XFormRef element has the following attributes:
The dataSource element defines the connection parameters for a database. The
dataSource element has the following attributes:
The dataSource element has the following child elements:
The staticDir element contains the path to the root directory of application static files. The pathname is relative to the application deployment directory (the directory that contains the deployment file). For example:
The rbacPlugin element contains the path to a custom authentication module, if you have one. For example:
xmlns:ag="http://www.activegrid.com/ag.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
pageFrame="PageFramexform/PageFrame"
beginOperation="petstore/begin/default"
signonForm="SignOnxform/SignOn"
setupOperation="petstore/PetstorePortType/initSession"
sessionPersistence="DISTRIBUTED"
sessionDataSource="petstore-SQLite"