Getting Started with Ansible

Knoldus

Introduction: Ansible is a configuration management and provisioning tool, similar to Chef, Puppet or Salt.Configuration management systems are designed for controlling large numbers of servers easy for administrators and operations teams. They allow you to control many different systems in an automated way from one central location.

There are many popular configuration management systems available for Linux systems, such as Chef and Puppet, these are often more complex than many people want or need. Ansible is written in Python and uses SSH to execute commands on different machines. Ansible uses YML to describe work.

Install And Configure Ansible on Ubuntu: Run the below command to install and configure ansible on Ubuntu.

sudo yum install ansible

We’ll assume you are using SSH keys for authentication. To set up SSH agent to avoid retyping passwords, you can run the below command.

ssh-keygen
ssh-agent bash
ssh-add ~/.ssh/id_rsa

Configuring Ansible Hosts: Ansible keeps track…

View original post 209 more words

Advertisements

How to create a KeyStore in PKCS12 Format.

Knoldus

In my last blog I explained how to create a self-signed SSL certificate. You can go through the previous blog and generate the certificate and private key as we’ll be needing it for creating a KeyStore.

Create a self-signed SSL Certificate using OpenSSL.

In this blog I’ll be explaining how one can create a KeyStore in PKCS12 Format using OpenSSL.

Let’s start with “What is PKCS12 Format ?

A PKCS12(Public-Key Cryptography Standards) defines an archive-file format for storing server certificates, intermediate certificate if any and private key into a single encryptable  file.

Now, lets see how we can create a KeyStore.

For generating a KeyStore one should already have an existing private key and certificate(self signed or signed by CA). Following are the steps required for creating a KeyStore:

->Step1: Create private key and certificate.

Create a self-signed…

View original post 168 more words

Akka-http Logging: Logging the Response Time of the Rest API

Knoldus

Sometimes while developing REST API’s we want to log the response time of  our REST APi for the sake of better tuning. We are going to discuss the same case here and will see how to do that in Akka-http .

So sometime before while I was working on akka-http while developing a spark-akka-http-couchbaseLightbend activator template , a weird use case came in-front of me. I wanted to log each and every request that is made to my server along with the response time that my server took to execute it. I searched for it and found that others are also searching for the same thing. I thought that akka must have  provided something for implementing this (which they probably don’t) , but I didn’t found anything in the documentation , and hence I have to come up with my own  custom solution( just a little hack ! ;)…

View original post 232 more words

Scala, Couchbase, Spark and Akka-http: A combinatory tutorial for starters

Knoldus

Couchbase and Apache Spark are best so far , for the in-memory computation. I am using akka-http because its new in the business. If you are not a big fan of akka-http and don’t think it is yet ready for production then you can take a look on this blog, which displays how to do the same task using Spray.

If you are new to all these technologies and all these sounds just like some weird names 😉 do not worry we will walk through step by step and at the end you will be able to make a REST Api that can be deployed on Spark Cluster with Couchbase as the database.

So first things first :

What is Couchbase ?

Couchbase is one of the best in-memory database with lots of capabilities and a user friendly UI to manage the database. It  is a NoSQL document database with…

View original post 493 more words

Scala-IOT : What is Mqtt ? How it is lightweight ?

Knoldus

We have already stepped in the world of IOT ! And if you do find it fascinating then stay tuned to this series , or you can signup for our newsletter so you can directly get a message in your inbox whenever it is published !

So we established our basic understanding in our last blog post of what is IOT and how it is effecting our world and making it a better place to live 😉 (I guess I love to mock Hooli 😀 )

If you just want a quick recap here is the blog: IOT: Introduction to IOT

So in this blog we will talk about the MQTT  and its headers , what is this protocol ? (where we left in the last blog Remember ??  😉 )

So once again lets start with first things first :

What is MQTT ?

So MQTT official website says…

View original post 751 more words

Scala-IOT: Getting started with RaspberryPi without Monitor or Screen.

Knoldus

Hey folks,

We are back again ! ( Did you miss me? ) A big Moriarty Fan ! 🙂

So where we left was, now we have a basic understanding of IOT i.e. Internet of things and we know which protocol it uses i.e. MQTT and why it uses it ? If you didn’t follow us till here you can check out our previous blogs and then come back here to be in a flow.

1. Scala-IOT : Introduction to Internet Of Things.

2. Scala-IOT : What is Mqtt ? How it is lightweight ?

So in this blog we will talk about how to get started with RaspberryPi. How to  install the Raspbian Jessie on it, and how to configure it so that you would not need any screen to communicate with it !

So the per-requisites would be  :

  • Raspberry Pi 3
  • SD card (8GB+)
  • Power Source ( Mobile…

View original post 1,385 more words

Scala – IOT : First basic IOT application using Scala on RaspberryPi

Knoldus

Let’s start our journey for making the first IoT application to make world a better place 😉
(I would never miss a chance to mock Hooli ! 😉 )

In this blog finally the two technologies SCALA and IOT  will meet and we will be doing these many things in this blog:

  1. Setting up the scala sbt environment on RaspberryPi
  2. Developing your first IOT application using Scala
  3. Deploying the developed application on RaspberryPi.

And finally we are going to achieve this:

IMG_20160827_203534_HDR

View original post 831 more words