Apache Airavata - IDE Integration Setup


📋 Prerequisites

Before starting, ensure you have the following installed on your system:

ToolVersionPurposeInstallation Link
🐳 Docker & Docker ComposeLatestContainer orchestrationGet Docker
💡 IntelliJ IDEALatestIDE with Java 17+Download IDEA
Java JDK17+Runtime environmentOpenJDK 17
🔧 Apache Maven3.8+Build toolInstall Maven
📝 GitLatestVersion controlInstall Git
🐍 Python3.8+Django portalPython.org
📦 Node.js & npmLatest LTSFrontend build toolsNode.js

🏗️ Development Environment Setup

1️⃣ Clone and Prepare Repository

# Clone the main repository
git clone https://github.com/apache/airavata.git
cd airavata

# Build the project (this may take a few minutes)
mvn clean install -DskipTests

2️⃣ Open in IntelliJ IDEA

  1. Launch IntelliJ IDEA
  2. Open Project → Navigate to your cloned airavata directory
  3. Navigate to: moduleside-integration module

🐳 Backend Services Setup

3️⃣ Configure Host Resolution

Add the following entry to your system's hosts file:

Linux/macOS: /etc/hosts Windows: C:\Windows\System32\drivers\etc\hosts

127.0.0.1    airavata.host

4️⃣ Start Backend Services

Navigate to the containers directory and start all required services:

cd .devcontainer
docker-compose up -d

Services Started:

  • 🗄️ MySQL Database
  • 🔐 Keycloak (Authentication)
  • 📨 Apache Kafka (Messaging)
  • 🐰 RabbitMQ (Message Queue)
  • 🔒 SSHD Server (Secure connections)

5️⃣ Initialize Database

Apply database migrations:

cd .devcontainer
cat ./database_scripts/init/*-migrations.sql | docker exec -i containers-db-1 mysql -p123456

🖥️ Starting Airavata Components

6️⃣ Start API Server

  1. Navigate to: org.apache.airavata.ide.integration.APIServerStarter
  2. Right-click in the editor
  3. Select: Run 'APIServerStarter.main()'

💡 JDK 17+ Note: Add this JVM argument in your run configuration:

--add-opens java.base/java.lang=ALL-UNNAMED

7️⃣ Start Job Execution Engine

  1. Navigate to: org.apache.airavata.ide.integration.JobEngineStarter
  2. Right-click and select Run

Components Started:

  • 🔄 Helix Controller
  • 👥 Helix Participant
  • ⚙️ Pre Workflow Manager
  • 📋 Post Workflow Manager

8️⃣ Start Job Monitoring

Setup Email Monitor (One-Time Setup)

  1. Create a Gmail Account https://accounts.google.com/signup

  2. Enable 2-Step Verification https://myaccount.google.com/security

  3. Go to App Passwords https://myaccount.google.com/apppasswords
    (Make sure you're logged in and have already enabled 2-Step Verification.)

  4. Generate App Password:

    • Enter the name “Airavata” and click “Generate”.
  5. Copy the Generated App Password

    • A 16 character password will appear copy and save it immediately, as it will not be shown again.
  6. Update Configuration: Edit src/main/resources/airavata-server.properties:

    email.based.monitor.address=your-email@gmail.com
    email.based.monitor.password=your-app-password
    
  7. Start Monitor:

    • Navigate to: org.apache.airavata.ide.integration.JobMonitorStarter
    • Right-click and Run

🌐 User Portal Setup (Django)

9️⃣ Django Portal Installation

You can create and launch experiments and manage credentials using this portal.

# Navigate outside the Airavata directory
cd ..

# Clone the Django portal repository
git clone https://github.com/apache/airavata-portals.git
cd airavata-portals/airavata-django-portal

# Create a virtual environment
python3 -m venv venv

# Activate the virtual environment
source venv/bin/activate  # For Windows: venv\Scripts\activate

# Install Python dependencies
pip install -r requirements.txt

### 🔟 Configure Django Portal

```bash
# Create local settings
cp django_airavata/settings_local.py.ide django_airavata/settings_local.py

# Run database migrations
python3 manage.py migrate

# Build JavaScript components
./build_js.sh

# Load default CMS pages
python3 manage.py load_default_gateway

# Start development server
python3 manage.py runserver

🌍 Access User Portal

🛠️ Admin Portal Setup (Optional)

For registering compute resources and storage resources:

1️⃣ Starting Super Admin Portal (PGA)

This portal is required when registering new compute or storage resources into the gateway.

cd .devcontainer/pga
docker-compose up -d

2️⃣ Configure Host Resolution

Get host machine IP:

macOS:

docker-compose exec pga getent hosts docker.for.mac.host.internal | awk '{ print $1 }'

Windows:

docker-compose exec pga getent hosts host.docker.internal

Update container hosts: Replace with the actual IP

docker-compose exec pga /bin/sh -c "echo '<host-machine-ip> airavata.host' >> /etc/hosts"

3️⃣ Access Admin Portal

🛑 Cleanup & Troubleshooting

Stop All Services

# In each docker-compose directory, run:
docker-compose down
docker-compose rm -f

# Remove unused containers and networks
docker system prune

🔐 Certificate Renewal (If Expired)

Only needed when Keycloak certificates expire:

cd modules/ide-integration/src/main/resources/keystores

# Remove old keystore
rm airavata.p12

# Generate new keystore (airavata.p12)
keytool -genkey -keyalg RSA -alias selfsigned -keystore airavata.p12 \
        -storetype pkcs12 -storepass airavata -validity 360 -keysize 2048 \
        -dname "CN=airavata.host,OU=airavata.host,O=airavata.host,L=airavata.host,ST=airavata.host,C=airavata.host"

# Generate self-signed key-pair (for TLS)
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt \
  -subj "/CN=airavata.host/OU=airavata.host/O=airavata.host/L=airavata.host/ST=airavata.host/C=airavata.host" \
  -addext "subjectAltName=DNS:airavata.host"

📊 Service Status Overview

ServicePortStatus CheckPurpose
🗄️ MySQL3306docker psDatabase
🔐 Keycloak8443airavata.host:8443Authentication
📨 Kafka9092InternalMessaging
🐰 RabbitMQ5672InternalMessage Queue
🌐 Django Portal8000localhost:8000User Interface
🛠️ PGA Admin8008airavata.host:8008Admin Portal

🆘 Common Issues

Port Conflicts:

# Check what's using a port
lsof -i :8000
netstat -tulpn | grep :8000

Docker Issues:

# Reset Docker
docker system prune -a
docker-compose down --volumes

Build Failures:

# Clean Maven cache
mvn clean
rm -rf ~/.m2/repository/org/apache/airavata