Monday Dec 19, 2005

More SMF descriptions for JavaES

Here are a few SMF descriptions you can use to enable Java Enterprise System applications.   I've included the steps to follow again.  They are pretty simple and you are more than welcome to edit the xml descriptions to meet your needs.  These files assume the creation of the jes dir located under the manifest dir.   Then the APPTYPE would include something like webserver. You can read the XML manifest files to understand how the Description maps to the directory.

Thanks to Scott Fehrman from the Identity Group for creating these.

chown root:sys /var/svc/manifest/jes/APPTYPE/FILENAME.xml
chmod 444 /var/svc/manifest/jes/APPTYPE/FILENAME.xml
svccfg import /var/svc/manifest/jes/APPTYPE/FILENAME.xml
svcadm -v enable SERVICENAME_FOUNDINXMLFILE

Calendar Server - jescalserverdefault.xml
Directory Server- jesdirserverport389.xml
Mail Server- jesmailserverdefault.xml
Web Server - jeswebserverport80.xml

Web Server Admin - jeswebserveradminport.xml



Monday Sep 26, 2005

SMF Description for Sun Java System Application Server

Its been quite a while since I've blogged on anything. So I'll try to pick up with something useful. I was tasked by a collegue to create a script that would ensure that his Sun Java System Application Server instance would restart if his Solaris 10 server ever went down. For this example we are talking about normal power outages/flickers occuring in a home. Not anything you would face in a reliable data center. The SJSAS documentation describes how to do this with /etc/inittab. I decided to try some of the new capabilities in S10, mainly SMF.

I borrowed from these 3 sources:
http://www.cuddletech.com/blog/pivot/entry.php?id=326
http://www.sun.com/bigadmin/content/submitted/config_smf.html
http://www.sun.com/bigadmin/content/selfheal/sdev_intro.html

Step 1) Create the SMF description. Here is one for the Application Server. You should chanage DOMAINNAME to be the name of the domain you wish to restart. Currently this script will only start 1 domain. I called this SMF description sjsas.xml



<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>

<!--
Jeff Bounds 09/12
Service manifest for Sun Java System Application Server
-->

<service_bundle type='manifest' name='SUNWappserver:appserver'>
<service name='application/sjsas' type='service' version='1'>
<create_default_instance enabled='false' />
<single_instance />

<dependency name='fs' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>

<dependency name='net' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/initial' />
</dependency>

<exec_method type='method' name='start' exec='/opt/SUNWappserver/appserver/bin/asadmin start-domain DOMAINNAME' timeout_seconds='-1'>
<method_context>
<method_credential user='appservd' group='appservd' />
</method_context>
</exec_method>

<exec_method type='method' name='stop' exec='/opt/SUNWappserver/appserver/bin/asadmin stop-domain DOMAINNAME' timeout_seconds='-1'>
</exec_method>
<stability value='Unstable' />

<template>
<common_name>
<loctext xml:lang='C'>
SJSAS
</loctext>
</common_name>
</template>

</service>
</service_bundle>



Step 2) You will need to copy this file and fix permissions for it. I placed this file in the applications directory underneath the manifest dir.

chown root:sys /var/svc/manifest/application/sjsas.xml

chmod 444 /var/svc/manifest/application/sjsas.xml



Step 3) Import the service description

svccfg import /var/svc/manifest/application/sjsas.xml



Step 4) Enable the service

svcadm -v enable sjsas




This seems to work just fine for me. I also created a SMF description for Sun Java System Web Server. I'll post that tomorrow

About

bounds

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Links
Blogroll

No bookmarks in folder