The new WSO2 APK for API Management - Sergain Labs

  • Home
  • The new WSO2 APK for API Management
sergain-admin September 19, 2021 2 Comments

Trying out initial release of WSO2 APK, the Kubernetes based API Management product from WSO2

Sergain Technologies places a strong emphasis on API management, utilizing WSO2’s products to implement effective solutions for clients. As one of the main WSO2 integration partners, staying up to date with the latest innovations and releases from WSO2 is crucial in order to deliver the best solutions to clients. By keeping abreast of the latest developments in WSO2’s API management offerings, the team at Sergain Technologies is able to stay ahead of the curve and provide cutting-edge solutions that address the ever-evolving needs of clients. With a deep understanding of WSO2’s API management products and best practices, the team at Sergain Technologies is well-equipped to deliver comprehensive and current solutions that meet the specific needs of each client.

Adoption of cloud native technologies are rising at lightning speed and we have noticed a significant trend among our customers of moving towards cloud native deployments. This shift is reflective of the growing adoption of cloud computing and its many benefits. By leveraging Kubernetes, organizations can automate the deployment, scaling, and management of their applications, making it easier to run their workloads in a cloud environment. In response to this trend, WSO2 started developing Ballerina which is a cloud native programming language while redesigning their products to support cloud-native and Kubernetes-based deployments.

WSO2 API Platform for Kubernetes (WSO2 APK) is the newest Kubernetes based API development platform which designed to help customers to build, deploy, and manage APIs in a cloud native environment. They have launched the initial release in December, 2022. Our team interested is excited to try out the newest platform. But couldn’t do it till they launch 0.0.1 M2 milestone two days ago. It’s very easy to setup this platform by going through their release notes. For anyone else trying WSO2 APK can refer this article which will explain our first experience with WSO2 APK.

Environment setup and prerequisites

We have used a personal laptop to try out the deployment and test the WSO2 APK product. By using Minikube, we can run a single-node Kubernetes cluster locally on a laptop, allowing us to evaluate the product without having to set up a separate testing environment.

Helm should installed in the environment as it’s a prerequisite to try out the product. Helm is a package manager for Kubernetes, which makes it easier to install, upgrade, and manage Kubernetes applications. By using Helm, we can easily manage the deployment of WSO2 APK in the Minikube cluster. WSO2 APK repository contains helm charts for the deployment and we will be using that to set up the cluster.

The allocation of CPU and memory resources for this deployment was 4 vCPUs and 8,192MB of RAM, which we thought sufficient but there were no recommendations from the WSO2 APK deployment guidelines on hardware requirements.

Installation

According to the WSO2 APK architecture, it consists of a data plane and control plane which allow clear separation between runtime and management aspects. There are around 12 docker images pushed to WSO2 docker registry and released helm charts refer to those images.

The first step is to create a namespace named apk to install APK components

kubectl create namespace apk

Installation is pretty straightforward and we just have to move to helm-charts directory of distribution and execute the helm install command. Please use the following commands.

cd /helm-charts
helm dependency build
helm install apk-test . -n apk

It started creating containers and which will download all required images to the local docker registry. According to the local container repository details, the total size of images pulled is around 2 GB. It took a few minutes for us to complete the process for the first time. But once the images were pulled, all services will be started in less than a minute. Overall installation experience is very good and positive which hides many complexities from users where they don’t need to worry about installing databases, configuring connections, mounting and etc as all of them are handled through helm.

You will see the below list of Pods are created for APK deployment.

Pod and Services List

Trying out product APIs

One thing that we realized was WSO2 APK doesn’t have plans to release user interface (UI) components along with the milestone release of APK. May be they will add the UI components in the future releases. So all the interactions with the product will need to be done through API calls.

The absence of UIs, users will need to interact with the product through a separate application or system that is able to make API calls. This can be a bit complex for first time users, as they will need to have knowledge of how to make API calls and interpret the responses in order to interact with the product. But to start with the product quickly, the WSO2 APK team provided a complete postman collection which covers all capabilities of the product. For us, it was quite easy as we have worked with WSO2 API Manager product REST APIs over the last few years while doing customer projects. To try the APIs, please follow the below steps.

Go to following directory

/test/postman-tests

Open the postman UI and load one environment and 4 collections available there. Then postman will looks like below.

Post Collection for WSO2 APK

There are few parameters you need to edit to get this work.

Deploy sample service

We will need sample service to try out the product and we couldn’t find exact instructions on how to deploy the service and links for them with scripts. But we tried the following approach and was able to make it work. Kudos to our team. Add that service name to postman scripts.

From this point onward we were able to run collections without issue. We were able to do following tasks

List all services in all clusters

It will be convenient if we can list only services available on specific namespace rather than list all services from all namespaces. It will also be good if we can have a query parameter to mention namespace and filter services based on that.

Was able to create a runtime API and obtain an access token to invoke the same

Difference between internal back office and back office is not very clear. It took some time to figured out the internal back office is something they use internally to update API details. We feel that these things should be documented clearly.

Overall, it’s a new experience to have complete separation of control plane from data plane. In this approach users need to create a runtime API first and then updates for the APIs including metadata such as documentation, descriptions etc should be updated using a control plane APIs. Most of the customer deployments are done by the same group of users.

Conclusion

Overall, the first user experience with the deployment approach is very positive and easy to follow. APK comes with benefits such as ease of deployment, lightweight gateways, and seamless user-friendly Kubernetes integration. And we feel fast booting time, scaling support, and management capabilities are ahead of older API Manager versions. You don’t need any previous experience or detailed knowledge on Kubernetes or helm to start and test the product. Even users with basic Kubernetes knowledge can deploy and test APK in their local workstation without issue. This will massively boost the productivity of the development teams.

At the same, we feel that there are some challenges understanding the new component architecture and inter-connectivity between them. Even though the gateway memory and CPU consumption is really good, the back office and other micro services are a bit bulky and consume more resources than important gateway components. The complete separation of control plane and data plane separation is a new concept for many existing users who are familiar with WSO2 API Manager.

Migrating from older WSO2 API Manager versions to new WSO2 APK isn’t clear and not discussed in the documents. We believe this is something important and the team will have a solution by the time they do a GA release.

We would like to congratulate the WSO2 for their future work with this new product and look forward to the GA release of APK.

2 Comments

Leave Comment