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!
March 3rd, 2004 at 7:02 pm
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
March 3rd, 2004 at 8:02 pm
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
March 3rd, 2004 at 8:32 pm
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
March 3rd, 2004 at 8:38 pm
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
March 5th, 2004 at 1:10 pm
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
July 10th, 2007 at 9:30 am
For all weblogic professionals, check out all of the jobs from the entire internet Best Weblogic Jobs.
July 10th, 2007 at 9:31 am
For all weblogic professionals, check out all of the jobs from the entire internet Best Weblogic Jobs.
July 10th, 2007 at 9:32 am
For all weblogic professionals, check out all of the jobs from the entire internet here: http://www.odinjobs.com/s/weblogic_jobs.html
July 10th, 2007 at 9:33 am
For all weblogic professionals, check out all of the jobs from the entire internet here: http://www.odinjobs.com/s/weblogic_jobs.html
July 26th, 2007 at 1:25 am
subtlety is the art of saying what you think and getting out of the way before it is understood.
July 27th, 2007 at 5:11 am
every jack has his gill
February 9th, 2009 at 4:12 am
Jobs.Porta
March 9th, 2010 at 10:19 pm
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