Thursday, February 14, 2019

How to set MTU in a linux server to 1500

How to set MTU in a linux server to 1500?

Login to the server as root
ifconfig -a (to understand the network interface name)
ifconfig ens3 mtu 1500
ifconfig -a (to confirm whether the value changes or not)

Friday, November 23, 2018

Simple shell script to check whether a process is running or not, if not it will start it

I need a simple shell script to check whether a process is running or not, if not it will start it.

Here in this example, i am checking my node process.

if ! pgrep -x "node" > /dev/null
then
   nohup start.js &

fi

Tuesday, November 20, 2018

Project Helidon - microservice framework for Java

Project Helidon, an open source, lightweight microservices framework for Java. It supports the MicroProfile technology and is intended to make it easier to develop microservices. Helidon has a collection of Java libraries for writing microservices that will run on a web core powered by the Netty framework. Helidon supports cloud application developments along with health checks, metrics, tracing, and fault tolerance.  Helidon has what you need to write cloud ready applications that integrate with Prometheus, Zipkin and Kubernetes. It is also compatible with all IDEs with no special plugins required. Developers need JDK9 or JDK8, Maven 3.5 and any IDE they prefer to start with Helidon.

Java EE is a stable technology but it has a lot of legacy code. Instead of building microservices on top of Java EE, a new framework which is designed to build microservices from the scratch. That's how Helidon was born. Helidon provides configuration and security for the development of microservices.

What are the most common use cases for Helidon?
Helidon is designed for creating Java microservices. So if you’re a Java developer and you’re writing microservices, then Helidon is a great choice. It’s unique in that provide a way for Java EE developers to use familiar APIs (with our MicroProfile support), but also have the option to explore or use the leaner set of APIs provided by Helidon SE. This helps to improve developers productivity.

Helidon development team is working to integrate on GraalVM support, as it saves money for customers. It will make application start and run faster. Running faster means servicing more requests per instance. Servicing more requests means you need fewer instances. Fewer instances means less money. 

Helidon is packaged in two versions:

- Helidon SE, a lightweight microframework developed in a reactive way. JDK (Java SE Development Kit) serves as the runtime.
- Helidon MP, a MicroProfile implementation providing a development experience familiar to Java EE and Jakarta EE developers. It serves as a runtime for microservices.



What’s next for Helidon?
As part of the Helidon 1.0 release, there will be Oracle Cloud integration with CDI extension, also team have some plan to add a Reactive HTTP client. Inspide of this team is looking at adding support for NoSQL, Eventing and OpenAPI.

URL : https://helidon.io/#/
Documentation : https://helidon.io/docs/latest/#/getting-started/02_base-example

Tuesday, October 23, 2018

When delete a pod in kubernetes, it respawn the same again

Issue:

When we delete a pod using kubectl command, it get respawn automatically. This is one of the feature of Kubernetes.

[root@compute-instance1 ~]# kubectl get pods | grep ImagePullBackOff
quickstart-se-68d7ffb868-l7pvk                    0/1       ImagePullBackOff   0          12m

[root@compute-instance1 ~]#

How to solve this?

[root@compute-instance1 ~]# kubectl get all
This command will list down all the details.

[root@compute-instance1 ~]# kubectl delete deploy/quickstart-se svc/quickstart-se
deployment "quickstart-se" deleted
service "quickstart-se" deleted
[root@compute-instance1 ~]#

This helps to delete that particular pod from K8s.