The cornerstone of effective, scalable, cloud native development is establishing a personal laboratory, which is the focus of this chapter. This space serves as a secure playground for innovation. Your laboratory is your development environment, typically a local workstation or laptop, where you have the freedom to experiment, iterate, and rapidly observe the results. You […]
Disabling Unauthenticated Access to Cloud Run Services – API and User Interface with API Gateway and Cloud Storage
With the API Gateway working, you can now remove unauthenticated access to the Cloud Run services by revoking the roles/run.invoker role from allUsers from the Cloud Run service. This is because the API Gateway has the roles/run.invoker role to call the Cloud Run service on your behalf. This will also be the case for the […]
Deploying the UI Container to Cloud Run – API and User Interface with API Gateway and Cloud Storage
As the user interface container does not need any configuration, you do not need to configure any environment variables. It will also run without needing any additional permissions, so you do not need to configure any IAM roles. However, by default, it will use the default service account for the project which has more permissions […]
Requirements – API and User Interface with API Gateway and Cloud Storage
In previous chapters, you developed three separate Cloud Run services that collectively constitute the backend for the Skills Mapper application. While the benefit of this arrangement is that each service can be individually maintained and scaled, it has led to a somewhat fragmented system. Navigating this structure currently requires an understanding of which functionality is […]
Requirements – Profile Service with Pub/Sub and Firestore
This chapter delves into the creation of a cloud native, event-driven microservice: the profile service. This profile service will build and continuously update user profiles based on changing facts from the fact service. The architecture will employ Google Pub/Sub for event notifications, Firestore as a serverless database to store user profiles, and Cloud Run for […]
Deploying to Cloud Run Connecting to Cloud SQL – Fact Service with Spring Boot, Cloud Run, and Cloud SQL
To deploy for real, the fact service needs to connect to the Cloud SQL PostgreSQL database. There are several options for connecting to a Cloud SQL database from Cloud Run. In this case, as you are using the Spring Cloud GCP starter for Cloud SQL to connect to a Cloud SQL database using the Cloud […]
Creating a Secret in Secret Manager – Fact Service with Spring Boot, Cloud Run, and Cloud SQL
Before establishing a connection between the Cloud Run service and the Cloud SQL database, it’s necessary to create a secret in Secret Manager to safely store the database user’s password. Secret Manager is a secure and convenient solution provided by Google Cloud for managing sensitive information like passwords, API keys, and other secrets. It ensures […]
Building the Container – Fact Service with Spring Boot, Cloud Run, and Cloud SQL
With the Spring Boot application written, you need to package it into a container. In Chapter 10, I will cover more options for automating this process; however, for now, I will introduce Jib, a Google open source project that allows you to build containers for a Java application without a Dockerfile. Jib uses a plugin […]
Cloud Run – Fact Service with Spring Boot, Cloud Run, and Cloud SQL
As you have seen in Chapter 6, Cloud Run is a flexible solution for running containers, and you will use it here again. My approach is to work my way down from the highest abstraction until I find a service that can work within the constraints I have identified, a process I call progressive decomposition, […]
Requirements – Fact Service with Spring Boot, Cloud Run, and Cloud SQL
In previous chapters, you embraced cloud native development. You made full use of the convenience of serverless Cloud Functions and then Cloud Run. You used the Go programming language, which, due to its relatively light footprint and fast startup time, is ideal for Cloud Run and autoscaling in particular. However, this chapter includes a more […]