How did we automate a WSO2 Deployment, CI/CD with Azure Devops — part 04

automate wso2 deployments with azure devops cicd pipelines — part 04

This is the 4th post of a series of posts about Automating a WSO2 deployment using Azure Devops pipelines. Links to all the posts can be found in the bottom of this article.

In this post Im going to explain how did we develop a CI/CD pipeline to deploy Carbon Applications(.car files) to a WSO2 EI deployment in an Openshift cluster. We used maven car deploy plugin to deploy the .car files.

These are Maven Multi Module projects. Which contained a config project, a registry resources project, a composite application project as sub projects.

I will post the whole pipeline…


How did we automate a WSO2 Deployment, CI/CD with Azure Devops — part 03

automate wso2 deployments with azure devops cicd pipelines — part 03

This is the 3rd post of a series of posts about Automating a WSO2 deployment using Azure Devops pipelines. Links to all the posts can be found in the bottom of this article.

In this post Im going to explain how we automated a WSO2 deployment in an Openshift cluster. The same pipeline can be used even for a WSO2 deployment in a Kubernetes cluster, by only changing the ‘oc’ commands to ‘kubectl’ commands.

We used WSO2 Official Kubernetes artefacts and parameterised them according to our need.

API Manager — https://github.com/wso2/kubernetes-apim/tree/2.6.x/advanced/pattern-1

Enterprise Integrator — https://github.com/wso2/kubernetes-ei/tree/6.4.x/

Below is the directory/file structure…


How did we automate a WSO2 Deployment, CI/CD with Azure Devops — part 02

automate wso2 deployments with azure devops cicd pipelines — part 02

This is the 2nd post of a series of posts about Automating a WSO2 deployment using Azure Devops pipelines. Links to all the posts can be found in the bottom of this article.

In this post Im going to talk about how to write pipelines in Azure Devops for a WSO2 deployment.

Build and Push Docker Images

As I mentioned in my previous post, we had repositories for each wso2 product to build docker images. We could have used docker images from wso2 official docker registry and use those images as base images and create our own images. Customer preferred the other way which is…


How did we automate a WSO2 Deployment, CI/CD with Azure Devops — part 01

automate wso2 deployments with azure devops cicd pipelines — part 01

Bit of a background here. There was a WSO2 deployment where all deployment related stuff including product upgrades and artefact upgrades were done manually. I was assigned to automate the whole Deployment process.

The deployment was on an OpenShift cluster which was in house(on premise) and as the CI/CD tool/solution, customer had chosen Azure Devops. After completing this task, Azure Devops became one of my favourites(I would say the most favourite) in CI/CD domain. Thing that I loved most about Azure devops is, its documentation. Very informative and comprehensive. And at the same time simple and easy to learn.

This…


Mapping between old configuration files and new deployment.toml file

Understand wso2 api manager 3.x new configuration model

The new configuration model based on the toml format is introduced from API Manager 3.0.0 onwards. In older versions of the product, users had to modify different configuration files depending on the components related to the specific feature they were configuring.

With new configuration model all configuration files have been merged to make configurations easier. Therefore, the <API-M_HOME>/repository/conf/deployment.toml file is the single source used to configure and tune the various features in API Manager.

You can follow below documentation to understand the configuration parameters that can be used in deployment.toml file.

But IMHO, this documentation doesn’t cover everything. Even though…


Local Kubernetes playground using KIND (Kubernetes in Docker)

source: https://kind.sigs.k8s.io/

Background

Have you ever wanted a simple Kubernetes cluster to try things out ? Or just to get familiar with kubernetes components, commands and other stuff ? Basically, have you ever wanted a Kubernetes Playground ?

There are many platforms that offer you kubernetes clusters to play with. For example: Katacoda, Play with Kubernetes, Minkube etc. Or else you can go with GKE(google), EKS(amazon) etc.

But as far as I found, there are limitations with those options. …


Publish APIs that don’t require Authentication to invoke

Usually APIs are secured using some kind of protocol. More commonly using OAuth these days.

But,

What if you or your company as a API provider, want to expose an API(or particular API resource in a given API) which doesnt need authentication.

Which means its an Open API / Public API

This is how we can accomplish it using WSO2 API Manager.

To make an API open , In WSO2 API Manager we need to disable oauth protection for all the resources in API, in the Manage section while publishing the API.

Start creating an api, go up to Manage…


Here in this article Im going to describe how we can add basic auth authentication for a WSO2 Data Service.

We will be using wso2 developer studio(EI Tooling) for this task.

I have following project in my EI Tooling (Developer Studio). And I have my dataservice called test.dbs

project view

When I deploy it, It will be like below. Unsecured.


Dockerize a Maven project

At one point I wanted to host my microservices in a kubernetes cluster. So the first thing I did is trying to containerize my microservices. These micro services were written in Sprinboot. But you can do it to any maven project.

When you start the microservice in your local machine following is what you do.

java -jar my-springboot-microservice.jar

Lets containerize

While looking for ways to achieve this. I found this awesome maven plugin called Dockerfile Maven.

01. Add Dockerfile Maven Plugin to pom file

What you’ve to do is add the following plugin section in your pom.xml file under <Project><build><plugins>.

02. Create a Dockerfile inside your project

This Dockerfile should be in the same level with…


TLS cert to Kubernetes Ingress

If you want to add a certificates to your kubernetes applications hosted in your bare metal kubernetes cluster, you can do it by adding certificates to your ingress. This is for Bare Metal. For AWS and GCE there are other approaches.

Kubernetes handle certificates and username/passwords via kubernetes secrets.

01. Create a TLS secret

You need to have the private key and the public cert. It could be self signed one or CA signed one.

kubectl create secret tls my-tls-cert --key /path/to/tls.key --cert /path/to/tls.crt

02. Add to Ingress

Generic Ingress would be like below. You have to add the secret there.

Please note the I have added the…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store