GluonPartially Implemented
Deploy the app your template defines
Gluon is the deployment control plane: register an application, attach a hostname, and run the same Leptos app on local Docker or on DigitalOcean, AWS, Google Cloud and Azure. Place Boson and Chronon worker services on pools with the hardware they need.Gluon · src/deploy.rs
use gluon::applications::{
ApplicationService, ContainerConfigSpec, CreateApplicationParams, RouteConfigSpec,
};
use gluon::domain::attach_hostname;
use gluon::generated::{GluonApplicationAppKind, GluonDomainZone};
use valence::{use_, Model};
let booted = gluon::bootstrap_valence_from_env().await?;
let valence = booted.valence("deploy-marketing")?;
let app = ApplicationService::create(
&valence,
CreateApplicationParams {
name: "marketing".into(),
image_ref: "ghcr.io/acme/marketing:latest".into(),
app_kind: GluonApplicationAppKind::Service,
container: ContainerConfigSpec::default(),
health_check: None,
lb: None,
route: Some(RouteConfigSpec { path_prefix: "/".into(), strip_prefix: false }),
desired_instances: 2,
target_node_id: None,
metadata_json: serde_json::json!({}),
},
)
.await?;
let zone = GluonDomainZone::get(
"zone:example.com",
&valence,
use_!("Load the **DNS zone** the new hostname will live in."),
)
.await?
.expect("zone");
attach_hostname(&valence, &app, &zone, "app.example.com").await?;Ships inRemote fleet
In the Remote fleet template
Gluon deploys the Remote fleet template's services as containers, and gives Boson and Chronon workers the pools they run on.Application lifecycle
Implemented
Register images, instance counts, health checks, and routes through ApplicationService, then reconcile the running instances.
Quotes and reservations
Implemented
Price a machine with a provider quote, then reserve it.
Domains and certificates
Implemented
Attach hostnames, reconcile DNS, regenerate the load balancer config, and issue and renew Let's Encrypt certificates.
Cloud providers
Implemented
Compute on DigitalOcean, AWS, Google Cloud and Azure. DNS on Cloudflare, Route 53, Cloud DNS and Azure DNS. CDN on Cloudflare, CloudFront and Fastly. Domain registration through Route 53 Domains.
Hardware minimums per pool
Implemented
Place replicas on virtual pools. Set the minimum and recommended vCPU, memory and disk an application needs, override them per pool, and preview the placement before anything changes.
Release automation
Implemented
Poll source, build images, roll out upgrades, and clean up registries through the CI/CD modules.
Gluon operator UI
Partially Implemented
Manage applications, domains, pools, releases, and builds. The operator surface is still being completed.
Code sample
Taken from the getting-started docs. See all code samples on Resources.
Gluon app + domainGluon
Create an application and attach a hostname
use gluon::applications::{
ApplicationService, ContainerConfigSpec, CreateApplicationParams, RouteConfigSpec,
};
use gluon::domain::attach_hostname;
use gluon::generated::{GluonApplicationAppKind, GluonDomainZone};
use valence::{use_, Model};
let booted = gluon::bootstrap_valence_from_env().await?;
let valence = booted.valence("deploy-marketing")?;
let app = ApplicationService::create(
&valence,
CreateApplicationParams {
name: "marketing".into(),
image_ref: "ghcr.io/acme/marketing:latest".into(),
app_kind: GluonApplicationAppKind::Service,
container: ContainerConfigSpec::default(),
health_check: None,
lb: None,
route: Some(RouteConfigSpec { path_prefix: "/".into(), strip_prefix: false }),
desired_instances: 2,
target_node_id: None,
metadata_json: serde_json::json!({}),
},
)
.await?;
let zone = GluonDomainZone::get(
"zone:example.com",
&valence,
use_!("Load the **DNS zone** the new hostname will live in."),
)
.await?
.expect("zone");
attach_hostname(&valence, &app, &zone, "app.example.com").await?;