First we need to log in to AWS profile NORTH VERGINI Region
I also have cert wich will be using for HTTPs on Load balancer, check pre request part to get the certificate from your domain.
First we need to create security group.
Security Group and key pairs:
Go to ec2 instances then click Security group
Create a security group for load balancer
Give a name : vprofile-ELB-SG-------->Description: Security group for vprofile prod load balancer.--------->Vpc : choose a default one
Type: HTTP -------->check port :80------->source: Anywhere (because we are public host our website)
Type: HTTPS-------->Port: 443---->Source: Anywhere
Create a security group for Tomcat
Name: vprofile-app-sg----------->Description: Security group for tomcat instances----->vpc: choose a default one
Type: custom TCP--------->Port:8080--------->Source: custom
Choose security of load balancer
Description: Allow traffic from vprofile prod ELB ------>Save this.
Need to add one more security group for Backend server RabbitMQ, Memcached and MySQL.
Name: vprofile-backend-sg----------->Description: Security group for vprofile-backend server--------->vpc: choose a default one
Type: MYSQL/Aurora--------->Port:3306--------->Source: custom Allow only from application security group or choose vprofile-app-sg----->Description: allow 3306 from application
Two other source is working in this server:
Type: custom Tcp--------->port:11211--------->Source: custom Allow only from application security group or choose vprofile-app-sg------->Description: Allow tomcat to connect Memcached
Type: custom tcp------->Port:5672-------->Source: custom Allow only from application security group or choose vprofile-app-sg--------------> Description: allow tomcat to connect RabbitMQ---------->Save security group
Now we have Three security group
we need make one more change in backend security group 3 services, it will also interact each other.
Go to backend security group
Type: All traffic--------->Port:All-------->Source: custom Choose its own security id or choose vprofile-backend-sg------->Description: allow internet traffic to flow on all port.--------->save the changes
Now time to create a key pairs
Left side you can find key pair click that
Create key pair--->Name: vprofile-prod-key------> Format: if your using putty choose ppk or if your using gitbash then choose pem, I am using gitbash so am choosing pem format.-------->Then click create key pair.
Next step we need to install EC2 click the link below to follow the steps.
EC2 Instance