ROUTE 53 AND ARTIFACT

In This we gonna see how to create Route 53 and Artifact.

Need to update private ip in route 53 to our private DNS, Copy all three Private IP address. 

Search for route 53 

   create a hosted zone------> This will be private--------->so we can give any name ----------> NAME: vprofile.in ----------> Give description: Hosted zone for vprofile backend servers------------>Region: select region north virgin-------------> vpc ID choose default-----------> create hosted zone .

Now need to create record 

 simple record --------->Name: db01-----------> IP address : give db01 ip ----------> save ---> create record

 simple record --------->Name: mc01--------->IP address : give db01 ip -------->save------> create record 

 simple record ----------->Name: rmq01--------->IP address : give db01 ip ---------> save---->Create record

 Now we gonna Launch Tomcat Instance

Choose Launch instance -------> Search for Ubuntu 18 instance ------>t2 micro is fine its a free tire----->click next------>Click enable accidental terminator----------->Now we gonna add TOMCAT user data in box.----------->click next-----> Wil keep default storage 8----->will add some tags -------> Name vprofile-app01--------> security group will vprofile-app port 8080------> click next and launch our instance.

It will give error port 22 is not open we will launched that once our instance is up and running.

Now we gone install artifact locally in our machine

For that we need jdk and maven installed in our machine,if you follow our pre requisition  and download all the tool you can skip this part now.

To download artifact go to gitbasah 

 Go to our repo--->cd vprofile-project---->cd src---->cd main---->cd resources (inside resources folder we have application file we are going to  change this).

vi application file

      Change db01:3306 to  db01.vprofile.in:3360

Change mc01 to mc01.vprofile.in:11211

Change rmq01 to rmq01.vproject.in.5672.


#JDBC Configutation for Database Connection

jdbc.driverClassName=com.mysql.jdbc.Driver

jdbc.url=jdbc:mysql://db01:3306(db01.vprofile 1.in:3306)/accounts?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull

jdbc.username=admin

jdbc.password=admin123


#Memcached Configuration For Active and StandBy Host

#For Active Host

memcached.active.host=mc01(mc01.vprofile 1.in)

memcached.active.port=11211

#For StandBy Host

memcached.standBy.host=127.0.0.2

memcached.standBy.port=11211


#RabbitMq Configuration

rabbitmq.address=rmq01(rmq01.vprofile 1.in)

rabbitmq.port=5672

rabbitmq.username=test

rabbitmq.password=test


#Elasticesearch Configuration

elasticsearch.host =192.168.1.85

elasticsearch.port =9300

elasticsearch.cluster=vprofile

elasticsearch.node=vprofilenode


press esc and try :wq to come out from vim file


To check everything is working fine try cat application properties


Now go to ec2 ----->Go to route 53 to verify the name what we gave is right before we build artifact.------>If everything is fine ----> go to gitbash.

we gonna build our source code into artifact 

Check where is pom.xml file----Try the below command 

cd vprofile-project ------>ls

Try this command to build artifact 

mavn install

we gonna store this artifact to s3 backet 

we gonna create IAM to use awscli 

IAM ---->USER ---> USER NAME : vprofile-s3-admin------>Access type: Programmatic Access ----> Attachhed Exiting Policy-----> Amazon s3 full service ---------->Download Crediional file.


After this go to Gitbash----->root user---->configure aws---->aws configure----->Aws access key ID------>Give this information from the creditional downloaded ------->Security key----->Default region name--------->default output format----->

Now time to create s3 bucket 

aws s3 mb s3://<vprofile-artifact-storage> we can give any name for our bucket.

cd vprofile-project---->ls ----->cd target---->ls (inside this we have vprofile-artifact)------>Now we cp artifact to war file--->Try this command

--------> aws s3 cp vprofile-v2.war s3 vprofile-artifact-storage/vprofile-v2.war---------> aws s3 ls s3 vprofile-artifact-storage



Next step we need to install EC2 click the link below to follow the steps.

Load Balncer and Auto scalling