microservices-demo | Sample cloud-first application | GCP library
kandi X-RAY | microservices-demo Summary
kandi X-RAY | microservices-demo Summary
ATTENTION: Apache Log4j 2 advisory. Due to vulnerabilities present in earlier versions of Log4j 2, we have taken down all affected container images. We highly recommend all demos and forks to now use images from releases >= v0.3.4. Online Boutique is a cloud-native microservices demo application. Online Boutique consists of a 10-tier microservices application. The application is a web-based e-commerce app where users can browse items, add them to the cart, and purchase them. Google uses this application to demonstrate use of technologies like Kubernetes/GKE, Istio, Stackdriver, gRPC and OpenCensus. This application works on any Kubernetes cluster, as well as Google Kubernetes Engine. It’s easy to deploy with little to no configuration.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Sends an order confirmation email
- Sends a confirmation email
- Start the server
- Adds an email service servicer to the given server
- Checkout a cart
- Add product to cart
- Set index
- Index server
- Adds recommendations service servicer to server
- Get a JSON logger
microservices-demo Key Features
microservices-demo Examples and Code Snippets
# Local port to run Producer Tomcat
server.port=8080
# Kafka connection settings
spring.cloud.stream.kafka.binder.brokers=
spring.cloud.stream.kafka.binder.configuration.security.protocol=SASL_SSL
spring.cloud.stream.kafka.binder.configuration.sasl.
Sample Cats added
Web server listening at: http://0.0.0.0:3030
Browse your REST API at http://0.0.0.0:3030/explorer
Sample bears added
Web server listening at: http://0.0.0.0:3001
Browse your REST API at http://0.0.0.0:3001/explorer
swift build
cd $GOPATH/src/github.com/microservices-demo/payment/
go get -u github.com/FiloSottile/gvt
gvt restore
cd $GOPATH/src/github.com/microservices-demo/payment/paymentsvc/
go build -o payment
Community Discussions
Trending Discussions on microservices-demo
QUESTION
I have configured linkerd with 2 clusters in GKE (west and east cluster) for multicluster purpose. I used this demo app provided by google https://github.com/GoogleCloudPlatform/microservices-demo
First I did it with Istio and everything worked out fine, but with linkerd its different. As expected the exported service from east to west cluster with get the cluster name appended to the service. eg in west cluster ,you will get currencyservice-east.
The problem I think I am having is that the frontend in the west cluster keeps sending request to currencyservice instead of currencyservice-east.
I didn't have this problem in Istio because Istio used the same service name across clusters. I am not a GO programmer, but I have googled my life to find out where the service name was defined in the frontend source code to change it but I have not succeeded.
another alternative will be for linkerd to maintain the service name while exporting it.
please guys help me.
...ANSWER
Answered 2021-Nov-16 at 17:19You can use a TrafficSplit on the source cluster to direct calls to currentservice
to currentservice-east
.
QUESTION
TRYING TO EDIT AS SUGGESTED:
STS crashes continously, here is an exmple of the last logs in projects folder:
...ANSWER
Answered 2021-Oct-31 at 08:04Deleted the project (only from eclipse, don't check to option to delete from disk). Then reimport in workspace solved the problem.
QUESTION
I am trying to run a test server on aws using terraform. When i run terraform apply
it throws an error saying Reference to undeclared resource. Below is my test server file inside terraform.
test-server.tf
...ANSWER
Answered 2021-Sep-16 at 17:07You have a typo here:
QUESTION
I am creating microservice application. for which we have a pom
in the project. Under this we have multiple modules. I am using Java11
and spring 2.5.4.
below is my pom
. from this all the modules
will get versions. Its packaging is pom
.
ANSWER
Answered 2021-Sep-04 at 20:42You are using IntelliJ IDEA and did not update the pom information (Icon in the uppoer right with small 'm' symbol.)
Therefore the dependencies are not resolved properly.
Besides I suggest to use a single module project for spring boot applications, if there is no real requirement to do otherwise.
QUESTION
That is my server.go
file where I define my server
struct and its methods.
ANSWER
Answered 2021-May-16 at 18:51This line:
QUESTION
Dear StackOverflow community!
I am trying to run the https://github.com/GoogleCloudPlatform/microservices-demo locally on minikube, so I am following their development guide: https://github.com/GoogleCloudPlatform/microservices-demo/blob/master/docs/development-guide.md
After I successfully set up minikube (using virtualbox driver, but I tried also hyperkit, however the results were the same) and execute skaffold run
, after some time it will end up with following error:
ANSWER
Answered 2021-May-14 at 11:16Tried it with docker driver, i.e. minikube start --driver=docker
, and it works. Thanks Brian!
QUESTION
I am trying to build and deploy microservices images to a single-node Kubernetes cluster running on my development machine using minikube. I am using the cloud-native microservices demo application Online Boutique by Google to understand the use of technologies like Kubernetes, Istio etc.
Link to github repo: microservices-demo
While following the installation process, and on running command skaffold run
to build and deploy my application, I get some errors:
ANSWER
Answered 2020-Jun-22 at 09:07There are a few reasons why you encounter these errors:
There might be an issue with the existing cache and/or disc space. In order to fix it you need to clear the APT cache by executing:
sudo apt-get clean
andsudo apt-get update
.The same goes with existing docker images. Execute:
docker image prune -f
anddocker container prune -f
in order to remove unused data and free disc space.If you don't care about the security risks, you can try to run the
apt-get
command with the--allow-unauthenticated
or--allow-insecure-repositories
flag. According to the docs:
Ignore if packages can't be authenticated and don't prompt about it. This can be useful while working with local repositories, but is a huge security risk if data authenticity isn't ensured in another way by the user itself.
Please let me know if that helped.
QUESTION
I have been working on extending the GCP Online Boutique microservices example, and I would like to add Istio AuthorizationPolicy resources to the system.
Concretely, I want an AuthorizationPolicy
to block all not-whitelisted traffic to cartservice
, and I want to whitelist traffic from frontend
to cartservice
.
Currently, I am able to block traffic with an AuthorizationPolicy
, but I cannot whitelist traffic by principal or namespace.
For context, here is my system setup. (Anything not explicitly stated here is the default from the demo linked above)
Istio Version:
...ANSWER
Answered 2020-Aug-01 at 15:14For reference, after debugging in person with OP, we discovered that the cluster was underspecified in terms of CPU usage. On resizing the cluster to have additional CPU (1 vCPU -> 4 vCPUs), we were able to get authz
policies working and respected.
Our hypothesis is that istiod
was failing to respond to requests because of this issue. We do not know why.
QUESTION
I am trying to build and deploy microservices images to a single-node Kubernetes cluster running on my development machine using minikube. I am using the cloud-native microservices demo application Online Boutique by Google to understand the use of technologies like Kubernetes, Istio etc.
Link to github repo: microservices-demo
I have followed all the installation process to locally build and deploy the microservices, and am able to access the web frontend through my browser. However, when I click on any of the product images say, I see this error page.
HTTP Status: 500 Internal Server Error
On doing a check using kubectl get pods
I realize that one of my pods( Recommendation service) has status CrashLoopBackOff.
Running kubectl describe pods recommendationservice-55b4d6c477-kxv8r
:
ANSWER
Answered 2020-Jul-25 at 20:26The timeout of the Readiness Probe (1 second) was too short.
More InfoThe relevant Readiness Probe is defined such that /bin/grpc_health_probe -addr=:8080
is run inside the server
container.
You would expect a 1 second timeout to be sufficient for such a probe but this is running on Minikube so that could be impacting the timeout of the probe.
QUESTION
I have two applications, nginx and redis, where nginx uses redis to cache some data so the redis address must be configured in nginx.
On the one hand, I could first apply the redis deployment and get its IP and then apply the nginx deployment to set up the two application in my minikube.
But on the other, to simplify installation in the Kubernetes Dashboard for QA, I want to create a single Kubernetes YAML file (like GoogleCloudPlatform/microservices-demo/kubernetes-manifests.yaml) to deploy these two applications on two diverse Pods. However, if I do it by means of Environment Variables, I cannot get the redis address.
So how do I achieve it?
...ANSWER
Answered 2020-Jul-08 at 11:25Hardcoding IP-address is not a good practice. Instead you can create a service for redis as well and configure the service dns name in your nginx deployment using the kubernetes dns config like this my-svc.my-namespace.svc.cluster-domain.example
. Your nginx will then communicate to the redis container through this service.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install microservices-demo
Create a Google Cloud Platform project or use an existing project. Set the PROJECT_ID environment variable and ensure the Google Kubernetes Engine and Cloud Operations APIs are enabled.
Clone this repository.
Create a GKE cluster.
GKE autopilot mode (see Autopilot overview to learn more):
GKE Standard mode:
Deploy the sample app to the cluster.
Wait for the Pods to be ready.
Access the web frontend in a browser using the frontend's EXTERNAL_IP.
[Optional] Clean up:
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page