Annotation Interface ApplicationPlugin


@Retention(RUNTIME) @Target(TYPE) @Documented public @interface ApplicationPlugin
Marks a class as a pluggable application specification.

Application specifications annotated with this annotation are automatically discovered and loaded by the CloudForge application deployment system via Java ServiceLoader. This enables external contributors to add new applications without modifying core code.

Usage Example:


 @ApplicationPlugin(
     value = "sonarqube",
     category = "code-quality",
     displayName = "SonarQube",
     description = "Continuous code quality and security inspection",
     defaultCpu = 2048,
     defaultMemory = 4096,
     supportsOidc = true
 )
 public class SonarQubeApplicationSpec implements ApplicationSpec {
     @Override
     public void deploy(SystemContext ctx, DeploymentContext dCtx) {
         // SonarQube deployment logic
     }
 }
 

Application Categories:

  • cicd: CI/CD platforms (Jenkins, GitLab, Drone)
  • vcs: Version control systems (Gitea)
  • monitoring: Monitoring and observability (Grafana, Prometheus)
  • analytics: Business intelligence (Metabase, Superset)
  • database: Databases and caching (PostgreSQL, Redis)
  • artifactregistry: Artifact repositories (Nexus, Harbor)
  • secrets: Secrets management (Vault)
  • collaboration: Team collaboration (Mattermost)
  • code-quality: Code analysis (SonarQube, etc.)

Resource Requirements:

Default resource values are used when not explicitly specified in deployment context:

  • defaultCpu: Fargate CPU units (256, 512, 1024, 2048, 4096)
  • defaultMemory: Fargate memory in MB (512-30720, based on CPU)
  • defaultInstanceType: EC2 instance type (t3.small, t3.medium, etc.)
Since:
3.0.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Application category for grouping and discovery.
    Application identifier used in deployment configuration.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Default Fargate CPU units when not specified in deployment context.
    Default EC2 instance type when not specified in deployment context.
    int
    Default Fargate memory in MB when not specified in deployment context.
    Brief description of the application's purpose.
    Human-readable display name for the application.
    boolean
    Whether this application requires an external database (RDS).
    boolean
    Whether this application supports optional external database (RDS).
    boolean
    Whether this application supports AWS EC2 deployment.
    boolean
    Whether this application supports AWS Fargate deployment.
    boolean
    Whether this application supports OIDC authentication integration.
  • Element Details

    • value

      String value
      Application identifier used in deployment configuration.

      This value is used in deployment-context.json to specify which application to deploy:

      
       {
         "application": "jenkins",
         "runtimeType": "FARGATE"
       }
       

      Examples: "jenkins", "gitlab", "grafana", "postgresql", "sonarqube"

      Returns:
      the application identifier (lowercase, kebab-case)
    • category

      String category
      Application category for grouping and discovery.

      Categories help organize applications in deployment tools and documentation.

      Standard categories: cicd, vcs, monitoring, analytics, database, artifactregistry, secrets, collaboration, code-quality

      Returns:
      the application category
    • displayName

      String displayName
      Human-readable display name for the application.

      Used in CLI tools, logging, and documentation. If not specified, defaults to the capitalized value().

      Examples: "Jenkins", "GitLab", "SonarQube", "PostgreSQL"

      Returns:
      the display name
      Default:
      ""
    • description

      String description
      Brief description of the application's purpose.

      Used in interactive deployment tools and documentation.

      Examples:

      • "Open-source automation server for CI/CD"
      • "Complete DevOps platform with Git, CI/CD, and security"
      • "Continuous code quality and security inspection"
      Returns:
      the application description
      Default:
      ""
    • defaultCpu

      int defaultCpu
      Default Fargate CPU units when not specified in deployment context.

      Valid values: 256 (.25 vCPU), 512 (.5 vCPU), 1024 (1 vCPU), 2048 (2 vCPU), 4096 (4 vCPU)

      Default: 1024 (1 vCPU)

      Returns:
      the default CPU units
      Default:
      1024
    • defaultMemory

      int defaultMemory
      Default Fargate memory in MB when not specified in deployment context.

      Memory must be compatible with the CPU configuration per AWS Fargate requirements:

      • 256 CPU: 512-2048 MB
      • 512 CPU: 1024-4096 MB
      • 1024 CPU: 2048-8192 MB
      • 2048 CPU: 4096-16384 MB
      • 4096 CPU: 8192-30720 MB

      Default: 2048 MB

      Returns:
      the default memory in MB
      Default:
      2048
    • defaultInstanceType

      String defaultInstanceType
      Default EC2 instance type when not specified in deployment context.

      Common types: t3.small, t3.medium, t3.large, m5.large, m5.xlarge

      Default: t3.small

      Returns:
      the default EC2 instance type
      Default:
      "t3.small"
    • supportsFargate

      boolean supportsFargate
      Whether this application supports AWS Fargate deployment.

      Most containerized applications support Fargate. Set to false for applications that require specific host-level configurations or resources.

      Default: true

      Returns:
      true if Fargate is supported
      Default:
      true
    • supportsEc2

      boolean supportsEc2
      Whether this application supports AWS EC2 deployment.

      All applications should support EC2 for maximum flexibility. Set to false only if the application strictly requires serverless/Fargate architecture.

      Default: true

      Returns:
      true if EC2 is supported
      Default:
      true
    • supportsOidc

      boolean supportsOidc
      Whether this application supports OIDC authentication integration.

      Applications with OIDC support can integrate with AWS Cognito or IAM Identity Center for centralized authentication and single sign-on.

      Examples of OIDC-enabled applications: Jenkins, GitLab, Grafana

      Default: false

      Returns:
      true if OIDC integration is supported
      Default:
      false
    • requiresDatabase

      boolean requiresDatabase
      Whether this application requires an external database (RDS).

      Applications that REQUIRE a database cannot function without one and must always provision RDS instances. These applications do not support embedded databases for production use.

      Examples of applications that require databases:

      • GitLab - PostgreSQL required
      • Mattermost - PostgreSQL/MySQL required
      • Superset - PostgreSQL/MySQL required for metadata
      • Harbor - PostgreSQL required for registry metadata

      Default: false

      Returns:
      true if external database is required
      Default:
      false
    • supportsDatabase

      boolean supportsDatabase
      Whether this application supports optional external database (RDS).

      Applications with optional database support can use either:

      • Production: External RDS database for multi-instance deployments
      • Development: Embedded database for single-instance deployments

      Examples of applications with optional database support:

      • Metabase - PostgreSQL/MySQL OR H2 embedded
      • Grafana - PostgreSQL/MySQL OR SQLite embedded

      Important: Embedded databases (H2, SQLite) cannot support multiple instances due to file locking. For high availability, external RDS is required.

      Default: false

      Returns:
      true if external database is supported but not required
      Default:
      false