Projects and tokens

A project holds apps, the people who use them, their files, shares and a domain. The project commands are the operator's. The token commands act on your own tokens. Who may do what, and sudo mode, are the same as in the portal.

Every command acts on the project of the person who signed in. The operator acts on another one with -project <project>, before or after the command, or with GKO_PROJECT=<project>:

gko -project lab app list
gko app install -project lab nextcloud

Opening a project

gko project create -name "Ada Lovelace" ada@example.org
gko project create -slug lab -domain lab.example.org -name "Ada Lovelace" ada@example.org

project create opens a project with a new person as its owner, and prints, once, the link the owner follows to set their sign-in. The owner's name is shown in the portal; the address identifies them. The slug is the owner's username, derived from the address unless -slug names it.

-domain gives the project a domain of its own before it installs anything, so its apps are named <app>.pod.<domain>. The domain and its wildcard record must point at the install first. A project can be given a domain later, but only while it has no apps.

Listing and sharing

gko project list
gko project share lab 2Gi 2 100Gi

project list prints every project with its owner's address, whether it is the operator's, its memory, CPU and storage shares, and when it was created. A share of zero means the project has no share of its own and takes from the machine.

project share sets those three shares in one command:

Memory and CPU are ceilings on what the project's apps may reserve between them. Storage is what its volumes may hold. An install or a start past the memory or CPU share is refused, and the app namespaces carry the shares as a ResourceQuota so the cluster refuses them too. Giving a project its first storage share is what gives it a storage container for its volumes.

A project's domain

gko project domain lab lab.example.org
gko project domain lab ""

project domain names a project's apps under a domain of its own, before it installs any. The project's apps are at <app>.pod.<domain>, and the domain itself redirects to the install's portal, where the project's people sign in. An app on another site than the portal opens in a tab of its own.

An empty domain returns the project to the install's app domain.

gko project domain -check lab lab.example.org

-check saves nothing. It lists the records the domain needs and whether each one answers, the apps that would move and to which address, and what blocks the change, if anything does.

Changing a project's owner

gko -project lab project owner -email new@example.org
gko -project lab project owner -username new-name
gko -project lab project owner -name "Ada Lovelace"

project owner changes the owner's address, username or display name. A project's slug is its owner's username, so a new username renames the project too, and it can change only while the project has no apps installed.

People

gko -project lab member list
gko -project lab member invite -name "Grace Hopper" grace@example.org
gko -project lab member resend grace-example-org
gko -project lab member mailbox grace-example-org on
gko -project lab member remove -delete-files grace-example-org

These are the Users page's actions. member invite adds a person and prints, once, the link that sets their sign-in; their username comes from the address. member resend prints a new link. member mailbox opens a mailbox at their email, which must be in one of the project's zones, or closes it. member remove takes them off the project with their sign-in; what they put in a shared app stays, and -delete-files also deletes their own files once their apps let go of them. A person is named by username.

Zones and branding

gko -project lab zone list
gko -project lab zone add lab.example.org
gko -project lab zone remove lab.example.org
gko -project lab branding name "The Lab"
gko -project lab branding set logo logo.svg
gko -project lab branding remove icon

These are the Domains and Settings pages' actions. A zone is a domain the project's apps can be named in and its people's addresses can be at; zone list prints each with the records it needs and whether they resolve. A zone goes only once no app answers in it, and the project's own domain stays. branding name is what the window title and the sign-in page call the server, "" for the portal's domain. branding set takes a PNG, JPEG, WebP or SVG of 256 KB at most, read for what it is rather than what its name says.

Closing a project

gko project delete lab

This closes the project, its people's sign-ins and the files its uninstalled apps left, for good. Its apps must be uninstalled first. Unless -yes is given, it asks you to type the project's slug back. Its storage container goes only while empty, which both ZFS and CephFS refuse while a volume or a kept snapshot remains.

API tokens

gko token list
gko token create -expires-in-days 30 terraform
gko token revoke <id>

token list prints your tokens with their id, name, creation time, last use and expiry. token create prints a new token once; -expires-in-days sets its lifetime, and 0, the default, means it never expires. Copy it somewhere safe before the command ends.

Tokens are the operator's: nobody else can create one, here or on the portal's account pane, where the operator lists and revokes them too.

token revoke revokes one of your tokens by id. A token acts as the person who created it, with the rights they hold at the time of each request. Removing someone from a project revokes their tokens.

The first token on an install where nobody can use a browser yet comes from the backend pod, not from gko:

kubectl -n sys-backend exec deploy/gko-backend -c app -- /app/gkod token create alice laptop

The server binary is gkod; its subcommands are the platform's own. Anything a person runs day to day is gko.


Last validated: · View as Markdown