User Tools

Site Tools


web:accesswebec2:aws_web_app_ec2_configuration

This is an old revision of the document!


Setup EC2 for AGTEK WebApps

The AGTEK WebApps are written as a web application using the Apache Tomcat application server. The web app hosts a REST api that the browser side portion can use to interact with the AGTEK Access server. Initial deployments of the AccessWeb app are likely to be deployed on a separate AWS EC2 instance, which might be behind a load balancer, or may include several instances to assist shouldering the load.

Configuring the deployment environment is picky enough that a detailed recipe is required to be successful. This page details that configuration. Note that this does NOT discuss the development environment, nor does it does where you will obtain the AccessWeb.war application image.

Because of the intertwined nature of some of these packages, you may need to revisit some configurations a couple of times.

AccessWeb environmental technologies

  • EC2 virtual machine
  • Amazon Linnux AMI
  • Java Server release, version 1.8
  • Apache Tomcat application server
  • EFF Certbot (for SSL/TLS security certificates)

EC2 setup

  • Log into AWS
  • Allocate an EC2 instance, Linux Amazon AMI, 64 bit (size should match the current deployment size for the webapp array)
  • Suggestion is to use the same PEM for security as the access.agtek.com
  • The EC2 instance should be inside the Access VPC
  • Make sure that the port 80 and 443 are open. (VPC net ACLs will likely have these open as they are required).

Framework installs

  • Download the Java Server distribution (tar.gz for Linux 64 bit)
    • Un-tar the distribution to /home/ec2-user to get somethink like /home/ec2-user/jdk1.8.0_144
  • Download the Apache Tomcat distribution(tar.gz)
    • Un-tar the distribution to /home/ec2-user to get something like /home/ec2-user/apache-tomcat-9.0.0
  • Download the certbot script to /home/ec2-user
    wget https://dl.eff.org/certbot-auto
    chmod a+x certbo-auto
  • Adjust the .bashrc to have the following:
    JAVA_HOME=/home/ec2-user/jdk1.8.0_144
    export JAVA_HOME
    
    JRE_HOME=$JAVA_HOME
    export JRE_HOME
    
    PATH=$JAVA_HOME/bin:$PATH
    export PATH
    
    TOMCAT_HOME=/home/ec2-user/apache-tomcat-9.0.0.M26
    export TOMCAT_HOME
  • Copy get-certs script to /home/ec2-user (from the AccessWeb GIT repository /tools directory)
    chmod a+x get-certs

Certbot setup

Tomcat configuration

web/accesswebec2/aws_web_app_ec2_configuration.1504897180.txt.gz · Last modified: 2017/09/08 18:59 by mjallison