Tiya
Tiya

Reputation: 563

Cloud Foundry : Spring boot vs WAR file

I am new to the world of Cloud, CloudFoundry, Saas, PaaS, IaaS, etc.

So I have few very fundamental questions.

Upvotes: 3

Views: 3318

Answers (1)

Praneeth Ramesh
Praneeth Ramesh

Reputation: 3564

There is nothing like better in war or Spring boot jar. They both are underhood same things, where Spring boot jar manages the server embedded in it and war does not have that.

Cloud Foundry has something like BuildPacks. You need to define a buildpack when you do a cf push. If you select a java build pack it has the things required to run a war on server. It gets the Java, Tomcat Server and all other dependencies needed to run the war.

https://github.com/cloudfoundry/java-buildpack

Cloud foundry creates a droplet, which is basically the execution context with all required dependencies. This is used to run the actual VM on the cloud.

You need not know which server your war is deployed to. That is the basic idea behind the cloud deployment. It may be on a single/multiple VMs under the hood. So what you need to know is something called routes. Routes are the actual addresses to your apps. You need to create routes and bind them to your application, and later app can be accessed using the routes.

https://docs.cloudfoundry.org/devguide/deploy-apps/routes-domains.html#routes

No using embedded servers is not mandatory in Any Cloud PAAS. War can be directly deployed. All PAAS platforms has support for this. Cloud foundry way of doing this is through build packs.

CF : https://docs.cloudfoundry.org/buildpacks/

Heroku : https://devcenter.heroku.com/articles/java-webapp-runner

Any application/ non spring apps which is plain war or jar can be used to run on PAAS platforms.

Upvotes: 2

Related Questions