Skip to main content

tcb cloudrun

tcb cloudrun manages CloudBase Run services: initialise a project, run locally, deploy, manage services and versions, control canary traffic, and read logs.

Command index​

Development and deployment​

CommandPurpose
tcb cloudrun initCreate a service code project
tcb cloudrun runRun a function-type service locally
tcb cloudrun deployDeploy code and publish a new version

Service management​

CommandPurpose
tcb cloudrun listList services
tcb cloudrun detailShow service details
tcb cloudrun trafficView and set canary traffic
tcb cloudrun traffic promoteFinish the canary release
tcb cloudrun traffic rollbackRoll back the release
tcb cloudrun downloadDownload service code
tcb cloudrun deleteDelete a service

Version management​

CommandPurpose
tcb cloudrun version detailShow version details
tcb cloudrun version rollbackRoll back to a specific version
tcb cloudrun version deleteDelete versions

Logs and records​

CommandPurpose
tcb cloudrun record listList deployment records, get BuildId / RunId
tcb cloudrun logs buildView build logs
tcb cloudrun logs processView runtime logs

Service types​

CloudBase Run services come in two types; some commands apply to only one of them.

TypeDescriptionLocal run
Function typeCode organised as functions, a service can hold several functionsSupported, use tcb cloudrun run
Container typeDeployed as a container image, no functions insideNot supported

Deploying a container-type service requires a port, see Code deployment.

Typical workflow​

# 1. Initialise the project
tcb cloudrun init -e env-123456 -s my-service --template nodejs

# 2. Debug locally
tcb cloudrun run -e env-123456

# 3. Deploy
tcb cloudrun deploy -e env-123456 -s my-service

# 4. Verify the canary, then finish the release
tcb cloudrun traffic -e env-123456 -s my-service --stable 90 --canary 10
tcb cloudrun traffic promote -e env-123456 -s my-service