It's a pet project made for learning cloud native application development techniques by book Cloud Native Spring in action
- Containerizing spring boot applications
- Multi-staged docker builds
- Optimizing docker builds with cache
- Accelerate docker builds with COPY --link
For local development I will use docker-compose to quickly test some functionality and minikbe.
For "production" environment (whatever it would mean in this case) I will use Google Cloud Kubernetes (GKE)
Before you can set up a new Kubernetes cluster, you must set up your GKE environment. The process may change in the future, so I’ll only give you a few general instructions here. For complete instructions, refer to https://cloud.google.com/container-engine/docs/before-you-begin.
Roughly, the whole procedure includes:
- Signing up for a Google account if you don’t have one already.
- Creating a project in the Google Cloud Platform Console.
- Enabling billing. This does require your credit card info, but Google provides a 12-month free trial with a free $300 credit. And they don’t start charging automatically after the free trial is over.
- Downloading and installing the Google Cloud SDK, which includes the gcloud tool.
- Creating the cluster using the gcloud command-line tool.
I use the europe-west3 region based in Frankfurt, Germany. It has three different zones - I’ll use the zone europe-west3-c. The default zone for all gcloud operations can be set with the following command:
gcloud config set compute/zone europe-west3-c
gcloud container clusters create polar-bookshop --num-nodes 3
To use kubectl with GKE cluster you will need a special plugin. You can find the instruction in Google Cloud website
Some organization manages a specialized bookshop and wants to sell its books about the North Pole and the Arctic online. A cloud native approach is being considered.
As a pilot project you are asked to build a Catalog Service, and for now it will only have one responsibility: welcoming users to the book catalog. This pilot project will be the foundation for actual products built as cloud native applications, should it be successful and well-received.