Using AWS Elastic Beanstalk as a guide for application configuration

PaaS services fit in that world in between serverless and roll-your-own infrustructure.  AWS Elastic Beanstalk is a PaaS service exposes their their service usage to teach you the right way to deploy web applications. The EB team eats their own AWS dogfood and generates a full featured environment via a generated CloudFormation template that you can examine and leverage.

For this example we will deploy Apache Tika document parser as a service. We'll leverage a previous blog article PaaS Document Parsing With Tika and EBS for the instructions.  A shortened version is below

Topology Discussion

This diagram shows the components deployed to make an autoscaling web application that leverages Elastic Beanstalk , IAM, ALBs and other AWS goodness.

Resources and Services

Elastic Beanstalk uses these services to provision and deploy a simple no-database web application like the Apache Tika Parser.  We use the CLI to upload the configuration which Elastic Beanstalk then uses to generate a CloudFormation template that describes all  of the components.

This section needs to be fleshed out
AWS Resources and ServicesInformation
Elastic Beanstalk Application.tbd
Cloud Formation stack.tbd
Deployment configuration bucket.tbd
Launch Template.tbd
Security Groups.tbd
ALB.tbd
    ALB Listener.tbd
    ALB Target Groups.tbd
      Autoscale Group.tbd
      Autoscale Group Policy.tbd
      Cloudwatch Alarms.tbd
      EC2.tbd
      IAM Roles.tbd

      Video Version


      Short Version Deployment Instructions

      You must set up your environment for Elastic Beanstalk CLI deployments. 
      PrerequisiteCommand
      aws-access-id and aws-secret-key exist and are installed in ~/.aws/configMust be generated in console

      Can be added to config file by aws cli or by eb init in interactive mode.
      SSH pair exists and is available in ~/.sshCan be created externally or may be created be eb init interactive mode if ssh is installed
      Python is installedSee platform instructions
      ElasticBeanstalk CLI is installed
      https://github.com/aws/aws-elastic-beanstalk-cli-setup
      Clone the repository
      Run installer
      • python .\aws-elastic-beanstalk-cli-setup\scripts\ebcli_installer.py


      Steps

      These step describe deploying a pre-build Java jar file.
      Step Command
      open a command prompt .
      make a working directory .
      cd into the working directory CLI assumes the deployment is for thecurrent working directory 
      Download Apache tika into the working directory wget or use web site https://tika.apache.org/download.html
      Initialize the environment eb init <app-name> --platform corretto-8 --keyname <ssh key name> --region <region>

      Example (app named fsi-eb-teka and SSH key pair aws-eb):
      eb init fsi-eb-tika --platform corretto-8 --keyname aws-eb --region us-east-2
      Deploy the jar as an application eb create <app-name>-dev --cname <app-name>-dev --elb-type application --enable-spot -it t2.micro --envvars PORT=9998 --tags mytag=myvalue

      Example (app named fsi-eb-tika , append -dev for dev environment)
      eb create fsi-eb-tika-dev --cname fsi-eb-tika-dev --elb-type application --enable-spot -it t2.micro --envvars PORT=9998 --tags mytag=myvalue
      Verify GET app name returned by the create

      Example (deployment named fsi-eb-tiva-dev)
      fsi-eb-tika-dev.us-east-2.elasticbeanstalk.com
      Un-deploy eb terminate <app-name>

      Example (deployment named fsi-eb-tiva-dev)
      eb terminate fsi-eb-tika-dev --force


        Created 4/2020

        Comments

        Popular posts from this blog

        Understanding your WSL2 RAM and swap - Changing the default 50%-25%

        Installing the RNDIS driver on Windows 11 to use USB Raspberry Pi as network attached

        DNS for Azure Point to Site (P2S) VPN - getting the internal IPs