Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions skills/cloud/alloydb-basics/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ endpoint management to help developers build AI apps faster.
1. **Enable the AlloyDB API:**

```bash
gcloud services enable alloydb.googleapis.com
gcloud services enable alloydb.googleapis.com --quiet
```

2. **Create a Cluster:**

```bash
gcloud alloydb clusters create my-cluster --region=us-central1 \
--password=my-password --network=my-vpc
--password=my-password --network=my-vpc \
--quiet
```

*Note: For production, we recommend using IAM database authentication
Expand All @@ -39,7 +40,8 @@ endpoint management to help developers build AI apps faster.

```bash
gcloud alloydb instances create my-primary --cluster=my-cluster \
--region=us-central1 --instance-type=PRIMARY --cpu-count=2
--region=us-central1 --instance-type=PRIMARY --cpu-count=2 \
--quiet
```

## Reference Directory
Expand Down
2 changes: 1 addition & 1 deletion skills/cloud/bigquery-basics/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ intelligence capabilities.

1. **Enable the BigQuery API:**
```bash
gcloud services enable bigquery.googleapis.com
gcloud services enable bigquery.googleapis.com --quiet
```

2. **Create a Dataset:**
Expand Down
28 changes: 16 additions & 12 deletions skills/cloud/cloud-run-basics/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ types:
1. Enable the Cloud Run Admin API and Cloud Build APIs:

```bash
gcloud services enable run.googleapis.com cloudbuild.googleapis.com
gcloud services enable run.googleapis.com cloudbuild.googleapis.com --quiet
```

1. If you are under a domain restriction organization policy [restricting](https://docs.cloud.google.com/organization-policy/restrict-domains)
Expand Down Expand Up @@ -55,7 +55,8 @@ Cloud Run Builder (`roles/run.builder`) role on your project:
```bash
gcloud projects add-iam-policy-binding PROJECT_ID \
--member=serviceAccount:SERVICE_ACCOUNT_EMAIL_ADDRESS \
--role=roles/run.builder
--role=roles/run.builder \
--quiet
```

Replace `PROJECT_ID` with your Google Cloud project ID and
Expand Down Expand Up @@ -106,7 +107,8 @@ To deploy a container image, run the following command:
gcloud run deploy SERVICE_NAME \
--image IMAGE_URL \
--region us-central1 \
--allow-unauthenticated
--allow-unauthenticated \
--quiet
```

Replace the following:
Expand Down Expand Up @@ -139,7 +141,8 @@ There are two different ways to deploy your service from source:
```bash
gcloud run deploy SERVICE_NAME --source . \
--base-image BASE_IMAGE \
--automatic-updates
--automatic-updates \
--quiet
```

Cloud Run only supports automatic base images that use [Google Cloud's
Expand All @@ -149,7 +152,7 @@ There are two different ways to deploy your service from source:
* To deploy from source using a Dockerfile, run the following command:

```bash
gcloud run deploy SERVICE_NAME --source .
gcloud run deploy SERVICE_NAME --source . --quiet
```
When you provide a Dockerfile, Cloud Build runs it in the cloud, and
deploys the service.
Expand All @@ -165,7 +168,8 @@ There are two different ways to deploy your service from source:
--no-build \
--base-image=BASE_IMAGE \
--command=COMMAND \
--args=ARG
--args=ARG \
--quiet
```

Replace the following:
Expand All @@ -192,13 +196,13 @@ There are two different ways to deploy your service from source:
To create a new job, run the following command:

```bash
gcloud run jobs create JOB_NAME --image IMAGE_URL OPTIONS
gcloud run jobs create JOB_NAME --image IMAGE_URL OPTIONS --quiet
```

Alternatively, use the deploy command:

```bash
gcloud run jobs deploy JOB_NAME --image IMAGE_URL OPTIONS
gcloud run jobs deploy JOB_NAME --image IMAGE_URL OPTIONS --quiet
```

Replace the following:
Expand Down Expand Up @@ -243,14 +247,14 @@ successful completion.
To execute an existing job, run the following command:

```bash
gcloud run jobs execute JOB_NAME
gcloud run jobs execute JOB_NAME --quiet
```

If you want the command to wait until the execution completes, run the following
command:

```bash
gcloud run jobs execute JOB_NAME --wait --region=REGION
gcloud run jobs execute JOB_NAME --wait --region=REGION --quiet
```

Replace the following:
Expand Down Expand Up @@ -296,7 +300,7 @@ repository](https://docs.cloud.google.com/artifact-registry/docs/repositories/re
To deploy a container image, run the following command:

```bash
gcloud run worker-pools deploy WORKER_POOL_NAME --image IMAGE_URL
gcloud run worker-pools deploy WORKER_POOL_NAME --image IMAGE_URL --quiet
```

Replace the following:
Expand Down Expand Up @@ -333,7 +337,7 @@ default, Cloud Run uses the default machine type provided by Cloud Build.
To deploy a worker pool from source, run the following command:

```bash
gcloud run worker-pools deploy WORKER_POOL_NAME --source .
gcloud run worker-pools deploy WORKER_POOL_NAME --source . --quiet
```

Replace `WORKER_POOL_NAME` with the name you want for your worker pool.
Expand Down
29 changes: 17 additions & 12 deletions skills/cloud/cloud-run-basics/references/cli-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,33 @@ gcloud run [GROUP] [COMMAND] [FLAGS]

```bash
gcloud run deploy my-service \
--image us-docker.pkg.dev/cloudrun/container/hello:latest
--image us-docker.pkg.dev/cloudrun/container/hello:latest \
--quiet
```

- **Deploy from source code:**

```bash
gcloud run deploy my-service --source .
gcloud run deploy my-service --source . --quiet
```

- **Deploy a Cloud Run function:**

```bash
gcloud run deploy my-service
--source . --function example-hello --base-image go126 --region us-central1
--source . --function example-hello --base-image go126 --region us-central1 --quiet
```

- **List services:**

```bash
gcloud run services list
gcloud run services list --quiet
```

- **Update traffic split:**

```bash
gcloud run services update-traffic my-service --to-revisions=REV1=50,REV2=50
gcloud run services update-traffic my-service --to-revisions=REV1=50,REV2=50 --quiet
```

### Cloud Run job
Expand All @@ -50,13 +51,14 @@ gcloud run [GROUP] [COMMAND] [FLAGS]

```bash
gcloud run jobs create my-job \
--image us-docker.pkg.dev/cloudrun/container/job:latest
--image us-docker.pkg.dev/cloudrun/container/job:latest \
--quiet
```

- **Execute a job:**

```bash
gcloud run jobs execute my-job
gcloud run jobs execute my-job --quiet
```

- **List jobs:** `gcloud run jobs list`
Expand All @@ -73,26 +75,28 @@ gcloud run [GROUP] [COMMAND] [FLAGS]

```bash
gcloud run worker-pools deploy my-workerpool \
--image us-docker.pkg.dev/cloudrun/container/worker-pool:latest
--image us-docker.pkg.dev/cloudrun/container/worker-pool:latest \
--quiet
```

- **Deploy from source code:**

```bash
gcloud run worker-pools deploy my-workerpool --source .
gcloud run worker-pools deploy my-workerpool --source . --quiet
```

- **List worker pools:**

```bash
gcloud run worker-pools list --region us-central1
gcloud run worker-pools list --region us-central1 --quiet
```

- **Configure scaling (manual):**

```bash
gcloud run worker-pools deploy my-workerpool --instances=5 \
--image us-docker.pkg.dev/cloudrun/container/worker-pool:latest
--image us-docker.pkg.dev/cloudrun/container/worker-pool:latest \
--quiet
```

### Configuration and logs
Expand All @@ -103,7 +107,8 @@ gcloud run [GROUP] [COMMAND] [FLAGS]

```bash
gcloud logging read "resource.type=cloud_run_revision AND \
resource.labels.service_name=my-service"
resource.labels.service_name=my-service" \
--quiet
```

## Common Flags
Expand Down
3 changes: 2 additions & 1 deletion skills/cloud/cloud-run-basics/references/iam-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,6 @@ gcloud run deploy SERVICE_NAME \
--region=REGION \
--image=IMAGE_URL \
--no-allow-unauthenticated \
--iap
--iap \
--quiet
```
14 changes: 9 additions & 5 deletions skills/cloud/cloud-sql-basics/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ access to Cloud SQL resources.

1. **Enable the API:**
```bash
gcloud services enable sqladmin.googleapis.com
gcloud services enable sqladmin.googleapis.com --quiet
```

2. **Create an Instance:**
Expand All @@ -40,7 +40,8 @@ access to Cloud SQL resources.
--database-version=POSTGRES_18 \
--cpu=2 \
--memory=7680MiB \
--region=REGION
--region=REGION \
--quiet
```

3. **Set a password for the default user:**
Expand All @@ -49,13 +50,15 @@ access to Cloud SQL resources.
is `postgres`:
```bash
gcloud sql users set-password postgres \
--instance=INSTANCE_NAME --password=PASSWORD
--instance=INSTANCE_NAME --password=PASSWORD \
--quiet
```

4. **Create a database:**
```bash
gcloud sql databases create DATABASE_NAME \
--instance=INSTANCE_NAME
--instance=INSTANCE_NAME \
--quiet
```

5. **Get the instance connection name:**
Expand All @@ -65,7 +68,8 @@ access to Cloud SQL resources.
Proxy. Retrieve it with the following command:
```bash
gcloud sql instances describe INSTANCE_NAME \
--format="value(connectionName)"
--format="value(connectionName)" \
--quiet
```

6. **Connect to the instance:**
Expand Down
20 changes: 11 additions & 9 deletions skills/cloud/cloud-sql-basics/references/cli-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,60 +17,62 @@ gcloud sql [GROUP] [COMMAND] [FLAGS]

```bash
gcloud sql instances create my-instance --database-version=MYSQL_8_0 \
--tier=db-f1-micro --region=us-central1
--tier=db-f1-micro --region=us-central1 \
--quiet
```

- **List instances:**

```bash
gcloud sql instances list
gcloud sql instances list --quiet
```

- **Describe an instance:**

```bash
gcloud sql instances describe my-instance
gcloud sql instances describe my-instance --quiet
```

- **Restart an instance:**

```bash
gcloud sql instances restart my-instance
gcloud sql instances restart my-instance --quiet
```

### Database and User Management

- **Create a database:**

```bash
gcloud sql databases create my-db --instance=my-instance
gcloud sql databases create my-db --instance=my-instance --quiet
```

- **Create a user:**

```bash
gcloud sql users create my-user --instance=my-instance \
--password=my-password
--password=my-password \
--quiet
```

### Operations and Backups

- **List operations:**

```bash
gcloud sql operations list --instance=my-instance
gcloud sql operations list --instance=my-instance --quiet
```

- **Create a backup:**

```bash
gcloud sql backups create --instance=my-instance
gcloud sql backups create --instance=my-instance --quiet
```

- **Restore from a backup:**

```bash
gcloud sql backups restore backup_id --restore-instance=my-instance
gcloud sql backups restore backup_id --restore-instance=my-instance --quiet
```

## Common Flags
Expand Down
6 changes: 3 additions & 3 deletions skills/cloud/gke-basics/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ GKE is a managed Kubernetes platform on Google Cloud for deploying, scaling, and
## Quick Start

```bash
gcloud services enable container.googleapis.com
gcloud container clusters create-auto my-cluster --region=us-central1
gcloud container clusters get-credentials my-cluster --region=us-central1
gcloud services enable container.googleapis.com --quiet
gcloud container clusters create-auto my-cluster --region=us-central1 --quiet
gcloud container clusters get-credentials my-cluster --region=us-central1 --quiet
kubectl create deployment hello-server \
--image=us-docker.pkg.dev/google-samples/containers/gke/hello-app:1.0
```
Expand Down
Loading