Unit testing is pretty interesting topic and it helps you in writing good code. It gives you a confidence while building your software but most of the times developers ignores this because it is time consuming. Recently i learned about a very good tool mockgen, which is being used widely in the Go community for mocking purpose. In this blog, i will cover how to mock the behaviours of your program using mockgen.

Mocking with mockgen

Need of unit testing arises when project size grows day by day and hence the probability of making logical mistakes. Mocking is helpful in unit testing to…

Go’s dependency management was very tricky from the very beginning and as a result, a lot of third-party tools like dep, govendor, glide came into existence. Each of these dependency management tools tried to solve the various set of problems but still, some void has to be filled.

Go module was released back in 2018 and was an experimental feature till Go 1.13. A lot of improvements and bug fixes have been done to make it production-ready. In the nutshell, go module itself takes care of a lot of things and gives developers a very rare chance to make a…

In the previous blog we have learned to test http handlers at the server side. In this blog we will learn how to test the same from the client side, commonly known as mocking http servers in this blog. Ginkgo framework provides very interesting package ghttp which is wrapper over httptest package and makes the unit testing great again 😜.

If you have not visited my previous two blogs and not familiar with the ginkgo framework, it is recommended to go through them first. …

In the previous blog we learned how to bootstrap the initial unit test code using ginkgo and learned to write unit test of a sum function. In this blog we will learn how to test http handlers using test server provided by ginkgo to mock server’s behaviour and test the handlers.

I have already provided the installation instruction and other initial steps in the previous blog, here i will go through the simple http server and its test code.

package mainimport (
func Handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there, the end point is…

OpenEBS doesn’t support RWM out of the box but it can be used for RWM requirements with the help of NFS provisioner. NFS provisioner is just like an application which consumes OpenEBS volumes as it’s persistent volume and provides a way to share the volume between many applications.

In this blog, i would like to discuss the steps to run NFS on top of OpenEBS Jiva for RWM use cases. There are three sections in the blog, one is about the installation of Jiva volumes, second one is about the installation of NFS Provisioner and the last one is about…

OpenEBS Jiva Volumes are a great way to provide highly available persistent volumes to Kubernetes stateful workloads by making use of the local storage available on each node. Installing and setting up OpenEBS is very easy, almost like running just another application in Kubernetes Cluster. Of course the best part is that OpenEBS Jiva volumes are completely Kubernetes Native and can be managed directly via kubectl.

For setting up OpenEBS and using Jiva volumes, please refer to this documentation.

In this blog, I will focus on some of the common questions that come up in the OpenEBS Users Slack channel

In the previous blog, we have learned how to monitor openebs volumes, where i had mainly discussed about monitoring volume controller’s of storage engines jiva and cstor. In this blog i will cover how to monitor cstor-pools using Prometheus to pull metrics from maya-exporter sidecar of cstor-pool pods and Grafana to visualize the metrics.

It’s been almost a year since we have released cstor and we felt that there is a need of continuous monitoring tool to monitor cstor-pool container to get the details about various metrics such as health of cstor-pool container, no of reads/writes, no of io’s, rebuilding…

Being as a part of DevOps culture from past 6 months i realized how important monitoring is for containerized environments. Automation and monitoring is the important philosophy of DevOps and OpenEBS follows it from the very beginning of its development.We thought of using Prometheus for monitoring purpose because of these reasons :

  • It is Open Source
  • It is developer friendly (Easy to manage and implement)
  • It has very rich querying language (Promql)
  • It provides lot of integrations such as node-exporter, alertmanager etc.
  • It is scalable (Federation)
  • It provides flexibility of reading and writing data remotely.

Besides these , it also…

If you are in cloud related services, you may hear the word Docker many times because of it’s simplicity and ease of use. I have published a very beginner friendly blog about containers, VMs and other cloud technologies few months ago. Just go through this blog where i covered some very basic things that i learned at that time. This blog is all about Docking your simple program on Docker, let’s dive into the shore of it’s ocean .

Before moving on, the first thing comes into your mind would be why do i need to run my app inside…

Few days ago, when i was very new to OpenEBS, i didn’t understand much about it, and i wanted to contribute on this project. But i couldn’t find any comfortable starting point to get started with it. Then i was assigned to write the code that displays the OpenEBS Volume statsinto JSON format . Even though this was an easy task but It took me more than a week to understand the code flow and i completed this task successfully on time 😝. This was my first meaningful contribution on OpenEBS as well as on open source 😌. I thought…

Utkarsh Mani Tripathi

Work @JFrog, TechGeek and a part time writer

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