# Package Files # *.jar *.war *.nar *.ear *.tar.gz *.rar #Exceptions to File Types based on Locations !LB/**/*.jar
Monday, April 12, 2021
Git ignore all files of a certain type except in all subdirectories of a certain directory?
Multiple Instances, LoadBalancer, @LoadBalanced
@LoadBalanced
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
Why We place @LoadBalanced on RestTemplate because RestTemplate is used to to fetch Server IP Address and port from Eureka Registry and its also used for Client side Load Balancing
@EnableEurekaClient public class MovieCatalogServiceApplication { public static void main(String[] args) { SpringApplication.run(MovieCatalogServiceApplication.class, args); } @Bean @LoadBalanced public RestTemplate getRestTemplate() { return new RestTemplate(); } }
We achieved by running application in an executable Jar in separate port
java -Dserver.port=8084 -jar movie-info-service-0.0.1-SNAPSHOT.jar
IntelliJ - Multiple Maven Projects Back into 1 Single Workspace/Window
How to merge Multiple Maven Projects Back into 1 Single Workspace/Window
https://stackoverflow.com/questions/8774024/intellij-working-on-multiple-projects/14637761#14637761
View > Tool Windows > Maven > An inline Window Opens > Click on Plus(+) Sign > Choose POM File of the Project You want to add in Workspace/Window > OK
Sunday, April 11, 2021
Install Ubuntu 17 on Virtualbox - With Full Desktop Screem
Newer Ubuntu versions gave me some issues - Got Stuck for 2-3 Hours
Solution :
- Don't Select "Download Updates" and "3rd Party Software" When U Click on Install Ubuntu
Download VirtualBox
https://www.virtualbox.org/wiki/Downloads
http://old-releases.ubuntu.com/releases/17.04/ubuntu-17.04-desktop-amd64.iso
https://superuser.com/questions/751831/virtualbox-ubuntu-full-screen-mode-resolution/754029#754029
Saturday, April 10, 2021
AWS : Internet <-> Internet GW <-> VPC <-> Route Table <-> NACL <-> Security Group <-> EC2 Instance
Data Flow inside AWS
Thursday, April 8, 2021
AWS : NAT_Gateway
https://www.youtube.com/watch?v=_JumK1gOYW8
- Make an NAT_Gateway . Allocate Elastic IP Address to it.
- Place NAT Gateway in Public Subnet, i.e. this subnet should tied to a Route Table which points to Internet Gateway
- Place All EC2 Instances in Private Subnet i.e Route Table should point to "NAT_Gateway" for 0.0.0.0/0 Destination
--------------------------------------------------------------------------------------------------------------------------
EC2 instances need to have Public IP Address and Subnet must be connected to Route Table with a Internet Gateway
This Internet Gateway also allows Anyone to reach to EC2 Instances - EC2 is Accessible to World
What if We don't want EC2 Instances not to be accessible and yet to be able to Access Internet when it wants to ? Private Instances Want to connect to Internet without going through Internet Gateway.
Solution is "NAT Gateway"
NAT Gateway needs Static/Elastic IP Address - A special IP Address which never changes
"NAT Gateway" - Masks Pvt IP Address and writes its own IP Address and connects to outside world via Internet Gateway
"NAT Gateway" is placed in Public Subnet having a Route Table which routes to Internet Gateway
EC2 Instances having Private IP Addresses in Private Subnet are connected to Route Table which routes to "NAT Gateway"
Azure - Pipeline - Add Approver for Stage
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass
-
https://www.baeldung.com/spring-properties-file-outside-jar https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-featu...
-
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass
-
The decision was made to block such external HTTP repositories by default https://stackoverflow.com/questions/66980047/maven-build-failure-d...