Coldfusion mx server administration
Download
1 / 63

ColdFusion MX Server Administration - PowerPoint PPT Presentation


  • 614 Views
  • Updated On :

ColdFusion MX Server Administration. J2EE Deployment and Clustering Adam Wayne Lehman [email protected] Adam Wayne Lehman. Senior Systems Engineer, U.S. Department of State OSAC.gov U.S. Department of State Adobe User Group Manager 10 years of web development experience

Related searches for ColdFusion MX Server Administration

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'ColdFusion MX Server Administration' - Leo


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Coldfusion mx server administration l.jpg

ColdFusion MX Server Administration

J2EE Deployment and Clustering

Adam Wayne Lehman

[email protected]


Adam wayne lehman l.jpg
Adam Wayne Lehman

  • Senior Systems Engineer, U.S. Department of State

    • OSAC.gov

  • U.S. Department of State Adobe User Group Manager

  • 10 years of web development experience

  • Adrocknaphobia.com


Overview l.jpg
Overview

  • Installing ColdFusion MX (multi-server mode)

    • JRun Directory Structure

  • Server Directory Structure

  • JRun Management Console

  • EAR/WAR Deployment

    • Web Application Overview

  • JRun Tools

    • Server Instance Management

    • External Web Servers

    • Windows Services

  • JRun Clustering

    • Example Infrastructures


Coldfusion mx server administration4 l.jpg

ColdFusion MX Server Administration

Considerations for

Installing ColdFusion MX


Drive setup l.jpg

Installing ColdFusion MX

Drive Setup

  • C: Operating System

  • J: JRun and installed COTS applications

  • W: Web and application files

optional

  • S: Swap / Virtual Memory (PageFile.sys)

    • HD space equal to the amount of system RAM

  • L: Log Files


Installing coldfusion mx l.jpg

Installing ColdFusion MX

Installing ColdFusion MX

  • Install multi-server configuration

  • Internal JRun web server only (stand-alone)


Slide7 l.jpg

Installing ColdFusion MX

JRun

  • Full version of JRun installed

  • Download and install the most recent JRun Updater

    JRun 4 Updater 6

    Build Number 106363


Jrun directory structure l.jpg

<JRun-root>

Bin

JRE

Lib

Logs

Servers

Verity

Installing ColdFusion MX

JRun Directory Structure

JRun Utilities and Executables.

(JRun Launcher, Webserver Config, JRun Services, etc.)


Jrun directory structure9 l.jpg

<JRun-root>

Bin

JRE

Lib

Logs

Servers

Verity

Installing ColdFusion MX

JRun Directory Structure

Java Runtime Environment

MX 7 ships with version 1.4.2


Jrun directory structure10 l.jpg

<JRun-root>

Bin

JRE

Lib

Logs

Servers

Verity

Installing ColdFusion MX

JRun Directory Structure

JRun Java Classes

Included JVM classpath


Jrun directory structure11 l.jpg

<JRun-root>

Bin

JRE

Lib

Logs

Servers

Verity

Installing ColdFusion MX

JRun Directory Structure

JRun Log Files


Jrun directory structure12 l.jpg

<JRun-root>

Bin

JRE

Lib

Logs

Servers

Verity

Installing ColdFusion MX

JRun Directory Structure

Server Instances


Jrun directory structure13 l.jpg

<JRun-root>

Bin

JRE

Lib

Logs

Servers

Verity

Installing ColdFusion MX

JRun Directory Structure

Verity Search Server


Coldfusion mx server administration14 l.jpg

ColdFusion MX Server Administration

Application Directory Structure


Directory structure l.jpg

Application Folder

Application

ColdFusion

Cache

Components

CustomTags

Lib

Logs

SERVER-INF

Application Directory Structure

Directory Structure

Application / Web root directory


Directory structure16 l.jpg

Application Folder

Application

ColdFusion

Cache

Components

CustomTags

Lib

Logs

SERVER-INF

Application Directory Structure

Directory Structure

ColdFusion EAR/WAR files.


Directory structure17 l.jpg

Application Folder

Application

ColdFusion

Cache

Components

CustomTags

Lib

Logs

SERVER-INF

Application Directory Structure

Directory Structure

ColdFusion Component Base Directory


Directory structure18 l.jpg

Application Folder

Application

ColdFusion

Cache

Components

CustomTags

Lib

Logs

SERVER-INF

Application Directory Structure

Directory Structure

Custom Tag Base Directory


Directory structure19 l.jpg

Application Folder

Application

ColdFusion

Cache

Components

CustomTags

Lib

Logs

SERVER-INF

Application Directory Structure

Directory Structure

Java classes (JARs) and other deployed web applications (WARs)


Directory structure20 l.jpg

Application Folder

Application

ColdFusion

Cache

Components

CustomTags

Lib

Logs

SERVER-INF

Application Directory Structure

Directory Structure

Log files

* If not storing on a separate drive


Directory structure21 l.jpg

Application Folder

Application

ColdFusion

Cache

Components

CustomTags

Lib

Logs

SERVER-INF

Application Directory Structure

Directory Structure

JRun server files


Coldfusion mx server administration22 l.jpg

ColdFusion MX Server Administration

JRun Management Console

(JMC)


Jmc vs cf admin l.jpg
JMC vs CF Admin

  • JMC runs in a separate process outside of all ColdFusion instances.

    • JMC can be disabled when not in use.

    • ColdFusion instances can be managed while offline.

  • CF Admin provides limited functionality.

  • Pre-MX 7 clusters may exhibit strange behaviors when managed through CF Admin.


Jrun management console jmc l.jpg

JRun Management Console

JRun Management Console (JMC)

  • JRun Admin located at http://127.0.0.1:8000

  • Login

    • Username: admin (case-sensitive)

    • Password: CFIDE password set during installation

      * username/password stored in<jrun-root>\servers\admin\jrun-users.xml

  • Default servers installed under <jrun-root>/servers


Jrun management console l.jpg

JRun Management Console

JRun Management Console

  • 3 Servers Installed

    • Samples : Generic J2EE server instance

    • CFusion : ColdFusion MX server instance

    • Admin : JRun Administrator instance

  • Remove CFusion and Samples server

    • Remove the server without removing any associated files or directories


Creating a new server l.jpg

JRun Management Console

Creating A New Server

  • Select Create a NewServer in the JRunManagement Console.

  • Specify the ApplicationFolder as the JRunServer Directory.

  • Remove thedefault-ear directoryfrom your ApplicationFolder.

  • Start the server.


Jrun management console27 l.jpg

JRun Management Console

JRun Management Console


Ear war deployment l.jpg

EAR/WAR Deployment

EAR/WAR Deployment

  • Archive deployment

    • Entire structure is contained in a single archive

    • Compact

    • Easy to version and swap

    • Recommended for a single deployment

  • Expanded deployment

    • Hot deployment

    • Easy to edit and update files

    • Recommended for a clustered deployment


Archive deployment l.jpg

EAR/WAR Deployment

Archive Deployment

  • Run the ColdFusion installation to create the EAR/WAR archive

    EAR : Enterprise Application Archive

    WAR : Web Application Archive

    • An EAR may contain multiple WARs

  • Copy the EAR/WAR to <Application Folder>/ColdFusion

  • Select the server in the JRun Management Console to view the J2EE Components

  • Add a new Enterprise Application / Web Application

  • Select the EAR/WAR

  • Deploy


  • Expanded deployment l.jpg

    EAR/WAR Deployment

    Expanded Deployment

    • Expand the EAR/WAR directory structure.

    • Copy the CFIDE, META-INF, and WEB-INF directories to <Application Root>/ColdFusion.

      • Do not copy the CFIDE if you do not wish to deploy the ColdFusion Administrator.

    • Start the server.

      • The EAR/WAR will be automatically deployed when the server starts.


    Web application overview l.jpg

    JRun Management Console

    Web Application Overview


    Web application overview32 l.jpg

    JRun Management Console

    Web Application Overview

    • Context Path Host: Restricts the host address of the application.

    • Context Path: The base context path of the application.

      • Context Path Host + Context Path = Application URL

    • Document Root: Application root directory.

      • <Application Folder>/Application

    • Dynamic Reload/Compile: JRun dynamically recompiles and reloads servlets, JSPs, servlet helper classes, and JSP helper classes when a servlet or JSP is called. (Disabled by default).


    Web application overview33 l.jpg

    JRun Management Console

    Web Application Overview

    • Directory Browsing: Allow users to browse directories if a file is not specified.

    • File Serving: Allow the application to process templates.

    • File-based Session Persistence / Session Replication:Enables session sharing across a cluster

    • Replication Buddy:Determines the servers in the cluster to share sessions with.


    Web application xml l.jpg

    JRun Management Console

    Web Application XML

    <Application Folder>/ColdFusion/WEB-INF/jrun-web.xml

    <jrun-web-app>

    <enable-jrun-web-services>false</enable-jrun-web-services>

    <session-config>

    <persistence-config>

    <active>false</active>

    </persistence-config>

    <replication-config>

    <active>false</active>

    </replication-config>

    </session-config>

    <virtual-mapping>

    <resource-path>/</resource-path>

    <system-path>W:\CFMX7\Application</system-path>

    </virtual-mapping>

    <context-root>/</context-root>

    <compile>false</compile>

    <reload>false</reload>

    <uri-character-encoding>UTF-8</uri-character-encoding>

    </jrun-web-app>


    Internal web servers l.jpg

    JRun Management Console

    Internal Web Servers

    • ProxyService: Interacts with external web servers (IIS, Apache, etc.)

    • WebService: Built-in JRun web server.



    Configuring external web servers l.jpg

    JRun Tools

    Configuring External Web Servers

    • Web Server Configuration Tool (WSConfig.exe)

      • Found under <JRun Root>\bin

      • Both GUI & Command Line


    Configuring external web servers38 l.jpg

    JRun Tools

    Configuring External Web Servers

    • JRun Host / Server: JRun server instance or cluster running ColdFusion

    • Web Server: Type of web server

    • IIS Web Site: Available IIS web sites which are not already connected to JRun

    • Configure web server for ColdFusion MX:

      • Sets common properties of the web server when using ColdFusion. (Specifies index.cfm as a default document)


    Register windows services l.jpg

    JRun Tools

    Register Windows Services

    JRunSVC Tool (JRunSVC.exe)

    • Found under <JRun Root>\bin

    • Command line only

    • Install, remove, start, and stop the JRun server's Windows service.

    jrunsvc -install jrun_server [service_name [service_display_name [service_description]]]

    jrunsvc -[remove|start|stop service_name]

    * Wrap the service name in quotes (“”) if the name contains any spaces.


    Jrun server management l.jpg

    JRun Tools

    JRun Server Management

    • JRun Launcher Tool (JRun.exe)

      • Found under <JRun Root>\bin

      • Both GUI & command-line

    • Start, stop and restart JRun instances without the need for the running admin service or a web browser.



    Infrastructure l.jpg

    JRun Clustering

    Infrastructure


    Infrastructure43 l.jpg

    JRun Clustering

    Infrastructure

    • Load Balancer: Balances web requests to multiple web servers.

    • Web Server: Responds to web requests and directs processing or requests to JRun. (IIS, Apache, etc.)

    • JRun Web Connector: Software process which directs processing requests from the web server to JRun.

    • JRun: Application server running multiple instance of ColdFusion MX.

    • ColdFusion MX: If you need a definition, please exit the room quietly.


    Jrun clustering l.jpg

    JRun Clustering

    JRun Clustering

    • JRun provides enterprise-level server clustering for maximum reliability and scalability. Clustering is built into the web server connectors and the JRun kernel:

      • At the web server connector level, clustering enables load balancing and automatic failover between the web server and the web containers.

      • At the kernel level, clustering enables load balancing and automatic failover for clusterable server objects, such as EJBs, JNDI trees, or any clusterable custom service.

        • JRun servers use the JINI technology to dynamically locate their peers in the cluster, eliminating the risk inherent to a single point of failure. (multi-casting)


    Basic request l.jpg

    JRun Clustering

    Basic Request


    Basic request46 l.jpg

    JRun Clustering

    Basic Request

    • The page request is received by the Web Server.

    • The Web Server passes a process request to the JRun Web Connector.

    • The JRun Web Connector passes the process request to the JRun server instance running ColdFusion MX.


    Basic request47 l.jpg

    JRun Clustering

    Basic Request

    • Single Point of Failure

      • If any part of the infrastructure fails, the application goes offline.


    Balanced request l.jpg

    JRun Clustering

    Balanced Request


    Balanced request49 l.jpg

    JRun Clustering

    Balanced Request

    • The page request is directed through the load balancer to the Web Server.

      • Any available Web Server may handle the request.

    • The Web Server passes a process request to the JRun Web Connector.

    • The JRun Web Connector passes the process request to the JRun server instance running ColdFusion MX.


    Balanced request50 l.jpg

    JRun Clustering

    Balanced Request

    • Single Point of Failure

      • The Load Balancer only creates redundancy within the Web Servers.

      • During a ColdFusion MX failure users are redirected to a different ColdFusion MX instance.

        • All session data is lost.

      • The Load Balanceris not always aware that ColdFusion MX has failed.

        • Most load balancers are unable to monitor the health of a server beyond the web server.

        • The load balancer will continue to forward requests towards a slow running or hung ColdFusion MX server.

      • When a Web Server fails, a healthy ColdFusion MX is no longer utilized (and vice-versa).


    Clustered request l.jpg

    JRun Clustering

    Clustered Request


    Clustered request52 l.jpg

    JRun Clustering

    Clustered Request

    • Follows the same path to the JRun Web Connector as the balanced request.

    • The JRun Web Connector forwards the process request to a JRun server instance running ColdFusion MX.

      • Any available ColdFusion MX instance may handle the request.


    Single point of failure l.jpg

    JRun Clustering

    Single Point of Failure

    • The clustered infrastructure does not have a single-point-of failure.

    Except for the Load Balancer….

    and every piece of networking equipment…

    • In a clustered environment the parts of the infrastructure most likely to fail are redundant.


    Coldfusion mx server administration54 l.jpg

    Coldfusion MX Server Administration

    Creating A JRun Cluster


    Register remote server l.jpg

    Creating A JRun Cluster

    Register Remote Server

    • Select Register Remote Server in the JRunManagement Console.

    • Specify the Host Name, JRun Server Name and JNDI Port Number of the server you wish to register.

      • Use the IP address of theremote server ratherthan the host name.


    Creating a cluster l.jpg

    Creating A JRun Cluster

    Creating a Cluster

    • Select Create a New Cluster in the JRunManagement Console.

    • Specify the Cluster Name.

    • Add Servers to the cluster. (Do not include the admin server)

    • Restart all serversin the cluster.


    Session replication l.jpg

    Creating A JRun Cluster

    Session Replication

    On Web Application Overview page:

    • Check Enable SessionReplication

    • Specify * as a New Replication Buddy and click the Add button.

    • Set persistence config to false in the jrun-web.xml file.

    • Restart the server.

    Session replication does not work with

    file-based session persistence.


    Web application xml58 l.jpg

    Creating A JRun Cluster

    Web Application XML

    <Application Folder>/ColdFusion/WEB-INF/jrun-web.xml

    <jrun-web-app>

    <enable-jrun-web-services>false</enable-jrun-web-services>

    <session-config>

    <persistence-config>

    <active>false</active>

    </persistence-config>

    <replication-config>

    <active>true</active>

    </replication-config>

    </session-config>

    <virtual-mapping>

    <resource-path>/</resource-path>

    <system-path>W:\CFMX7\Application</system-path>

    </virtual-mapping>

    <context-root>/</context-root>

    <compile>false</compile>

    <reload>false</reload>

    <uri-character-encoding>UTF-8</uri-character-encoding>

    </jrun-web-app>


    Connecting a cluster l.jpg

    Creating A JRun Cluster

    Connecting A Cluster

    • Use the Web Server Configuration Tool to connect the cluster to an external web server following the same process used to connect a single instance.

    • Select the cluster in JRun Serverdrop-down.

      • Ensure that all members of the cluster are running before using the Web Server Configuration Tool.

      • When using multiple NICs specify the local IP address of the NIC card under JRun Host

    • Restart all servers in the cluster.


    Testing a cluster l.jpg

    Creating A JRun Cluster

    Testing A Cluster

    The following ColdFusion code will

    output the JRun server instance name:

    <cfoutput>

    #createObject(‘java’, ‘jrunx.kernel.JRun’).getServerName()#

    </cfoutput>


    Reference l.jpg
    Reference

    • Clustering ColdFusion MX for J2EE for JRunhttp://www.macromedia.com/devnet/coldfusion/j2ee/articles/endtoend.html

    • JRun Administrator’s Guidehttp://livedocs.macromedia.com/jrun/4/JRun_Administrators_Guide

    • JRun Command-line Toolshttp://livedocs.macromedia.com/jrun/4/JRun_SDK_Guide/apis4.htm


    Full day course l.jpg
    Full-Day Course

    • ColdFusion Server Administration

      • CFUnited Pre-Conference Course

      • June 26, 2006

      • North Bethesda Marriott

      • Additonal Topics

        • JRun 4.5 (Cheeta)

        • Build servers and clusters

        • Performance Tuning

      • My Birthday!



    ad