Skip to content

deepakdeore2004/addressbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup on EC2

VPC and subnet should be present. Tested on Ubuntu 14.04.

Add/ change below variables in ec2_create.yml

keypair: KEY_PAIR
instance_type: t2.micro
security_group: NAME_OF_THE_GROUP_TO_BE_CREATED_OR_UPDATED
image: ami-9abea4fb
region: AWS_REGION
vpc: VPC_ID
subnet: SUBNET_ID

Create an instance

ansible-playbook ec2_create.yml

Install nginx, mysql, jdk, tomcat and addressbook

ansible-playbook -i hosts playbook.yml

Application can be accessed from IP or its public DNS.

Logstash setup

Use below pattern in tomcat/conf/server.xml valve settings and restart it.

pattern="%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" %A %p %D %S "%{X-Forwarded-For}i" "%{SECURITY_LOGIN_NAME}s"" />
/opt/apache-tomcat-7.0.69/bin/shutdown.sh
/opt/apache-tomcat-7.0.69/bin/startup.sh

Add elasticsearch in logstash/defaults/main.yml.

Un-comment logstash role in playbook.yml and run.

ansible-playbook ec2_create.yml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published