You can deploy several types of application to the Fusion Application Server:
Application Type | File Format |
---|---|
Application Type | File Format |
SIP sevlet | WAR |
Converged Application (SIP Servlet(s) and HTTP Servlet(s)) | WAR |
JEE Application Module | EAR |
JAR files and Java resources such as property files | JAR |
Note: FAS does not support SAR files.
You can deploy multiple applications on a cluster using the Management Console; once deployed, you can configure application properties in the same way. You can also configure datasources for those applications which need them (see the Configuring Datasources section in this article).
Deploying Applications
Deployments can be managed through the Management Console.
Deploying an Application
-
Launch the Management Console - see the Starting the Management Console section in the Management Interfaces article.
-
From the top right menu, select Runtime.
-
In the left hand menu, expand Domain and select Manage Deployments.
-
Select the Content Repository navigation tab:
- Click Add to display the Upload dialog:
- Choose the application that you want to deploy, and click Next:
Any type of file can be uploaded to the FAS, but you will normally upload WAR or EAR files.
- Edit the name if required (usually you can accept the default), and click Save.
The uploaded file will appear in the Content Repository.
- Select the application that you have just uploaded (files in the Content Repository are in alphabetical order of their names), and click Assign:
-
Select the server group you want to deploy the application to. In most instances, SIP applications will be deployed to the main-server-group. Applications should not be deployed to the lb-server-group.
-
Click Save.
The application is now uploaded and deployed to a server group. The Assignments column should show 1 against the name of the application.
Updating an Application
-
Launch the Management Console - see the Starting the Management Console section in the Management Interfaces article.
-
From the top right menu, select Runtime.
-
In the left hand menu, expand Domain and select Manage Deployments.
-
Select the Content Repository navigation tab:
- Select the application you wish to update in the list, and click Update:
- Choose the application that you want to deploy, and click Next:
Make sure that you choose a file containing a newer version of the application you are updating, as FAS cannot distinguish a newer version of the same application from an unrelated application.
- Click Save.
The application will be uploaded to FAS, replacing the selected application, and assigned to any server groups it was already assigned to.
Undeploying an Application
-
Launch the Management Console - see the Starting the Management Console section in the Management Interfaces article.
-
From the top right menu, select Runtime.
-
In the left hand menu, expand Domain and select Manage Deployments.
-
Select the Content Repository navigation tab:
- Select the application you want to undeploy, and click Remove:
- Click Confirm to remove the application from FAS. It will no longer appear in the Content Repository.
Note: Deployed applications can depend upon other deployed applications. If you remove an application without removing any applications which depend on it, those applications will probably malfunction. If in doubt, you can disable an application first, to check if it is safe to remove it; see the Enabling or Disabling an Application section below.
Enabling or Disabling an Application
-
Launch the Management Console - see the Starting the Management Console section in the Management Interfaces article.
-
From the top right menu, select Runtime.
-
In the left hand menu, expand Domain and select Manage Deployments.
-
Select the Server Groups navigation tab:
- Click the View link in the Options column of the main-server-group row:
- Select the application you want to disable, and click the En/Disable button:
- Click Confirm to disable the application.
When disabled, the tick in the Enabled column will disappear. If the application is disabled, clicking the En/Disable button will enable it.
Application Backups
You can configure FAS to store backups of each deployed artifact. The backups are stored in the directory <install dir>/domain/deployment\_backups
on the master node. Each time it uploads a file (whether it is new or an update to an existing application), FAS stores a backup in this directory with the name <filename>-<YYYYMMDDhhmmssmmm>
where <YYYYMMDDhhmmssmmm>
is a timestamp in ISO order with millisecond precision and no separators or timezone. You can configure how many backups are stored for each one by setting the value of jboss.domain.backups.max in the <install dir>/domain/configuration/fas.properties
file. The value should be 0 or higher, with 0 indicating no backups should be stored. The default value is 5.
Configuring Application Properties
Applications that can be deployed to Fusion Application Server can expose their properties for configuration in the Management Console in two different ways: using system properties, or using the Application Configuration Framework. This section describes both methods. The documentation for your application should describe the properties that can be configured and how to configure them.
Configuration using System Properties
System properties are used by some applications as part of their configuration; for example some FCSDK samples require some system properties to be added. (See the FCSDK documentation for details of the required system properties.) To add system properties:
-
Launch the Management Console - see the Starting the Management Console section in the Management Interfaces article.
-
Application properties can be added at any of the following four levels (in order of precedence):
i. domain level
Applies to all server processes running on all hosts within the domain:
a. Click **Profiles** in the top right menu
b. In the left hand menu, expand **General Configuration** and click **System Properties**
ii. server group level
Applies to all server processes within a server group:
a. Click **Server** in the top right menu
b. In the left hand menu, expand **Server** and click **Server Groups**
c. Select the Server Group in the main content area, and choose the **System Properties** tab below it
iii. host level
Applies to all the server processes running on a specific host:
a. Click **Server** in the top right menu, and select the host in the top left menu
b. In the left hand menu, expand **Host Settings** and click **Host Properties**
iv. server level
Applies to a specific server process:
a. Click **Server** in the top right menu and select the host in the top left menu
b. In the left hand menu, select **Server Configurations**
c. Select the server process in the main content area, then select the **System Properties** tab below
The most common place to set a system property is at server group level, because applications are deployed to a server group. In the appropriate System Property page:
-
To edit a system property, click the cell in the Value column of the property you want to change, and enter the new value.
-
To remove a system property, select the property and click the Remove link.
-
To add a system property, click the Add button to bring up the Create System Property dialog:
Enter the Name and Value, and click Save.
Changes made to system properties are immediately available to applications.
Configuration using the Application Configuration Framework
Alternatively, applications can use the Application Configuration Framework (ACF) to manage their configuration. This offers validation and publishing hooks that allow the application to check that configuration settings are valid, and to be informed when configuration settings have changed.
If an application has been developed to use the ACF, its configuration can be managed using the CLI or Management Console.
Managed and Unmanaged Applications
An application may be capable of being managed by the ACF, without actually being managed. In order to manage its properties, you must first manage the application:
-
Launch the Management Console - see the Starting the Management Console section in the Management Interfaces article.
-
From the top right menu, choose Profiles.
-
From the top left menu, select the ha profile.
-
In the left hand menu, expand Subsystems and Sip, and select Application Config:
- Select the application you want to manage and click the Manage button. A dialog appears:
- Click Confirm to manage the application. The Status column will read MANAGED, and there will be an Unmanage button:
You can unmanage a managed application by clicking Unmanage. If you unmanage a previously-managed application, this deletes any overridden properties set by the administrator or product installer. Values return to their default values, and the properties are no longer editable.
Managing ACF Applications using the Management Console
-
Launch the Management Console - see the Starting the Management Console section in the Management Interfaces article.
-
From the top right menu, choose Profiles.
-
From the top left menu, select the ha profile.
-
In the left hand menu, expand Subsystems and Sip, and select Application Config:
The applications which are using the ACF are displayed in the top of the main content area. If there is more than one, you will need to select the application to see its properties in the lower part of the main content area.
- Click on the cell in the Value column for the property you wish to edit.
When you press <span class="smallcaps">Enter</span>
, or move the focus away from the edited cell, it validates the property value and displays any errors. Values are not immediately published.
-
Repeat with all the properties you want to change.
-
Click Save.
This tries to validate and save all the properties. In this step, the application validates the property set as a whole; if the validation is successful, the Management Console publishes the properties: that is, it sends the property set to the application and informs it of the change. If any of the values are invalid, it displays an error and does not make any changes.
Managing ACF Applications using the CLI
-
Start the CLI (see the Starting the CLI section in the Management Interfaces article).
-
Run:
/profile=ha/subsystem=config:list-apps()
to get a list of applications which can be managed using the ACF:
{
"outcome" => "success",
"result" => undefined,
"server-groups" => {"main-server-group" => {"host" => {"master-192.168.9.14" => {"192.168.1.234-1" => {"response" => {
"outcome" => "success",
"result" => [("SomeApp" => {
"description" => "Provides sip routing adaptation",
"status" => "MANAGED"
})]
}}}}}}
}
The status of the application in the above example is MANAGED, therefore its properties can be modified. If it was UNMANAGED, you would need to manage it before setting its properties.
- To manage an application:
/profile=ha/subsystem=config/application=<application name>:add(description="description")
(You must add a description if you manage the application using the CLI.)
- To unmanage an application:
/profile=ha/subsystem=config/application=<application name>:remove()
- To view an application's properties:
/profile=ha/subsystem=config/application=<application name>:describe
This will return the properties:
{
"outcome" => "success",
"result" => undefined,
"server-groups" => {"main-server-group" => {"host" => {"master-192.168.9.14" => {"192.168.1.234-1" => "response" => {
"outcome" => "success",
"result" => [{"properties" => {
"externalRegistrarUrl" => {
"description" => "The SIP URI of the external registrar",
"value" => "192.168.1.100",
"type" => "String",
"status" => "SET"
},
"internalUserPattern" => {
"description" => "A regular expression pattern to match all SIP users that should be handled by the internal registrar",
"value" => "^1.\*",
"defaultValue" => "^1.\*",
"type" => "String",
"status" => "NOT\_SET"
}
}}]
}}}}}}
- To validate a property:
/profile=ha/subsystem=config/application=<application name>/property=<property name>:validate(value=<new value>)
The outcome (success, or failed and a reason) will be returned in the response.
- To add a property:
/profile=ha/subsystem=config/application=<application name>/property=<property name>:add(value=<value>)
Use add to set one of the exposed properties which has not been set before; if it has already been set, use update.
- To remove a property:
/profile=ha/subsystem=config/application=<application name>.property=<property name>:remove
- To change a property:
/profile=ha/subsystem=config/application=<application name>/property=<property name>:update(value=new value>)
Use update to change an exposed property that has previously been set using add; if it has not been set before, use add.
- To publish the changes:
When you have made all the changes to the properties that you want, you must publish them, which saves them and pushes them to the FAS server processes.
/profile=ha/subsystem=config/application=<application name>:validate()
/profile=ha/subsystem=config/application=<application name>:publish()
Co-hosting Applications
The JSR 289 SIP specification allows for only one SIP application router per container. This makes it difficult to install or deploy more than one SIP product to a single container. The Fusion Application Server supports the ability to have multiple application routers deployed at the same time, facilitating the co-hosting of multiple SIP products.
FAS introduces a concept of a SIP application router domain. Each application router can be associated with a number of domains. When a SIP request enters FAS, FAS checks the domain that the SIP message is addressed to, and selects the application router with an application router domain that matches. If the domain is not explicitly configured as an application router domain of one of the application routers, FAS selects the application router which is configured as the default.
Each deployable artifact (for example FCSDK's gateway.ear) is associated with its own application router, which sends SIP to the servlets within the artifact. Each application router must register with the Application Router Registry module of FAS. If a servlet in an artifact acts as a UA and generates an outbound SIP message, that message will also pass through the artifact's application router.
Note: When co-hosting multiple applications, ensure that a reverse lookup on any IP address in the FAS cluster can only resolve to a single application router domain. Otherwise, a remote application could perform a reverse lookup on one of the IP addresses, and resolve it to a domain which FAS associates with a different application; in that case, any SIP message sent by the remote application would go to an application which it was not intended for.
See the Fusion Application Server Architecture Guide for more information on the Application Router Registry and Application Router selection.
Configuring AR Details in the Management Console
-
Launch the Management Console - see the Starting the Management Console section in the Management Interfaces article.
-
From the top right menu, select Profiles.
-
From the top left menu, select the ha profile.
-
From the menu on the left, expand Sip and select Application Routers:
A list of any existing application routers is displayed in the bottom of the main content area, together with the Controlled Domains to which they apply.
- Click the Add button:
-
Enter the name of the Application Router.
-
If you want this to be the default Application Router, select the Is Default checkbox. Only one AR can be the default.
-
Click Save.
-
Select the Application Router you have just added, and the Controlled Domains tab below.
-
Click the Add button on the Controlled Domains tab:
- Enter the Controlled Domain to which the AR will apply, and click Save.
FAS will route SIP to Application Routers according to the domain in the Request URI of the INVITE, so the Controlled Domain should be an IP address or the domain part of a SIP address.
- If your new application router is not the default, you must specify which application should use this application router. Select the Application Artefacts tab and click Add:
- Enter the name of the deployed application file for the application that should use this AR, and click Save.
Configuring AR Details in the CLI
-
Start the CLI (see the Starting the CLI section in the Management Interfaces article).
-
Type:
/profile=ha/subsystem=sip/app-router=
and press <span class="smallcaps">Tab</span>
to get a list of installed application routers.
- Run:
/profile=ha/subsystem=sip/app-router=<app router name>:read-resource
to get a list of an application router's properties:
{
"outcome" => "success",
"result" => {
"default" => true,
"application-artefact" => {"test.ear => undefined},
"controlled-domain" => {"192.168.1.100" => undefined}
}
}
The response illustrates an application router with a single controlled domain (192.168.1.100) and a single artifact (test.ear), and set as the default application router.
- To add an application router:
/profile=ha/subsystem=sip/app-router=<app router name>:add
- To remove an application router:
/profile=ha/subsystem=sip/app-router=<app router name>:remove
- To set an application router to be the default:
/profile=ha/subsystem=sip/app-router=<app router name>:write-attribute(name=default,value=true)
- To add a controlled domain to an application router:
/profile=ha/subsystem=sip/app-router=<app router name>/controlled-domain=<controlled domain name>:add
- To remove a controlled domain from an application router:
/profile=ha/subsystem=sip/app-router=<app router name>/controlled-domain=<controlled domain name>:remove
- To add an artifact for an application router:
/profile=ha/subsystem=sip/app-router=<app router name>/application-artefact=<application name>:add
- To remove an artifact for an application router:
/profile=ha/subsystem=sip/app-router=<app router name>/application-artefact=<application name>:remove
If a resource you are trying to add already exists, or a resource which you are trying to remove does not, you will receive an error response:
{
"outcome" => "failed",
"failure-description" => {"domain-failure-description" => "JBAS014803: Duplicate resource [
(\"profile\" => \"ha\"),
(\"subsystem\" => \"sip\"),
(\"app-router\" => \"my-app-router\"),
(\"controlled-domain\" => \"my-controlled-domain\")
]"},
"rolled-back" => true
}
Configuring Datasources
Some applications (for instance, some of the Fusion Client SDK samples) that you can run on FAS require the use of a database.
The standard way to access a database is by using a datasource. To create a datasource, you need to:
-
install the JDBC driver
-
create the datasource
-
configure the datasource
-
test the connection
Each of these is described here.
Installing the JDBC Driver
A JDBC-4 compliant JDBC driver file must be deployed using the Management Console:
- Download the relevant JDBC driver.
For example, the MySQL JDBC driver can be obtained from:
http://dev.mysql.com/downloads/connector/j/
The Oracle driver can be downloaded from:
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
The driver file must be available on the machine that you are accessing the Management Console from, as the Browse function can only access the local file system.
-
Launch the Management Console - see the Starting the Management Console section in the Management Interfaces article.
-
From the top right menu, select Runtime.
-
From the left hand menu, select Manage Deployments.
-
Click Add.
-
Select the JDBC driver JAR file which you have just downloaded.
-
Click Next.
-
Click Save.
-
Click Assign.
-
Select the groups you want to add the driver to.
In most cases, this will be main-server-group, but there may be occasions when you need to make a datasource available to one of the other groups.
- Click Save.
Creating the Datasource
-
In the top right menu, select Profiles.
-
Select the profile you want to work with from the top left menu.
-
From the menu on the left, expand Connector, and select Datasources:
- Click Add:
-
Enter the name of the data source (e.g. TestDS), and it's JNDI name (e.g. java:jboss/datasources/TestDS).
-
Click Next:
-
Select the JDBC driver you have just deployed.
-
Click Next:
-
Enter the connection URL (e.g.
jdbc:mysql://<host>:3306/<schema>
- the format varies with the JDBC driver in use). -
Enter the user name and password for the database, and the security domain if needed.
-
Click Done.
-
Restart the AS (see the Starting and Stopping Server Processes section in the Managing Cluster Components article).
Configuring the Datasource
To configure the datasource, it must be disabled; you cannot configure an enabled datasource.
-
From the top right menu, select Profiles.
-
Select the profile you want to work with from the top left menu.
-
From the menu on the left, expand Connector, and select Datasources:
- Select the datasource you want to configure, and if it is enabled (if there is a tick in the Enabled column), click the Disable button, then Confirm in the Modify Datasource dialog:
-
Configure Transaction Isolation:
-
Select the Connection tab in the lower part of the main content area.
-
Click Edit.
-
From the Transaction Isolation drop down list, select a value appropriate to your application:
- Click Save.
-
-
Configure the Connection Pool:
- Select the Pool tab in lower part of the main content area:
-
Click Edit.
-
Set the Min Pool Size and Max Pool Size.
-
Click Save.
- Click Enable, then Confirm in the Modify Datasource dialog.
Testing the Connection
You can test the datasource using the CLI:
-
Start the CLI (see the Starting the CLI section in the Management Interfaces article).
-
Run:
/host=<host name>/server=<server process>/subsystem=datasources/data-source=<datasource name>:test-connection-in-pool()
where <host name>
is the host (usually either localhost
or master-<ip address>
), <server process>
is the name of the AS or other server process (e.g. appserver-localhost), and <datasource name>
is the name of the datasource you want to test.
You should get a success message returned:
/host=master-192.168.1.234/server=192.168.1.234-1/subsystem=datasources/data-source=MyDS:test-connection-in-pool()
{
"outcome" => "success",
"result" => [true]
}
For more information on configuring datasources in JBoss7, see <https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-Datasources>
Comments
0 comments
Please sign in to leave a comment.