> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emergence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GCP Marketplace

> Deploy CRAFT from the Google Cloud Marketplace using private offers, Terraform Kubernetes apps, and integrated billing.

# GCP Marketplace

CRAFT is available on the **Google Cloud Marketplace** as a Terraform Kubernetes Application. Customers can deploy the platform into their own GKE clusters and apply purchases against existing GCP committed spend.

## Why GCP Marketplace

<CardGroup cols={2}>
  <Card title="Committed Spend Drawdown" icon="wallet">
    Apply CRAFT purchases against existing GCP committed spend via the Marketplace Commerce Platform for Operators (MCPO), with a 25% cap for channel deals.
  </Card>

  <Card title="Simplified Procurement" icon="receipt">
    Pre-approved vendor status on GCP Marketplace eliminates lengthy procurement cycles -- up to 4 weeks faster than traditional vendor onboarding.
  </Card>

  <Card title="Unified Billing" icon="file-invoice-dollar">
    Customers receive one consolidated GCP bill rather than a separate vendor invoice.
  </Card>

  <Card title="Low Fees" icon="percent">
    Standard marketplace fee of 3%, with renewal rates as low as 1.5%.
  </Card>
</CardGroup>

## Architecture Advantage

CRAFT is natively deployed on GKE Autopilot in production. The GCP Marketplace listing leverages the same Helm chart (`em-runtime`) and Terraform modules used for direct deployments, ensuring consistency:

| Component                 | Source                                                              |
| ------------------------- | ------------------------------------------------------------------- |
| **Application chart**     | `em-runtime` Helm chart (cloud-agnostic)                            |
| **Infrastructure module** | GKE Terraform module (provided in deployment kit)                   |
| **Container images**      | Published to Google Artifact Registry via CI/CD                     |
| **Configuration**         | Environment-specific Helm values files (provided in deployment kit) |

## Deployment Model

<Tabs>
  <Tab title="Private Offer">
    Private offers allow the sales team to send a pre-configured pricing link directly to target customers. No public storefront is required.

    <Steps>
      <Step title="Sales creates a private offer">
        Using the GCP Producer Portal, the sales team configures pricing (subscription, usage-based, or hybrid) and generates a private offer link.
      </Step>

      <Step title="Customer accepts the offer">
        The customer clicks the private offer link, reviews pricing, and accepts within their GCP console. The purchase is applied against their GCP committed spend.
      </Step>

      <Step title="Deployment is initiated">
        After acceptance, the customer or the Emergence team deploys the platform into the customer's GKE cluster using the provided Terraform module.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Self-Service (Phase 3)">
    In the self-service model, customers click "Deploy" in the GCP Marketplace listing and the platform deploys automatically into their GKE cluster.

    The deployment uses:

    * A `schema.yaml` defining customer-configurable parameters
    * Terraform modules for GKE cluster, Cloud SQL, Memorystore, and GCS provisioning
    * Helm chart installation with marketplace-specific values
    * Workload Identity for secure service-to-service authentication
  </Tab>
</Tabs>

## Billing Integration

GCP billing uses a metering agent sidecar that reports usage metrics to the GCP Marketplace Billing API.

### Metered Dimensions

<Warning>
  Metering dimensions are not yet finalized. The dimensions below are candidates under review by the product team. Final dimensions will be aligned with customer value metrics before the billing integration goes live.
</Warning>

| Candidate Dimension   | Unit  | Description                                        | Status       |
| --------------------- | ----- | -------------------------------------------------- | ------------ |
| Active users          | count | Active platform users per billing period           | Under review |
| API calls             | count | Total API requests (aggregate or by service)       | Under review |
| Data volume processed | bytes | Total data volume processed by the platform        | Under review |
| Managed nodes         | count | Number of managed infrastructure nodes or clusters | Under review |

### Pricing Model

The GCP listing supports a hybrid pricing model:

* **Base subscription**: Monthly or annual fee for platform access
* **Usage-based metering**: Additional charges based on consumption of metered dimensions
* **Private offer pricing**: Custom pricing negotiated per customer via the Producer Portal

## Container Image Publishing

The CI/CD pipeline publishes container images to Google Artifact Registry for the following components:

| Category                  | Images                                                   |
| ------------------------- | -------------------------------------------------------- |
| **Production services**   | Governance, Assets, Utils                                |
| **Subchart dependencies** | Keycloak, OpenFGA, PostgreSQL, Redis, Infisical (or ESO) |
| **Init containers**       | Schema migration, bootstrap, health-check                |

<Note>
  The `ci-main.yml` pipeline builds and pushes images to Artifact Registry on every merge to main. Pre-release images are built from feature branches via `ci-branches.yml`.
</Note>

## Prerequisites for Deployment

Before deploying from GCP Marketplace:

1. **GKE cluster** -- An existing GKE Autopilot or Standard cluster (1.28+)
2. **Cloud SQL** -- PostgreSQL 17+ instance with 9 databases (one per service)
3. **Memorystore** -- Redis 7 instance for caching and event streaming
4. **IAM** -- Workload Identity configured for service-to-GCP-service authentication
5. **Networking** -- VPC with private service access for Cloud SQL and Memorystore

## Troubleshooting

<AccordionGroup>
  <Accordion title="Deployment fails with permission errors">
    Verify the deploying user has the `roles/container.admin` and `roles/iam.serviceAccountUser` roles. Workload Identity requires the service account to be bound to the Kubernetes service account.
  </Accordion>

  <Accordion title="Metering agent not reporting usage">
    Check that the metering agent sidecar is running in the Governance pod. Verify the `MARKETPLACE_METERING_ENABLED` environment variable is set to `true` and the service account has the `roles/servicemanagement.reporter` role.
  </Accordion>

  <Accordion title="Private offer not visible to customer">
    Ensure the private offer was created in the correct GCP Producer Portal project and the customer's billing account ID matches the offer target.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="AWS Marketplace" icon="cloud" href="/guides/marketplace/aws">
    Learn about the AWS Marketplace listing and EKS deployment.
  </Card>

  <Card title="Azure Marketplace" icon="cloud" href="/guides/marketplace/azure">
    Learn about the Azure Marketplace listing and AKS deployment.
  </Card>

  <Card title="Helm Configuration" icon="dharmachakra" href="/deployment/helm/configuration">
    Configure Helm values for GKE deployment.
  </Card>
</CardGroup>
