KubeOrbit was released, solving problems in integration testing

TeamCode OfficialTeamCode Official

The Challenges in Business Cloudification

In recent years, Cloud Native has become a popular word among developers, which represents a design concept to manage infrastructures, applications, procedures in a more automatic and cost-effective way. But there're many issues and challenges during the Cloudification of Enterprises including:

  • How to empower R&D personnel to use cloud technology easily and improve R&D efficiency.
  • How to decouple abstraction complexity, reduce cross-organizational communication, and improve team collaboration efficiency.
  • How to use the unified capabilities of the platform to clarify the organizational boundaries and optimize the organizational structure.

Take microservice integration testing as an example. It is a process of multi-party cooperation. How to call the microservice correctly is the core demand that developers and testers are concerned with most.

However, various issues arise frequently during team development and testing. The most common one is that the development team must perform integration testing of microservices on a daily basis, and a single testing environment will result in test queuing, resource constraints, etc. For example, during the launchment of a new project version, development teams have to test the different functions, causing congestion in the test environment and low team testing efficiency. Another situation is that if a service in the microservice links to an unstable feature, other services depend on this service, the entire link will be in an error. And if there are numerous microservices responsible for different teams in the test environment. A team pushes functions into the test environment, causing problems and instability in the environment and hindering the work progress of the whole QA team.


KubeOrbit solves problems in integration testing

On the basis of these problems and challenges, we design and develop KubeOrbit. It's an integration testing tool for cloud-native application that can help your team do microservice integration testing efficiently.

Cloud-Native Applications Integration Testing Tool - KubeOrbit

In the traditional team testing process, if I want to test multiple features, it requires several testing environments. How to implement multi-feature testing based on a single environment to save time and R&D costs?

KubeOrbit provides the solution: it can create test channels within your microservice test environment, so that you can get a single stable integration test environment. Add the microservices to the test channel, other Microservices of different versions are isolated. You specify a test channel when initiating a microservice request, and KubeOrbit will forward it to the test channel you specify. In this way, if an integration testing channel is set up in the test environment, service A that depends on service B can be tested in one channel, and service C can be tested in another channel.

KubeOrbit provides the solution

KubeOrbit helps users to set-up feature-based integration testing channels. The services of the different channels do not interfere with each other, and there is no need to queue up to use the test environment. It supports any Layer - 7 protocol, microservice framework, and any programming language: whether you develop microservices in Java, Python or Golang, or use HTTP or gRPC communication in architecture, you can use this product and resources can be obtained at any time without concern for the underlying details.

In addition to the simultaneous testing of multiple requirements on multiple microservices, KubeOrbit has service preemption branch testing; changes in third-party services that different business groups rely on during testing will affect the testing of this business; Under the architecture of microservices, the QA team needs a stable test environment to test all services on the test link; when multiple modules under a service are merged into the main branch, the QA team needs to test its evolution version at the same time.


Quick Experience with KubeOrbit

To begin with, you have to install kubectl and helm on your PC (As in MacOS):

Shell
1$ brew install kubectl

If you haven't install Istio in your Kubernetes cluster, you need to install it by the following command:

Shell
1$ helm repo add istio https://istio-release.storage.googleapis.com/charts
2$ helm repo update
Install KubeOrbit in your Kubernetes cluster:
Shell
1$ wget https://static01.teamcode.com/public/kubeorbit.tar.gz
2$ tar -xzvf kubeorbit.tar.gz
3$ cd kubeorbit
4$ make deploy

Shell
1namespace/orbit-system created
2customresourcedefinition.apiextensions.k8s.io/orbits.network.kubeorbit.io created
3customresourcedefinition.apiextensions.k8s.io/serviceroutes.network.kubeorbit.io created
4serviceaccount/orbit-controller-manager created
5role.rbac.authorization.k8s.io/orbit-leader-election-role created
6clusterrole.rbac.authorization.k8s.io/orbit-manager-role created
7clusterrole.rbac.authorization.k8s.io/orbit-metrics-reader created
8clusterrole.rbac.authorization.k8s.io/orbit-proxy-role created
9rolebinding.rbac.authorization.k8s.io/orbit-leader-election-rolebinding created
10clusterrolebinding.rbac.authorization.k8s.io/orbit-manager-rolebinding created
11clusterrolebinding.rbac.authorization.k8s.io/orbit-proxy-rolebinding created
12configmap/orbit-manager-config created
13service/orbit-controller-manager-metrics-service created
14deployment.apps/orbit-controller-manager created
After installing successfully, you can start to use KubeOrbit.

KubeOrbit creates channels in your Kubernetes cluster by applying new custom resources. Firstly, copy the following CRD and save it as resourcedefinition.yaml on your local machine.

Yaml
1apiVersion: network.kubeorbit.io/v1alpha1
2kind: Orbit
3metadata:
4  name: orbit-sample
5  namespace: sample-namespace
6spec:
7  # Add fields here
8  provider: istio
9  trafficRules:
10    headers:
11      version: "your-version" # Each channel needs to specify a set of key-value pairs
Then rename the version and save the file, as the example shown below:
Yaml
1apiVersion: network.kubeorbit.io/v1alpha1
2kind: Orbit
3metadata:
4  name: orbit-sample
5  namespace: sample-namespace
6spec:
7  provider: istio
8  trafficRules:
9    headers:
10      version: "v1"
Lastly, apply it to your kubernetes cluster:
Shell
1$ kubectl apply -f /path/to/your/resourcedefinition.yaml
After the channel has been created, you can start integration testing. Add a version label to your deployment and name it as the channel name:
Shell
1$ kubectl label deployment your-deployment version=base
2$ kubectl label deployment your-deployment-v1 version=v1
You can add a microservice to the target channel by defining traffic forwarding rules in spec.
Yaml
1apiVersion: network.kubeorbit.io/v1alpha1
2kind: ServiceRoute
3metadata:
4  name: serviceroute-sample
5  namespace: sample-namespace
6spec:
7  name: pod-svc
8  trafficRoutes:
9    routes:
10      - name: v1
11        labels:
12          version: v1
13        headers:
14          version:
15            exact: v1
16    default:
17      version: base
And now you forward the microservice traffic to the target testing channel successfully.


Summary and Future Plans

Currently, KubeOrbit enables users to integration test without changing the existing architecture, with characteristics of isolation and convenience, etc. It will adapt to the existing microservice, no need to adjust the existing technology stack and architecture, and it can also isolate the communication between different test channels. The process of creating and deleting test channels is very simple, that you can complete the whole operation within just a few seconds.

As to the product design in the future, we will optimize the product to support more architectures and protocols, improving the user experience continuously. Currently, our team is composed of senior full-stack technology developers with an average R&D experience of more than 10 years. We hope to build an industry-leading cloud collaborative development platform. We also look forward to more excellent friends from all over the world joining TeamCode!

Know more: www.kubeorbit.io
Drop your resume: hr@teamcode.com
Contact us: dev.relation@teamcode.com
You can also chat with us at Discord<3