如何在 WLST(离线模式)下克隆 weblogic 服务器?
我们有一个自定义的 weblogic 模板,其中有管理服务器(显然)和一个集群,其中 2 个托管服务器部署到同一台机器上。我们将该模板用于我们的开发环境。但现在当我们转向性能测试环境时,我们需要引入更多的机器。
在 WLST(离线或在线模式)下创建新机器很容易。但是如何在 WLST 中克隆服务器(因为除 weblogic.Name 和目标计算机之外的所有设置都相同)?
这在 WebLogic 管理控制台中似乎是可能的,但我们需要自动化它。
We have a custom weblogic template which has admin server (obviously) and a cluster with 2 managed servers deployed to the same machine. We use that template for our development environments. But now when we move on to performance testing environments, we need to introduce more machines.
It's easy to create a new machine in WLST (offline or online mode). But how do I clone a server (as all of the settings, except weblogic.Name and target machine are the same) in WLST?
It seems to be possible in WebLogic Administration Console, but we need to automate that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我最终定义了以下函数:
之后只需调用:
更新:我在博客中写了更多关于它的内容:http://blog.aestait.com/cloning-objects-in-wlst-offline/。该脚本还在 WebLogic 11g 上进行了测试。
I ended up doing defining the following functions:
After that just call:
UPDATE: I wrote more about it in my blog: http://blog.aestasit.com/cloning-objects-in-wlst-offline/. Also the script was tested on WebLogic 11g.
我不确定 WLST 的最新版本,但旧版本没有单个命令,因为
clone
位于控制台端 - 它不是可以在 MBean 上调用的功能。您可以编写一个脚本,将 serverName 作为参数,遍历所有资源,然后创建新服务器。或者,也可以使用 Oracle 的 OEM。希望有帮助。
I'm not sure about the newest version of WLST but the older releases don't have a single command for it since
clone
is on the console side - It's not a functionality that can be invoked on an MBean.You could write a script that takes a serverName as a parameter, traverses through all resources and then creates your new server. Alternatively, Oracle's OEM could be used as well. Hope that helps.