Image layout
Each source-backed service has one GAR package:Provision GAR
Create the repository and Writer service account in Google Cloud Console. Use a billing-enabled project and enable the Artifact Registry and IAM APIs if prompted. The operator needs permission to enable APIs, administer Artifact Registry repositories and their IAM policies, create service accounts, and create service-account keys. The predefined roles that supply these permissions are Service Usage Admin, Artifact Registry Administrator, Service Account Admin, and Service Account Key Admin, or custom roles with equivalent permissions.Create the repository
Open Artifact Registry → Repositories → Create repository:
Keep the repository private. Configure the cleanup policy before activating deletion.
Alternatively, use Google Cloud Shell or an authenticated
gcloud CLI:
Create the Writer account
Open IAM & Admin → Service Accounts and createtechulus-agent without granting a project-wide role. In the repository’s Permissions panel, grant it Artifact Registry Writer (roles/artifactregistry.writer) on that repository only. The account pushes and pulls images; Techulus does not need repository administration access.
For the equivalent gcloud setup:
Download and encode the JSON key
For the Writer account, open Keys → Add key → Create new key → JSON and download the key to a trusted workstation asagent-key.json. Service-account key creation can be prohibited by the iam.disableServiceAccountKeyCreation organization policy. If blocked, ask your organization administrator to approve an exemption. Google does not allow an existing private key to be downloaded again.
With gcloud, create the key using:
gar-credentials.env already exists:
umask 077 makes newly created files private to your user; chmod 600 explicitly restricts the output to owner read/write access. Base64 is not encryption. Treat both files as private keys: never commit them or paste them into chat.
Configure Techulus
Securely copy the encoded value into the deployment.env or installer and add the repository path:
GAR_REPOSITORY must not include a scheme, image path, tag, or digest. The health endpoint returns 503 when a mandatory GAR value is missing or malformed. After securely transferring the credential, delete temporary files:
Cleanup policy
The trackeddeployment/gar-cleanup-policy.json defines exactly two repository-wide rules:
- keep the 10 most recent versions of every package, with no package-prefix filter;
- delete versions in any tag state once they are older than 30 days.
The operator applying policies needs Artifact Registry Administrator permissions. From a Techulus checkout, the equivalent gcloud command is:
BatchDeleteVersions operations. When correct, switch to Delete artifacts in Console or run the same command with --no-dry-run.
Updating an existing repository
After deploying the code that no longer manages GAR tags, replace the old protected-tag Keep rule with the tracked policy; Techulus does not update cloud policies automatically. Then removeGAR_ADMIN_KEY_BASE64 from the deployment environment and revoke/delete the unused Repository Administrator service-account key. Remove the account or its repository role if it has no other purpose. There is no compatibility or migration automation.
