GCP Learning Series _ App Engine Part 2
Overview
This blog will show how to setup Cloud SDK in your local machine, configuring docker , create docker image and push it to Container Registry
To install Cloud SDK, Python3 is pre-requisite.
Please install Python, using brew
brew install python3
Then download the tar file : google-cloud-sdk-350.0.0-darwin-x86_64.tar
Unzip it and then run below command to do Cloud SDK installation
Cloud Authentication
Need to run below command to do authentication
gcloud auth login
the above command, will open up the gcloud console and need to give your consent there to access gcloud console
Building a sample application and push it to Container Registry
https://github.com/bhanikki28/GCPSamples/tree/master/AppEngineDemo
To build and dockerize the application, please refer to : https://medium.com/@bharathy.poovalingam/spring-boot-with-docker-d4129a353f87
Note : here , need to tag the image, that match to gcr registry as shown below
Syntax : gcr.io/PROJ_ID/folder/image_name
Authorizing Docker
Need to run below command to authorize docker to push image to Google Cloud Container Registry
gcloud auth configure-docker
Pushing the image to Container Registry
Login to gcloud console and navigate to Container Registry section, to view the image been pushed there.
to be continued… ( Deploying the image to Google App Engine )
Happy Learning !
Bharathy Poovalingam
#GCP #Learning #Serverless #AppEngine