Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

Fresh Espresso & Open Source Cloud


I have a passion for all things open source. I live in Ipswich MA and work for Red Hat, on the fabric8 project. Fabric8 is a cloud micro-services platform so you can deploy your applications to an all open source cloud. I kayak on the Atlantic Ocean along the coastal North East from Massachusetts to Maine whenever I can.

Kubernetes API Management importing a Camel with serious Swagger

Introduction

Not too long ago Claus Ibsen demo’ed the camel-swagger module. The camel-swagger module allows you to describe your Camel REST service using Swagger DSL. In this blogpost we converted his example to run on Kubernetes using Fabric8. After deploying the service to Kubernetes we can then import the API into the API Manager that is Apiman. Once imported the SwaggerJSON DSL is presented to API consumers in a nice viewer.

Obtaining and deploying the camel-swagger quickstarts

It is assumed you have a running Fabric8 instance running on Openshift 3 with Apiman deployed. Check this post if you don’t. Next, fork and clone the ipaas-quickstarts repository

git clone https://github.com/fabric8io/ipaas-quickstarts

To deploy the quickstart login to your Kubernetes master and invoke the f8-local-deploy profile running maven

oc login <your master>
cd ipaas-quickstarts/quickstarts/cdi/camel-swagger
mvn -Pf8-local-deploy

Show the camel-swagger API from the Apiman API Catalog

In the Fabric8 console look up the Apiman Application and find the link to the Apiman Console (look for apiman.vagrant.f8, if vagrant.f8 is your Kubernetes domain.

apiman catalog.png

The catalog display all services running on Kubernetes and you can start an import into Apiman right from the catalog to make this service available as a managed service. Also you can view the API description right from the Catalog.

apiman swagger.png

Conclusion

The old Camel learned a new trick and can describe its RESTful service using SwaggerJSON. Apiman can import the SwaggerJSON DSL document and present service consumers with a central API Catalog from where the service description can be viewed in the nice Swagger editor/viewer.


About the author

Kurt Stam


Discussions

comments powered by Disqus