问题
We're setting up a development team, where we want each developer to run its copy of Weblogic in their workstations.
Ideally, we would like all these installs to be as similar to the production environment as possible. Things like:
- port numbers of servers
- Admin and managed servers
- JDBC data sources and JNDI names
- JMS data sources
- Additional jars in the classpath
I would like to set the server once and replicate the configuration to everyone on the team.
Is there a way to share this kind of configuration accross the team ? Maybe share some config files ? Some Weblogic jython script that recreates the environment ? How to do it ?
Weblogic version is Weblogic 12c.
回答1:
- Create new empty domain using standard tools (don't start it!)
- Init Git repository
- Commit the following folders and files:
- bin/
- config/
- security/
- fileRealm.properties
- startWebLogic.cmd
- startWebLogic.sh
- Create file
servers/AdminServer/security/boot.properties
for easier server start up and commit it. - In
startWebLogic.cmd
makeDOMAIN_HOME
relative:set DOMAIN_HOME=%~dp0
- Remove absolute paths declarations in the files:
- bin/setDomainEnv.cmd
- bin/startManagedWebLogic.cmd
- bin/startWebLogic.cmd
- bin/stopManagedWebLogic.cmd
- bin/stopWebLogic.cmd
- Start weblogic domain by click on
startWeblogic.cmd
- Add JDBC and JMS settings via Administration Console. Commit only
config/
folder and changed files (not new):git add config
andgit add -u
- Place additional jars into
lib/
folder and commit. - Share the repository with other people.
See example repository on github.
回答2:
Yes, using biemond/orawls. An example of how to use it is available here.
回答3:
This kind of problem is addressed by infrastructure configuration automation tools, such as Ansible, Puppet and Chef.
Having an authoritative environment configuration defined using one of these tools can be not only useful for development environment setup purposes, but also for any other production or non-production environments.
回答4:
Oracle has recommended to use pack/unpack to extend domain. Both the commands are easy to use and can be executed easily
来源:https://stackoverflow.com/questions/39249694/weblogic-how-to-replicate-server-configuration