Article
· Mai 30 3m de lecture

Comment gérer une configuration InterSystems API Manager dans un pipeline CI/CD ?

Kong fournit en open source un outil de gestion de ses configurations (écrit en Go), appelé decK (pour declarative Kong)

  • Vérifiez que decK reconnaît votre installation Kong Gateway via deck gateway ping
deck gateway ping   
Successfully connected to Kong!
Kong version:  3.4.3.11
  • Exporter la configuration de Kong Gateway dans un fichier "kong.yaml" via deck gateway dump
deck gateway dump -o kong.yaml
  • Après avoir modifié les adresses IP dans le fichier kong.yaml, afficher les différences via deck gateway diff
deck gateway diff kong.yaml

updating service test-iris  {
   "connect_timeout": 60000,
   "enabled": true,
-  "host": "192.168.65.1",
+  "host": "172.24.156.176",
   "id": "8fc9849d-9e61-402d-bcad-c3e611808892",
   "name": "test-iris",
   "port": 9092,
   "protocol": "http",
   "read_timeout": 60000,
   "retries": 5,
   "write_timeout": 60000
 } updating service uct  {
   "connect_timeout": 60000,
   "enabled": true,
-  "host": "192.168.65.1",
+  "host": "172.24.156.176",
   "id": "96ad587e-8921-4d6c-acb7-3f7f7a7cc072",
   "name": "uct",
   "path": "/api/uct/",
   "port": 9092,
   "protocol": "http",
   "read_timeout": 60000,
   "retries": 5,
   "write_timeout": 60000
 } Summary:
  Created: 0
  Updated: 2
  Deleted: 0
deck gateway sync kong.yaml

updating service uct  {
   "connect_timeout": 60000,
   "enabled": true,
-  "host": "192.168.65.1",
+  "host": "172.24.156.176",
   "id": "96ad587e-8921-4d6c-acb7-3f7f7a7cc072",
   "name": "uct",
   "path": "/api/uct/",
   "port": 9092,
   "protocol": "http",
   "read_timeout": 60000,
   "retries": 5,
   "write_timeout": 60000
 } updating service test-iris  {
   "connect_timeout": 60000,
   "enabled": true,
-  "host": "192.168.65.1",
+  "host": "172.24.156.176",
   "id": "8fc9849d-9e61-402d-bcad-c3e611808892",
   "name": "test-iris",
   "port": 9092,
   "protocol": "http",
   "read_timeout": 60000,
   "retries": 5,
   "write_timeout": 60000
 } Summary:
  Created: 0
  Updated: 2
  Deleted: 0
deck gateway dump --workspace workspace1
deck gateway sync workspace1.yaml --workspace workspace1

Pour plus d'informations :

https://docs.konghq.com/deck/get-started

https://docs.konghq.com/deck/reference/faq/

https://github.com/Kong/deck/blob/main/CHANGELOG.md/

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer