0% found this document useful (0 votes)
10 views65 pages

Deploying Multi-Tier Webapp On AWS Using Managed Services

The document outlines the process of deploying a simple multi-tier web application on AWS using managed services. It includes detailed steps for creating IAM users, setting up security groups, and configuring services like RDS, Elasticache, and Active MQ. The document serves as a comprehensive guide for users to follow along with the deployment process on AWS.

Uploaded by

Pratik Sanas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views65 pages

Deploying Multi-Tier Webapp On AWS Using Managed Services

The document outlines the process of deploying a simple multi-tier web application on AWS using managed services. It includes detailed steps for creating IAM users, setting up security groups, and configuring services like RDS, Elasticache, and Active MQ. The document serves as a comprehensive guide for users to follow along with the deployment process on AWS.

Uploaded by

Pratik Sanas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Deploying the

Simple multi tier


application on
AWS using
Managed services
Deploying the Simple multi tier web application on AWS using managed services

Flow of Execution & Index of Topics

Tasks Page No

i Services used in this project 2

ii Architectural Design 3

1 Login to AWS Account, creating IAM user with Existing policy 4

2 Create key pair for beanstalk login 10

3 Create security group for Backend(Active MQ, Elasticache and RDS) 11

4 Create RDS 14

5 Creating Elasticache Service 23

6 Creating Amazon Active MQ Service 31

7 DB Initialization 35

8 Create Elastic Beanstalk environment 41

9 Update the security group of backend to allow traffic from the Beanstalk Security 50
group

10 Build the artifact with Backend Information 52

11 Deploy Artifact to Beanstalk 59

12 Changing the health checks on beanstalk to /login 61

13 Testing the Deployment with Beanstalk URL 63

14 Credits 64

1
Deploying the Simple multi tier web application on AWS using managed services

Services used in this project

SL.No Services

1 EC2 instances

2 ELB

3 Autoscaling

4 RDS

5 Elastic Cache

6 Active MQ

7 IAM

8 Cloudwatch

9 Git

10 Maven

2
Deploying the Simple multi tier web application on AWS using managed services

Architectural Design

3
Deploying the Simple multi tier web application on AWS using managed services

1 Login to AWS Account, creating IAM user with Existing policy

1. Login to your AWS Account with IAM user account

2. If you don’t have an IAM user account follow the below steps , open IAM by searching it

4
Deploying the Simple multi tier web application on AWS using managed services

3. Select Users at sidebar, next click on Add users

4. Now you can see the Dashboard for creating IAM User, we have 3 Steps
Step 1 : Specify user details
Step 2 : Set permissions
Step 3 : Review and create

5
Deploying the Simple multi tier web application on AWS using managed services

5. Creating IAM user - Step 1 : Specify user details :


User name Add your username

Enable Console access Tick

Console password Type strong Password

● Must be at least 8 characters long


● Must include at least three of the
following mix of character types:
uppercase letters (A-Z), lowercase
letters (a-z), numbers (0-9), and
symbols ! @ # $ % ^ & * ( ) _ + -
(hyphen) = [ ] { } | '

Users must create a new password at next Untick


sign-in (recommended).

Review you details and click on Next

6
Deploying the Simple multi tier web application on AWS using managed services

6. Creating IAM user - Step-2 : Set permissions


● Select Attach policy directly
● At permission policies , search for Admin , select AdministratorAccess
● At bottom, select Next

7. Creating IAM user - Step 3 : Review and create


Check the details and click on Create user , you can add tags if you need

7
Deploying the Simple multi tier web application on AWS using managed services

8. Creating IAM user - Step 4 : Retrieve password


● Copy the signin URL , Username and password and save it by pasting secured place
or
● You can download the csv file, store in secured place

9. Logout from the root user aws console and open the URL at browser (URL : previously copied)
Now login as IAM user, by entering username and password , next click on Sign In

8
Deploying the Simple multi tier web application on AWS using managed services

10. It’s done , now you logged in AWS Console with IAM user
You can check your username at top right corner as iam-username@ root-user-name
You can check at Region N.Virginia , by clicking the regions dropdowns besides

9
Deploying the Simple multi tier web application on AWS using managed services

2 Create key pair for beanstalk login

1. Open EC2, by searching it or Select Services > Compute > EC2,Click on Key Pairs at bottom
left sidebar

2. Click on Create key pair

3. Enter Name, Key pair type as RSA and Private key format as .pem, Next click on Create key
pair

10
Deploying the Simple multi tier web application on AWS using managed services

3 Create security group for Backend(Active MQ, Elasticache and RDS)

1. Open Security groups services by click on security groups at sidebar

2. Here, we need to enable Internal traffic between the backend services - Active MQ, Elasticache
and RDS, For this we are creating a security group
Note : By default, we don’t have any option to allow internal traffic between multiple services within
security
We can allow traffic by adding IP’s of services at security group, but now we are not created
services, so we following a way
● Creating a dummy Inbound rule and saving it
● Editing the security group inbound rules adding inbound rule with the same security group
and deleting the previous dummy rule

3. Click on Create security group, Then you can see this page

11
Deploying the Simple multi tier web application on AWS using managed services

● Add Security group name : Backend-sg-Active MQ-Elasticache-RDS


● Description : Backend Security Group for Active MQ, Elasticache and RDS
● VPC : use default VPC
● Inbound Rules : Add Rule , at source : select My IP

Click on Create security group at bottom, then security group created, shows the details page

4. Click on Edit inbound Rules

5. Delete Previous inbound rule

12
Deploying the Simple multi tier web application on AWS using managed services

6. Click on Add rule


● Type : All Traffic
● Source : Custom and search for backend - select the backend security group
(previously created)
● Click on Save rules

7. You can see updated security group

13
Deploying the Simple multi tier web application on AWS using managed services

4 Creating RDS

1. Open RDS by searching or Select AWS > Services > Database > RDS

2. Before creating the RDS Database, we have to create Subnet groups , Parameter groups,
Click on Subnet groups at sidebar

3. Click on Create DB subnet group


We have to Give the below setup details/configuration settings
● Subnet group details
○ Name : RDS-sg-vprofile
○ Description : RDS-sg-vprofile
○ VPC : Select Default VPC
● Add subnets
○ Availability zones : Select all Availability zones
○ Subnets : Select all Subnets

14
Deploying the Simple multi tier web application on AWS using managed services

Next, click on Create

15
Deploying the Simple multi tier web application on AWS using managed services

4.2 Parameter group :

1. Click on Parameter groups at sidebar

2. Click on Create parameter group


● Parameter group family : mysql5.7
● Type : DB Parameter Group
● Group name : rds-parameter-group-vprofile
● Description : rds-parameter-group-vprofile

Next, Click on Create

16
Deploying the Simple multi tier web application on AWS using managed services

4.3 RDS Mysql Database Creation :

1. Click on Databases on Amazon RDS sidebar, Next click on Create database

2. Database creation services web page opens

1. Here, we have some steps to create Mysql/Database

I. Choose a database creation method


II. Engine options
III. Templates
IV. Availability & durability
V. Settings
VI. Instance configuration
VII. Storage
VIII. Connectivity
IX. Database authentication
X. Monitoring
XI. Additional configuration

17
Deploying the Simple multi tier web application on AWS using managed services

(i). Choose a database creation method : select Standard create

(ii). Engine options : Engine type : MySQL & Engine Version : MySQL 5.7.34

(iii). Templates : Select Free Tier

18
Deploying the Simple multi tier web application on AWS using managed services

(iv). Availability and durability : Options disabled when we select free tier

(v). Settings :

● DB instance identifier : name of database- give any name


● Credentials Settings
○ Master username : admin/master username for database
○ Auto generate a password : tick it , aws will create a strong a password for us

(vi). Instance configuration :

● DB Instance class : Burstable classes (includes t classes)


● Select db.t2.micro

19
Deploying the Simple multi tier web application on AWS using managed services

(vii) Storage :
● Storage type : General Purpose(Gp2)
● Allocated storage : 20 GiB
● Storage autoscaling :
○ Enable storage autoscaling : Untick

(viii). Connectivity :
● Compute resource : Don’t connect to EC2
● Network type : IPv4
● Virtual private cloud (VPC) : Default
● DB subnet group : Choose Previously created security group for RDS
● Public access : Select No
● VPC security group (firewall) : choose existing , and select previously created security
group for backend
● Availability Zone : No preference
● RDS Proxy : Untick

20
Deploying the Simple multi tier web application on AWS using managed services

(ix). Database authentication : Select Password authentication

(x). Monitoring: untick Enable Enhanced monitoring

(xi). Database options :


● Initial database name : master
● DB parameter group : previously created parameter group , i.e.
rds-parameter-group-vprofile
● Option group : select default
● Backup : untick
● Log exports : untick all
● IAM role : NA
● Maintenance : untick
● Maintenance window : No preference
● Deletion protection : untick

21
Deploying the Simple multi tier web application on AWS using managed services

5. Estimated monthly costs : shows monthly bill , Next click on create database

It will takes 5-10 mins to create RDS Database, click on View credential details, then copy
credentials & save them in a secured place

22
Deploying the Simple multi tier web application on AWS using managed services

5 Creating Elasticache

5.1 Overview :
Open Elasticache by searching it, below shows the dashboard of Elasticache, Before going to
create ElastiCache Cluster, we have to create
(i). Parameter groups
(ii). Subnet groups

5.2 Creating Parameter Group :

(i) . Overview : Select Parameter groups on sidebar, Next click on Create parameter group

23
Deploying the Simple multi tier web application on AWS using managed services

(ii). Create parameter group : When after you clicking it, you can see the below dashboard, Give
the below settings and click on create
● Name : Memcached-vprofile
● Description : Elasticache-Memcached-vprofile
● Family : Memcached 1.4
Next, click on Create

5.3 Subnet groups creation :

(i). Click on Subnet groups on Amazon Elasticache Sidebar to open subnet groups service.
Click on Create subnet group

(ii). Create Subnet group : when after clicking it, we can see below dashboard, asks for settings
follow the below settings/details which are required for the vprofile project

● Subnet group settings


○ Name : memcache-subnet-vprofile
○ Description : Elasticache-memcache-subnet-vprofile
○ VPC ID : Choose Default VPC

24
Deploying the Simple multi tier web application on AWS using managed services

(iii). Selected subnets : Choose all

(iv). Subnet group is created

Next, we have to create a Memcached cluster.

25
Deploying the Simple multi tier web application on AWS using managed services

5.4 Creating Memcached cluster :

(i). Click on Memcached cluster on side bar of Amazon ElastiCache,


Next Click on Create Memcached cluster

(ii). To Create Memcached cluster, we have to complete these steps


Steps Settings

Step 1 Cluster settings

→ Location

→ Cluster info

→ Cluster settings

→ Subnet group settings

→ Associated subnets

→ Availability Zone placements

Step 2 Advanced settings

Step 3 Review and create

Step 1 : Cluster Settings

● Location : AWS Cloud


● Cluster Info :
○ Name : Memcached-vprofile-cluster
○ Description - optional

26
Deploying the Simple multi tier web application on AWS using managed services

● Cluster settings
○ Engine version : 1.4.34
○ Port : 11211
○ Parameter groups : memcached-vprofile
○ Node type: cache.t2.micro - 0.5 GiB memory
○ Number of nodes : 1

● Subnet group settings : A subnet group is a collection of subnets (typically private).


Designate a subnet group for your clusters running in an Amazon Virtual Private Cloud
(VPC) environment.
○ Subnet groups : choose existing
○ Subnet groups : select previously created subnet for Memcahed
● Associated subnets : shows the list of enabled subnets for Memcahed

27
Deploying the Simple multi tier web application on AWS using managed services

● Availability Zone placements : No preference

Next, Click on Next

28
Deploying the Simple multi tier web application on AWS using managed services

Step 2 : Advanced settings :

● Security groups : select the security group previously created for Memcached
● Maintenance window : Tick No preference

Click on Next,

Step - 3 : Review

Here we need to focus at


(i) Parameter groups : need to add previously created
(ii) Subnet groups : need to add previously created
(ii) Security groups : need to add previously created

29
Deploying the Simple multi tier web application on AWS using managed services

Next, click on create.

(iii) Now you can see the Memcached cluster is created

30
Deploying the Simple multi tier web application on AWS using managed services

6 Creating Amazon Active MQ (RabbitMQ)

6.1 Overview :

● Amazon MQ is a managed message broker service for Apache ActiveMQ and RabbitMQ
that makes it easy to set up and operate message brokers in the cloud, so you can migrate
your messaging and applications without rewriting code.
● Here we use RabbitMQ service using the Amazon MQ
● We have also Related service Amazon SQS is a fully managed and highly scalable
message queuing service for distributed applications and systems.

6.2 Create RabbitMQ with Amazon Active MQ :

(i). Click on Brokers on Sidebar to start

(ii). Click on Create Brokers on right top corner of webpage

31
Deploying the Simple multi tier web application on AWS using managed services

(iii). Steps to create :


Creation of Broker engine has 4 steps, they are
● Step 1 : Select broker engine
● Step 2 : Select deployment and storage type
● Step 3 : Configure settings
● Step 4 : Review and create

(iv). Step 1 - Select broker engine : Select ActiveMQ, Then after click on Next

(v) Step 2 - Deployment mode and storage type :


● Select Deployment mode : Single broker - Single-instance broker
● Select Storage type : Durability optimized ,Then after click on Next

32
Deploying the Simple multi tier web application on AWS using managed services

(vi). Step 3 - Configure settings :


● Details :
○ Broker name : RabbitMQ-Vprofile
○ Broker instance type : mq.t3.micro - 2 vCPU 1Gb RAM Low Network
● ActiveMQ access :
○ Username : rabbit
○ Password : Ribbon@2023#

● Additional settings :
○ Broker engine version : 5.15.12
○ Broker configuration : Create a new configuration with default values
○ CloudWatch Logs : Tick none of them
○ Network and security : Select Private access
○ VPC and subnets : Use the default VPC and subnet(s)
○ Security group(s) : use previously created backend security group
○ Encryption : AWS owned CMK
○ Maintenance : Untick Enable automatic minor version upgrades
○ Maintenance window : No preference

After this click on Next

33
Deploying the Simple multi tier web application on AWS using managed services

(vii). Step - 4 : Review & create :


Review all and create broker

Estimated deployment time: 20 minutes

34
Deploying the Simple multi tier web application on AWS using managed services

7 Database Initialization

7.1 Overview :
● To connect to RDS Mysql we need a VM with mysql-client installed,
● Need to connect to mysql using RDS endpoint , username and password
● Create accounts database
● Download the database from the git by cloning
● Restore/copy the database to accounts database
● Verify the accounts database has tables related vprofile project

7.2 Creating Virtual Machine


Open EC2 by searching it, click on Launch instance to create a VM, Creating VM we have 7 steps
(i) Name and tags : mysql-client-instance
(ii) Application and OS Images (Amazon Machine Image) : Ubuntu 18.04 LTS

(iii) Instance type : t2.micro

35
Deploying the Simple multi tier web application on AWS using managed services

(iv) Key pair (login) : use beanstalk key

(v) Network settings :


a. VPC : Default VPC
b. Subnet : No preference
c. Auto-assign public IP : Yes
d. Firewall (security groups) : TCP - 22 - Anywhere or SSH from anywhere

(vi). Configure storage : Default - 8GB - gp2


(vii) Advanced details : Leave it default

36
Deploying the Simple multi tier web application on AWS using managed services

(viii) Review and Launch Instance to create Instance

(ix) Go to instances select the created instance and connect it with pem key using SSH terminal
→ Copy the Connect string

(x) Open your ssh terminal/Terminal in windows, move to the pem key downloaded directory, in my
case, I have downloaded to Downloads folder, moving to directory and pasting the string in
terminal to connect with vm instance

Virtual Machine connected using SSH

37
Deploying the Simple multi tier web application on AWS using managed services

(xi) Updating the Repository

sudo apt update -y

(xii) Installing the mysql-client

sudo apt install mysql-client -y

(xiii) Enable the MySql Port 3306 of RDS Mysql security group
Now onwards RDS Mysql takes inputs from mysql-client ubuntu VM with 3306 Port

(xiv) Connecting to the mysql by copying the endpoint

38
Deploying the Simple multi tier web application on AWS using managed services

(xv) Connecting at mysql-client ubuntu VM, run the below command


Replace username and password with your username and password

mysql -h database-vprofile.ciix4w7yixwy.us-east-1.rds.amazonaws.com -u admin


-pittdrUcEEiq8fOcHjlPJ

(xvi) Creating database with name ‘accounts’

create database accounts;

show databases;

(xvii) exit from mysql and Download the git repo which contain database schema

git clone https://github.com/devopshydclub/vprofile-project

(xviii). Move to the database backup directory

cd /home/ubuntu/vprofile-project/src/main/resources/

39
Deploying the Simple multi tier web application on AWS using managed services

(xix) Restoring the backup to accounts database

mysql -h database-vprofile.ciix4w7yixwy.us-east-1.rds.amazonaws.com -u admin


-pittdrUcEEiq8fOcHjlPJ accounts < db_backup.sql

(xx). Checking the tables in accounts by logging in

mysql -h database-vprofile.ciix4w7yixwy.us-east-1.rds.amazonaws.com -u admin


-pittdrUcEEiq8fOcHjlPJ

Use accounts;

Show tables;

Tables are added to database;

40
Deploying the Simple multi tier web application on AWS using managed services

8 Create Elastic Beanstalk environment

8.1 Overview :

Elastic Beanstalk is a service for deploying and scaling web applications and services. Upload
your code and Elastic Beanstalk automatically handles the deployment—from capacity
provisioning, load balancing, and auto scaling to application health monitoring.
Amazon Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications
and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker on familiar
servers such as Apache, Nginx, Passenger, and IIS.

In this Project we are using Elastic Beanstalk for apache tomcat with Auto scaling

8.2 Creating Elastic Beanstalk Environment

1. New Environment: Create new environment


Step -1 : Select Environment Tier : Web server environment

Step -2 : Enter Application name

41
Deploying the Simple multi tier web application on AWS using managed services

Step - 3 : Enter Environment name

Step - 5 : Enter Platform as Tomcat with Tomcat 8.5 corretto - Amazon Linux 2
And

Step -6 : Application code : sample code & click on Configure more options

Step - 7 :
We have to configure more options for some particular
(i) Instance
(ii) Capacity block
(iii) Load balancer
(iv) Rolling updates and deployments
(v) Security
(vi) Monitoring
(vii) Tags
(viii) Managed Updates

42
Deploying the Simple multi tier web application on AWS using managed services

Step - 8 : (i) Select Edit on Instance block

Step - 9 : Modify instances


Root volume type : General Purpose SSD
Security group : Backend security group (Previously created )

43
Deploying the Simple multi tier web application on AWS using managed services

Step - 10 : (ii). Select Edit on Capacity block

Step - 11 : set Autoscaling group environment type as Load balanced , min 2, max 4 instance &
instance type t2.micro , keep everything else as default values

44
Deploying the Simple multi tier web application on AWS using managed services

Step - 12 : (iii). Select Edit on Load balancer block

Step - 13 : Check Application Load balancer with Dedicated or not, no changes right now ,
changes taken place once after Beans launched

45
Deploying the Simple multi tier web application on AWS using managed services

Step - 14 : (iv). Select Edit on Rolling updates and deployments block :

Step - 15 : Select Deployment policy as Rolling and Batch size as 50%


We have 2 instance runs all time (given min 2) so 50% will roll update to once after one

Keep all other default :

46
Deploying the Simple multi tier web application on AWS using managed services

Step - 16 : (v). Select Edit on Security block

Step 17 : Add Key pair with Elastic Beanstalk key (previously created)

Step - 18 : (vi). Select Edit on Monitoring block

Step - 19 : Change Health monitoring to Basic

47
Deploying the Simple multi tier web application on AWS using managed services

Step - 20 : (vii). Select Edit on Tags block

Step - 21 : Add tag as key: Project and value : vprofile

Step - 22 : (viii) Select Edit on Managed Updates block

Step - 23 : Tick off Managed updates to turn off the updates

48
Deploying the Simple multi tier web application on AWS using managed services

Step - 24 : click on Create environment

It will take 5-15 minutes to launch the Beanstalk application

Once After Creation , you can see the Environment Health ok (to see select the created
environment from the sidebar), we can see this only once after Creating the Beanstalk application
and click on the link

Now the sample web application is running/working

49
Deploying the Simple multi tier web application on AWS using managed services

9 Update the security group of backend to allow traffic from Beanstalk Security group

9.1 Overview :

● We have the Beanstalk Application is up and running but we need vprofile project need to
uploaded to Tomcat
● we have to establish the connections between the Tomcat & Backend services Mysql,
Active MQ and ElastiCache Services
● For this , we have to Add Inbound Rules at Backend Security Group as

Service Port Source/IP Range

Mysql 3306 Beanstalk security group

ElastiCache 11211 Beanstalk security group

ActiveMQ 5671 Beanstalk security group

9.2 Checking the security groups :

To check the security groups , go to aws > Services > Compute > EC2 > Sidebar > Select security
group
Here below we can see two new security groups created
(i) One for Elastic beanstalk
(ii) second for Load balancer

For identification purpose renaming with extension tags, you can see the changes

50
Deploying the Simple multi tier web application on AWS using managed services

To Add the Inbound Rules at Backend Security Group, select backend sg and click at
Edit inbound rules

Add the rules and save rules

51
Deploying the Simple multi tier web application on AWS using managed services

10 Build the artifact with Backend Information

10.1 Overview :

To build the artefact we need to install the following tools/services in local machine(windows) :
● Chocolatey install
● Installing git
● Installing jdk8
● Install maven
● Clone the git repository
● Build the source code using maven
1. Open power with Run as Administrator : Press windows button > search for windows powershell
> Select Run as Administrator

2. Install chocolatey using the below command :

Weblink for documentation : https://chocolatey.org/install#individual

Run the below command at powershell


Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol =
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object
System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

52
Deploying the Simple multi tier web application on AWS using managed services

3. Install git using below command @powershell

choco install git -y

4. Installing jdk8 @powershell

choco install jdk8 -y

53
Deploying the Simple multi tier web application on AWS using managed services

6. Installing maven @powershell

choco install maven -y

7. Verify the installation : run the below commands at cmd

choco install maven -y

8. Clone the git repository,


Open cmd and move to any one of disk , in my case i am moving into F disk/drive

cd F:/
git clone https://github.com/SagarFive/vprofile-project.git

9. Move into the project directory, list out all branches

cd vprofile-project
10.Checkout to aws-Refactor branch

git checkout aws-Refactor

54
Deploying the Simple multi tier web application on AWS using managed services

11. List files using ls : shows us project home directory files

ls

12. Getting inside the files, to update application.properties file

cd .\src\main\resources\

13. We have to update AmazonMQ, AmazonCache and RDS info in the application.properties file,
so now it’s time to grab the information from the services
We have to update the endpoints of services in application.properties file, for that open services
dashboard and copy the endpoints

55
Deploying the Simple multi tier web application on AWS using managed services

Mysql endpoint : Open RDS and select the Database and copy the endpoint

Amazon Rabbit MQ Endpoint :

Copy the AMQP ENDPOINT

56
Deploying the Simple multi tier web application on AWS using managed services

3. ElasticCache Endpoint : Copy endpoint of memcached-vprofile-cluster

Amazon RDS database username password

database-vprofile.ciix4w7yixwy.us-east-1.rds.amazonaws.com
admin
ittdrUcEEiq8fOcHjlPJ

---

ActiveMQ
b-ab9a56fb-e5ce-4864-a0d4-30cf7dd360d7-1.mq.us-east-1.amazonaws.com:5671
rabbit
Ribbon@2023#

----
Memcache
memcached-vprofile-cluster.bzrpsb.0001.use1.cache.amazonaws.com:11211

4. Modifying the application.properties file :


Go to source code at your local machine and search for application.properties, Change the
Configurations with above configurations
To edit file

vim application.properties

Press I to enter Editing/INSERT mode

57
Deploying the Simple multi tier web application on AWS using managed services

Change the configurations with endpoints and passwords

To Save Press ESC to enter in Command mode and Then Enter wq! , once after changes done
5. Building artifact : Go to source code at ec2 > get inside vprofile-project folder (this folder
contains file pom.xml/Move to project directory where pom file is available )
Run the below command to get/build artifact war file

cd <vprofile-project-home-directory>
mvn install

In above screenshot, we can find artefact location ( 5th line from bottom of screenshot) - Copy the
Path

58
Deploying the Simple multi tier web application on AWS using managed services

11 Deploying artifact to Beanstalk

1. Go to Elastic Beanstalk > application versions

2. Upload the artefact by clicking upload button ( add version label, choose file - add by using
previously copied path)

Artifact .war file uploaded

59
Deploying the Simple multi tier web application on AWS using managed services

3. Deploy the artifact/application, select the newly uploaded artifact/application > actions > Deploy

Confirm the deployment

60
Deploying the Simple multi tier web application on AWS using managed services

12 Changing the health checks on beanstalk to /login

1. Before deploying change health check endpoint

2. Add Health check as /login , for this Beanstalk > Application > Configuration > Processes >
Health check and path as /login

61
Deploying the Simple multi tier web application on AWS using managed services

Add the path here as /login

Save it

62
Deploying the Simple multi tier web application on AWS using managed services

13 Testing the Deployment with Beanstalk URL

1. Go Beanstalk app and copy the Endpoint of beanstalk application below the application name

2. Run/open the endpoint at web browser, login with username password , both use : admin_vp

63
Deploying the Simple multi tier web application on AWS using managed services

14 Credits

Source code/Github code used in the project belongs :

1 devopshydclub - github account https://github.com/devopshydclub

2 devopshydclub - vprofile project https://github.com/devopshydclub/vprofile-project

3 devopshydclub - vprofile note https://github.com/devopshydclub/vprofile-project

4 Project -

Suggest us/Comment us if there is any mistakes in this documentation

🌐 Copy of Deploying the Simple multi tier application on AWS using Managed…

Thank you !
For more visit us : www.sagar5.in

64

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy