AWS Elastic Beanstalk natively supports Tomcat with an RDS instance for the PostgreSQL database.
On your Linux environment:
# Verify Python installation python3 --version # Install pip if needed sudo apt update sudo apt install python3-pip # Install pipx (recommended for isolated environments) sudo apt install pipx pipx ensurepath # Reload shell configuration source ~/.bashrc # Install AWS CLI pipx install awscli # Verify installation aws --version # Configure CLI aws configure # Install EB CLI pipx install awsebcli # Verify installation eb --version
You need to create a RDS instance for the database. See Create RDS Instance page.
Set your variables in configuration files environment.config and tomcat-context.config.
Your project structure should look like:
jira-broker-deploy/
├── your-application.war
└── .ebextensions/
├── environment.config
├── jvm-options.config
├── tomcat-context.config
└── https-loadbalancer.config
If this is the first Elastic Beanstalk deployment in your AWS account, an administrator needs to create IAM roles and S3 bucket:
# Navigate to your deployment directory cd ~/jira-broker-deploy # Initialize EB eb init # Answer prompts: # - Select region: your region (e.g., 3 for eu-west-1) # - Application name: jira-broker (or your preference) # - Platform: Tomcat # - Platform branch: Tomcat 11 with Corretto 11 running on 64bit Amazon Linux 2023 # - CodeCommit: n (no) # - SSH: y (yes, recommended) # - Keypair: create new or select existing # Create EB environment eb create jira-broker-env
Via AWS Console:
jira-broker-postgresawseb and select the Elastic Beanstalk security group# SSH into EB instance
eb ssh
# Test network connectivity
telnet jira-broker-postgres.xxxxx.rds.amazonaws.com 5432
# Test with psql (if installed)
psql -h jira-broker-postgres.xxxxx.rds.amazonaws.com \
-U your_database_user \
-d broker
exit
# Import certificate
aws acm import-certificate \
--certificate fileb://certificate.crt \
--private-key fileb://private.key \
--region eu-west-1
Copy the returned ARN (e.g., arn:aws:acm:eu-west-1:123456789012:certificate/abcd1234-...) and replace it in SSLCertificateArns in https-loadbalancer.config.
cd ~/jira-broker-deploy eb deploy
# Get load balancer URL eb status | grep CNAME
Broker should be available at: https://{load_balancer_url}/oslc-connect-jira
# Deploy new version eb deploy # View application logs eb logs # View real-time logs eb logs --stream # SSH into instance eb ssh # Check environment status eb status # Update environment variables eb setenv DB_PASSWORD=new_password # Open application in browser eb open # Terminate environment (stops billing) eb terminate production-env # Recreate environment eb create production-env # Check Tomcat logs eb ssh sudo tail -200 /var/log/tomcat11/catalina.out sudo journalctl -u tomcat11 -n 200 exit # Check application health eb health # View detailed logs eb logs --all