Move Cloud Run image property to GCP config struct

Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>
This commit is contained in:
Tihomir Jovicic
2021-06-10 11:45:52 +02:00
parent 5d8219a8f3
commit 83eebf82fa
14 changed files with 56 additions and 109 deletions

View File

@@ -298,9 +298,9 @@ dagger up
## Deploy an application to GCP Cloud Run
This example shows how to deploy an application to GCP Cloud Run. Read the deployment [plan](https://github.com/dagger/dagger/tree/main/examples/cloud-run-app)
This example shows how to deploy an application to GCP Cloud Run. Read the deployment [plan](https://github.com/dagger/dagger/tree/main/examples/cloudrun-app)
NOTE: this example requires an EKS cluster to allow authentication with your AWS credentials; but can easily be adapter to deploy to any Kubernetes cluster.
NOTE: this example requires the right GCP IAM permissions: `https://cloud.google.com/run/docs/reference/iam/roles#additional-configuration`
Components:
@@ -311,27 +311,26 @@ How to run:
1. Initialize a new workspace
```sh
cd ./cloud-run-app
cd ./cloudrun-app
dagger init
```
2. Create a new environment
```sh
dagger new cloud-run-app
cp *.cue ./.dagger/env/cloud-run-app/plan/
dagger new cloudrun-app
cp main.cue ./.dagger/env/cloudrun-app/plan/
```
3. Configure the Cloud Run service
```sh
dagger input text serviceName MY_APP_NAME
dagger input text region MY_GCP_REGION
dagger input text image MY_GCR_IMAGE_NAME
dagger input text gcpConfig.project MY_GCP_PROJECT
dagger input text gcpConfig.region MY_GCP_REGION
dagger input secret gcpConfig.serviceKey -f MY_GCP_SERVICE_KEY_FILE
```
4. Deploy!