I'm creating my service in Google Cloud platform Kubernetes cluster, it is a simple application that has two endpoints one is public another is secured. For authentication, I use Cloud Identity. Cloud identity is using Firebase under the hood and JWT token has some attributes such as name which in my case is "firebase" and audiences which corresponds to my project id.
For AppEngine app I can use cloud endpoints and it verifies JWT, but what I should use when deploying app to Kubernetes ? I saw that one option is Istio are there more options ?
You can use Cloud Endpoint with GKE.
Check this official tutorial : Getting started with Cloud Endpoints on GKE, it may help you.
For your information, you can also consider Cloud Run as a fully serverless alternative. It provides a built-in authentication layer.
Related
I m working on a spring cloud microservices project and i want to implement the admin server. I found two implementations types, the first one is using the dependency of admin client on each microservice and then configure the service to connect with the admin server, and the second one is just registering the admin server to eureka to fetch other services without doing anything in those services..
What is the difference between the two implementations? and which one is recommended with microservices architecture?
If you are already using Spring Cloud Service Discovery (e.g. with Eureka or Consul), then there is no need to use the Spring Boot Admin client as described in section "Registering Client Applications" of the reference documentation:
If you already use Spring Cloud Discovery for your applications you don’t need the SBA Client. Just add a DiscoveryClient to Spring Boot Admin Server, the rest is done by our AutoConfiguration.
I'm new to Azure and its services and I'm trying to sort out the differences. If one wants to deploy a Spring Boot app on Azure can this be done without using Azure Spring Cloud? Also, can Azure functions be integrated only with Azure Spring Cloud?
Here are the documentation pages for both:
Spring on Azure
Azure Spring Cloud
Spring on Azure provides solution for integration with Azure Services such as Active Directory. It has nothing common with Spring Cloud project and is not targeted to the microservice architecture only.
Azure Spring Cloud is a project that enables easy deployment of Spring Cloud based microservice applications to Azure while keeping the implementation platform agnostic. On top of that it offers solutions of components what is the microservice architecture about such as service discovery and registry, configuration management etc.
I would like to make web application based on Spring REST with SQL db and React frontend.
While it's OK for me, to deploy it locally, I don't really know, how to make it visible on public website. I thought of Azure, AWS, Google Cloud, but I cannot find any sufficient information.
Should I run frontend and backend on two independent Web apps? If so, how would I make them communicate?
Thanks for any replies!
If you are using AWS cloud, You can make it public using aws cloudfront which serves static content from s3. You just need to upload your react build on s3 and you can host via cloudfront.
For your spring rest service you can deploy your .war Or .jar on AWS Elastic beanstalk(EBS).
Your database should be on AWS RDS
Using those service you can ealsy host your website with react frontend, spring rest services and database handling
Front-end will make REST API calls to your backend to fetch/retrieve or to send data. This is usually the way frontend communicates with backend.
In order to make your applications accessible to the public over internet, you will need an external IP address.
Your backend and frontend applications may use the same IP but different port and access paths.
You might also need to have a domain name and DNS setup against your ip.
Backend will be deployed independently of frontend and you can have both of them running on same machine.
You can start your Backend as a Spring Boot Application on any standard port available. [default is 8080].
Same can be looked up by your React Frontend using process.env.API_URL.
Below article from DZone is a rich source of information.
https://dzone.com/articles/integrating-spring-boot-and-react-with-spring-secu-1
Also to achieve the same, you can try a simple combination of AWS EC2 & RDS combination to start with and enhance it as per requirement.
I have restful spring web service running on tomcat server and have mysql database on backend. I deployed war file of my service using aws elastic beanstalk free account yet but I am unable to setup mysql database. Can anyone guide me on this matter ? Secondly, our application has android side code which will call my REST API so is there any other way to do this instead of setting up amazon web services for testing purposes ?
You are going the right way; Android should call REST APIs. These APIs can be implemented in following ways:
As you suggested; use spring on tomcat to expose such apis.
Use API Gateway exposed by AWS. This api gateway can even call lambda expressions in backend which can be written in Java/Python etc.
I will suggest you to go ahead with 1 as u are already aware of spring/tomcat etc. and MOST companies use this only.
For MySQL database you have following options:
Install MySQL on your local EC2 server ( where you have tomcat running ); or on another EC2 server.
You can use MySQL as a service which is RDS. It is expensive but easy to configure.
I have set of apis written on google appengine using google cloud endpoints. I want to publish these api's for other developers to consume by releasing the documentation generated through api-explorer. For this I would want my apis to be exposed on url such as https://api.example.com/v1/ but all my api endpoints generated through appengine have a url signature as https://module-dot-project-name.appspot.com/_ah/api/v1/. I have tried mapping my api.example.com to the module serving the api's using the dispatch file, but I could not get my apis to work on my own domain address.
1) How can I get my apis to work on my own domain name?
2) How can I publish my api documentation using api-explorer serving on my own domain address? On url such as https://apis-explorer.appspot.com/apis-explorer/?base=https://api.example.com#p/
1) is now possible with the newer version of cloud endpoints, called Cloud Endpoints Framework. Here is the documentantion, but if you are using the App Engine Standard environment it just works.
2) I'm not sure is possible. I only wrote this answer to addres number 1. :)
Unfortunately, you can't. From the documentation:
Note: Google Cloud Endpoints does not support custom domains.