Weblogic: how to replicate server configuration?

ぐ巨炮叔叔 提交于 2021-02-08 06:17:16

问题


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:


  1. Create new empty domain using standard tools (don't start it!)
  2. Init Git repository
  3. Commit the following folders and files:
    • bin/
    • config/
    • security/
    • fileRealm.properties
    • startWebLogic.cmd
    • startWebLogic.sh
  4. Create file servers/AdminServer/security/boot.properties for easier server start up and commit it.
  5. In startWebLogic.cmd make DOMAIN_HOME relative: set DOMAIN_HOME=%~dp0
  6. Remove absolute paths declarations in the files:
    • bin/setDomainEnv.cmd
    • bin/startManagedWebLogic.cmd
    • bin/startWebLogic.cmd
    • bin/stopManagedWebLogic.cmd
    • bin/stopWebLogic.cmd
  7. Start weblogic domain by click on startWeblogic.cmd
  8. Add JDBC and JMS settings via Administration Console. Commit only config/ folder and changed files (not new): git add config and git add -u
  9. Place additional jars into lib/ folder and commit.
  10. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!