WSO2 APIM - api 文件部署 [英] WSO2 APIM - api file deployment

查看:40
本文介绍了WSO2 APIM - api 文件部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 puppet 部署 WSO2 APIM 2.1.0,我们也考虑使用 CICD 部署 API 本身.

deploying the WSO2 APIM 2.1.0 using puppet, we consider to deploy the API itself with the CICD as well.

理论上 - 我可以复制(模板)突触文件(代理、api)并且该 api 可用于调用,但是 - 该 API 在商店中不可见.我假设数据库中的数据不仅仅是一个突触配置文件.

In theory - I could copy (template) the synapse files (proxy, api) and the api is available for the call, however - the API is not visible in the store. I assume there's more data in the database than just a synapse config file.

有没有办法使用配置文件定义/部署 API(包括到商店),或者需要手动完成?

Is there a way to define / deploy API (including to the store) using the configuration files or it needs to be done manually?

我认为有一种方法可以使用 API 管理服务来部署 API.但是当使用元数据 XML 调用 addAPI 时,看起来没问题.但是试图在发布者中查看 API 抛出异常

I thought there's a way to deploy API using the API Admin Services. But when calling addAPI with the metadata XML, looks ok. But trying to see the API in the publisher throws an exception

<代码>错误 - 索引:jag org.wso2.carbon.apimgt.api.APIManagementException:无法在数据库中找到 API:admin-myapi-v1.0.0

谢谢你的提示

g.

推荐答案

根据您的要求,您似乎可以使用以下选项之一.

Based on your requirements it looks like you can use one of the following options.

  1. 迁移 API - 您可以从一个环境导出 API,然后将这些 API 导入新环境.当您在新环境中导入 API 时,这些 API 将处于已创建状态.您需要手动发布这些 API.可能正在使用 jaggery API 或 REST API,您将能够发布 API.

  1. Migrate APIs - You can export APIs from one environment and import those APIs to the new environment. When you import APIs in the new environment, those APIs will be in created state. You need to manually publish those APIs. May be using the jaggery API or REST API you will be able to publish the APIs.

REST API

Jaggery API - 目前已弃用,并且不鼓励使用它.

Jaggery API - This is deprecated at the moment and discourage for using this.

创建 API 后,API 相关详细信息将保存在数据库中.此外,可以在文件系统中找到突触配置.如果您将以前的数据库指向新的部署并部署突触工件,API 将起作用.但是再次 API 创建/发布和整个流程将不会被测试.对于 CICD,您需要考虑上述选项.在未来的版本中,将更多地关注 REST API,它将对 CICD 更有用.

Once you create the APIs, APIs related details will be saved in the database. Additionally, synapse configuration can be found in the file system. If you point the previous database to the new deployment and deploy the synapse artifacts, APIs will work. But then again API creation/publishing and entire flow will not be tested. For CICD, you need to consider above mentioned options. In the future releases, there is more focus towards the REST API and it will be more useful for the CICD.

这篇关于WSO2 APIM - api 文件部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆