Is it possible to copy/export WebSphere Application Server Cell configuration from one environment to another environment? - websphere

Remember this is not Standalone Environment.
In one physical server I have set up a Cell with one Deployment Manager, one Node, one application server and configured them. Now I need to create 12 more similar cell with same configuration in different physical servers. So is it possible to copy/export configuration from one environment to another ?
Creating the Cell is not a problem for me, I want to skip the step of configuring again and again.

Start by looking at this IBM KnowledgeCenter topic on properties-based configuration and administration. It has a number of links to other topics with additional information. The property file based configuration allows you to extract a text file of properties from an existing WebSphere Application Server configuration, perform some processing on the text file (like changing hostnames, ports, etc) using your favorite tools and then apply that configuration to another cell, node, or server.

Related

From Websphere 6.1.35 to Websphere 8.5.5.17 - application startup impacted by filesystem scan

This is an old application and we have trouble to have the application changed.
During the deploy of a CRM like application, migrated from a 6.1.35 environment to a 8.5.5.17 websphere application server environment, the startup time of the application changed from 10 seconds to 12 minutes.
We made sono troubleshooting and we found that the problem is a remote filesystem which has 1.200.000 files. This remote filesystem is "mounted" in a path that is part of the WAR cell. This is done after the deploy of the application.
What make the application startup so slow is that on 8.5.5.17, all the files present in the path of the application are traversed (thus it tries to traverse the 1.200.000 file in the remote filesystem, which takes, as you may guess, 12 minutes...).
Anybody knows if this changed behaviour from WAS 6.1.x to WAS 8.5.5.x is intended?
Is there any workaround to block this?
WebSphere Application Server creates a list of files in the application when starting the application. It's a bit overzealous when creating the list in that it includes files that it does not need to look at during application start. For large applications, the file list can consume a lot of memory and can take a long time to generate. Since it is a Java EE application server, it should only be concerned with files in Java-EE-defined locations when starting the application. The list is not used during application run time. Therefore, the application server should only look in the directories:
/
META-INF/*
WEB-INF
WEB-INF/classes/*
WEB-INF/lib/*
APAR PH09294, included in 8.5.5.16 and 9.5.0.1, provides a way for you to limit the file list to the above locations. You can specify a setting either in the application or in the application server. (If you are using a version prior to 8.5.5.16 or 9.5.0.1, you should look at PM37942, which is a bit more cumbersome but still works.)
To enable the setting in the application, add the following to the MANIFEST.MF of either the EAR or the WAR. (Remember when editing MANIFEST.MF, obey the formatting rules. MANIFEST.MF must end with a blank line.) Adding the setting to a WAR limits the file list for just that WAR. Adding the setting to an EAR limits the file list for all WARs in that EAR.
IBM-Enable-File-List-Include-Filter: true
You can apply the setting to the server by setting a JVM custom property.
The following JVM custom property applies the setting to all applications on the server:
Property: org.eclipse.jst.j2ee.commonarchivecore.EnableFilesListIncludeFilter
Value: true
You can also apply the setting to all servers in a profile by adding the following line to the <WAS_PROFILE_HOME>/properties/amm.filter.properties file:
IBM-Enable-File-List-Include-Filter = true
Finally, to apply the setting to all profiles, add the above line to the <WAS_HOME>/properties/amm.filter.properties
Where should you set it? If you set it in the application, then wherever you deploy the application, the file list will be limited in scope. You do not depend on any setting in the application server. So for any large application, a developer should always include the setting in the application. An administrator might consider applying the setting to the entire WebSphere Application Server installation.

Create new file transfer configuration using IBM MQMFT

I am using IBM MQMFT hosted on-premise and I have a request to transfer a new file from one server to the other.
Both servers already have MQ agents and are already sending some files across.
I would like to be able to add this new file configuration so that the file can also be picked up.
Please advise the steps required to achieve this. Do I just edit the agent's XML?
If you simply wish to send a file from one agent to another, and those agents are already configured...
Use the fteCreateTransfer command for a 'one off':
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.wmqfte.doc/start_new_transfer_cmd.htm
Consider a resource monitor (via fteCreateMonitor) or scheduled transfer (via fteCreateTransfer) if you're doing it on a regular basis:
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.wmqfte.doc/create_monitor_cmd.htm

existdb: identify database server

We have a number of (developer) existDb database servers, and some staging/production servers.
Each have their own configuration, that are slightly different.
We need to select which configuration to load and use in queries.
The configuration is to be stored in an XML file within the repository.
However, when syncing the content of the servers, a single burnt-in XML file is not sufficient, since it is overwritten during copying from the other server.
For this, we need the physical name of the actual database server.
The only function found, request:get-server-name that is not quite stable since a single eXist server can be accessed through a number of various (localhost, intranet or external) URLs. However, that leads to unnecessary duplication of the configuration, one for each external URL...
(Accessing some local files in the file system is not secure and not fast.)
How to get the physical name of the existDb server from XQuery?
I m sorry but I don't fully understand your question, are you talking about exist's default conf.xml or your own configuration file that you need to store in a VCS repo? Should the xquery be executed on one instance and trigger an event in all others, or just some, or...? Without some code it is difficult to see why and when something gets overwritten.
you could try console:jmx-token which does not vary depending on URL (at least it shouldn't)
Also you might find it much easier to use a docker based approach. Either with multiple instances coordinated via docker-compose or to keep the individual configs from not interfering with each other when moving from dev to staging to production https://github.com/duncdrum/exist-docker
If I understand correctly, you basically want to be able to get the hostname or the IP address of a server from XQuery. If the functions in the XQuery Request module are not doing as you wish, then another option would be to set a Java System Property when starting eXist-db. This system property could be the internal DNS name or IP of your server, for example: -Dour-server-name=server1.mydomain.com
From XQuery you could then read that Java System property using util:system-property("our-server-name").

How to list all apps on WAS and their linked node cell and server name?

The context is that I have a script that automates the update or deployment of applications on WAS 6.1 servers from a DMGR. This script use a setting file that contains the application name, the server cell, node and name. I don't want to make manually a file for every application. I searched IBM for a way to get all these informations and can't find how.
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.base.doc%2Finfo%2Faes%2Fae%2Ftxml_listapp.html
I know how to list apps on a server but I need to link all those infos together.
$AdminApp list (any options would give me info I need?)
Use the scriptLibrary included in WAS version 8:
AdminApplication.listApplications()
Returns: List of the available application names in the respective cell.

WAS7 System Properties in RAD 7.5.1

I have an old project in WSAD 5.1.2 with a WAS4 server configuration that's in a .wsi-file. If I double click it I get the server configuration editor and on the environment tab there is a System Properties section with some name-value pairs.
Now I have opened the same project in RAD 7.5.1. Where can i input the same name-value pairs for a server in RAD 7.5.1? There's no "environment-tab" if I double-click my server, just an "Overview" tab.
I finally found the proper way of doing it in the admin web interface...
Application servers > myServer > Process definition > Java Virtual Machine > Custom properties
In RAD 7.5.4 JVM name value pair is stored in Servers --> Application Servers --> java and process Management --> process definition --> java virtual machine --> custom properties
here you can create a new name value pair which can be used by Java code using System get properties function.
Apparently IBM started to ship a real application server starting with RAD/RSA6 instead of the test server that comes with WSAD. So to configure the appserver it's just to use the web admin interface as usual.
Thanks to Jeanne Boyarsky for the answer in the forums over at The Java Ranch.
The old app I'm porting needs some properties in the system properties of the JVM set so that they can be retrieved with System.getProperty(...) and I found a dirty way of making it work. So, until I find out how to do it the proper way, if there is a proper way, I came up with this hack:
After doing some "find" and "grep" in the profile directory of the appserver i found a file called:
runtimes\base_v7\profiles\<profilename>\config\cells\<cellname>\nodes\<nodename>\servers\<servername>\server.xml
At the bottom of server.xml there is a <jvmEntries xmi:id="JavaVirtualMachine_.... tag.
Inside it you can add system properties tags on the format:
<systemProperties xmi:id="someId" name="name of your property" value="the value" required="false"/>
Anyone who knows how to to this the proper way and has read all the way down here must be crying by now... :)
But, it seams to work...

Resources