Posts

Showing posts from June, 2024

Automating JBoss Installation on AWS EC2 Instance with User Data Script

  This script automates the installation and configuration of JBoss EAP on an AWS EC2 instance, ensuring that all necessary components are installed, configured, and managed as a service. By using this script as user data when launching an EC2 instance, you can streamline the deployment of JBoss EAP in your environment The Script Here's the complete script: #!/bin/bash # Create directory for JBoss packages sudo mkdir -p /opt/jboss/package # Sync JBoss package from S3 aws s3 sync s3://jboss-package /opt/jboss/package # Ensure that your Yum repository metadata is up to date sudo yum clean all sudo yum makecache # Install JAVA 1.8 (Amazon Corretto) sudo yum -y install java-1.8.0-amazon-corretto.x86_64 # Update the system sudo yum -y update # Change to the JBoss package directory cd /opt/jboss/package # Verify that the installer and XML configuration files exist if [ -f "/opt/jboss/package/jboss-eap-7.4.0-installer.jar" ] && [ -f "/opt/jboss/package/auto.xml"