Command line and Terraform
- graal Data Platform
- Version 0.1 (current)
- Open source · Apache 2.0
Two tools drive graal Data Platform outside the console, through the same REST API:
graalctl, the command line, and the graalsystems Terraform provider, to describe
projects, identities, jobs and workflows in a Git repository. Both are open source, under the
Apache 2.0 license.
graalctl
Section titled “graalctl”A single binary for Linux, macOS and Windows (github.com/graalsystems/graalctl).
curl -fsSL https://raw.githubusercontent.com/graalsystems/graalctl/main/install.sh | shThe script downloads the latest version for your system, checks its SHA-256 sum and installs it in
/usr/local/bin (or ~/.local/bin). On Windows, take graalctl-windows-x86_64.exe from the
releases page.
Logging in
Section titled “Logging in”A context names an installation and a tenant:
graalctl config set-context prod \ --api-url https://graal.example.com/api/v1 \ --auth-url https://sso.example.com \ --tenant acmegraalctl login # username and passwordgraalctl login --device # SSO: a URL and a code to enter in any browser--auth-url is the address of the installation’s OpenID Connect server, without /realms/…: the
realm is derived from the tenant. For a script, an integration or an agent, prefer the credentials of
an application to those of a person:
echo "$SECRET" | graalctl login --client-id my-application --client-secret-stdinCommands
Section titled “Commands”graalctl projects listgraalctl libraries upload first_job.py # prints the library keygraalctl jobs create --project <PROJECT> -f job.jsongraalctl jobs run <JOB> --follow # starts a run and follows its logsgraalctl jobs schedule <JOB> "0 6 * * *" # JSON Patch on /schedulegraalctl runs list --job <JOB>graalctl api /instance-types # any API operation-o json prints the API objects, -o id one identifier per line. The job.json file has the shape
described in the quickstart.
In a continuous integration pipeline
Section titled “In a continuous integration pipeline”Nothing needs to be stored on the CI runner: the API address, the tenant and the application credentials come from the environment.
export GRAAL_API_URL=https://graal.example.com/api/v1export GRAAL_KEYCLOAK_URL=https://sso.example.comexport GRAAL_TENANT=acmeexport GRAAL_CLIENT_ID=ci GRAAL_CLIENT_SECRET=… # CI secretsgraalctl jobs run <JOB> --follow --timeout 3600The exit code follows the run: 0 when it succeeds, 1 when it fails or is cancelled, 124 when
--timeout is reached.
Terraform provider
Section titled “Terraform provider”The graalsystems provider
(github.com/graalsystems/terraform-provider-graalsystems)
manages projects, identities, jobs, workflows, workspaces, users and groups.
terraform { required_providers { graalsystems = { source = "graalsystems/graalsystems" version = "~> 1.4.0" } }}
# Credentials: GRAAL_CLIENT_ID and GRAAL_CLIENT_SECRET.provider "graalsystems" { api_url = "https://graal.example.com/api/v1" auth_url = "https://sso.example.com" tenant = "acme"}
resource "graalsystems_project" "analytics" { name = "Analytics"}A change becomes a JSON Patch on the resource: the API has no full PUT on a resource designated by
its identifier. The only exception is apply-by-name for jobs, workflows and connections
(PUT /projects/{id}/apply/…/{name}, see the REST API).
The workstation graal CLI: a Kerberos ticket through SSO
Section titled “The workstation graal CLI: a Kerberos ticket through SSO”For tools that speak Kerberos (Spark, Hive, HDFS, a JDBC client), each tenant can have a managed
KDC run by the platform. The workstation graal CLI gives a user a ticket from that KDC through
their SSO, with no Kerberos password:
| Command | What it does |
|---|---|
graal login |
opens a session through the tenant’s SSO (device flow: a code to enter in the browser) |
graal kinit |
gets a ticket from the tenant’s managed KDC; eval "$(graal kinit)" exports it into the shell |
graal kdestroy |
destroys the ticket |
graal whoami |
tenant, realm, user, end of session (--json for a script) — never a token |
graal logout |
revokes the session and removes it from the workstation |
The workstation needs an MIT Kerberos client (1.13 or later) with the PKINIT plugin. No token and no
key is ever written to the output; the ticket’s private key never leaves the workstation. On the
agent side, the MCP tools kerberos_kdc_status and kerberos_client_config give the KDC’s state and
what a workstation needs (see AI agents (MCP)).
Examples
Section titled “Examples”github.com/graalsystems/examples gathers ready-to-run
jobs, one per type (Python, bash, Spark, Dask, Ray, Flink, dbt…), each with its job.json, and a
GitHub Actions CI example with graalctl.
Its projects/ directory adds
whole projects: several jobs that hand data to each other through Iceberg tables, the identity
that runs them with only the rights it needs, and the workflow that chains them. A daily data
pipeline (ingestion, aggregation, quality checks) and a demand forecast (preparation, a training
notebook tracked in MLflow, publication) each deploy in one command:
projects/deploy-project.sh projects/energy-consumption --run