Skip to content

Commit

Permalink
Merge pull request #1 from GoogleCloudPlatform/ridwanmsharif/docs-update
Browse files Browse the repository at this point in the history
run-service-simple: use released image in the simple app instructions
  • Loading branch information
ridwanmsharif authored Dec 12, 2023
2 parents e54fa78 + ea5fb13 commit 487ae52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
19 changes: 1 addition & 18 deletions cloudbuild-simple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,14 @@ steps:
waitFor:
- BUILD_SAMPLE_APP

- name: "gcr.io/cloud-builders/docker"
args: ["build", "-t", "${_IMAGE_COLLECTOR}", "."]
id: BUILD_COLLECTOR
waitFor: ["-"]

- name: "gcr.io/cloud-builders/docker"
args: ["push", "${_IMAGE_COLLECTOR}"]
id: PUSH_COLLECTOR
waitFor:
- BUILD_COLLECTOR

- name: "ubuntu"
env:
- "IMAGE_APP=${_IMAGE_APP}"
- "IMAGE_COLLECTOR=${_IMAGE_COLLECTOR}"
- "PROJECT=${_GCP_PROJECT}"
script: |
sed -i s@%OTELCOL_IMAGE%@${IMAGE_COLLECTOR}@g run-service-simple.yaml
sed -i s@%SAMPLE_APP_IMAGE%@${IMAGE_APP}@g run-service-simple.yaml
id: REPLACE_YAML_VALUE
waitFor:
- PUSH_COLLECTOR
- PUSH_SAMPLE_APP

- name: "gcr.io/google.com/cloudsdktool/cloud-sdk:slim"
entrypoint: gcloud
Expand All @@ -61,7 +47,6 @@ steps:
id: DEPLOY_MULTICONTAINER
waitFor:
- PUSH_SAMPLE_APP
- PUSH_COLLECTOR
- REPLACE_YAML_VALUE

- name: "gcr.io/google.com/cloudsdktool/cloud-sdk:slim"
Expand All @@ -86,12 +71,10 @@ substitutions:
_GCP_PROJECT: ${PROJECT_ID}
_REGISTRY: ${_REGION}-docker.pkg.dev/${_GCP_PROJECT}/run-gmp
_IMAGE_APP: ${_REGISTRY}/sample-app
_IMAGE_COLLECTOR: ${_REGISTRY}/collector
_SA_NAME: run-gmp-sa

images:
- ${_IMAGE_APP}
- ${_IMAGE_COLLECTOR}

# comment out the following line if you want to run Cloud Build with the existing
# service account with the following roles.
Expand Down
4 changes: 2 additions & 2 deletions run-service-simple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
template:
metadata:
annotations:
run.googleapis.com/execution-environment: gen1
run.googleapis.com/execution-environment: gen2
run.googleapis.com/cpu-throttling: 'false'
run.googleapis.com/container-dependencies: '{"collector":["app"]}'
spec:
Expand All @@ -39,5 +39,5 @@ spec:
port: 8000
ports:
- containerPort: 8000
- image: "%OTELCOL_IMAGE%"
- image: us-docker.pkg.dev/cloud-ops-agents-artifacts/cloud-run-gmp-sidecar/cloud-run-gmp-sidecar:1.0.0
name: collector
2 changes: 1 addition & 1 deletion run-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
template:
metadata:
annotations:
run.googleapis.com/execution-environment: gen1
run.googleapis.com/execution-environment: gen2
run.googleapis.com/cpu-throttling: 'false'
run.googleapis.com/container-dependencies: '{"collector":["app"]}'
run.googleapis.com/secrets: '%SECRET%:projects/%PROJECT%/secrets/%SECRET%'
Expand Down

0 comments on commit 487ae52

Please sign in to comment.