Article
· Avr 19, 2022 2m de lecture

Comment gérer une configuration InterSystems API Manager (IAM ; i.e : Kong GATEWAY) 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 ping
deck ping   
Successfully connected to Kong!
Kong version:  2.3.3.2-enterprise-edition
  • Exporter la configuration de Kong Gateway dans un fichier "kong.yaml" via deck dump
deck dump
  • Après avoir modifié le kong.yaml, afficher les différences via 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
  • Appliquez les modifications via 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

 

Pour plus d'informations :

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

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

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