Repository navigation
v0.3.0
jcloud can now check a platform laid out differently from Japode. Everything it used to assume about where files sit and how services are reached is now something the platform declares. The motivating case is Viglet Cloud: an nginx edge, one shared compose file split by profiles, shared postgres/redis/Keycloak, and per-client copies of each product.
A platform describes itself
jcloud.ymlat the platform root names the manifest path, route file and kind, container prefix, image variable, pin file, deploy command, addon path, backup kind, whether images are built on the host, and where.env.examplelives. Without the file, every value is Japode's, so an existing Japode tree is read exactly as before.
agree
- nginx edges.
--routestakesnginx -Toutput whenroute.kind: nginx. Hosts come fromserver_name, the upstream fromproxy_pass(withset $varandupstreamblocks resolved), plusclient_max_body_sizeandproxy_set_header(an empty value counts as a strip). Caddy'scaddy adaptJSON still works, and--adaptedis kept as an alias. - The resolved compose model.
--composetakesdocker compose --profile '*' config --no-interpolate --format jsonand finds each service by name, so one shared compose file split by profiles is checked correctly. A manifest may declareprofile:. - Shared needs.
needs: [{name, type, shared: postgres}]points at a platform service several products use. jcloud checks that service against the addon and checks that the client waits on it and reaches it. - Backups.
backup: noneskips the backup.conf comparison and says so in a non-failing note. Each sqlite file or database the platform claims nothing for is named. - Variables.
env_prefix:declares a service's key prefix (e.g.VIGLET_TURING_).shared: trueon a variable makes it a bare key, such asOPENAI_API_KEY, that every manifest declaring it must agree on. - Per-client copies.
instances:names copies by template (turing-{client}). Each copy found in the compose model and the edge is held to the product's port, image variable, healthcheck and route. - Auth gates. A route may state
gate: /oauth2/auth, compared with nginxauth_requestor Caddyforward_authin both directions. A declared gate the route doesn't run is reported as open to anyone. - TCP probes.
health.probe: tcpneeds no path. A service with noexpose:and noports:may show its port through its healthcheck; one that declares anexpose:must still list the port.
up and survey
- Host-built images.
build: <Dockerfile>replacesimage:wherejcloud.ymlsaysbuilds: true. Such a service is ready without a pin, andsurveycompares no digest for it. - Moving tags. A pin that is a tag rather than a digest is named, along with the digest to pin from
--published. - Opt-in services.
surveydoesn't report a service missing when its compose profile wasn't reported on.
Output changes
::error/::warningannotations are printed only whenGITHUB_ACTIONS=true. A terminal now shows each problem once. If you run jcloud in a container from an Actions step, pass the variable through (docker run -e GITHUB_ACTIONS …), or the annotations disappear.comparereports only the lines that differ, each named by its field (port:,env[2]:), instead of every line between two distant differences.
Contract tests
JCLOUD_PLATFORMtakes a:-separated list of platform trees. Each is checked through its ownjcloud.yml.
Install
Download a binary below, or go install github.com/Japode/jcloud@v0.3.0.