3scaleをインストールしてみよう!

2019年5月10日(金)
杉本 拓

はじめに

前回の記事では、APIとAPI管理の基本的なことについて説明し、オープンソースのAPI管理製品である3scaleをご紹介しました。本記事では、API管理基盤となる3scaleのインストール方法をご紹介したいと思います。

前回記事にもある通り3scaleのソースコードはGitHubで公開され、コミュニティによる開発が進められています。3scaleを構成する主要モジュールは5つ(APIcast、Porta、Apisonator、Pisoni、Zync)あり、そこで使用されるシステムコンポーネントはすべてコンテナとして動作します。3scaleをインストールできる環境には、Kubernetesをベースとしたオープンソースのコンテナ管理プラットフォームであるOpenShiftがあります。

今回は簡単にインストールできるオールインワン構成のOpenShiftであるMinishiftを使って、3scaleの環境を構築していきます。

Minishiftのインストール

今回使用する環境はMacBook Pro(メモリ16GB)、macOS Sierra(10.12.6)ですが、他の環境の方は適宜読み替えて頂ければと思います。macOSでは、Homebrewを使用してMinishiftを簡単にインストールできます。なお、Minishiftのインストールと設定に関する情報の詳細は、「Overview - Getting Started | Minishift | OKD Latest」にも記載されています。

1$ brew cask install minishift
2$ brew cask install minishift
3 ...
4==> Installing Cask minishift
5==> Linking Binary 'minishift' to '/usr/local/bin/minishift'.
6 
7🍺 minishift was successfully installed!
8$ minishift version
9minishift v1.32.0+009893b

Minishiftのインストールが完了したら、さっそくMinishiftを起動してみましょう。なお、3scaleをローカルで動かす場合、Minishiftには最低でも6GB程度のメモリと2コア以上のCPUを割り当てた方がよいため、「–memory 6GB –cpus 2」のオプションを付けてMinishiftを起動します。

001$ minishift start --memory 6GB --cpus 2
002-- Starting profile 'minishift'
003-- Check if deprecated options are used ... OK
004-- Checking if https://github.com is reachable ... OK
005-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
006-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
007-- Checking if requested hypervisor 'xhyve' is supported on this platform ... OK
008-- Checking if xhyve driver is installed ...
009   Driver is available at /usr/local/bin/docker-machine-driver-xhyve
010   Checking for setuid bit ... OK
011-- Checking the ISO URL ... OK
012-- Downloading OpenShift binary 'oc' version 'v3.11.0'
013 53.27 MiB / 53.27 MiB [============================================] 100.00% 0s-- Downloading OpenShift v3.11.0 checksums ... OK
014-- Checking if provided oc flags are supported ... OK
015-- Starting the OpenShift cluster using 'xhyve' hypervisor ...
016-- Minishift VM will be configured with ...
017   Memory:    6 GB
018   vCPUs :    2
019   Disk size: 20 GB
020 
022 355.00 MiB / 355.00 MiB [==========================================] 100.00% 0s
023-- Starting Minishift VM .......................... OK
024-- Checking for IP address ... OK
025-- Checking for nameservers ... OK
026-- Checking if external host is reachable from the Minishift VM ...
027   Pinging 8.8.8.8 ... OK
028-- Checking HTTP connectivity from the VM ...
029   Retrieving http://minishift.io/index.html ... OK
030-- Checking if persistent storage volume is mounted ... OK
031-- Checking available disk space ... 1% used OK
032-- Writing current configuration for static assignment of IP address ... OK
033   Importing 'openshift/origin-control-plane:v3.11.0' . CACHE MISS
034   Importing 'openshift/origin-docker-registry:v3.11.0' . CACHE MISS
035   Importing 'openshift/origin-haproxy-router:v3.11.0' . CACHE MISS
036-- OpenShift cluster will be configured with ...
037   Version: v3.11.0
038-- Pulling the OpenShift Container Image ................. OK
039-- Copying oc binary from the OpenShift container image to VM ... OK
040-- Starting OpenShift cluster ...............................................................
041Getting a Docker client ...
042Checking if image openshift/origin-control-plane:v3.11.0 is available ...
043Pulling image openshift/origin-cli:v3.11.0
044E0408 01:31:40.268974    4405 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-cli:v3.11.0 anonymously
045Image pull complete
046Pulling image openshift/origin-node:v3.11.0
047E0408 01:31:44.115175    4405 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-node:v3.11.0 anonymously
048Pulled 5/6 layers, 86% complete
049Pulled 6/6 layers, 100% complete
050Extracting
051Image pull complete
052Checking type of volume mount ...
053Determining server IP ...
054Using public hostname IP 192.168.64.3 as the host IP
055Checking if OpenShift is already running ...
056Checking for supported Docker version (=>1.22) ...
057Checking if insecured registry is configured properly in Docker ...
058Checking if required ports are available ...
059Checking if OpenShift client is configured properly ...
060Checking if image openshift/origin-control-plane:v3.11.0 is available ...
061Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
062I0408 01:32:03.616396    4405 config.go:40] Running "create-master-config"
063I0408 01:32:06.457951    4405 config.go:46] Running "create-node-config"
064I0408 01:32:08.127620    4405 flags.go:30] Running "create-kubelet-flags"
065I0408 01:32:08.609311    4405 run_kubelet.go:49] Running "start-kubelet"
066I0408 01:32:08.820948    4405 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
067I0408 01:33:02.849180    4405 interface.go:26] Installing "kube-proxy" ...
068I0408 01:33:02.850063    4405 interface.go:26] Installing "kube-dns" ...
069I0408 01:33:02.850093    4405 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
070I0408 01:33:02.850120    4405 interface.go:26] Installing "openshift-apiserver" ...
071I0408 01:33:02.850184    4405 apply_template.go:81] Installing "kube-proxy"
072I0408 01:33:02.850216    4405 apply_template.go:81] Installing "openshift-apiserver"
073I0408 01:33:02.850679    4405 apply_template.go:81] Installing "kube-dns"
074I0408 01:33:02.852202    4405 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
075I0408 01:33:09.993910    4405 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
076I0408 01:35:31.084683    4405 run_self_hosted.go:242] openshift-apiserver available
077I0408 01:35:31.085655    4405 interface.go:26] Installing "openshift-controller-manager" ...
078I0408 01:35:31.085714    4405 apply_template.go:81] Installing "openshift-controller-manager"
079I0408 01:35:35.519024    4405 interface.go:41] Finished installing "openshift-controller-manager"
080Adding default OAuthClient redirect URIs ...
081Adding sample-templates ...
082Adding web-console ...
083Adding registry ...
084Adding router ...
085Adding persistent-volumes ...
086Adding centos-imagestreams ...
087I0408 01:35:35.607170    4405 interface.go:26] Installing "sample-templates" ...
088I0408 01:35:35.607205    4405 interface.go:26] Installing "openshift-web-console-operator" ...
089I0408 01:35:35.607233    4405 interface.go:26] Installing "openshift-image-registry" ...
090I0408 01:35:35.607259    4405 interface.go:26] Installing "openshift-router" ...
091I0408 01:35:35.607284    4405 interface.go:26] Installing "persistent-volumes" ...
092I0408 01:35:35.607313    4405 interface.go:26] Installing "centos-imagestreams" ...
093I0408 01:35:35.607390    4405 apply_list.go:67] Installing "centos-imagestreams"
094I0408 01:35:35.607579    4405 interface.go:26] Installing "sample-templates/mongodb" ...
095I0408 01:35:35.607607    4405 interface.go:26] Installing "sample-templates/mariadb" ...
096I0408 01:35:35.607633    4405 interface.go:26] Installing "sample-templates/mysql" ...
097I0408 01:35:35.607658    4405 interface.go:26] Installing "sample-templates/rails quickstart" ...
098I0408 01:35:35.607684    4405 interface.go:26] Installing "sample-templates/sample pipeline" ...
099I0408 01:35:35.607710    4405 interface.go:26] Installing "sample-templates/postgresql" ...
100I0408 01:35:35.607736    4405 interface.go:26] Installing "sample-templates/cakephp quickstart" ...
101I0408 01:35:35.607761    4405 interface.go:26] Installing "sample-templates/dancer quickstart" ...
102I0408 01:35:35.607787    4405 interface.go:26] Installing "sample-templates/django quickstart" ...
103I0408 01:35:35.607813    4405 interface.go:26] Installing "sample-templates/nodejs quickstart" ...
104I0408 01:35:35.607839    4405 interface.go:26] Installing "sample-templates/jenkins pipeline ephemeral" ...
105I0408 01:35:35.607998    4405 apply_list.go:67] Installing "sample-templates/jenkins pipeline ephemeral"
106I0408 01:35:35.608505    4405 apply_template.go:81] Installing "openshift-web-console-operator"
107I0408 01:35:35.608895    4405 apply_list.go:67] Installing "sample-templates/postgresql"
108I0408 01:35:35.608905    4405 apply_list.go:67] Installing "sample-templates/sample pipeline"
109I0408 01:35:35.609191    4405 apply_list.go:67] Installing "sample-templates/cakephp quickstart"
110I0408 01:35:35.609421    4405 apply_list.go:67] Installing "sample-templates/dancer quickstart"
111I0408 01:35:35.609780    4405 apply_list.go:67] Installing "sample-templates/django quickstart"
112I0408 01:35:35.610015    4405 apply_list.go:67] Installing "sample-templates/nodejs quickstart"
113I0408 01:35:35.610360    4405 apply_list.go:67] Installing "sample-templates/mysql"
114I0408 01:35:35.610546    4405 apply_list.go:67] Installing "sample-templates/rails quickstart"
115I0408 01:35:35.610602    4405 apply_list.go:67] Installing "sample-templates/mongodb"
116I0408 01:35:35.610832    4405 apply_list.go:67] Installing "sample-templates/mariadb"
117I0408 01:35:58.012747    4405 interface.go:41] Finished installing "sample-templates/mongodb" "sample-templates/mariadb" "sample-templates/mysql" "sample-templates/rails quickstart" "sample-templates/sample pipeline" "sample-templates/postgresql" "sample-templates/cakephp quickstart" "sample-templates/dancer quickstart" "sample-templates/django quickstart" "sample-templates/nodejs quickstart" "sample-templates/jenkins pipeline ephemeral"
118I0408 01:36:29.534909    4405 interface.go:41] Finished installing "sample-templates" "openshift-web-console-operator" "openshift-image-registry" "openshift-router" "persistent-volumes" "centos-imagestreams"
119Login to server ...
120Creating initial project "myproject" ...
121Server Information ...
122OpenShift server started.
123 
124The server is accessible via web console at:
126 
127You are logged in as:
128    User: developer
129    Password: <any value>
130 
131To login as administrator:
132    oc login -u system:admin
133 
134 
135-- Exporting of OpenShift images is occuring in background process with pid 3258.

上記のようなメッセージが表示されていればOpenShiftは無事に起動しています。ログに表示されているURL(上記であればhttps://192.168.64.3:8443/console)にアクセスしてOpenShiftの管理コンソールにアクセスすることもできますが、ここでは3scaleのインストールを進めましょう。

3scaleのインストール

3scaleをインストールする前の下準備

3scaleの実行環境はOpenShiftのテンプレートとして提供されており、3scaleの環境構築担当者はそのテンプレートを用いて簡単に3scaleの実行環境を構築できるようになっています。3scaleのGitHubにはいくつかのテンプレートが用意されていますが、今回は評価用のテンプレート(amp-eval-tech-preview.yml)を使用しますので、事前にファイルをダウンロードしておきます。

2$ cd 3scale-amp-openshift-templates/amp/
3$ ls
4amp-eval-tech-preview.yml   amp.yml
5amp-ha-tech-preview.yml     system-oracle
6amp-s3.yml

3scaleのOpenShiftテンプレートを使用して3scaleをインストールするには、OpenShiftのCLIツールであるocコマンドを使用します。Minishiftをインストールするとocコマンドも一緒にインストールされますがPATHが通っていないため、以下のコマンドを使用してPATHを通します。

01$ minishift oc-env
02export PATH="/Users/taku/.minishift/cache/oc/v3.11.0/darwin:$PATH"
03# Run this command to configure your shell:
04# eval $(minishift oc-env)
05 
06$ eval $(minishift oc-env)
07 
08$ oc version
09oc v3.11.0+0cbc58b
10kubernetes v1.11.0+d4cacc0
11features: Basic-Auth

ocコマンドの設定が完了したら、まずはadminユーザとしてOpenShiftにログインします。

01$ oc login -u system:admin                                   [~]
02Logged into "https://192.168.64.3:8443" as "system:admin" using existing credentials.
03 
04You have access to the following projects and can switch between them with 'oc project <projectname>':
05 
06    default
07    kube-dns
08    kube-proxy
09    kube-public
10    kube-system
11  * myproject
12    openshift
13    openshift-apiserver
14    openshift-controller-manager
15    openshift-core-operators
16    openshift-infra
17    openshift-node
18    openshift-service-cert-signer
19    openshift-web-console
20 
21Using project "myproject".

デフォルトで複数のOpenShiftプロジェクトが作られていますが、ここでは3scaleインストール用のプロジェクトを作成し、そこに3scaleの実行環境を構築していきましょう。

1$ oc new-project 3scale
2Now using project "3scale" on server "https://192.168.64.3:8443".

3scaleのコンテナイメージはregistry.redhat.ioにあるものを使用する必要があります。そのレジストリにアクセスするためにRegistry Service Accountを使用しますので、Registry Service Accountsのページでサービスアカウントを作成してください(Red Hatのアカウントがない場合にはRed Hatアカウントも作成してください)。

レジストリサービスのアカウントが用意できたら、以下のコマンドでdocker-registryのシークレットを作成します。なお、your-registry-service-account-usernameとyour-registry-service-account-passwordの値はRegistry Service Accountsのページに表示されているものと置き換えてください。

1$ oc create secret docker-registry threescale-registry-auth \
2  --docker-server=registry.redhat.io \
3  --docker-username="your-registry-service-account-username" \
4  --docker-password="your-registry-service-account-password"

Registry Service Accountsの作成については、オンラインマニュアルも参照ください。

以上で準備は完了です。

3scaleのインストール

それでは、いよいよ3scaleをインストールしていきましょう。OpenShiftテンプレートを使用してアプリケーションをOpenShiftにデプロイするには「oc new-app」コマンドを使用します。以下のように引数を指定してoc new-appコマンドを実行すると、3scaleのOpenShiftテンプレートのデプロイが開始されます。

001$ oc new-app \
002>    --param WILDCARD_DOMAIN="192.168.64.3.nip.io" \
003>    --param AMP_RELEASE=2.4.0 \
004>    -f amp-eval-tech-preview.yml
005--> Deploying template "3scale/3scale-api-management-eval" for "amp-eval-tech-preview.yml" to project 3scale
006 
007     3scale API Management
008     ---------
009     3scale API Management main system (Evaluation)
010 
011     Login on https://3scale-admin.192.168.64.3.nip.io as admin/2nnlaew6
012 
013     * With parameters:
014        * AMP_RELEASE=2.4.0
015        * APP_LABEL=3scale-api-management
016        * TENANT_NAME=3scale
017        * RWX_STORAGE_CLASS=null
018        * AMP_BACKEND_IMAGE=registry.access.redhat.com/3scale-amp24/backend
019        * AMP_ZYNC_IMAGE=registry.access.redhat.com/3scale-amp24/zync
020        * AMP_APICAST_IMAGE=registry.access.redhat.com/3scale-amp24/apicast-gateway
021        * AMP_ROUTER_IMAGE=registry.access.redhat.com/3scale-amp22/wildcard-router
022        * AMP_SYSTEM_IMAGE=registry.access.redhat.com/3scale-amp24/system
023        * POSTGRESQL_IMAGE=registry.access.redhat.com/rhscl/postgresql-95-rhel7:9.5
024        * MYSQL_IMAGE=registry.access.redhat.com/rhscl/mysql-57-rhel7:5.7
025        * MEMCACHED_IMAGE=registry.access.redhat.com/3scale-amp20/memcached
026        * IMAGESTREAM_TAG_IMPORT_INSECURE=false
027        * REDIS_IMAGE=registry.access.redhat.com/rhscl/redis-32-rhel7:3.2
028        * MySQL User=mysql
029        * MySQL Password=8n36wn6d # generated
030        * MySQL Database Name=system
031        * MySQL Root password.=she4ce04 # generated
032        * SYSTEM_BACKEND_USERNAME=3scale_api_user
033        * SYSTEM_BACKEND_PASSWORD=ibgvd7do # generated
034        * SYSTEM_BACKEND_SHARED_SECRET=bpdfox8f # generated
035        * SYSTEM_APP_SECRET_KEY_BASE=b1184ac4b2e0ba2055708dca3e3d34c37c30523550668ae2170dd0046e4b1e4160224b272bbedbdc6e4b7da4a707864e07b0e656b105a7148b3dd4e6a7117584 # generated
036        * ADMIN_PASSWORD=2nnlaew6 # generated
037        * ADMIN_USERNAME=admin
038        * ADMIN_ACCESS_TOKEN=di3i1riwy2usdrvg # generated
039        * MASTER_NAME=master
040        * MASTER_USER=master
041        * MASTER_PASSWORD=7balbbmq # generated
042        * MASTER_ACCESS_TOKEN=b12vpaw0 # generated
043        * RECAPTCHA_PUBLIC_KEY=
044        * RECAPTCHA_PRIVATE_KEY=
045        * PostgreSQL Connection Password=KxcgDuRNK3vg4uqU # generated
046        * ZYNC_SECRET_KEY_BASE=gCGhfB4vi4a73QAg # generated
047        * ZYNC_AUTHENTICATION_TOKEN=ELbAXPr32vlmvupx # generated
048        * APICAST_ACCESS_TOKEN=ylhn5hh2 # generated
049        * APICAST_MANAGEMENT_API=status
050        * APICAST_OPENSSL_VERIFY=false
051        * APICAST_RESPONSE_CODES=true
052        * APICAST_REGISTRY_URL=http://apicast-staging:8090/policies
053        * WILDCARD_DOMAIN=192.168.64.3.nip.io
054        * WILDCARD_POLICY=None
055 
056--> Creating resources ...
057    imagestream.image.openshift.io "amp-backend" created
058    imagestream.image.openshift.io "amp-zync" created
059    imagestream.image.openshift.io "amp-apicast" created
060    imagestream.image.openshift.io "amp-wildcard-router" created
061    imagestream.image.openshift.io "amp-system" created
062    imagestream.image.openshift.io "postgresql" created
063    deploymentconfig.apps.openshift.io "backend-redis" created
064    service "backend-redis" created
065    configmap "redis-config" created
066    persistentvolumeclaim "backend-redis-storage" created
067    deploymentconfig.apps.openshift.io "system-redis" created
068    persistentvolumeclaim "system-redis-storage" created
069    deploymentconfig.apps.openshift.io "backend-cron" created
070    deploymentconfig.apps.openshift.io "backend-listener" created
071    service "backend-listener" created
072    route.route.openshift.io "backend" created
073    deploymentconfig.apps.openshift.io "backend-worker" created
074    configmap "backend-environment" created
075    secret "backend-internal-api" created
076    secret "backend-redis" created
077    secret "backend-listener" created
078    deploymentconfig.apps.openshift.io "system-mysql" created
079    configmap "mysql-main-conf" created
080    configmap "mysql-extra-conf" created
081    persistentvolumeclaim "mysql-storage" created
082    deploymentconfig.apps.openshift.io "system-memcache" created
083    persistentvolumeclaim "system-storage" created
084    service "system-provider" created
085    service "system-master" created
086    service "system-developer" created
087    route.route.openshift.io "system-provider-admin" created
088    route.route.openshift.io "system-master" created
089    route.route.openshift.io "system-developer" created
090    service "system-mysql" created
091    service "system-redis" created
092    service "system-sphinx" created
093    service "system-memcache" created
094    configmap "system" created
095    configmap "smtp" created
096    configmap "system-environment" created
097    deploymentconfig.apps.openshift.io "system-app" created
098    deploymentconfig.apps.openshift.io "system-sidekiq" created
099    deploymentconfig.apps.openshift.io "system-sphinx" created
100    secret "system-events-hook" created
101    secret "system-redis" created
102    secret "system-master-apicast" created
103    secret "system-database" created
104    secret "system-seed" created
105    secret "system-recaptcha" created
106    secret "system-app" created
107    secret "system-memcache" created
108    deploymentconfig.apps.openshift.io "zync" created
109    deploymentconfig.apps.openshift.io "zync-database" created
110    service "zync" created
111    service "zync-database" created
112    secret "zync" created
113    deploymentconfig.apps.openshift.io "apicast-staging" created
114    deploymentconfig.apps.openshift.io "apicast-production" created
115    service "apicast-staging" created
116    service "apicast-production" created
117    route.route.openshift.io "api-apicast-staging" created
118    route.route.openshift.io "api-apicast-production" created
119    configmap "apicast-environment" created
120    secret "apicast-redis" created
121    deploymentconfig.apps.openshift.io "apicast-wildcard-router" created
122    service "apicast-wildcard-router" created
123    route.route.openshift.io "apicast-wildcard-router" created
124--> Success
125    Access your application via route 'backend-3scale.192.168.64.3.nip.io'
126    Access your application via route '3scale-admin.192.168.64.3.nip.io'
127    Access your application via route 'master.192.168.64.3.nip.io'
128    Access your application via route '3scale.192.168.64.3.nip.io'
129    Access your application via route 'api-3scale-apicast-staging.192.168.64.3.nip.io'
130    Access your application via route 'api-3scale-apicast-production.192.168.64.3.nip.io'
131    Access your application via route 'apicast-wildcard.192.168.64.3.nip.io'
132    Run 'oc status' to view your app.

3scaleのコンテナはAPIゲートウェイ(APIcast)、管理ポータル、デベロッパーポータル、データベース、cron、インデックスエンジンなど役割ごとにKubernetesのPodとして個別にデプロイされており、それぞれ必要に応じて柔軟にスケールアウトできるモジュール構成となっています。すべてのPodのデプロイが完了するまで若干時間がかかりますので、すべてのPodが起動するまで少し待ちましょう(3scale 2.4では全部で15のPodがあります)。

OpenShiftの管理コンソールにアクセスして3scaleのプロジェクトを表示すると、そのステータスを確認できます。図1はすべてのPodがデプロイされ、3scaleの実行環境ができた状態を示しています。

OpenShift管理コンソールURL
https://$(minishift-ip):8443/console/project/3scale/overview

図1:すべてのPodがデプロイされ、3scaleの実行環境ができた状態

インストールが完了したら、さっそく3scaleが正しく動いているかどうか確認していきましょう。以下のURLにアクセスし、3scaleの管理ログイン画面を表示させます。

3scale管理コンソールURL
https://3scale-admin.$(minishift ip).nip.io/

ログインユーザ名は「admin」、パスワードは3scaleのOpenShiftテンプレートをデプロイした時のログに以下のように出力されています。パスワードは自動生成されるので、ログインする時にはその値を使用してください。

1...
2        * ADMIN\_PASSWORD=2nnlaew6 \# generated
3        * ADMIN\_USERNAME=admin
4...

ログインすると図2のように、3scaleの仕組みを簡単に紹介するWizard画面が表示されます。

図2:3scaleの仕組みを簡単に紹介するWizard画面

[OK, how does 3scale work?]のボタンをクリックし、まずはWizardに従って3scaleの仕組みを理解していきましょう。基本的な動作としては、APIクライアントが3scaleのAPIゲートウェイに対してリクエストを投げると、3scaleで認証や流量制御が行われ、バックエンドのAPIが呼び出されてレスポンスがAPIクライアントに返されます(図3)。

図3:Wizardに沿って3scaleの仕組みを理解していく

[Got it! Lets add my API]をクリックすると、3scaleをインストールしてすぐに試せるように、サンプルのEcho API(https://echo-api.3scale.net/)を追加できるようになっていますので、Wizardに従ってAPIを追加してみてください(図4)。

図4:Wizardに従ってサンプルのEcho APIを追加

APIの追加が完了すると図5のように3scaleの管理画面が表示され、Echo APIが追加され、呼び出されていることをグラフで確認できます。

図5:追加したEcho APIが追加され、呼び出されていることが確認できる

以上で3scaleの環境を構築できましたので、APIの管理を行っていくことができます。

おわりに

次回は3scaleのコミッターとしても活躍している日立製作所の田畑さんより、3scaleの基本機能や一般的な使い方を紹介します。

レッドハット株式会社
外資系ソフトウェアベンダーにおいて、SOA、分散システム、アジャイル開発、デジタルマーケティング、コンテンツ管理などの分野でのコンサルティング業務に従事。2016年よりRed Hatにおいて、APIとインテグレーションのソリューションアーキテクトとしてクラウド時代のインテグレーションのあり方を提案し、導入のための支援を行っている。

連載バックナンバー

Think ITメルマガ会員登録受付中

Think ITでは、技術情報が詰まったメールマガジン「Think IT Weekly」の配信サービスを提供しています。メルマガ会員登録を済ませれば、メルマガだけでなく、さまざまな限定特典を入手できるようになります。

Think ITメルマガ会員のサービス内容を見る

他にもこの記事が読まれています