将任意文件安装到Websphere中所有节点的脚本接口?
我对 wsadmin 和可用于 Websphere 的管理客户端相当陌生。我想知道是否有人有将任意文件部署到单元中每个节点的示例?理想情况下,我正在寻找一种可以与Websphere ND v7和v6.1一起使用的解决方案,并且不会诉诸本机文件传输方法(例如Windows共享/ sftp),尽管如果存在可以通过部署管理器发现的配置至于采取什么本机方法来部署该文件可能是一个选项。
对于一些背景,我正在尝试为我们的客户编写应用程序安装脚本。作为其中的一部分,我需要创建一个 JDBC 提供程序和一个共享库以及我的应用程序。 IBM 的文档对于如何创建 具有特定类路径的共享库,以及 JDBC Provider 和 Websphere 变量。但我遇到了一个问题:我应该如何确保配置的提供程序和共享库的类路径上定义的资源在运行时在每个节点上可用?
I'm rather new to wsadmin and the administration client available for Websphere. I was wondering if anyone had an example of deploying arbitrary files to every Node in a Cell? Ideally I am looking for a solution that would work with both Websphere ND v7 and v6.1, and would not resort to native file transfer methods (e.g. windows shares / sftp), although if there is configuration that could be discovered through the Deployment Manager as to what native method to take to deploy the file that could be an option.
For some background, I'm trying to script the installation of an application for our clients. As part of that I will need to create a JDBC provider and a shared library along with my Application. IBM's documentation is fairly clear on how to create shared library with a particular classpath, and a JDBC Provider, and Websphere variables. But I am running into the problem of how I should go about ensuring that the resources defined on the classpaths of the configured provider and shared library are available on each Node at runtime?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以使用
wsadmin
的AdminConfig
对象。这种方法将文件放置在WAS的配置存储库中,该配置存储库由节点同步服务监控,因此自动将主存储库中的文件更改与每个节点存储库同步。现有的wsadmin
命令允许集中远程添加、更新和删除文件。下面是一些示例/config/test-app/jdbc-driver.jar)。可以如脚本中所示显式调用节点同步,或者如果启用自动同步,同步将自动发生。
wsadmin
jython
代码,它将本地文件 (/temp/jdbc-driver.jar
) 上传到配置存储库 (<代码>以下
wsadmin
jython
代码演示了如何更新该文件。Arbitrary files can be managed centrally using
wsadmin
'sAdminConfig
object. This approach places the files in WAS's configuration repository which is monitored by the node synchronization service, and therefore automatically synchronizes file changes from the master repository with each node repository. There are existingwsadmin
commands that enable the files to be added, updated, and deleted centrally and remotely.Here is some example
wsadmin
jython
code which will upload a local file (/temp/jdbc-driver.jar
) to the configuration repository (<WAS_PROFILE_ROOT>/config/test-app/jdbc-driver.jar
). The node synchronization may be explicitly invoked as demonstrated in the script, or the synchronization will occur automatically if automatic synchronization is enabled.The following
wsadmin
jython
code demonstrates how to update the file.