A brazilians view of London JavaServer Faces 1.0: Finally released, but it is only 1.0 :)
Mar 03

WebLogic Configuration: Part 2

Tech Add comments

We have been continuing our fun with WLS 8.1sp2 (upgrading from WLS 7), and are trying to put processes in place to allow:

a) A new developer to take our doc, setup a dev environment in a short period
b) An admin to take our doc, and setup a new testing/production server in a short period

When I take a look at the docs, it again shows that WLS is a real pain when it comes to single install servers.

WebLogic has the notion of an Admin Server for central configuration, logging, etc. This is great if you have a bunch of servers that you need to administer, clusters, etc. However in my experience this is probably ~5% of the total installs of WLS?

We want to be able to do the following to get a new instance running:

- Install WLS on machine
- Grab configuration from repository
- Set a few environment variables
- Run start script (again from repository)

This is what we have with other servers, why isn’t that the case here?

Instead what do we have to do?

- Install WLS on machine
- Run through a config wizard to setup a domain, and add a couple of things (JDBC pool) through this tool (since we need the {3DES} password that it generates)
- Run the server in that domain once, as for some reason that changes the config.xml. Kill the server.
- Grab the config.xml from the repository and run through a bunch of steps to merge the two. At least relative directories seem to be working now in WLS 8.1. The documentation says:

Relative paths are based on the root of the Admin Server installation directory.

However, from testing, it appears to actually be from the domain directory. This allowed us to use a path of:

<Application Name=”portal” Path=”applications/portal” …. >

This seemed to work on Windows too, although for some reason after you run the server it changes the file to be: Path=”applications\portal”. Whatever.

Something scares me about having running servers change your config.xml. I understand that there should be a tool (e.g. /console) to make changes in a GUI. That is great. However just running a server with a given config shouldn’t be changing the file! It should be read only!

BEA always recommends not touching the config.xml, and having that be a blackbox. In the real world though you want to share this file, and don’t want to force every new install to involve a step which goes through /console setting things up. Just let me edit a file and CVS checkout to the machine I am setting up… then I can % ant setup-server and away we go!

Tom Malaher has been running into similar problems, as shown by his post “Third party software installation woes”

13 Responses to “WebLogic Configuration: Part 2”

  1. Vinny Carpenter Says:

    Hi Dion. We’ve got the whole WebLogic install from scratch, create a domain and setup pools, etc completely scripted on the UNIX side. I’m sure the same will be true using Cygwin. Let me see if I can document and package that stuff up for you. Ping me in a few days if you don’t hear from me. Cheers
    –vinny

  2. Mark Griffith Says:

    Dion:

    First of all sorry your having problems.

    Here are the easy steps you should be able to take:

    -install wls on machine
    You can use the silent installer to do this from a script.
    http://edocs.bea.com/platform/docs81/install/silent.html

    -run an ant script that creates a brand new WLS installation and does all of the configuration as well. (wlserver task and wlconfig task)
    http://edocs.bea.com/wls/docs81/admin_ref/ant_tasks.html

    This latter process can use a ant properties file to abstract out the environmental differences.

    As for paths, I reccomend that you put the applications into the root of the domain. And then all of your applicaiton path’s in the config.xml are relative.

    Let me know if you have any problems doing this, I can if you want work up a small example to put on my blog as well.

    Cheers
    mbg

  3. Mike Cico Says:

    Hi Dion,

    For dynamic, non-console based configuration, I’d recommend trying out the Jython-based WLST (WebLogic Scripting Tool) at http://dev2dev.bea.com/codelibrary/code/wlst.jsp. It has similar semantics to WLShell, but with the added flexibility and power of Jython as well.

    If you don’t want a “new” tool like WLST, check out the “batchupdate” command on the weblogic.Admin tool, new in 8.1. You can have a set of wl.Admin commands in a file (say, created with the conf2admin tool, see link below), which will be invoked in sequence by the Admin tool in a single Admin tool invocation (making it much faster than running each command separately).

    The conf2admin tool (http://ftpna2.bea.com/pub/downloads/conf2admin.zip), can be used to take an existing config.xml and generate a set of Admin commands to be used with the weblogic.Admin tool to rebuild a domain from scratch. So, set up your domain, run conf2admin, and generate the support scripts to rebuild your domains from scratch.

    I’d recommend:
    - ceate your domain, and use conf2Admin to figure out how to recreate your domain with the Admin tool

    - write the support for using the output of that tool
    - booting a clean server using, for example,

    java -Dweblogic.management.GenerateDefaultConfig=true \
    -Dweblogic.management.username=weblogic \
    -Dweblogic.management.password=weblogic \
    weblogic.Server

    - use weblogic.Admin with the commands created by conf2admin to recreate the domain.

    Alternately, if you prefer an Ant based solution, check out the docs on , , and Ant tasks, which can be used to start/stop, configure, and deploy apps to instances of WLS 8.1.

    So there’s a lot of ways to slice this apple. You could also use a “canned” config in CVS, etc, and do Ant token filtering on the task as well to get people up and running quickly with a common configuration.

    Good luck,

    Mike

  4. Mike Cico Says:

    Dion,

    Part of my last message was garbled…the Ant tasks I was mentioning, that did not show up, are “wlserver”, “wlconfig”, and “wldeploy”, for starting/stopping servers, configuring servers, and deploying apps within Ant.

    Also, as Dave and Mark mention, the silent-mode of the config wizard is another way of canning the configuration of a domain in an “offline” manner.

    Mike

  5. Nelson Paiva Says:

    Dion,
    I had sent you an e-mail with concerns to this issue, but I just found out that you had worked a solution given the suggestions made.

    The solution:
    http://www.almaer.com/blog/archives/000083.html

  6. Carl Williams Says:

    For all weblogic professionals, check out all of the jobs from the entire internet Best Weblogic Jobs.

  7. Carl Williams Says:

    For all weblogic professionals, check out all of the jobs from the entire internet Best Weblogic Jobs.

  8. Carl Williams Says:

    For all weblogic professionals, check out all of the jobs from the entire internet here: http://www.odinjobs.com/s/weblogic_jobs.html

  9. Carl Williams Says:

    For all weblogic professionals, check out all of the jobs from the entire internet here: http://www.odinjobs.com/s/weblogic_jobs.html

  10. rosa Says:

    subtlety is the art of saying what you think and getting out of the way before it is understood.

  11. jim Says:

    every jack has his gill

  12. jobpattaya Says:

    Jobs.Porta

  13. indranil Says:

    Hi …

    not sure if its a right forum for this q or not…

    i want to check my new weblogic installation is done with success or not…is there any script for it…for checking?like we know for websphere…we have ivt.sh to run for the successfull installation.

    anyhelp …greatly appreciated
    thanks
    Neel

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: What are the first four letters in the word British?

Loading...