LoginSignup
3
0

More than 1 year has passed since last update.

DataPower Gateway for DockerをPodmanで動かす

Posted at

はじめに

DataPower Gatewayは、DataPower Gateway for DockerとしてDockerイメージが提供されています。このDockerイメージをDockerで動作させる方法については、次の記事で説明されています。

Docker版のIBM DataPower GatewayをMacで動かす

Dockerは、2021年8月31日に有償化が発表されています。そこで、Dockerの代わりにPodmanでDataPower Gateway for Dockerを動かすことができるか、試してみました。なお、この記事の執筆時点では、DataPower Gateway for Dockerでは、Podmanをサポートしていません。DataPower Gatewayの手軽な学習の手段としてご利用下さい。

環境

Processor: Intel Core i5-8250U CPU @ 1.60GHz x 8
Memory: 16 GB
OS: Ubuntu 20.04.3 LTS
Podman: version 3.3.1

手順

Podmanの導入

こちらの手順に従い、Podmanを導入します。

イメージの取得

$ podman pull ibmcom/datapower
? Please select an image:
  ▸ docker.io/ibmcom/datapower:latest
    quay.io/ibmcom/datapower:latest

docker.io/ibmcom/datapower:latestを選びます。

ディレクトリの準備

$ mkdir datapower
$ cd datapower
$ mkdir config
$ mkdir local
$ mkdir certs
$ chmod -R 777 config local certs

これらのディレクトリの詳細は、こちらのページを参照して下さい。

DataPowerの起動

Podmanを使ってDataPowerを起動します。次に最小限の指定を行うコマンドの例を示します。

podman run --name datapower -it \
 -v "$(pwd)/config:/opt/ibm/datapower/drouter/config" \
 -v "$(pwd)/local:/opt/ibm/datapower/drouter/local" \
 -v "$(pwd)/certs:/opt/ibm/datapower/root/secure/usrcerts" \
 -e DATAPOWER_ACCEPT_LICENSE=true \
 -e DATAPOWER_INTERACTIVE=true \
 -p 9090:9090 \
 ibmcom/datapower

-eで追加する環境変数については、こちらのページを参照して下さい。
また、DataPowerで使うポートは、-pで追加して下さい。上記の例では、DataPowerのGUIで使う9090だけを指定しています。
ログが表示された後、

login:

と表示されます。

CLIにログイン

ユーザーadmin、パスワードadminでCLIにログインします。

login: admin
Password: *****

Welcome to IBM DataPower Gateway console configuration.
Copyright IBM Corporation 1999, 2021

Version: IDG.10.0.3.0 build 333705 on Jun 16, 2021 9:06:57 PM
Delivery type: CD
Serial number: 0000001

GUIを有効化

CLIで次のコマンドを実行しGUIを有効化します。

idg# configure terminal
Global mode
idg(config)# web-mgmt
Modify Web Management Service configuration

idg(config web-mgmt)# admin-state "enabled"
idg(config web-mgmt)# exit

GUIにログイン

FirefoxなどのWebブラウザで次のURLを開きます。
https://localhost:9090
Potential Security Risk Aheadなどが表示されますが、そのままアクセスします。するとDataPower GatawayのGUIのログイン画面が表示されます。
スクリーンショット 2021-12-29 12.00.21.png
ユーザーadmin、パスワードadminでGUIにログインします。

スクリーンショット 2021-12-29 12.01.18.png
すると、The running configuration of the device contains unsaved changes. Review changes.
と表示されています。

設定の保管

Review changesをクリックします。
スクリーンショット 2021-12-29 12.03.54.png

CUIで変更した設定を保管し忘れていたことが分かります。Save Configをクリックして設定を保管します。

おわりに

DataPowerを停止するには、

$ podman stop datapower

開始するには、

$ podman start datapower

を実行します。

ディレクトリにファイルが追加されていることを確認してみます。

$ tree
.
├── certs
│   ├── luna_cert
│   ├── webgui-privkey.pem
│   └── webgui-sscert.pem
├── config
│   ├── auto-startup.cfg
│   ├── auto-user.cfg
│   └── default.cfg
└── local
    └── luna_config
        ├── Chrystoki.conf
        ├── configData
        │   └── token
        │       └── 001
        └── data
            ├── client_identities
            ├── partition_identities
            └── partition_policy_templates

この記事では、Dockerの代わりにPodmanを使ってDataPower Gateway for Dockerの基本的な動作を行えることを確認しました。繰り返しとなりますが、この記事の執筆時点では、DataPower Gateway for Dockerでは、Podmanをサポートしていないので、ご注意下さい。

3
0
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
0