Transformation Advisor Localをインストールした時の手順メモ


1. はじめに

TomcatのJavaアプリ(VM環境)をTransformation Advisorを使ってモダナイズする 」という投稿で、利用する Transformation Advisor Localのインストールをこの投稿で記述します。

このツールの使用例については、上記ページも参照ください。

2. Transformation Advisor Localとは

まず、Transformation Advisorはオンプレミス環境で動作しているJavaのミドルウェア・アプリケーションを分析し、生成されたマイグレーションバンドルを使って、 OpenShift の Libertyコンテナ上にJavaアプリをデプロイすることができるJavaアプリケーションのモダナイズするための移行支援ツールです。 (IBMの製品です。)

そして、Transformation AdvisorはOpenShift上にインストールしますが、
今回インストールするTransformation Advisor Localは、Windows・Linux・MacOSと、ローカルPCでもインストールして、Transformation Advisorを利用することができるツールです。

詳細はこちら:IBM Cloud Transformation Advisor

仕組みとしては、ローカルPCに、DockerとDocker Composeをインストールして、Transformation Advisorのコンテナイメージを起動して、Transformation Advisorを利用します。

ローカルPCにインストールすることができるで気軽に試すことができますが、ローカルPCの性能によっては、Dockerを動かす時点で、もっさりと遅いという事が起こるかもしれません。

3. Transformation Advisor Localのインストール

今回は、Transformation Advisor Localの90日評価版をLinux ( CentOS7 )の環境にインストールする手順を確認しました。

3.1 前提

  • 導入環境:
    • VMWare ESXi 6.7 の仮想マシン( スペックは適当に設定CPU4コア, メモリ8GB, HDD 32GB)
    • OS: CentOS Linux release 7.8.2003 (Core)の Minimam Install
  • インストール手順書: Installing IBM Cloud Transformation Advisor locally

3.2 手順

DockerとDocker Composeのインストール

  • 作業環境: CentOS7.8

Dockerの導入手順 https://docs.docker.com/get-docker 
に沿って下記の手順でDockerをインストールします。


$ sudo yum install  yum-utils

# docker のyum リポジトリ追加
$ sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo

# Dockerのインストール
$sudo yum install docker-ce docker-ce-cli containerd.io

#Dockerの起動
$sudo systemctl start docker

# Dockerの動作確認
$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
0e03bdcc26d7: Pull complete
Digest: sha256:e7c70bb24b462baa86c102610182e3efcb12a04854e8c582838d92970a09f323
Status: Downloaded newer image for hello-world:latest

Docker Composeのインストール

  • 作業環境: CentOS7.8

Docker Composeの導入手順 https://docs.docker.com/compose/install/
に沿って下記の手順でDockerをインストールします。

#docker-composeコマンドのダウンロード&設置
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

#docker-composeコマンドに実行権限追加
$ sudo chmod +x /usr/local/bin/docker-compose
$ ls -l /usr/local/bin/docker-compose
-rwxr-xr-x. 1 root root 12218968 Nov 29 04:34 /usr/local/bin/docker-compose

Transformation Advisor Localのダウンロード

  • 作業環境: ローカルPC

以下のURLよりTransformation Advisor Localの90日評価版をダウンロードします。(IBMアカウントが必要になります。)
https://www.ibm.com/account/reg/signup?formid=urx-38642

ダウンロードページにて、「Transformation Advisor Localのインストールスクリプト」をダウンロードします。

Transformation Advisor Local の CentOS7.8へのインストール

  • 作業環境: CentOS7.8

事前にローカルPCから CentOS7.8の環境に、先ほどダウンロードしたTransformation Advisor Localのバイナリ「 transformationAdvisor.zip」をアップロードしてください。

そして、以下の手順でインストールします。


#必要なツールのインストール(unzipとnetstatを導入)
$ yum install -y unzip net-tools

# Transformation Advisor Localの解凍
$ unzip transformationAdvisor.zip 
$ ls
launchTransformationAdvisor.sh  LICENSE  LICENSES  scripts  transformationAdvisor.zip

インストールのために「 ./launchTransformationAdvisor.sh 」を実行します。

$ sudo ./launchTransformationAdvisor.sh
[sudo] password for dai:

Docker Compose not installed. Please install docker-compose and re-run the script.
https://docs.docker.com/compose/install/

しかし、docker-composeがインストールされていないとメッセージが表示されます。これは、sudoのsecure_pathに docker-composeのインストールされているパスが登録されていないために、発生する事象です。

下記の様にvisudoを実行して、secure_pathに「 /usr/local/bin 」を追加してください。

$ sudo visudo

(変更前)88 Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin
(変更後)88 Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

再度、「launchTransformationAdvisor.sh」を実行して、インストールプログラムを起動します。 ライセンス情報が表示され、最後に、同意するか同意しないかの選択を 同意する 1 の選択をします。

sudo ./launchTransformationAdvisor.sh
LICENSE INFORMATION

The Programs listed below are licensed under the following License Information terms and conditions in addition to the Program license
terms previously agreed to by Client and IBM. If Client does not have previously agreed to license terms in effect for the Program, the
 International License Agreement for Evaluation of Programs (Z125-5543-05) applies.

Program Name (Program Number):
IBM Cloud Transformation Advisor local 2.3.0 (Evaluation)

The following standard terms apply to Licensee's use of the Program.

' ----- 省略 ----- '

1) I have read and agreed to the license agreements
2) Don't accept the license agreements

その後、下記のようなオペレーションメニューが表示されるので、「1) Install Transformation Advisor」の 1 を入力してEnterを押してインストールを開始します。


Select the operation.......

1) Install Transformation Advisor
2) Uninstall Transformation Advisor (keep database data)
3) Uninstall Transformation Advisor (remove database data)
4) Stop Transformation Advisor
5) Start Transformation Advisor
6) Check for latest Transformation Advisor
7) Working in an Air Gapped Environment
8) Quit

その後、正常にインストールが環境すると、下記の様にTransformation AdvisorのURLが表示されます。


Installing Transformation Advisor..............
Pulling db     ... done
Pulling server ... done
Pulling ui     ... done
Creating network "scripts_default" with the default driver
Creating scripts_db_1 ... done
Creating scripts_server_1 ... done
Creating scripts_ui_1     ... done
Configuring Transformation Advisor...............................................
Status
------------------------------------------------------------------------------------------------------
Transformation Advisor 2.3.0 is available for us at the following URL> http://192.168.26.253:3000

Transformation Advisor への接続

  • 作業環境: ローカルPC

ローカルPCのブラウザにて、前手順のインストール完了時に出力されるURLに接続し、Transformation Advisorの画面が表示されることを確認します。

4. 最後に

これで Transformation Advisor を利用することができるようになりました。
今回は、 Linux環境の手順を説明しましたが、Windows・MacOSの環境でも Docker・Docker Composeが導入済みの環境ならばインストールすることができます。

Transformation Advisor の具体的な使用例は、「TomcatのJavaアプリ(VM環境)をTransformation Advisorを使ってモダナイズする 」の投稿をぜひ、ご覧ください。