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
| Command | Purpose |
|---|---|
tcb cloudrun init | Create a service code project |
tcb cloudrun run | Run a function-type service locally |
tcb cloudrun deploy | Deploy code and publish a new version |
Service management
| Command | Purpose |
|---|---|
tcb cloudrun list | List services |
tcb cloudrun detail | Show service details |
tcb cloudrun traffic | View and set canary traffic |
tcb cloudrun traffic promote | Finish the canary release |
tcb cloudrun traffic rollback | Roll back the release |
tcb cloudrun download | Download service code |
tcb cloudrun delete | Delete a service |
Version management
| Command | Purpose |
|---|---|
tcb cloudrun version detail | Show version details |
tcb cloudrun version rollback | Roll back to a specific version |
tcb cloudrun version delete | Delete versions |
Logs and records
| Command | Purpose |
|---|---|
tcb cloudrun record list | List deployment records, get BuildId / RunId |
tcb cloudrun logs build | View build logs |
tcb cloudrun logs process | View runtime logs |
Service types
CloudBase Run services come in two types; some commands apply to only one of them.
| Type | Description | Local run |
|---|---|---|
| Function type | Code organised as functions, a service can hold several functions | Supported, use tcb cloudrun run |
| Container type | Deployed as a container image, no functions inside | Not 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