Can SaaS and PaaS be used together? - google-cloud-platform

PaaS is used for creating custom applications using programming which will later be deployed onto the provider's cloud.
SaaS, on the other hand, the consumer uses the provider's applications running on the provider's infrastructure. Also, SaaS uses PaaS
Can the provider and the consumer be the same thing?
If a certain organisation uses SaaS can it go back to PaaS and build an application that it needs and then use it on SaaS?

SaaS - You build an application (e.g. App_A), deploy it somewhere (cloud) and different customers use the application over the web or without having to host it themselves.
When you build the application, (e.g. App_A) and have to deploy it to a cloud provider, you have 2 options
a) Take care of 'virtually' building the hardware - you select disk size, select an OS, memory size, install all the necessary software and then you deploy your application on it. In this case, you are using an Infrastructure as a Service (IaaS). It's like building a computer first and then installing (deploying) your App.
b) Second option is that the cloud provider handles all of the earlier mentioned components and you just deploy your code. It's like someone gives you an already built computer and you just install your code (your application). This is Platform as a service (PaaS)
At the end of the day, you can run a business (a SaaS) on a PaaS e.g. Khan Academy & SnapChat both run on Google App Engine. In these examples, Khan Academy and SnapChat are both SaaS running on Google App Engine which is a PaaS

Can the provider and the consumer be the same thing?
I think you are confusing these two terms. The provider is the CSP (cloud service provider) and consumer is the entity/users actually accessing the software/infrastructure.
The whole point of PAAS is that it provides a framework for developers to build customized applications, as well as simple cost-effective deployment of apps. If you wanted to access your application through the cloud similar to how SAAS works then that is entirely possible but would still require you pay the CSP for VM space to run your applications

Related

Pivotal Cloud Foundry is based on container or VM

I am starting to learn PCF . Please help me understand if PCF falls under the concept of containerization or virtualization.
Kindly help me with this.
PCF (a.k.a. PAS, a.k.a. TAS) apps are deployed on containers, typically using Garden as the container runtime and Diego as the container orchestration engine. The components of the PCF runtime may be deployed as virtual machines, managed by BOSH, or as containers.
Pivotal Cloud Foundry (PCF) is a Platform as a Service (PaaS). It helps the developer to write the modern microservice based application and consume services from the marketplace. Typically, we should deploy and install PCF on the cloud platforms such as AWS Cloud and Azure Cloud. The deployment is a big process like it requires 20+ VMs and it should be highly available.
Now coming to your question, PCF doesn't fall specifically under containerization nor virtualization. PCF provides PaaS service like Elastic Bean Stalk in AWS Cloud. Of course, we can use Docker container technology for the application runtime on PCF Cloud.
what is PCF: Pivotal Cloud Foundry is a commercial version of Cloud Foundry that is produced by Pivotal. It has commercial features that are added over and above what is available in the open source version of Cloud Foundry. It's PaaS platform i.e. a platform upon which developers can build and deploy applications. It provides you runtime to your applications. You give PCF an application, and the platform does the rest. It does everything from understanding application dependencies to container building and scaling and wiring up networking and routing.
Beauty of PCF is that you need not to worry about the underlying infrastructure and it can be deployed on-premises and on many cloud providers to give enterprises a hybrid and multi-cloud platform. It gives you flexibility and offers a lot of options to develop and run cloud native apps inside any cloud platform.
Category: PCF is one example of an “application” PaaS, also called the Cloud Foundry Application Runtime, and Kubernetes is a “container” PaaS (sometimes called CaaS). PCF is higher level abstraction and Kubernetes is lower level of abstraction in the PaaS world. In simple terms Cloud Foundry can be classified as a tool in the "Platform as a Service" category.
Applications run on PCF are deployed, scaled and maintained by BOSH (PCF’s infrastructure management component). It deploys versioned software and the VM for it to run on and then monitors the application after deployment. It can't be seen purely under containerization or virtualization.
Learning: Pivotal used to provide PWS (Pivotal Web Services) which is a kind of platform available over the internet that you could have explored to learn for free but somehow PWS took its final bow and left the stage back in Jan'21. May be look to go to one of certified providers: https://www.cloudfoundry.org/certified-platforms/

How to connect a local service being developed to a hosted service mesh?

I currently have a hosted (GCP) microservice environment that is under development. When working on a service I currently run the environment locally. I run all the services that the service I am working on needs to communicate to.
This provides a bad developer experience because:
I have to spin up every service; there can be a lot
running so many services can use a lot of my system resources
If any of those services need a DB, I have to set that up too
I'm looking for a soution to this. Idealy, I will run just the single service locally and connect to the rest of the services in the hosted environment.
Do any of the popular service meshes offer this as an option? I'm looking at Istio and Kuma primarily. Are there any alternatives solutions that come to mind?
For remote development/debugging I would suggest to have a look at Telepresence.
https://www.telepresence.io/
It is even recommended by Kubernetes docs:
Using telepresence allows you to use custom tools, such as a debugger and IDE, for a local service and provides the service full access to ConfigMap, secrets, and the services running on the remote cluster.
https://kubernetes.io/docs/tasks/debug-application-cluster/local-debugging/
Istio on the other hand enables you to do shadow deployment and canary or blue/green deployment. You can e.g. run a service and send certain user (based on the header) to a new version. You can mirror traffic to a service or shift traffic from 0 to 100 % step by step. I'd say it's more for testing your new service under load or gradually releasing a new version.

Deploying a multi-service app to a cloud provider

There are several tutorials on how to deploy a containerized service to the cloud: AWS, Google Cloud Platform, Heroku, and many others all have nice tutorials on how to do this.
However, most real-world apps are made of two or more services (for example a database + a web server), rather than just one service.
Is it bad practice to deploy the various services of a multi-service app to different clusters (e.g. deploy the database to a GKE cluster, and the web server to another GKE cluster)? I'm asking this because I am finding it very difficult to deploy a simple web app to a single cluster, while I was expecting that once I set up my Dockerfiles and docker-compose.yml everything would work out-of-the-box (as advertised by the documentations of Docker Compose and Kubernetes) and I would be able to have a small cluster with 1 container for my database and 1 container for my web server.
So my questions are:
Is it bad practice to deploy the various services of a multi-service app to different clusters?
What is, in general, the de-facto standard way to deploy a web app with a database and a web server to the cloud? What are the easiest tools to achieve this?
Practically, what is the simplest way I can deploy a React + Express + MongoDB app to any cloud provider with a free-tier account?
Deploying multiple services (AKA applications) that shares some logic between them on the same cluster/namespace is actually the best practice. I am not sure why you find it difficult, but you could take a container orchestrator platform, such as Kubernetes and deploy as many applications as you want - in the same project on the same cluster.
I would recommend getting into a cloud platfrom that serves a Container Orchestrator such as Google Container Engine of Google Cloud Platform (or any other cloud platform you want) and start exploring around. You can also read about containers overall or Kubernetes.
So, practically speaking, I would probably create MongoDB and the express app inside the same namespace (and every other service or application related to the project on another container within the same namespace).

What is the purpose of using Spring cloud? What is the difference between AWS and Springcloud?

Why we need Spring cloud? What is the difference between AWS and Spring Cloud?
It might help to think of a division between infrastructure, applications and platform. Think of infrastructure as hardware - servers, disk, compute, network routing etc. that you can use. Let's call 'application' the executables that you build from your code in order to implement business logic and satisfy your end users. Then platform is a connecting layer - tools and standards to help your applications make use of infrastructure.
AWS is most famous for providing cloud infrastructure but it also provides a lot of services that could fall under platform. For example, it provides an API gateway service and container orchestration services with ECS or EKS (kubernetes) - these are more platform-level services as they are services that help your applications to scale and to talk to each other in the cloud.
Spring Cloud is a set of tools that help you address common problems faced by cloud applications. Concerns like how to get applications to talk reliably to each other in the cloud (eureka, hystrix and ribbon for http, streams for messaging) how to provide a single entry-point for consumers to access a set of microservices (zuul and spring cloud gateway) and how to manage configuration across microservices (spring cloud config). Mostly I would put these concerns under 'platform' but there are grey areas. You normally add the spring cloud libraries to components you build, which is a bit more 'application'-like. Some of the same concerns are addressed by certain services available in AWS (especially ECS and EKS(kubernetes)).
So the core areas of concern are very different for AWS (primarily infrastructure) and spring cloud (platform or platform-application bridge). But there can be some overlap at the platform level because AWS and spring cloud both offer so many options. It is tricky to find any direct comparisons because there are so many options but if you focus on EKS(kubernetes) in particular a good article comparing it with spring cloud is https://dzone.com/articles/deploying-microservices-spring-cloud-vs-kubernetes
Spring Cloud is a programming API that is used to develop an application by following a microservices design.
Spring Cloud speaks about development. Cloud Platforms like AWS are used to deploy the application.
Spring Cloud is just a set of tools (software) commonly used in the cloud, AWS is one of many cloud options, a place where you can deploy your apps.

is Google Cloud Platform capable of providing these things?

I have a system made up of the following that I'd like to host on Google Cloud Platform:
web service (apache cxf)
web server (apache tomcat)
database (mysql)
hosted web pages
I'd like to be able to install/set up Tomcat and MySql myself. I do not want to use someone's canned, prepackaged components.
If this has built in tools to allow load testing that would be a great nice to have but its not required.
What is required is that it essentially runs itself and requires little hands on intervention from me on a day to day basis.
Yes the GCP can do all of that.
Just set up a virtual machine inside the compute engine and it will be very easy to maintain and even scale your applications.
My company is doing just that right now.
Yes you can use the Google Compute Engine , it's Infrastructure as a Service just like Amazon EC2 or other servers.
Refer https://cloud.google.com/compute/