### Skaffold Configuration: Artifacts Source: https://github.com/googlecloudplatform/cloud-deploy-tutorials/blob/main/tutorials/base/web/README.md Define the Docker images and their build contexts within the 'artifacts' section of skaffold.yaml. This example specifies two images: 'leeroy-web' and 'leeroy-app'. ```yaml artifacts: - image: leeroy-web context: ./leeroy-web/ - image: leeroy-app context: ./leeroy-app/ ``` -------------------------------- ### Run Skaffold Development Mode Source: https://github.com/googlecloudplatform/cloud-deploy-tutorials/blob/main/tutorials/base/web/README.md Execute this command from the project root to start Skaffold in development mode. Skaffold will build, deploy, and continuously monitor your applications for changes. ```bash skaffold dev ``` -------------------------------- ### Apply Cloud Deploy Tutorial Policies Source: https://github.com/googlecloudplatform/cloud-deploy-tutorials/blob/main/policies/README.md Run this script to override organizational policies for the current project, which is required before starting Cloud Deploy tutorials to allow the creation of default service accounts with necessary permissions. ```bash ./apply-policies.sh ``` -------------------------------- ### Skaffold Configuration: Deploy Manifests Source: https://github.com/googlecloudplatform/cloud-deploy-tutorials/blob/main/tutorials/base/web/README.md Configure the 'deploy' stanza in skaffold.yaml to specify Kubernetes manifest files. This example uses glob patterns to include all YAML and JSON files from the manifest directories of both applications. ```yaml deploy: kubectl: manifests: - ./leeroy-web/kubernetes/* - ./leeroy-app/kubernetes/* ``` -------------------------------- ### Organizational Policies Overridden for Cloud Deploy Tutorials Source: https://github.com/googlecloudplatform/cloud-deploy-tutorials/blob/main/policies/README.md List of organizational policies that will be overridden for the current project when running the apply-policies.sh script. These overrides are necessary for the Cloud Deploy tutorials. ```text compute.requireOsLogin compute.requireShieldedVm compute.restrictVpcPeering compute.restrictVpnPeerIPs compute.vmCanIpForward iam.automaticIamGrantsForDefaultServiceAccounts ``` -------------------------------- ### Access Web Service URL Source: https://github.com/googlecloudplatform/cloud-deploy-tutorials/blob/main/tutorials/base/web/README.md Use this command to retrieve the URL for the 'leeroy-web' service and then access it with curl. This is useful for testing the exposed frontend. ```bash $ curl $(minikube service leeroy-web --url) ``` -------------------------------- ### Update Application Message Source: https://github.com/googlecloudplatform/cloud-deploy-tutorials/blob/main/tutorials/base/web/README.md Modify the handler function in 'app.go' to change the message returned by the 'leeroy-app' backend. This change will be picked up by Skaffold during development. ```golang func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "leeroooooy app!!!\n") } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.