{"id":18564959,"url":"https://github.com/sumitm01/lift-and-shift-application-workload-on-aws","last_synced_at":"2026-02-04T09:33:42.802Z","repository":{"id":184620806,"uuid":"657089940","full_name":"SumitM01/Lift-and-shift-application-workload-on-AWS","owner":"SumitM01","description":"Lift the existing tech stack and host it on AWS cloud with proper load balancing and DNS configuration.","archived":false,"fork":false,"pushed_at":"2023-06-24T16:09:59.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-26T12:09:57.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SumitM01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-22T09:46:20.000Z","updated_at":"2023-07-29T08:42:57.000Z","dependencies_parsed_at":"2023-07-29T10:52:18.082Z","dependency_job_id":null,"html_url":"https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS","commit_stats":null,"previous_names":["sumitm01/lift-and-shift-application-workload-on-aws"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SumitM01%2FLift-and-shift-application-workload-on-AWS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SumitM01%2FLift-and-shift-application-workload-on-AWS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SumitM01%2FLift-and-shift-application-workload-on-AWS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SumitM01%2FLift-and-shift-application-workload-on-AWS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SumitM01","download_url":"https://codeload.github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239293948,"owners_count":19615043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T22:16:56.927Z","updated_at":"2026-02-04T09:33:42.726Z","avatar_url":"https://github.com/SumitM01.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lift-and-shift-application-workload-on-AWS\nLift the existing tech stack and host it on AWS cloud with proper load balancing and DNS configuration.\n\n## Overview \nIn this project i have hosted the entire stack of the vprofile project and hosted it no AWS for production workload. If we look at the scenario there are lot of services running in tandem so that the service properly delivered to the customer. Managing these services requires huge expenditure, time and resources.\nTo tackle this problem we can host the entire technology stack on AWS using its IaaS capabilities. We pay as we go, automation is easy, human errors can be avoided and flexibilty will be available.\n\n## Project Architecture\n![service_architecture](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/6edda220-61c6-40ee-abc1-1919cb75baaf)\n\n## Services \n- EC2 instances\n    - virtual machines to run tomcat, mysql, rabbitmq, memcached\n- Elastic Load Balancer\n    - Nginx load balancer replacement \n- Auto scaling\n    - Automation for VM scaling\n- S3/EFS storage\n    - Shared storage\n- Route 53\n    - AWS private dns service\n## Implementation\n\nCONFIGURE SECURITY GROUPS :\n\t- configure vprofile elb sg\n ![vprofile-elb-sg rules](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/6f121752-0516-4b82-b3f8-edf3b386fbed)\n\n\t- configure vprofile-app-sg\n ![vprofile-app-sg rules](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/3ac3269a-bbcc-4d43-a4d2-fa76506d7162)\n\n\t- configure vprofile-backend-sg\n ![vprofile-backend-sg inbound rules](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/72122d80-2ce7-48e7-aafe-0a64ec5777de)\n\nLOCAL MACHINE REPO\n\t- clone the repo vprofile-project and checkout to branch 'local-setup'\n\t- change to vagrant/automated_provisioning folder\n\t\n\nLAUNCH EC2 INSTANCES AND CONFIGURE SERVICES\n\t- launch vprofile-db01 instance with centos 7 ami and t2.micro with user data as local-setup/vagrant/Automated_provisioning/mysql.sh and sg as vprofile-backend-sg with port 22 allowed from your ip\n\t- launch vprofile-mc01 instance with centos 7 ami and t2.micro with user data as local-setup/vagrant/Automated_provisioning/memcache.sh and sg as vprofile-backend-sg with port 22 allowed from your ip\n\t- launch vprofile-rmq01 instance with centos 7 ami and t2.micro with user data as local-setup/vagrant/Automated_provisioning/rabbitmq.sh and sg as vprofile-backend-sg with port 22 allowed from your ip\n ![backend-servers-ec2](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/4b02b966-52c2-4759-9bbc-610cb4864333)\n\n\t- ssh to backend instances and validate if they have been configured or not.\n ![rabbitmq-status-check](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/f96c6eeb-5bb9-43be-b5cd-8101318cf8e4)\n ![memcached-status-check-cli](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/285e7af7-0405-4a62-9cd1-e9fa4d723a52)\n ![mysql-status-check-cli](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/9afec310-63e0-4f1f-839c-5bef75812df2)\n\t- launch vprofile-app01 instance with ubuntu 20 ami and t2.micro with user data as local-setup/vagrant/Automated_provisioning/tomcat_ubuntu.sh and sg as vprofile-app-sg with port 22 allowed from your ip\n\t\nNEW HOSTED ROUTE 53 ZONE\n\t- create a hosted zone in route 53 as vprofile.in\n\t- add records as db01.vprofile.in, mc01.vprofile.in, rmq01.vprofile.in with their respective private Ip addresses.\n ![hosted-zone-vprofile](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/24b0234a-99b0-4d92-9d88-e23e692d5b01)\n \nUPDATE application.properties FILE IN 'aws-LiftAndShift'\n\t- update jdbc.url to jdbc:mysql://db01.vprofile.in:3306/accounts?useUnicode=true\u0026characterEncoding=UTF-8\u0026zeroDateTimeBehavior=convertToNull\n\t- update memcached.active.host to mc01.vprofile.in\n\t- update rabbitmq.address to rmq01.vprofile.in\n\nBUILD APPLICATION FROM SOURCE CODE\n\t- on local machine in the vprofile-project folder run mvn install artifact will be generated\n\nMAKE S3 BUCKET AND STORE THE ARTIFACT IN THE BUCKET\n\t- create an IAM role for accessing S3 bucket through cli and setup aws cli\n\t- aws configure and provide the IAM role credentials\n ![iam-user-signin](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/47061ed8-05b7-4110-ac9b-f7aa78d0f602)\n\t- run 'aws s3 mb s3://your_bucket_name' to create a new bucket (make sure the bucket name is unique in the whole world)\n\t- go to your src code repo and run 'aws s3 cp vprofile-v2.war s3://your_bucket_name/vprofile-v2.war' to upload the artifact on the s3 bucket\n ![s3_artifact_upload](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/7b92ded8-8c8f-46d7-a520-8a48a92b3ded)\n\nDOWNLOAD ARTIFACT ON APP SERVER AND BUILD AND RUN IT\n\t- create an ec2 role allowing s3fullaccess to download artifact from s3 bucket on tomcat instance\n\t- ssh to tomcat server instance, install and configure awscli\n ![update-iam-role-app01](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/b245a3ed-1e9e-4e4e-9890-b67927e8ab61)\n\t- run 'aws s3 cp s3://your_bucket_name/vprofile-v2.war /tmp/vprofile-v2.war' to download the file \n\t- stop tomcat service\n\t- navigate to /var/lib/tomcat9/webapps and remove ROOT folder\n\t- copy the downloaded file from /tmp folder to that folder using 'cp /tmp/vprofile-v2.war ./ROOT.war'\n\t- start the tomcat service \n\nCONFIGURE LOAD BALANCER AND DNS\n\t- create a target group with 8080 port and health check at /login select vprofile-app01 as instance and reduce healthy threshold to 2.\n ![target-group](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/b349dc17-2eec-440e-a756-c9109da05de5)\n\t- create a load balancer as internet facing selecting all AZs and creating HTTPS listener with certificate\n ![load-balancer](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/b0affed3-01c0-45b3-92da-0565ac58eddf)\n\t- copy load balancer endpoint and create a cname record under hosted zones which routes to the endpoint\n ![add-cname-record](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/598c5055-9425-49cd-a60e-e7883bc4fe36)\n\nCONFIGURE AUTOSCALING GROUP \n\t- create an image of the app instance\n\t- create a launch configuration using the image of the instance\n ![launch-template](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/85040653-2eaa-4d25-aa8d-155a3ed00320)\n\t- create a auto scaling policy as you like\n ![auto-scaling-group](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/c7f89080-df68-442e-84ba-7ee9e910eee4)\n\n## Results\n![website-working](https://github.com/SumitM01/Lift-and-shift-application-workload-on-AWS/assets/65524561/deec4b58-5074-48c2-8fe4-682973ed21d6)\nCongrats ! you have successfully migrated the entire stack and hosted your project on AWS. \n\nAll the settings and configurations have been copied from the repository https://github.com/SumitM01/Automated-vprofile-project-setup-using-Vagrant. Hope this helps 😊.\n\n# References\n- https://github.com/devopshydclub/vprofile-project/tree/e4ba15005e3aee74516d725ef2db1bf3c419e472/vagrant/Automated_provisioning\n- https://github.com/SumitM01/Automated-vprofile-project-setup-using-Vagrant\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumitm01%2Flift-and-shift-application-workload-on-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumitm01%2Flift-and-shift-application-workload-on-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumitm01%2Flift-and-shift-application-workload-on-aws/lists"}