Invoke application deployed in Cloud Run from Apigee Proxy

Google Cloud Tech
2 Mar 202306:21

Summary

TLDRThis tutorial demonstrates deploying a Cloud Run application and an Apigee proxy using Cloud Build. It covers setting up the environment, enabling necessary APIs, and assigning roles for Cloud Build service account. The process includes building a container image, pushing it to Container Registry, and deploying it to Cloud Run. An Apigee service account with invoker role is created for accessing Cloud Run. The tutorial concludes with testing the API call to ensure successful deployment and a reminder to clean up resources.

Takeaways

  • 🔧 Demonstrates how to call a Cloud Run app from Apigee using Cloud Build for deployment.
  • ☁ Cloud Run is a managed platform for deploying containers on Google's scalable infrastructure.
  • đŸ› ïž Cloud Build is a managed CI/CD platform for automated builds.
  • 🔑 Prerequisites include Apigee exposure, external access configuration, and GCP deployment permissions.
  • đŸ› ïž Required tools are gcloud, unzip, curl, and jq.
  • 📝 The tutorial can be followed using Cloud Shell with QuickStart.
  • đŸ’» Sets up environment variables in an 'environment.sh' file for the deployment process.
  • 🔄 Enables necessary APIs like IAM, Cloud Build, Cloud Run, and Container Registry.
  • đŸ‘€ Assigns roles to the Cloud Build service account for Apigee and Cloud Run access.
  • 🚀 Triggers Cloud Build to deploy the application and sets up the service account for Apigee access.
  • 🔗 Modifies the target URL in the 'cloudbuild.yaml' file to point to the Cloud Run service.
  • 📈 Tests the API call to ensure successful deployment and returns the expected service message.
  • đŸ—‘ïž Reminds viewers to clean up resources after deployment.

Q & A

  • What is Cloud Run and how does it relate to the video's content?

    -Cloud Run is a managed compute platform that allows users to run stateless containers that are invocable via HTTP requests. It is part of Google Cloud's scalable infrastructure. In the video, Cloud Run is used to deploy a sample application that is then accessed via an API deployed through Apigee.

  • What is the role of Cloud Build in the context of this video?

    -Cloud Build is Google Cloud's fully managed continuous integration and delivery platform. In the video, it is used to automate the deployment of a Cloud Run application by building a container image, pushing it to Container Registry, and then deploying it to Cloud Run.

  • What is Apigee and how does it interact with Cloud Run in the video?

    -Apigee is an API management platform that allows developers to create, manage, and secure APIs. In the video, Apigee is used to deploy a proxy that acts as an intermediary for the Cloud Run service, enabling API traffic management and access control.

  • What are the prerequisites for the sample demonstrated in the video?

    -The prerequisites include having an Apigee environment configured for external access, the ability to deploy a proxy to Apigee, deploy an application to Cloud Run, and the ability to trigger a Cloud Build job in the GCP project.

  • What tools does a user need to have installed to follow the video tutorial?

    -A user needs to have tools like gcloud, unzip, curl, and jq installed to follow the tutorial. These tools are necessary for interacting with Google Cloud services and managing the deployment process.

  • How does the video demonstrate the setup of the environment for deploying the Cloud Run application?

    -The video demonstrates environment setup by using Cloud Shell with QuickStart, authenticating with GCP, navigating to the Cloud Run directory, and setting up environment variables in an 'environment.sh' file.

  • What APIs need to be enabled before deploying the Cloud Run samples?

    -Before deploying the Cloud Run samples, the IAM API, Cloud Build API, Cloud Run API, and Container Registry API need to be enabled.

  • What roles and permissions are assigned to the Cloud Build service account in the video?

    -The Cloud Build service account is assigned the Apigee Org Admin role, Cloud Run Admin, and Service Account Admin and User roles to facilitate the deployment process.

  • What is the content of the application deployed to Cloud Run as per the video?

    -The application deployed to Cloud Run is a simple Node.js application that prints the text 'Mocktarget Service.' This is demonstrated in the 'app.js' file within the 'app' directory.

  • How is the Apigee proxy deployed in the video?

    -The Apigee proxy is deployed using a 'cloudbuild.yaml' file that outlines steps for building the container image, pushing it to the container registry, and deploying it to Cloud Run. It also sets up a service account with the invoker role and changes the target URL to the Cloud Run endpoint before running the Maven deploy bundle step.

  • How can one test the successful deployment of the Cloud Run application and Apigee proxy?

    -After deployment, one can test the API call to ensure that the deployment was successful. In the video, this is demonstrated by making an API call that returns the expected response 'Mocktarget Service.'

Outlines

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Mindmap

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Keywords

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Highlights

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant

Transcripts

plate

Cette section est réservée aux utilisateurs payants. Améliorez votre compte pour accéder à cette section.

Améliorer maintenant
Rate This
★
★
★
★
★

5.0 / 5 (0 votes)

Étiquettes Connexes
Cloud RunApigeeCloud BuildDeploymentGCPContainerInfrastructureCI/CDAutomationDevOps
Besoin d'un résumé en anglais ?