Posts

Minikube - How to set up local kubernetes cluster

Image
Question - How to setup local kubernetes cluster using minikube? First of all lets describe briefly about "What is kubernetes?". Well, Kubernetes is open-source container orchestration tool which is used for deployments automation and scaling of containers on large scale environments. There are plenty of other features that it can do. Please go to the main site (https://kubernetes.io/) to explore more. In this specific post, we'll try to setup full kubernetes cluster on local machine. This should be used on Production like env, this is only for doing local testing and getting test of kubernetes on local server without investing much.             We will make use of "minikube" for this setup. Below is the "minikube" Architecture. Env and Version Details -    - Host OS - Windows 10    - Hypervisor - Vritualbox Requirements - 1. Hypervisor -                Install s...

How to Clean or Reset build numbers in Jenkins job ?

Image
When you were working with some POC or R&D, you may have to do things a number of times until you come to final conclusion. In my recent POC, I was working with Jenkins build jobs for Azure container registry with Azure Managed Container services aka AKS. During this whole activity I have created 70 plus builds and during this process each build was creating one separate tag for docker image on ACR. When this whole POC gets completed, I thought that it will be really good idea to flush/clear out build history and start building from scratch. Situation after completing POC- Below are the step by step instructions for the same- Login to Jenkins server, click on " Manage Jenkins" --> "Script Console". This will open below dialog box. Once you click on "Script Console", then copy and paste below script there and run. Note - Make sure to change the "Job Name" def jobName = "Enter Job Name" def jo...

Dictionaries in Python

Hello Guys,           In this particular post, I am going to discuss dictionaries in python. The example in this post is tested on Python-3.6.           Python data structures include lists, dictionaries, tuples, and sets.  If you have worked with python, then you may have worked on "lists", "tuples", "sets" and "dictionary" in python. Dictionary  - As the name suggests dictionary is the same as that ordinary dictionary where we will have index and then we'll use that index to search the specific entry. This is similar to book or phonebook index where we search things using names instead of values which we do in other python data structure. Dictionary worked in "key":"value" pair. The "word" is called key and the definition of "word" is called a value .               Usually, the "values" or "keys" of a dictionary are not in specific order. Another import thing is that we ca...

How to reset mongodb rootadmin password ??

Image
Sometimes we have to manage credentials for lots of things and its obvious that we can forget one of them. Here I am going to explain that how we can reset "rootadmin" password for running mongodb replica set. I am not going in details about installation, configuration or functionality detail. Instead, I'll directly jump to actual technical hacking stuff. Along with with we'll also learn some sed tricks that can be handy on many occasions. Things responsible for Authentication/Permissions with in mongodb replica set- security:   keyFile: "/data/mongo3.2/node3/mongo_3.2-keyfile"   authorization: "enabled" keyFile - This is the path to file that stores the shared secret that all MongoDB instances use to authenticate to each other in a sharded cluster or replica set. authorization - This will Enable or disable Role-Based Access Control (RBAC) to govern each user’s access to database resources and operations. By default, this wil...

Check dependencies of local RPM package

Image
We all know that for managing packages or softwares on any system, we need some kind of tool which can be used to manage the packages or softwares. Different distributions have its know tool for achieving the same.                      For example for RHEL/Centos/Fedora we use RPM(RPM Package Manager)  for all rpm package management which take care of "installation, uninstallation, update, query etc.               So, sometimes whenever we install any package we get lots of error regarding the dependencies. Here we are discussing that how we can list dependencies associated with particular rpm file. 1.) Check for file i,e, yet package is not installed:           rpm -qpR {rpm-file}   e.g.      -----     -----     output truncated..   2.) If packages is already installed:       rpm -qR {pa...

Remount multiple NFS mount points on Client in one go

Image
                                     Sometimes we may have number of mount points available on NFS clients and after making changes for any one of parameters, we have to remount all partitions. Doing umount and mount on multiple partitions will really be hectic job and there may be chances of human errors.           We can do this using single command to achieve the same. Sharing some other commands as well, before moving to exact one :). Get the list of all NFS mount points available on System:                       Before moving ahead with changes, lets see how many partitions are their on system. Below command will do trick and give you all the nfs mount points without any header and headers. Without headers -                      # df -PF n...

"ERROR: Could not find cookbook in your cookbook path, skipping it" in Chef

Image
Chef is a automation framework tool which help us to deploy code or configuration across multiple systems which may be physical, virtual or cloud systems. Here I am just want to highlight one small issue which I got when I was trying to upload cookbook from my workstation. Everything was in place, but still it was throwing below error: $ knife  cookbook upload cookbook_name ERROR: Could not find cookbook  cookbook_name  in your cookbook path, skipping it ERROR: Failed to upload 1 cookbook. Usually, by default knife will use default location specified in  ~/.chef/knife.rb file for cookbook. In my everything was correctly configured as below : $ cat ~/.chef/knife.rb | grep cookbook_path cookbook_path [ '.', '..' ] I was trying to upload as per directory name given to cookbook. After, doing lots of search finally got to know that knife command will compare the cookbook name from metadata.rb file in cookbook directory. Then I made the correction in ...

Get Oracle Version details

Image
In this small post, I am sharing the commands to get details about the oracle version you are using. Although much detail is there in Oracle documentation, but thought of sharing this small tips :). Steps: Connect to Oracle DB using CLI or UI tool as you wish. Here I am connecting with Oracel SQL Developer. There are number of ways for getting the details. I sharing below ones. select * from v$version;    2. select version from v$instance;             3. select * from product_component_version;* Regarding the release number format, there is very good explanation on Oracle Doc site . Please go through it for details. Thanks!!

boot2docker Error

Image
I have installed boot2docker and when I tried to play with docker, I have started getting below error for every docker commands that I run. Error FATA[0000] Get http:///var/run/docker.sock/v1.18/version: dial unix /var/run/docker.sock: An address incompatible with the requested protocol was used.. Are you trying to connect to a TLS-enabled daemon without TLS? I have checked about the vm status and everything seems good, as below: After some troubleshooting, I found that issue was with some system variables. Basically there are three variables, which you need to set to make this working. In windows you can use set command and in Linux you can use export command:    set DOCKER_HOST=tcp://192.168.59.103:2376        set DOCKER_CERT_PATH=C:\Users\kuldeep.d.sharma\.boot2docker\certs\boot2docker-vm       set DOCKER_TLS_VERIFY=1 Note: When you initialize your boot2docker, it will provide you all details and as...

Installing Jboss A-MQ 6.2

Image
Jboss A-MQ 6.2 has been released on 2015-06-23 with lots of bug fixes along with major switch from Active MQ 5.9 to 5.11. Below are the steps for installing the new version and exploring the messaging world :) . 1.) Download  JBoss A-MQ 6.2.0.GA Zip and md5 checksum to ensure the integrity. 2.) Compare the md5 checksum of zip file with downloaded one. 3.) If, both are same then unpack the archive. If you are unpacking the archive in windows, then make sure that you don't have any space and any special characters in name as %, $, # etc. 4.) Configure Users and Roles as per your requirements to $AMQ_HOME/etc/users.properties . Format will be as below. # USER=PASSWORD,ROLE1,ROLE2,… Note: I am using here simple admin password for demo, but in Live scenarios please choose strong password, as this password will be stored in plain text.  Jboss A-MQ 6.2 support RBAC(Role Based Access control), So we can assign different roles as per needed. ...

Chef Server Overview

Image
Currently we are leaving in digital world and IT Infrastructure is increasing day by day. In such situation it becomes difficult to manage number of servers, especially when we need to install or configure same thing on multiple systems.                               So, chef is going to make your task easy to manage whole infrastructure without much effort. Chef is used as automation framework with which we can install/deploy servers and applications to any VM, cloud and physical servers.  There were terms which we are going to use more often as we proceed: chef-client  :   This is the tool which is being installed on all the system managed by chef. It'll perform all task specified by runlist and also fetch any updated contents if any from chef-server. Workstation :  Workstation are the nodes/system configure to author changes and push them to server. We can also bootstrap new...

Reset root Password in Centos 7/Fedora Server 21

Image
Its mandatory to setup password for root account in Linux. Sometimes, we don't remember passowrd and somehow lose. There are the procedures for breaking it or you can say reset this to new one. Below is the step by step process for achieving the target  : Boot up your Fedora system, during bootsplash/bootscreen press arrow keys which will show you grub boot screen as below: Press "e" to enter into edit mode as below: After this scroll down to line starting with "linux16" and add "rw init=/bin/bash" at the end of line. Now what these parameter do is : rw : With this option kernel will mount the root File System in Read-Write mode. init=/bin/bash : In Linux/Unix based systems init is the first process which gets started during booting. Here we are asking to start bash shell instead of normal system initialization scripts. Now boot System using "Ctrl-x" as mentioned in screen as well and it will take you to bash ...

make: o: Command not found in Sysstat

Image
Today, I was trying to update my sysstat package to latest version i.e. 11.0. I have downloaded and start compiling the package. Now, during compilation process, when I fire make command, I got some errors like "make: o: Command not found". Errors : gcc -o cifsiostat -g -O2 -Wall -Wstrict-prototypes -pipe -O2 cifsiostat.o librdstats_light.a libsyscom.a -s o nls/af.gmo nls/af.po make: o: Command not found make: [nls/af.gmo] Error 127 (ignored) o nls/cs.gmo nls/cs.po make: o: Command not found make: [nls/cs.gmo] Error 127 (ignored) o nls/da.gmo nls/da.po make: o: Command not found make: [nls/da.gmo] Error 127 (ignored) o nls/de.gmo nls/de.po make: o: Command not found make: [nls/de.gmo] Error 127 (ignored) o nls/eo.gmo nls/eo.po make: o: Command not found make: [nls/eo.gmo] Error 127 (ignored) o nls/es.gmo nls/es.po make: o: Command not found make: [nls/es.gmo] Error 127 (ignored) o nls/eu.gmo nls/eu.po make: o: Command not found make: [nls/eu.gmo] Error 127 (ig...

Check Important information like Product-name, Version, codename etc in Jboss EAP 6 or Wildfly 8 using CLI.

Image
Sometimes, we need some information about the product we are using. Suppose, we want to know about the product version, name, codename or running mode in Jboss AS 7, Jboss EAP 6 or Wildfly-8.[0-1]. We can do all this easily using built in CLI utility. Below are the steps : 1.) Start your Application Server Instance in any mode(standalone/domain). Here, we are doing all this in standalone mode. root@lubuntu1:/data/wildfly-8.1.0.Final/bin# ./standalone.sh =========================================================================   JBoss Bootstrap Environment   JBOSS_HOME: /data/wildfly-8.1.0.Final   JAVA: java   JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true ========================================================================= 12:32:02,587 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final 12:32:06,242 IN...