Tomcat, MySQL

GroupStack Image

Linux, Apache Tomcat

on EC2 instance x 1

+

MySQL5 on EC2 instance x 1

 

robustack.com

Configuration

Apache Tomcat

MySQL

Database

robustack.com

EC2 instance02

Security Group01

EC2 instance01

Security Group02

root

/home/apache-tomcat7

root

/var/lib/mysql

Features

  • Group launch, start/stop and reboot  with predefined procedure
  • Group snapshot and restore with individual scaling of resources - instance type, EBS volume size 
  • GroupStack cloning over cross-regions and multi-AWS accounts
  •  GroupStack cloning from EC2 classic to VPC and vice versa

robustack.com

Group Launch

  • Creates EBS volumes
    • Tomcat stack data (vol-tcat-home)
    • MySQL stack data (vol-mysql-home)
  • Creates Security Groups and Rules
    • Tomcat stack : SSH(22), HTTP(8080), HTTPS(8443)
    • MySQL stack : SSH(22), MySQL(3306)
  • Launches Instances (On-Demand or Spot)
    • Tomcat stack and MySQL stack

robustack.com

Group Launch - cont'd

  • Attaches EBS volumes to Instances
    • Tomcat stack data (vol-tcat-home)
    • MySQL stack data (vol-mysql-home)
  • Creates and Mounts Filesystems
    • Tomcat stack    :
      • vol-tcat-home(/home/apache-tomcat7)
    • MySQL stack : vol-mysql(/var/lib/mysql) 

robustack.com

Group Launch - cont'd

  • Installs Softwares ( yum install, etc. )
    • Tomcat stack - Apache Tomcat 7
    • MySQL stack - MySQL 5
  • Starts Applications with pre-defined start orders and dependencies
    • Starts MySQL (Start Order 01)
    • Waits until MySQL running
    • Starts Tomcat (Start Order 02)

robustack.com

Group Launch - cont'd

  • To connect Tomcat, navigate to URL
    • http://<Tomcat Instance Public IP>:8080/​​
    • https://<Tomcat Instance Public IP>:8443/
  • You can check MySQL connection with simple jsp execution
    • http://<Tomcat Instance Public IP>:8080/dbtest.jsp
    • https://<Tomcat Instance Public IP>:8443/dbtest.jsp

robustack.com

Group Stop

  • Stops Applications with reversed start orders and dependancies
    • Stops Tomcat (Start Order 02)
    • Waits until Tomcat Stopped
    • Stops MySQL (Start Order 01)
  • Unmounts Filesystems
    • Tomcat stack    : umount /home/apache-tomcat7
    • MySQL stack : umount /var/lib/mysql

robustack.com

Group Stop - cont'd

  • Stops Instances and waits until stopped
  • Creates root Volume Snapshot and registers AMI if Instance lifecycle is Spot and it has never been preserved before (for next Spot Instance StartUp)

robustack.com

Group Start

robustack.com

  • You can change Instance types if required 
  • You can change Bidding Price for Spot Instances if necessary
  • Starts Instances. If any of them is Spot, it will newly be requested with preserved AMI which was created when the Instances was stopped 
  • Attaches EBS Volumes if Spot Instance owns them
  • Mounts Filesystems
  • Runs Post Bash Scripts (System/User Defined)
  • Starts Application with pre-defined Start Orders and dependencies

 

Group Reboot

  • Stops Applications with reversed start orders and dependencies
  • Unmounts Filesystems
  • Reboots Instances
  • Checks if Instances rebooted
  • Mounts Filesystems
  • Runs Post Bash Script (System/User-Defined)
  • Starts Applications with pre-defined start orders and dependencies

robustack.com

Group Snapshot

robustack.com

  • Freezes Filesystems if configured to do that and start snapshot EBS Volumes (including root Volumes) immediately. Just after start snapshot initiated, unfreezes Filesystems.
  • Saves the status of Filesystems and Instances when the Snapshot Initiated for future reference
  • Restoring GroupStack Snapshot which was taken while it was running MAY NOT BE SUCCESSFUL. You should verify it.

 

Group Snapshot Restore

robustack.com

  • Group Snapshot is restorable when the GroupStack is in 'stopped' status.
  • You can increase the size of GroupStack Volumes (including root) through 'Restore GroupStack'.
  • Detaches Volumes (includeing root) from Instances and creates new volumes from Group Snapshot
  • Attaches Volumes to the instances if the creation completed.
  • Starts Instances and resizes root Volumes
  • Resizes and mounts (or vice versa) Filesystems

 

Clone GroupStack

robustack.com

  • You can Clone GroupStack with Group Snapshot.
  • Cloning GroupStack can be done over other Availability Zone or other Region or other AWS account.
  • If you clone GroupStack over other Region, copying Group Snapshot to the destination Region is initiated first and then the source GroupStack configuration is transformed into the Region.

Clone GroupStack

robustack.com

  • You can Launch GroupStack with minimal configuration modifications.
  • Cloning does not include GroupStack variables, schedules, triggers. Any Security Group rules which are referencing objects outside GroupStack is not cloned to a new one.

 

Apache Tomcat

Open-source web server and servlet container developed by the Apache Software Foundation

MySQL 5

MySQL Community Edition.

MySQL is a popular choice of database for use in web applications, and is a central component of the widely used LAMP open source web application software stack

robustack.com

Tomcat Native Library

Tomcat Native Library gives Tomcat access to the Apache Portable Runtime (APR) library's network connection (socket) implementation and random-number generator.

info-tomcat-mysql

By robustack.com

info-tomcat-mysql

Robustack Image Information - Tomcat, MySQL

  • 673