Identity Manager on EC2

Identity Manager を Amazon EC2 上で動かす

前提条件

  • Amazon EC2 のアカウントを持っていること。(これがないと、EC2上でAMIを動かせないので。。)
  • EC2 用のKey Pair を作成して、PEMファイルを作業PC上に保存してあること。

準備

残念ながら、Identity ManagerまでインストールされたAMI(Amazon Machine Image)は、6/1 時点でありません。。。
したがって、今回は、Glassfish がインストールされているOpenSolarisのAMIを使って、その上に Identity Managerをインストールすることにします。

Glassfish on OpenSolaris のAMIからEC2 インスタンスを起動する。

  1. AWS Management Console にアクセス。
  2. Amazon EC2 タブをクリックすると、ログイン画面になるので、メールアドレスとパスワードを入れてログイン。
  3. 真ん中にある、Launch Instances ボタンをクリック。
  4. Launch Instance Wizard が画面の真ん中に表示されるので、Community AMIs タブをクリック。
  5. Community AMI を2000以上あるので、Glassfishを探すために、一番上のテキストボックスに、glassfish と入力してリターン。
  6. 今回は、EC2 GlassFish AMIs - Sun Software in the Clouds - wikis.sun.com でも紹介されている、ami-187d9a71 を使います。
    右側の select ボタンをクリックします。 
  7. Number of Instances (今回は1)、Instance Type (今回はSmallを選択)、Key pair name(事前に作成してあるKey Pairを選択)
    Security Groups (今回はDefault)を入力して、Launch ボタンをクリック。
    これで、インスタンスが起動しました。あがってくるまでちょっと待ちましょう。

Identity Managerのバイナリをダウンロードする。

  1. 今回は、Identity Manager 8.1 から、IDM_8_1_0_0.zip と IDM_8_1_L10N.zip をダウンロードしておきます。

ダウンロードしたバイナリをEC2インスタンスに転送する。

  1. EC2 ではセキュリティを考慮してか、SSH接続では、ID/パスワードではなくて、RSA認証(秘密鍵と公開鍵を使った認証)を行ないます。また、FTPで使う20、21ポートもデフォルトでは閉じられています。
    したがって、ここでは、SFTP でファイル転送を行ないます。私はFilezillaを使っています(秘密鍵を用いた認証にも対応しています。)

Identity Managerのインストールと配備

Identity Managerのインストール

  1. ダウンロードしたバイナリは、/export/home/product の下に、*IDM_8_1_0_0 IDM_8_1_L10N ディレクトリを作成して、それぞれ解凍してあることとします。
  2. /export/home/product/IDM_8_1_0_0 ディレクトリに移動して、install コマンドで起動します。install ファイルに実行権がついてないので、つけてから実行します。
    root@domU-12-31-39-00-5C-87:/export/home/product/IDM_8_1_0_0# chmod 744 install
    root@domU-12-31-39-00-5C-87:/export/home/product/IDM_8_1_0_0# ./install 
    
    You are running the installation program for Sun Identity Manager. This program
    asks you to supply configuration preference settings that it uses to install
    Sun Identity Manager
    
  3. ライセンスアグリーメントにも同意ます。
       Have you read, and do you accept, all of the terms of the preceding Software
       License Agreement? If so, choose 'yes' and the installation will continue.
       If not, choose 'no' and the installation program will end without installing
       the product. [no] {"<" goes back, "!" exits} yes
    
  4. /root/idm ディレクトリに Identity Manager をインストールします。このディレクトリはアプリケーションサーバにデプロイするための war ファイルを作成するためのディレクトリになります。
    The Sun Identity Manager components will be installed in the following
    directory. Specify the directory location where you want to install the Sun
    Identity Manager program.
    
       Directory to install Sun Identity Manager components into [/root/idm]: 
    
    The directory "/root/idm" does not exist.
    
    
    
    Do you want to create it now or choose another directory?
    
    1. Create Directory
    2. Choose New
    
       Enter the number corresponding to your choice  [1] 1
    
    Checking disk space...
    
    
    The following items for the product Sun Identity Manager will be installed:
    
    Product: Sun Identity Manager
    Location: /root/idm
    Space Required: 126.41 MB
    -----------------------------
    Identity Manager Component
    
    
    Ready to Install
    
    1. Install Now
    2. Start Over
    3. Exit Installation
    
       What would you like to do [1] {"<" goes back, "!" exits}? 1
    
    Installing Sun Identity Manager
    |-1%--------------25%-----------------50%-----------------75%--------------100%|
    
    
    Installation details:
    
         Product               Result     More Information
     1.  Sun Identity Manager  Installed  Available
    
    2. Done
    
       Enter the number corresponding to the desired selection for more
       information, or enter 2 to continue [2] {"!" exits}: 
    root@domU-12-31-39-00-5C-87:/export/home/product/IDM_8_1_0_0# 
    
  5. インストールされて、各種ファイルやディレクトリが展開されています。
    root@domU-12-31-39-00-5C-87:/export/home/product/IDM_8_1_0_0# cd /root/idm/
    root@domU-12-31-39-00-5C-87:~/idm# ls
    account                                logout.jsp
    admin                                  lookupUserId.jsp
    applet                                 META-INF
    approval                               metaview
    bin                                    model-export.dtd
    compliance                             model-export.xml
    config                                 model-export.xsl
    configure                              patches
    continueLogin.jsp                      policies
    debug                                  questionLogin.jsp
    defaultLogin.jsp                       reports
    defaultLogout.jsp                      resources
    doc                                    roles
    exporter                               sample
    forgotPasswordChangeResultsCustom.jsp  security
    help                                   spe
    home                                   staticLogout.jsp
    images                                 styles
    includes                               task
    index-help.xml                         test.jsp
    index.html                             uninstall_Sun_Identity_Manager.class
    LH.class                               user
    loginDisabled.jsp                      waveset.dtd
    login.jsp                              WEB-INF
    loginRecovery.jsp                      wsdl
    loginResetResults.jsp
    root@domU-12-31-39-00-5C-87:~/idm# 
    
  6. bin ディレクトリに移動して、lh コマンドでレポジトリDBとの接続設定を確認します。(レポジトリDBとの接続設定の確認は、lh setRepo -c です。)WSHOME を設定したから lh コマンドを使用します。今回は、動作各にだけなので、組み込みDBのHSQLDBをそのまま使います。(通常はMySQLなどを使われることをお勧めします。)
    root@domU-12-31-39-00-5C-87:~/idm# cd bin
    root@domU-12-31-39-00-5C-87:~/idm/bin# chmod 744 lh
    root@domU-12-31-39-00-5C-87:~/idm/bin# ./lh  setRepo -c
    WSHOME must be set!
    root@domU-12-31-39-00-5C-87:~/idm/bin# export WSHOME=/root/idm
    root@domU-12-31-39-00-5C-87:~/idm/bin# ./lh setRepo -c
    Starting internal database server ...
    DB Server @ jdbc:hsqldb:hsql://127.0.0.1:58733/idm
    HSqlDBDataStore:jdbc:hsqldb:file:
    root@domU-12-31-39-00-5C-87:~/idm/bin# 
    

Identity Managerの配備

  1. idm_l10n_ja_JP.jar を WEB-INF/lib ディレクトリにコピーします。これはIdentity ManagerのGUIを日本語化するためです。他の言語も必要なかたは、他の言語に対応した jar ファイルもWEB-INF/lib ディレクトリにコピーして下さい。
    root@domU-12-31-39-00-5C-87:~/idm# cp /export/home/product/IDM_8_1_L10N/idm_l10n_ja_JP.jar  WEB-INF/lib/
    
  2. アプリケーションサーバ上に配備するための warファイルを作成します。
    root@domU-12-31-39-00-5C-87:~/idm# pwd
    /root/idm
    root@domU-12-31-39-00-5C-87:~/idm# jar cvf ../idm.war *
    added manifest
    adding: account/(in = 0) (out= 0)(stored 0%)
    adding: account/speUserCreate.jsp(in = 1724) (out= 855)(deflated 50%)
    adding: account/loadFromFileResults.jsp(in = 2850) (out= 1143)(deflated 59%)
    adding: account/speUserDeleteResults.jsp(in = 1542) (out= 801)(deflated 48%)
    adding: account/createResults.jsp(in = 1641) (out= 807)(deflated 50%)
    adding: account/extract.jsp(in = 1625) (out= 783)(deflated 51%)
    adding: account/customModify.jsp(in = 3302) (out= 1386)(deflated 58%)
    adding: account/bulkop.jsp(in = 1459) (out= 717)(deflated 50%)
    adding: account/reprovision.jsp(in = 3245) (out= 1478)(deflated 54%)
    adding: account/resourceUnlock.jsp(in = 2961) (out= 1313)(deflated 55%)
    adding: account/modifyUserAuditPoliciesResults.jsp(in = 2675) (out= 1242)(deflated 53%)
    adding: account/doMultiUserActions.jsp(in = 25384) (out= 5613)(deflated 77%)
    adding: account/speUserDelete.jsp(in = 3159) (out= 1414)(deflated 55%)
    adding: account/renameUserResults.jsp(in = 1562) (out= 785)(deflated 49%)
    adding: account/listapplet.jsp(in = 5206
    ... 中略 ...
    adding: WEB-INF/spe/config/tiles-tab-defs.xml(in = 5872) (out= 858)(deflated 85%)
    adding: WEB-INF/spe/config/struts-tiles.tld(in = 7498) (out= 711)(deflated 90%)
    adding: WEB-INF/spe/config/struts-bean.tld(in = 8478) (out= 765)(deflated 90%)
    adding: WEB-INF/spe/config/struts-logic.tld(in = 14079) (out= 825)(deflated 94%)
    adding: WEB-INF/spe/config/struts-nested.tld(in = 68312) (out= 2226)(deflated 96%)
    adding: WEB-INF/spe/config/tiles-page-defs.xml(in = 11530) (out= 1512)(deflated 86%)
    adding: WEB-INF/spe/config/validator-rules.xml(in = 13458) (out= 1609)(deflated 88%)
    adding: WEB-INF/web.xml(in = 24159) (out= 4333)(deflated 82%)
    adding: wsdl/(in = 0) (out= 0)(stored 0%)
    adding: wsdl/LHPasswordSync.wsdl(in = 3733) (out= 690)(deflated 81%)
    root@domU-12-31-39-00-5C-87:~/idm# 
    root@domU-12-31-39-00-5C-87:~/idm# 
    
  3. 作成した war ファイルをデプロイ(配備)します。
    root@domU-12-31-39-00-5C-87:~/idm# pwd
    /root/idm
    root@domU-12-31-39-00-5C-87:~/idm# cd ..
    root@domU-12-31-39-00-5C-87:~# ls
    ec2sun  idm  idm.war
    root@domU-12-31-39-00-5C-87:~# /usr/appserver/bin/asaaddmin deploy idm.war 
    Please enter the admin user name>admin
    Please enter the admin password>
    root@domU-12-31-39-00-5C-87:~# 
    

Identity Managerの初期設定ファイルの読み込み

  1. デプロイ(配備)したIdentity Managerの状況を確認します。
  2. デプロイされたディレクトリに移動します。
    root@domU-12-31-39-00-5C-87:/export/home/product/IDM_8_1_0_0# cd /var/appserver/domains/do
    main1/applications/j2ee-modules/idm/bin/
    
  3. lh コマンドが使えるように設定します。(実行権の付与と、WSHOMEの設定)
    root@domU-12-31-39-00-5C-87:/var/appserver/domains/domain1/applications/j2ee-modules/idm/biin# pwd
    /var/appserver/domains/domain1/applications/j2ee-modules/idm/bin
    root@domU-12-31-39-00-5C-87:/var/appserver/domains/domain1/applications/j2ee-modules/idm/biin# ls -ltr
    total 15
    drwxr-xr-x 3 root root    5 2009-05-29 06:41 solaris
    -rw-r--r-- 1 root root 4423 2009-05-29 06:41 lh.bat
    drwxr-xr-x 2 root root   24 2009-05-29 06:41 winnt
    -rw-r--r-- 1 root root 4495 2009-05-29 06:41 lh
    drwxr-xr-x 2 root root    4 2009-05-29 06:41 linux
    root@domU-12-31-39-00-5C-87:/var/appserver/domains/domain1/applications/j2ee-modules/idm/biin# chmod 744 lh
    root@domU-12-31-39-00-5C-87:/var/appserver/domains/domain1/applications/j2ee-modules/idm/biin# ./lhlh
    WSHOME must be set!
    root@domU-12-31-39-00-5C-87:/var/appserver/domains/domain1/applications/j2ee-modules/idm/biin# export WSHOME=/var/appserver/domains/domain1/applications/j2ee-modules/idm/lh
    
  4. lh import コマンドを使用して初期設定ファイルを読み込みます。
    root@domU-12-31-39-00-5C-87:/var/appserver/domains/domain1/applications/j2ee-modules/idm/biin# lh import /var/appserver/domains/domain1/applications/j2ee-modules/idm/sample/init.xml  
    DB Server @ jdbc:hsqldb:hsql://127.0.0.1:42569/idm
    WARNING: No UserUIConfig object in repository.
    Including file 'sample/sysconfig.xml'.
    Default encryption set. Server encryption keys re-encrypted.
    Restored Configuration:System Configuration
    Including file 'sample/certdata.xml'.
    Restored UserForm:CertificateDataMainForm
    Restored UserForm:CertificateDataAddCertForm
    Restored UserForm:CertificateDataForm
    Including file 'sample/changelogconfig.xml'.
    Restored Configuration:ChangeLog Configuration
    Including file 'sample/authtypes.xml'.
    Restored Configuration:AuthorizationTypes
    Including file 'sample/admingroups.xml'.
    Restored AdminGroup:Admin
    Restored AdminGroup:List Admin Roles
    Restored AdminGroup:Connect Admin Roles
    Restored AdminGroup:Admin Role Administrator
    Restored AdminGroup:Approver Administrator
    ... 中略 ...
    Restored UserForm:Warehouse Workflow SLA Results Form
    Restored UserForm:Warehouse Summary Form
    Restored UserForm:Warehouse Summary Results Form
    Restored TaskDefinition:Data Warehouse Exporter
    Restored TaskDefinition:Data Warehouse Exporter Launcher
    Restored TaskSchedule:Data Warehouse Exporter
    Restored UserForm:Database Connection Configuration
    Restored UserForm:Database Connection Edit
    Restored Configuration:DatabaseConnection
    Added TaskDefinition:Check Warehouse Availability
    Added TaskDefinition:Warehouse Cycle Complete
    Added TaskDefinition:Warehouse Cycle Complete - Prune by Cycle
    Added TaskDefinition:Warehouse Cycle Complete - Prune by Age
    Added Subject to TaskSchedule: User Deferred Task Scanner
    root@domU-12-31-39-00-5C-87:/var/appserver/domains/domain1/applications/j2ee-modules/idm/biin# 
    

動作確認

  1. ウェブブラウザで、<EC2 インスタンスのパブリックDNS>/idm にアクセスします。
  2. 以下のように表示されればOKです。
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact