Published on InterSystems Developer Community (https://community.intersystems.com)

主页 > 如何在CI/CD Pipeline中管理InterSystems API Manager (Kong GATEWAY)配置?

文章
Michael Lei · 四月 25, 2022 阅读大约需 2 分钟

如何在CI/CD Pipeline中管理InterSystems API Manager (Kong GATEWAY)配置?

Kong提供了一个开源的配置管理工具(用Go语言编写),称为decK(代表声明式Kong)

  • 通过deck ping检查deck是否能识别你的Kong Gateway安装
deck ping   
Successfully connected to Kong!
Kong version:  2.3.3.2-enterprise-edition
  • 通过deck dump把 Kong Gateway配置倒出到 "kong.yaml" 文件 
deck dump
  • 修改 kong.yaml以后通过deck diff 通过把区别显示出来
deck diff
updating service alerts  {
   "connect_timeout": 60000,
-  "host": "172.24.156.176",
+  "host": "192.10.10.18",
   "id": "3bdd7db4-0b75-4148-93b3-2ff11e961f64",
   "name": "alerts",
   "path": "/alerts",
   "port": 50200,
   "protocol": "http",
   "read_timeout": 60000,
   "retries": 5,
   "write_timeout": 60000
 }

Summary:
  Created: 0
  Updated: 1
  Deleted: 0
  •  通过 deck sync应用这些变化
deck sync
updating service alerts  {
   "connect_timeout": 60000,
-  "host": "172.24.156.176",
+  "host": "192.10.10.18",
   "id": "3bdd7db4-0b75-4148-93b3-2ff11e961f64",
   "name": "alerts",
   "path": "/alerts",
   "port": 50200,
   "protocol": "http",
   "read_timeout": 60000,
   "retries": 5,
   "write_timeout": 60000
 }

Summary:
  Created: 0
  Updated: 1
  Deleted: 0
deck sync -s workspace1.yaml --workspace workspace1

deck sync -s workspace2.yaml --workspace workspace2

更多信息 :

https://docs.konghq.com/deck/1.11.x/guides/getting-started/

https://docs.konghq.com/deck/1.11.x/guides/best-practices/

#API #持续交付 #持续集成 #InterSystems IRIS for Health

源 URL:https://cn.community.intersystems.com/post/%E5%A6%82%E4%BD%95%E5%9C%A8cicd-pipeline%E4%B8%AD%E7%AE%A1%E7%90%86intersystems-api-manager-kong-gateway%E9%85%8D%E7%BD%AE%EF%BC%9F