Skip to content

Instantly share code, notes, and snippets.

View kumar-de's full-sized avatar
🎯
LOYO

AK kumar-de

🎯
LOYO
View GitHub Profile

Setup Kerberos client on your machine

Install the Kerberos client packages:

apt-get install krb5-user

Paste into /etc/krb5.conf and adjust the following to match your server-setup

[libdefaults]
 default_realm = ABC.TEST
@kumar-de
kumar-de / IBM-MQ-with-TLS.md
Last active July 20, 2023 14:55
Setting up IBM MQ with SSL/TLS enabled #IBMMQ #SSL #TLS

Dockerized IBM MQ with TLS enabled

Setting up the Server-keyStore and certificate

Run a container using latest IBM-MQ image

docker volume create qmdata
docker pull ibmcom/mq:latest
docker run -ti --entrypoint=/bin/bash --volume qmdata:/mnt/mqm ibmcom/mq:latest
@kumar-de
kumar-de / docker_build_jar.md
Last active August 20, 2019 21:39
Build docker container for jars

Build and push a docker image into hub.docker.com


Docker login already, if you haven't

docker login

Inside the directory containing the Dockerfile

docker build -t achintyakumar/cloud_connector:1.0 .

Tag the image

docker tag 888dd8r8f8 achintyakumar/cloud_connector:1.0

@kumar-de
kumar-de / install-stuff-centos7.md
Last active May 19, 2020 20:33
Install stuff on CentOS 7 #centos #centos7 #docker #python #install #ansible #openvpn #java8 #openjdk #java

Java - OpenJDK 8

yum -y update
yum install java-1.8.0-openjdk

Docker CE

sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
@kumar-de
kumar-de / configure-python-in-intellij-idea.md
Last active August 20, 2019 21:41
Get python-venv working in Intellij IDEA projects

Configure Python SDK in IntelliJ IDEA

Follow everything on this link:

https://www.jetbrains.com/help/idea/creating-virtual-environment.html

Open Project Structure CTRL+ALT+SHIFT+S

  • Project settings -> Facets -> expand Python click on child -> Python Interpreter
  • Project settings -> Modules -> Expand module -> Python -> Dependencies -> select Python module SDK
@kumar-de
kumar-de / iptables-manipulation.md
Last active April 16, 2020 22:43
Modify Linux firewall of a VPN-server for managing client-to-client accessibility #linux #firewall #iptables #vpn #client2client

Clean up all firewall rules

echo "Clearing all iptables rules"
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -F
iptables -t mangle -F
iptables -F
iptables -X
@kumar-de
kumar-de / run-spark-job-in-batch-vs-streaming-mode-with-kerberos.md
Last active August 20, 2019 21:43
Running Spark job in Batch vs Streaming mode against Kerberos

Running Spark job in Batch vs Streaming mode against Kerberos

Variables

BROKER="broker1:9092"
SPARK_URL="yarn"
MODE="cluster"
APP_NAME="ApplicationName"
SECURITYPROTOCOL="SASL_PLAINTEXT"
COMMON_JAR="common-jar.jar"
@kumar-de
kumar-de / create-external-table-with-partitions.sh
Created June 21, 2019 11:51
Create external Impala table partitioned by a certain column and recover old partitions of the same table
# The following example is for a job that produces daily, parquets partitioned by 'day' column
DB="database"
BASE_DIR="/output/parquets"
TBL="${DB}.table" # name of the impala table
PQT="${BASE_DIR}/day" # name of the parent directory containing output-subdirectories (in the format 'day=ddMMyyy')
# create/mount impala table
impala-shell -q "drop table if exists $TBL;
create external table $TBL (
account_id string,
@kumar-de
kumar-de / Kafka-console-consumer-with-kerberos.md
Last active March 1, 2023 03:59
Kafka console consumer with Kerberos

Kafka console consumer with Kerberos

1. Create a jaas.conf file with the following contents:

KafkaClient {
   com.sun.security.auth.module.Krb5LoginModule required
   useKeyTab=true
   keyTab="keytabFile.keytab"
   storeKey=true
   useTicketCache=false
   serviceName="kafka"
@kumar-de
kumar-de / create-fat-jar.md
Last active June 6, 2022 07:59
Create a fat jar using Maven

Create a fat jar using Maven

<?xml version="1.0" encoding="UTF-8"?>
<build>
	<plugins>
        <!-- Set a compiler level -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>