LoginSignup
3
2

More than 5 years have passed since last update.

Chefを使ってWebLogic Serverのサイレント・インストールの準備してみた:Response File

Last updated at Posted at 2016-06-09

概要

Oracle製品をインストールために必要となるInventory Pointer Location Fileの作成に関するCookbookについて以前記述しました。

ところで、実際にサイレント・インストールを実施するには各製品の構成に関するResponse Fileが必要となります。

このResponse Fileの作成をChefを利用して行ってみます。

Response File

サイレント・インストールは、GUIによる対話型ダイアログであるインストール・ウィザードを使用しません。
非対話型のバッチ形式で製品インストールを行います。
インストールの際に設定する必要のある「インストール・ディレクトリ」や「インストール・タイプ」などの情報を予め記述しておくファイルがResponse File (xxx.rsp)です。

WebLogic用Response Fileの主な内容

WebLogic Serverのサイレント・インストールに使用するResponse Fileの主なパラメータについて説明します。
詳細は以下のマニュアルに記載されています。
- Oracle® Fusion Middleware Oracle Universal Installerによるソフトウェアのインストール 12c (12.2.1)

対応画面 パラメータ 説明
インストールの場所 ORACLE_HOME Oracleホーム・ディレクトリの場所
インストール・タイプ INSTALL_TYPE 実行するインストールのタイプを指定 製品ディストリビューションによって異なる
  • インストール・タイプ
    • Fusion Middleware Infrastructureディストリビューションの場合
      • Fusion Middleware Infrastructure
      • Fusion Middleware Infrastructure With Examples
    • WebLogic ServerおよびCoherenceディストリビューションの場合
      • WebLogic Server
      • Coherence
      • Complete with Examples

Chefを使ってやりたい事

Chefを使ってResponse Fileに設定する情報をパラメータ化して、動的に生成できるようにします。

今回作成するRecipe

  • WebLogic Server インストール用のResponse File (install_weblogic.rsp)の作成
    • 「インストール・ディレクトリ」及び「インストール・タイプ」のパラメータ化

Recipe. install_weblogic.rspファイルの作成

以下の3種類のoraInst.locファイルで作成します。
- Recipe
- Template
- Attribute

Templateでinstall_weblogic.rspの骨子を作り、Attributeでデフォルトパラメータを定義し、Recipeでパラメータを利用してinstall_weblogic.rspファイルの権限設定及び配置を行います。

  • Template
templates/default/install_weblogic.rsp.erb
[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true

#
MOS_USERNAME=

#
MOS_PASSWORD=<SECURE VALUE>

#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=

#
SOFTWARE_UPDATES_PROXY_SERVER=

#
SOFTWARE_UPDATES_PROXY_PORT=

#
SOFTWARE_UPDATES_PROXY_USER=

#
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=<%= node['weblogic']['mw_home'] %>

#Set this variable value to the Installation Type selected. e.g. Fusion Middleware Infrastructure, Fusion Middleware Infrastructure With Examples.
INSTALL_TYPE=<%= node['weblogic']['install_type'] %>

#Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name.
MYORACLESUPPORT_USERNAME=

#Provide the My Oracle Support Password
MYORACLESUPPORT_PASSWORD=<SECURE VALUE>

#Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration
DECLINE_SECURITY_UPDATES=true

#Set this to true if My Oracle Support Password is specified
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

#Provide the Proxy Host
PROXY_HOST=

#Provide the Proxy Port
PROXY_PORT=

#Provide the Proxy Username
PROXY_USER=

#Provide the Proxy Password
PROXY_PWD=<SECURE VALUE>

#Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port]
COLLECTOR_SUPPORTHUB_URL=

「ORACLE_HOME」と「INSTALL_TYPE」をパラメータ化しています。

  • Attribute
attributes/default.rb
default['weblogic']['mw_home'] = '/u01/app/oracle/product/fmw12.2.1'
default['weblogic']['install_type'] = 'Fusion Middleware Infrastructure With Examples'

パラメータのデフォルト値を設定しています。

  • Recipe
recipes/responsefile.rb
template node['weblogic']['response_file'] do
  source 'install_weblogic.rsp.erb'
  owner node['weblogic']['owner']
  group node['weblogic']['group']
  mode '0644'
end

templateリソースを利用してinstall_weblogic.rsp.erbを配置し、オーナー及びパーミッション設定を行います。

まとめ

WebLogic Serverのサイレント・インストールに必要なInventory Pointer Location FileとResponse Fileの作成ができました。
これで以下のようにサイレント・インストールが実行できるようになります。

$ java -jar fmw_12.2.1.0.0_infrastructure.jar -silent -responseFile install_weblogic.rsp -invPtrLoc oraInst.loc

-今回のレシピ:https://github.com/shinyay/chef-oracle-weblogic/tree/publish_20160609

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2