WASのサイレントデプロイ方法

WASのサイレントデプロイができると、いちいち管理画面から処理を通していく必要が無くなり、一発でできるようになります。

pyファイルの作成

# インストール済みのアプリケーションをアンインストール
AdminApp.uninstall(‘<<アプリケーション名>>’)
# 保管
AdminConfig.save()
# インストール
AdminApp.install(\
‘/home/ear/<<アプリケーション名>>.ear’, \
‘[ -nopreCompileJSPs -distributeApp -nouseMetaDataFromBinary -nodeployejb -appname <<アプリケーション名>> -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall warn -noprocessEmbeddedConfig -filepermission .*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755 -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -MapResRefToEJB [[ “アプリケーション名” “” <<アプリケーション名>>.war,WEB-INF/web.xml jdbc/sample1 javax.sql.DataSource jdbc/sample1 “” “” ][ “アプリケーション名” “” <<アプリケーション名>>.war,WEB-INF/web.xml jdbc/sample2 javax.sql.DataSource jdbc/sample2 “” “” ]] -MapWebModToVH [[ “アプリケーション名” <<アプリケーション名>>.war,WEB-INF/web.xml default_host ]]]’ )
# 保管
AdminConfig.save()
# アプリケーションの起動
AdminControl.invoke(\
‘WebSphere:name=ApplicationManager,process=server1,platform=dynamicproxy,node=<<cell名>>,version=6.1.0.19,type=ApplicationManager,mbeanIdentifier=ApplicationManager,cell=<<cell名>>,spec=1.0’, \
‘startApplication’, \
‘[<<アプリケーション名>>]’, \
‘[java.lang.String]’)
AdminApp.list()

pyファイルをwsadminで実行する

#./wsadmin.sh -lang jython -f AppInstMadoST.py

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です