This project aimed to deploy a Java application on the AWS 3-tier architecture. The primary goal of the project was to provide a scalable, secure, and highly available application to the end-users through public internet access. The application was deployed on Amazon Web Services (AWS) infrastructure and various tools and services such as Bitbucket, Sonarcloud, Jfrog, AWS CLI, Cloudwatch, and Apache Maven were used to develop and deploy the application.
- Created an AWS Free Tier account and Bitbucket repository for the Java source code.
- Migrated the Java source code to Bitbucket and created accounts in Sonarcloud and Jfrog cloud.
- Created a Global AMI and installed the AWS CLI, Cloudwatch agent, and AWS SSM agent.
- Created Golden AMIs for Nginx, Apache Tomcat, and Apache Maven.
- Deployed a VPC network with a public subnet for the Bastion host and a private subnet for the application servers.
- Deployed a Bastion host in the public subnet with an EIP and a security group allowing port 22 from the public internet.
- On an EC2 instance using the Maven Golden AMI, cloned the Bitbucket repository, built the source code, and integrated it with Sonar Cloud.
- Deployed a multi-AZ MySQL RDS instance in the private subnets and a private facing Network Load Balancer and Target Group for the Tomcat servers.
- Deployed an Auto Scaling Group for the Tomcat servers using a launch configuration with the Tomcat Golden AMI and User Data to deploy the .war artifact.
- Deployed a public facing Network Load Balancer and Target Group for the Nginx servers.
- Deployed an Auto Scaling Group for the Nginx servers using a launch configuration with the Nginx Golden AMI and User Data to update the proxy_pass rules.
- Configured a cronjob to push the Tomcat application log data to an S3 bucket and rotate the log data.
- Configured Cloudwatch alarms to send email notifications when the database connections are above a certain threshold.
Technology / Services
- AutoScaling Group