Deploy Custom API
Celery tasks for deploying an llmclient on its custom domain.
An llmclient whose custom domain is verified is served on its own subdomain of that domain,
its custom host: <llmclient>.<custom domain>, e.g. support.llmclients.example.com.
Deploying it there takes the same two steps as deploying it on its default host:
DNS: an A record for the custom host, in the custom domain’s DNS zone. It is a copy of the A record of the platform’s API domain, so it points to the platform.
Ingress: a Kubernetes ingress for the custom host. cert-manager issues the custom host’s own TLS certificate for it.
The custom domain itself, i.e. its NS delegation and its ACM certificate, is verified by
verify_custom_domain(), which deploys the llmclient that uses
the domain once the domain is verified.
Main Tasks
- deploy_custom_api(llmclient_id):
Creates the custom host’s A record and ingress, for an llmclient that is deployed and whose custom domain is verified. It does nothing otherwise. It is idempotent.
Signals
pre_deploy_custom_api: Sent before deployment of the custom API begins.
post_deploy_custom_api: Sent after deployment of the custom API is completed.
Usage
deploy_custom_api.delay(llmclient_id)
- raises Exception:
Any exception during task execution will trigger a retry according to Celery settings.
- smarter.apps.llmclient.tasks.deploy_custom_api.deploy_custom_api(llmclient_id)
Deploy an llmclient on its custom domain: create its custom host’s A record and ingress.
- Parameters:
llmclient_id (
int) – The id of the llmclient.- Return type:
- Returns:
The custom host, e.g.
support.llmclients.example.com, or None if the llmclient was not deployed on its custom domain, because it does not exist, is not deployed, or its custom domain is missing or not verified.