Monday, June 21, 2021

Copy Top 'Latest Modified 10 Files" from Linux Server and Download it to Local Laptop

https://stackoverflow.com/questions/15691359/how-can-i-list-ls-the-5-last-modified-files-in-a-directory

https://stackoverflow.com/questions/16886179/scp-or-sftp-copy-multiple-files-with-single-command

https://stackoverflow.com/questions/1706882/get-the-date-a-day-before-current-time-in-bash


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

ssh kk@10.102.20.43                                                                

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

cd /efs/datadrive/app-data/vea/output/reports                                

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

ls -1t | head -8                                         # Its One 1 , not "L"       

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

ls -1t | head -8 | tail -7                               # date +%d-%m-%Y            

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

date +%d-%m-%Y -d "2 day ago"                            # date --date='-2 day'    

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

mkdir -p                                        # xargs  date +%d-%m-%Y -d "2 day"   

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

zip                                                                                

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

scp 703250313@10.102.20.43:/efs/datadrive/app-data/vea/output/reports/21-6-2021.csv .

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

Sunday, June 20, 2021

Unix Libraries - for windows (Alternatives) : GitBash and GOW(GNU on Windows)

 I have used  -  Git Bash, and GOW (GNU on Windows)

Record Set, Hosted Zone, DNS , Route 53, AWS

 DNS has Record Set Types:

A record   --> Domain URL points to IP address at TCP Level [ dummy.com   -> StaticIP_LoadBalancer]

CNAME record --> dummy.com   -> Alternate.com

NS record -> its not actually a website, but at Nameserver Level [Not very usual[

SSL can be embedded in DNS - DNS is Network level , Not Http Level

DNS is LEVEL4 - N/W Layer

HTTPS/SSL is Layer 7(6)  - Above 4


So, DNS is merely Server resolving , it does not know anything at SSL TLS HTTPS level

So, We direct DNS to Load Balancer 

Load Balancer has a listener which redirects traffic internally 

Load Balancer is at TCP Port 80

TCP Port 80 redirects to Port 443 at Load balancer Level

here at LB SSL offloading Happens


PFX File, CER File is issued to "DNS Name " and "Subject Alternative Names" to FQDN of Host Backends


DNS has Record Set Types:

A record

CNAME record

NS record



Saturday, June 19, 2021

FQDN is not same as Domain Name : IP Address vs FQDN vs DNS Name

  •  FQDN is Hostname - It always stays Unique - It can part of Local Intranet Domain. eg corp, domain2
  • IP Address is 4 number set , it may be static or dynamic -MAY Change if we say restart or invoke another VM
  • DNS name is like Global  Name

How to Route AWS to AZURE :::: Route53 to HTTPS SSL Based Application Load Balancer Routing

https://stackoverflow.com/questions/12176969/how-to-forward-http-request-to-https-in-amazon-route53/57481397#57481397


Amazon S3 -> Http Listener on ALB(Level 7) Redirect to HTTPS

HTTPS Listener redirect to HTTP BackendNodes/Destination [SSL Offloading]


ALB(HTTPS Redirect)   -> Node

AWS Route 53 -> Hosted Zone -> Domain URL -> Azure  Application Gateway [Public IP]


Azure  Application Gateway [Public IP] -> FrontEnd  -> 2 Listener (HttpListener80, HttpsListener443)

 APB HttpListener(80) Redirects to HTTPSListener(443)

ALB HTTPSListener  does SSL Offloading and backend Rule then distributes load among the nodes at HTTP Level


SSL Offloading - eases load on Destination Nodes/Actual Server VMs so that they don't have to encrypt and decrypt

Another option is End to End SSL in which even Backend Nodes must have SSL Implanted in them at Server Level but tradeoff is that it introduces extra work at node level - encrypting/deciphering.

Install Powershell for AZURE - Azure CLI

How to install Powershell for Azure

https://www.parallels.com/blogs/ras/azure-powershell/

Set-ExecutionPolicy RemoteSigned

Install-Module -Name Az -AllowClobber

Connect-AzAccount -DeviceCode                        [Enter Device Code on Browser after opening it]

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass