Mar 29, 2025

Mongo DB Connect String

  1. Standard format
    • Used to connect to standalone clusters, replica sets, or shared clusters
    • mongodb+srv://<username>:<password>@cluster0.e4fwa7d.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
  2. DNS seed list format 
    • Provides a DNS server list to connection string

Dec 29, 2023

Gradle version update from 6.5 to 8.1.1 findings.

Here is the list of changes required on Gradle upgrade from version 6.5 to 8.1.1

1. Replace xml.enabled to xml.required in reports of jacocoTestReport
jacocoTestReport {
    reports {
                xml.enabled = true //replace with xml.required = true
                ....
            }
        } 


2. Replace the depreciated properties with new properties as mentioned below:

  • appendix  -> archiveAppendix
  • archiveName -> archiveFileName (archivePath)
  • baseName -> archiveBaseName
  • classifier -> archiveClassifier
  • destinationDir -> destinationDirectory
  • extension -> archiveExtension
  • version -> archiveVersion

3. Replace implementation's force with version

            implementation (' ... ') {
                force = true // replace with version(true)
            }

4. Comment/remove all @Override

5. Replace all compile (' ... ') dependencies with implementation(' ... ')

 

Aug 18, 2022

Useful links

 https://regex101.com/



Regular expression to remove value from JSON output.

Jul 22, 2022

How to change timezone for OCI Linux using command line.

  • $ timedatectl
  • $ timedatectl list-timezones
  • $ sudo timedatectl set-timezone <your_time_zone>
    • eg. sudo timedatectl set-timezone Asia/Kolkata
  • To verify the change, invoke the timedatectl command again:
    • $ timedatectl

Jun 1, 2022

Basic Jenkins Setup

  1. Download the Jenkins war (LTS) file from https://www.jenkins.io/download/
  2. Setup JDK 11+ and set java to the path environment variable.
  3. Set JENKINS_HOME to any directory
  4. Run >java -jar jenkins.war
  5. Access Jenkins Server @ http://localhost:8080

  6. Provide Administrator password, generated at highlight path above.
  7. Proceed with 'Install suggested plugins.

Steps to open firewall port to access Jenkins server.
YOURPORT=8080
PERM="--permanent"
SERV="$PERM --service=jenkins"

firewall-cmd $PERM --new-service=jenkins
firewall-cmd $SERV --set-short="Jenkins ports"
firewall-cmd $SERV --set-description="Jenkins port exceptions"
firewall-cmd $SERV --add-port=$YOURPORT/tcp
firewall-cmd $PERM --add-service=jenkins
firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --reload

May 24, 2022

Kafka Commands for Windows

  1. bin/windows/zookeeper-server-start.bat ./config/zookeeper.properties -to start zookeeper
  2. bin/windows/kafka-server-start.bat ./config/server.properties -to start Kafka server
  3. bin/windows/kafka-topics.bat --create --topic <topic_name> --bootstrap-server "127.0.0.1:9092"

May 10, 2022