Showing posts sorted by relevance for query linux. Sort by date Show all posts
Showing posts sorted by relevance for query linux. Sort by date Show all posts

Monday, 27 October 2025

Install OpenShift on VMware with Assisted Installer. Fully Automatic. | Linux

 Installing OpenShift on VMware with Assisted Installer (Fully Automated)

If you’re looking to quickly set up OpenShift in a data center environment using VMware, the Assisted Installer is one of the most convenient options. This guide walks you through the process of installing OpenShift 4.19 (or the latest version) with minimal manual steps — once configured, the installation is mostly automatic.

Prerequisites

  • VMware environment with enough resources (recommended: 16 vCPU, 32 GB RAM, NAT interface for internet access).
  • A Linux machine with SSH key generated.
  • Basic DNS or /etc/hosts configuration access.

Step 1: Access the Assisted Installer

  1. Download the ISO from the Assisted Installer portal.

    The ISO will be tied to your VM’s public key.

  2. In the portal, select:

Create Cluster (button)Data Center (tab)Create Cluster (button)

Step 2: Define Cluster Settings

  • Cluster name: mycluster
  • Base domain: mycluster.com
  • OpenShift version: 4.19 (or latest available) 
  • CPU architecture: x86_64
  • External platform integration: None
  • Control plane nodes: 1 (Single-node OpenShift) (atleast 3 nodes for HA cluster production grade)
  • Hosts’ network configuration: DHCP (default)

Click Next.

Step 3: Operators Page

Leave defaults as-is. Click Next.

Step 4: Host Discovery

  1. Select Provisioning TypeFull image file (Download a self-contained ISO).

  2. Add your SSH public key:

    • On your Linux machine, run:

      ssh-agent cat ~/.ssh/id*.pub
    • Copy and paste the output into the Assisted Installer.

  3. Skip Proxy and Certificates (set to No).

  4. Click Generate Discovery ISO → Download the ISO.

  5. Create a VM in VMware (16 vCPU, 32 GB RAM, NAT).

  6. Boot the VM with the ISO.

Now, sit back and wait. The installation will run automatically and usually takes about 1 hour.

Step 5: Configure DNS or Hosts File

Before accessing the console, configure your DNS (recommended) or update /etc/hosts on your PC.

DNS entries:

api.assistedcluster.rukndarna.com A 192.168.23.164 *.apps.assistedcluster.rukndarna.com A 192.168.23.164

/etc/hosts entries (alternative):

192.168.23.164 api.assistedcluster.rukndarna.com 192.168.23.164 oauth-openshift.apps.assistedcluster.rukndarna.com 192.168.23.164 console-openshift-console.apps.assistedcluster.rukndarna.com 192.168.23.164 grafana-openshift-monitoring.apps.assistedcluster.rukndarna.com 192.168.23.164 thanos-querier-openshift-monitoring.apps.assistedcluster.rukndarna.com 192.168.23.164 prometheus-k8s-openshift-monitoring.apps.assistedcluster.rukndarna.com 192.168.23.164 alertmanager-main-openshift-monitoring.apps.assistedcluster.rukndarna.com

Step 6: Access the Web Console

Once installation completes, the console URL will be available:

Web Console:
https://console-openshift-console.apps.assistedcluster.rukndarna.com/

Credentials:

Username: kubeadmin
Password: <password> (replace with your generated password)

You can also download the kubeconfig file for password-less access.


Step 7: Connect with oc CLI

From your personal machine, you can connect in two ways:

  • Using kubeconfig (no password):

    oc get nodes --kubeconfig=kubeconfigfile
  • Using username/password:

    oc login -u kubeadmin -p 0000000 https://api.assistedcluster.rukndarna.com:6443

Common Useful Commands

oc get nodes
oc get co oc get csr oc whoami --show-console oc get services grep server kubeconfig

Done :) we have a single-node OpenShift cluster running on VMware with Assisted Installer — fully automated and ready for exploration.

Wednesday, 20 August 2025

Installing OpenShift on bare metal using Full Control (UPI) – Quick Step-by-Step Guide | Maximo

This guide explains how to deploy OpenShift on Bare Metal (UPI) in a VMware environment using a Service Node, Bootstrap Node, Control Plane, and Worker Nodes.

In VMware with Service Node, Bootstrap, and Master/worker nodes.

Log in to Red Hat Console: 

Goto - > Clusters -> Data Center -> Other Datacenter Options -> (Bare Mtail /x86_64)



References:

 1

GitHub - ryanhay/ocp4-metal-install: Install OpenShift 4 on Bare Metal - UPI

 2

How to install OpenShift 4 on Bare Metal - User Provisioned Infrastructure (UPI)

 3

How to Install OpenShift 4 on Bare Metal through User Provisioned Infrastructure (UPI)

 4

RedHat OpenShift Bootcamp | HA Cluster Deployment with UPI method part1

 



Requirements:

0

Service node/bastion

Any linux, I am using Rocky

2 interfaces:

Eth0 , eth1

Eth0 for external using NAT automatic ip.

 

 

Eth1 is internal hostonly. (192.168.22.1/24)

Services

Firewall/router, DNS, webserver, ingress/LoadBalancer,dhcp,

Openshift Installer

Installer script from console.redhat

Pull secret

From redhat console

Cli agent tools

Client tools

Redhat core os boot iso file to boot

Rhcos*.io

Actual Redhat core OS raw.gz file

Rhcos*.raw.gz

Ignition files  (16-22 hours of life after generations)

Run ignition (.ign) file with os file (raw.gz ) files on nodes with coreos-installer command

 

Timezone

UTC, same as coreos by default

 

 

NAT, IP forwarding

Enable using firewalld

From internal to external

1

Bootstrap node

based on the installer

nmtui :ip 22.200, gw 22.1, ns: 22.1, search domain: ocp.lan

2

Masters

based on the installer

nmtui :ip 22.201-203, gw 22.1, ns: 22.1, search domain: ocp.lan

3

Workers

based on the installer

nmtui :ip 22.211-213, gw 22.1, ns: 22.1, search domain: ocp.lan

4

Vmware vmx files

In all VMs' vmx files, add this before booting

Disk.EnableUUID = "TRUE"

5

Vm storage

Check drive type

·         SCSI / SATA controllers → Devices show up as /dev/sdX.

·         NVMe controllers → Devices show up as /dev/nvmeXnY

lsblk


My VMWare Settings (Virtual Network Editor)

To simulate a production-like isolated OpenShift environment, I used a host-only network as a private subnet accessible via a bastion (service) node. The bastion has an additional NAT interface (vmnet8) to share the host’s internet, acting as a gateway for the OpenShift nodes.

 


 


Wednesday, 9 August 2017

What is inode in Linux and IF You are Out of It (solution) | Linux

inode is basically a count of total number of files in directories of a user account in *nix systems.

similar to a unique identification of individuals in a country.

inode is data structure , it contains:
size,
user id,
group id
device id,
mode and access
protection
timestamps
links
points
etc.
except file name, and contents. 


Wednesday, 28 February 2018

Schedule this Batch to Download via FTP | Windows

We can use Linux-based utilities which are more secure and available for windows, like "wget" and "WinSCP" which is also a good option, but I preferred to stay in windows using the default old FTP command. Or we also can use Powershell instead of the old command-prompt-based batch file.


Anyhow, below is just one windows command using echo to redirect the text in a file and then the file will be called by FTP.

Just Run or you can write this command in a batch file to schedule.

cd /d "C:\Users\AQ\INTEGRATION\download"

echo open 10.152.30.229 >> ftp.txt & echo user myuser mypassword >> ftp.txt & echo binary >> ftp.txt & echo get "filename.dat" >> ftp.txt & echo bye >> ftp.txt & ftp -n -v -s:ftp.txt & del ftp.txt


1. 1st line is the path, where you want to download. 

2. Replace myuser and mypassword with the real FTP user credentials.

3. This script will create a file ftp.txt, and at the end of the line: this file is called by FTP before deletion. 


Note: Security concerns: username and password are written here. 

We also can use power sh


Monday, 16 October 2017

Anonymize or Replace text within a File using SED | Linux

Stream Editor aka 'sed' is a *nix utility to transform and parse text.

for example.
if a file testing.txt contains some text like ' helloworld.zip ',  it will be replace with any text or we can use $RANDOM function also.
sed s/hello.*zip/"hello://$RANDOM.zip"/g testing.txt
the final result will be like this:
hello12345.zip (any random number)
/g means all occurrence of this text


Wednesday, 7 March 2018

Find and kill a process which is listening on port 8080 | Windows


netstat –aon | find "<port number>"
Example:
netstat -ano -t  | findstr LISTENING | findstr :8080


now kill using taskkill command

taskkill /F /pid xxx

or kill by name for example.
taskkill /im notepad.exe

Tip: to find a string in a file using findstr:
findstr /i "helloworld" abc.txt
or
findstr /i "^hell*rld" abc.txt


------------------------------

Linux:
my best command:
netstat -tulpen

example:
netstat -tulpn | grep LISTEN | grep '(8080 |8081 |8082 | xxx)'

or

$ lsof -i tcp:1555

Monday, 23 July 2018

Failover - Host two will be added in hosts file If Host one is Down | Linux

This bash script we used for our of our client.
to use simple create a file e.g failover.sh and paste the below mentioned script into it.
now configure a cronjob to run this script every after 5 minutes or whatever you like.

#!/bin/bash
HOST1="10.2.4.115"
HOST2="10.2.4.116"
COUNT=4
for myHost in $HOST1
do
  count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }' 2>/dev/null)
  #count=$count"skj"
#  echo $count" ccc"
  if [ $count -gt 0 ]; then
    # 100% failed
    g_count=`grep -c $HOST1 /etc/hosts`
    if [ $g_count -eq 0 ]; then
      echo "change host1 ip"
     `cat /etc/hosts | sed 's/10.2.4.116/10.2.4.115/' > /etc/hosts_tmp`
     `cp /etc/hosts_tmp /etc/hosts --reply=yes`
    fi
    echo "Host : $myHost is UP"
  else
    g_count=`grep -c $HOST2 /etc/hosts`
    echo $g_count
    if [ $g_count -eq 0 ]; then
      echo "change  host2 ip"
     `cat /etc/hosts | sed 's/10.2.4.115/10.2.4.116/' > /etc/hosts_tmp`
     `cp /etc/hosts_tmp /etc/hosts --reply=yes`
    fi
    echo "Host : $myHost is down"
  fi
done

Friday, 13 October 2017

Find and Delete All Files Older than 10 Days using mtime | Linux

#to file files older than 10 days:
find /home/folder/ -mtime +10;

#now append it with -exec switch +  rm {} loop to delete all found files:
find /home/folder/ -mtime +10 -exec rm {} \;

----------------------
#and to find only in specific directory ignore sub directories

find /home/folder/ -maxdepth 1 -mtime +10

Monday, 18 May 2020

Utility to export Maximo Automation scripts to directory for backup and version control.

Utility will help extract the all scripts to directory for version control and for backup as well.


Download utility:

Maximo automataion script utility

Installation:
 

Extract the files and copy into <SMP Path>/maximo/tools/maximo/ path.
 

Running: 
Run the extract automation scripts_utility file.
It will take connection from maximo.properties file.
will create and update files in <SMP Path>/maximo/tools/maximo/automatioscripts folder.
 

Note: utility will work for Java 1.7 or above. Source file is available in same folder. You can recompile and use, if required in lower versions.



Windows: run extractAutomationScripts.bat

Linux or AIX run ./extractAutomationScripts.sh


Result: folder will create with automation scripts and create files with automation script name and description will copy top in text with comment.

Thanks

  



Tuesday, 15 August 2023

A Guide to Installing and Configuring SSH Tunneling | Windows

Introduction:

Secure communication and data protection are paramount in today's digital landscape. One effective way to ensure this is through the use of SSH tunneling. In this guide, we'll walk you through the process of installing, setting up, and utilizing SSH tunneling on a Windows operating system. This technique will provide you with a secure and encrypted channel for your data transmission needs.

Step 1: Install OpenSSH as a Windows Optional Feature
  1. Begin by installing OpenSSH as an optional feature on your Windows machine.
  2. Windows will automatically create a new firewall rule to permit inbound SSH access over port 22.
Note that, if you manually download and install OpenSSH, you'll need to create an inbound rule to allow SSH port access.

Step 2: Start and Enable the SSH Service

1. Open PowerShell as an administrator
2. Start the SSH service using the following command 
Start-Service ssh

Tuesday, 4 July 2023

How to Download Videos Shared on Microsoft SharePoint and 365 | Microsoft

Is it possible to download a video shared over Microsoft SharePoint or 365 when we can watch it but are unable to download it?

Introduction:

Have you ever encountered a situation where you're able to watch a video shared on Microsoft SharePoint or 365, but you can't seem to find a way to download it? In this guide, we'll walk you through a simple solution that empowers you to download these videos using the versatile media converter, ffmpeg.

Solution: Using FFmpeg Video Converter

FFmpeg is a powerful and universal media converter that can handle a wide range of media tasks, including converting and transcoding videos. Follow these steps to download videos that you can watch but can't download directly from Microsoft SharePoint or 365:

ffmpeg is a universal media converter. It can read a wide variety of inputs - including live grabbing/recording devices - filter, and transcode them into a plethora of output formats.