Roy Yup
Roy Yup

Reputation: 61

Deploy my spring boot application into google cloud computer engine

I got a query to ask you all. I am looking for guides that help me deploy my spring boot application on google cloud computer engine, I type in my instance IP address when I test my spring boot application I unable to access it in REST API.

May I know do you have any guides or steps for me to follow to deploy successfully in google cloud computing engine. Why do I need to deploy in computer engine is because I deployed my angular at it and I deploy it both it seems that my angular project being replaced by my spring boot application.

Upvotes: 2

Views: 2187

Answers (1)

Bryan Davis
Bryan Davis

Reputation: 134

Codelabs GCP / Spring series has deployment tutorials: https://codelabs.developers.google.com/spring/

GCP has some "Getting Started" tutorials you can use here: https://cloud.google.com/java/docs/

where the specific one for deploying a java app to GCE is here: https://cloud.google.com/java/docs/tutorials/bookshelf-on-compute-engine

But the basic steps are as follows:

  1. Write your Spring app
  2. Build your Spring app
  3. Run / test your jar locally
  4. Push your jar to a location in Storage
  5. Create a startup script for your GCE instance
  6. Create a new GCE VM which uses your startup script using Console, Deployment API, or gcloud tool

After that, you need to ensure you have the proper network rules in place to be able to access your API publicly. If you do not wish to learn how to use GCE, I would suggest you look into using App Engine instead because then you do not need to learn how to deploy and instead can concentrate on your api. Here is a guide to do that

Upvotes: 1

Related Questions