3Scale产品技术和部署方案说明v1 1
3Scale产品技术和部署方案说明v1 1
3Scale产品技术和部署方案说明v1 1
产品技术和部署方案说明
Red Hat 3Scale API 管理平台
Table of Contents
Containers Network
Different Configuration
scenarios for how network is
Containers involved in AMP and dependencies configured
Support Matrix
Support Provided
RED HAT 3SCALE API MANAGEMENT:
ARCHITECTURE OVERVIEW
3Scale API 管理平台 Overview
API 管理平台
API 使用人 API 管理员
System
( 应用开发 ) (LOB/PM,
Developers, Writers,
API 开发者门户 配置信息 API 管理门户 Ops)
● API Provider ● Dashboard
Branded Backend ● Developer /
● API Description Application / Key
● Signup Management
● ActiveDocs (OAS) ● CMS
鉴权 & 用量报告 ● Analytics
● Billing
Config / Authorize
API API
Gateway Manager
Config / Authorize
API API
Gateway Manager
Config / Authorize
API API
Gateway Manager
Config / Authorize
API API
Gateway Manager
(Openshift)
客户应用使用任意方式部署
API 管理平台全部运行在 Openshift 容器云平台上
离线部署 3 : API Backend and API Gateway
outside of OpenShift
Real Time Admin
Portal
API Backend
Config / Authorize
API Gateway API
Manager
(Native/Docker)
system-*
apicast-
production
redi mysq memcach sphinx sideki resqu pro dev
s l e q e . .
apicast-staging
backend-*
memcache
provider sphinx sidekiq system
系统
d
-redis
backend
listener cron worker
-
redis
网关
apicast-
*
3Scale 模块功能详解(待补充)
使用 OpenShift 部署 3Scale 的推荐系统配置
Openshift 容器平台测试推荐配置
- 3 Master 主控节点
- 2 Infra 系统节点(软负载均衡,内部容器仓库)
- 3 个或以上应用节点 Nodes
- 4~8 vCPU
- 32~64 GB Memory
- GE 网络
- 256GB vDisk
- NFS 存储(持久化数据)
18
3Scale 容量预估
AMP 2.1 on OpenShift 3.5 测试结果
OCP Cluster Definition Notes
● The vCPU numbers shown for AMP do not include vCPU dedicated to OpenShift cluster
“infrastructure”, they include just the cores for the routers and for the compute nodes where
the AMP platform is deployed
○ If you want the total number of vCPU required for the whole OCP cluster, you should
add the vCPU for the OpenShift infrastructure nodes.
● The routers could potentially be leveraged across multiple applications, but for simplicity we
have counted them as dedicated for 3scale AMP
● You may ask: “Why are the HW configs the same and it’s the system configuration that
enables higher performance between some options?”
○ The reason is that the Standard configuration is defined to allow running the solution
on minimal hardware for evaluation and POC reasons - making the OOTB experience
much simpler in those cases.
● The OCP cluster was deployed following this OpenShift Reference architecture guide
● Configuration
• HTTPS for incoming API traffic
• OCP terminating SSL in the HA Proxy routers
• No SSL for internal traffic to MySQL and Redis
• No OAuth
Test Setup
Instance Types Deployed:
2M 23
5M 57 2x 4 1x 8 12 666
c4.large c4.2xlarge
2x 4 3x 24 28 4314
NOTE: These AMP 2.1 tests are run on different
c4.large instance types as those
c4.2xlarge OSD deploys, but the same
instance types as AMP 2.0 testing below - to allow a AMP 2.0 to AMP 2.1 comparison
3Scale 认证和链接建立流程(初稿)
OIDC with 3pty IdP and RH-SSO as broker (based on OAuth authorization code flow)
3scale API
user application API gateway RH SSO 3pty IDP
manager
uses application Application requires
user data
302 Redirect
GET /authorize GET /auth
302 Redirect
GET login page
User is authenticated in
POST with login and password 3rd party IdP
302 Redirect
GET redirect_uri?code=...
POST /token
/token
code is valid
User is authenticated in
application access token and id-token
access token and id-token
access_token stored in
API Gateway cache
25
RED HAT 3SCALE
组网实例
域名
API team
API Backend
Notification emails
From:
[email protected]
om
API
API calls
Manager
staging endpoint Auth calls Admin portal
Built-In api-
staging.mydomain.com
mycompany-
admin.mydomain.com
API
Gateway
Developer portal
s production endpoint
developer.mydomain.
api.mydomain.com Email Server com
FIREWALL
客户网络
LB
Openshift
Apicast GW Openshift Openshift
Openshift
infra-node infra-node
node
3scale-AMP 3scale-AMP
Apicast GW
router router
Open ports, 80
and 443 to the
LB.
FIREWALL
Open ports for
apicast.
DMZ
LB
(haproxy,
Apicast GW f5.. )
Internal routers
异地部署,容灾 FIREWALL
DMZ
LB
docker/ docker/
native native
API LB
(haproxy,
f5.. )
RRDNS
3Scale 3Scale
AMP AMP
RED HAT 3SCALE 管理平台
官方支持的部署方式
3scale Component Platform Component Support Provided
linkedin.com/company/red-hat twitter.com/RedHatNews
youtube.com/user/
RedHatVideos
DEPLOYING ON OPENSHIFT
DEDICATED
Deploying AMP 2.1 on OpenShift Dedicated
Constraints
- Openshift Dedicated (currently) does not support Persistent Volumes with RWX
- Due to Openshift Dedicated Security Policies Wildcard Routes are disabled.
Requirements
- Routes must be created manually
- Use Alternative Deployment Template: amp-s3.yml
- 3 Persistent Volumes (RWO permissions) are needed for Redis and MySQL persistence
- Use AWS S3 Bucket for shared storage of CMS assets
- You need AWS Account with S3 Service and Buckets
35
Deploying AMP 2.1 on OpenShift Dedicated
New deployment variables
- FILE_UPLOAD_STORAGE: Indicates where to store the CMS uploaded files.
Possible values: filesystem or s3.
Default: filesystem.
Observations:
- The AWS credentials are stored in the cluster as an Openshift Secret (aws-auth).
- The product has been validated on Openshift Dedicated (v3.5.5.31) Base Package.
- All the PVs and new variables are taken care by amp-s3.yml template.
36
Deploying AMP 2.1 on OpenShift Dedicated
Deploy Command
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::targetBucketName",
"arn:aws:s3:::targetBucketName/*"
]
}
]
38 }
Deploying AMP 2.1 on OpenShift Dedicated
S3 Deployment Verification
● https://<aws-region>.amazonaws.com/<aws-bucket-name>/provider-name/2017/09/27/random-
file.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<aws-secret-id>
%2F20170927%2F<aws-region>%2Fs3%2Faws4_request&X-Amz-Date=20170927T133221Z&X-
Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-
Signature=626850e5fec0ce62bd6a1ac6e47d81ab52642a52b3a1518bc780959e2c916b90
39