Monday, August 2, 2021

How to mount AWS EFS Drive to Linux EC2 Instance

sudo su user1-

sudo yum install nfs-utils

mkdir -p /fileshare

chown user1:usergrp1 /fileshare

chmod ugo+rwx /fileshare

sudo vi /etc/fstab

--Get Info from Attach EFS from AWS [You need Network Access ]

fs-123456.efs.us-east-1.amazonaws.com:/ /fileshare nfs4 rw,intr,hard,_netdev,nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport

sudo mount -a

sudo reboot now


EFS is regional 


Sunday, July 18, 2021

Docker: Docker Commands : Exhaustive

docker image pull <image>
docker image ls

docker container run <image> 
docker container run <image> --name  <containerName>
docker container run <image> -d
docker container run <image> -p HostPort:ContainerPort
docker container run -it <image> command

docker container 

docker container start <container>
docker container start -at <container>

docker container exec -it  <container>  command

docker container top

Would the following two commands create a port conflict error with each other?
NO ? Why ?
Each of below lines creates own containers

docker container run -p 80:80 -d nginx
docker container run -p 8080:80 -d nginx





Thursday, July 15, 2021

Maven : -DskipTests vs -Dmaven.test.skip=true

https://stackoverflow.com/questions/25639336/whats-the-difference-between-dskiptests-and-dmaven-test-skip-true 


Maven docs:

-DskipTests compiles the tests, but skips running them

-Dmaven.test.skip=true skips compiling the tests and does not run them

Also this one might be important

maven.test.skip is honored by Surefire, Failsafe and the Compiler Plugin


So the complete set of test options for Maven would be:

  • -DskipTests ==> compiles the tests, but skips running them
  • -Dmaven.test.skip.exec=true ==> the tests get compiled, but not executed.
  • -Dmaven.test.skip=true ==> doesn't compile or execute the tests.

 

PKIX path building failed: sun.security.provider.certpath

https://stackoverflow.com/questions/21076179/pkix-path-building-failed-and-unable-to-find-valid-certification-path-to-requ



  1. Go to URL in your browser:
  • firefox - click on HTTPS certificate chain (the lock icon right next to URL address). Click "more info" > "security" > "show certificate" > "details" > "export..". Pickup the name and choose file type example.cer
  • chrome - click on site icon left to address in address bar, select "Certificate" -> "Details" -> "Export" and save in format "Der-encoded binary, single certificate".
  1. Now you have file with keystore and you have to add it to your JVM. Determine location of cacerts files, eg. C:\Program Files (x86)\Java\jre1.6.0_22\lib\security\cacerts.

  2. Next import the example.cer file into cacerts in command line (may need administrator command prompt):

keytool -import -alias example -keystore "C:\Program Files (x86)\Java\jre1.6.0_22\lib\security\cacerts" -file example.cer

You will be asked for password which default is changeit

Azure Notifications

 


Azure - Pipeline - Add Approver for Stage

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