Commit graph

466 commits

Author SHA1 Message Date
Jonas-Taha El Sesiy
23ad0169c2
Migrate to Gradle 6 (#281)
Update build.gradle to use plugin DSL instead of outdated buildscript
Update gradle wrapper to 6.3
Update jackson, opencensus, grpc & other dependencies to recent versions
Fix code warnings
Properly format source files using goJF task
Add default port to AdService
2020-03-28 00:16:31 -07:00
Daniel Sanche
e65565987e
Update container build instructions (#296) 2020-03-26 14:32:37 -07:00
Daniel Sanche
ccff406cdc
GitHub Actions smoke tests (#288)
- added ci smoke tests to repo
2020-02-21 15:26:03 -08:00
Megan O'Keefe
d66cbdd27f Release v0.1.4 2020-02-20 15:53:53 -05:00
Megan O'Keefe
90f9287f3a
Adds option to disable Stackdriver Export (#293) 2020-02-20 15:26:44 -05:00
Morgan McLean
595bd21d38
Set environment variable to enable Profiler (#239) 2020-02-14 16:49:24 -08:00
Ihor Dvoretskyi
51064dcf9d
Minikube installation instructions added (#209) 2020-02-14 16:47:18 -08:00
Megan O'Keefe
9133fdc043
EmptyCart bug fix (#289) 2020-02-06 15:36:26 -08:00
Daniel Sanche
53f2528094 Fix double shebang in loadgen.sh (#284) 2020-01-16 15:48:57 -08:00
Megan O'Keefe
326e058e10 Release v0.1.3 2019-12-17 15:01:04 -05:00
Megan O'Keefe
04b2084779
[WIP] Fixes emailservice CrashLoop when Workload Identity is enabled (#280)
* Adds explicit PROJECT_ID for stackdriver exporter

* save work

* cleanup
2019-12-17 13:41:59 -05:00
Megan O'Keefe
8cfb88bf2f
Standardizes loadgen behavior for Istio mTLS=STRICT (#279)
* Adds liveness probe annotation, moves loadgen initcontainer into main

* cleanup

* cleanup

* updated wrong manifests

* respond to comments
2019-12-16 09:30:23 -05:00
Ahmet Alp Balkan
61dd04992b
Fix skaffold install link
Fixes #260.
2019-11-04 10:06:03 -08:00
Bruno Paulino
ad4b29be93 Fix README typo (#258) 2019-11-01 08:39:30 -07:00
Ben Wells
a95997be94 Remove deps files from node paymentservice (#252) 2019-10-16 13:45:55 -07:00
Joseph Sirianni
24ca9eecef use python 3.7, as python:3-slim is now using python 3.8. (#254) 2019-10-16 10:11:05 -07:00
djmailhot
2177813c44 cartservice: Create genproto.sh (#249)
* Add src/cartservice/genproto.sh

* Add grpc generation to cartservice/genproto.sh

* Remove grpc from cartservice/genproto.sh due to errors
2019-09-29 15:40:48 +03:00
Daniel Sanche
4681320f80 got rid of errors in Stackdriver Logging (#245) 2019-09-20 15:11:49 -04:00
askmeegs
3f577b60a0 Release v0.1.2 2019-08-19 15:26:01 -04:00
askmeegs
6b75fd5bf8 Release v0.1.2 2019-08-19 15:23:46 -04:00
Megan O'Keefe
c052e69716
Adds cartservice timeout to all manifests (#241) 2019-08-19 15:21:56 -04:00
askmeegs
1e143c570f Release v0.1.2 2019-08-19 15:14:05 -04:00
Megan O'Keefe
156dfcec8a
[cartservice] Increases health check timeout (#240)
* Increases cartservice health check rpc timeout

* remove stopwatch from health check

* cleanup

* Cleanup
2019-08-19 14:28:03 -04:00
Evans Wang
13b73067c4 Typo in the months drop down (#237) 2019-07-16 14:00:33 -07:00
Megan O'Keefe
bb41c7fe02
Updates stackdriver agents for node.js services (#236) 2019-07-11 11:47:31 -04:00
Megan O'Keefe
754d22a08f
Updates go services to google-cloud-go 0.40.0 (#234)
* Updates go services to google cloud go 0.40.0

* Revert kubernetes manifests, remove custom images

* Remove binary file, replace nil error with unimplemented

* Shippingservice needed status import

* Remove shippingservice binary
2019-07-09 16:57:50 -04:00
iasinDev
f575b76f33 Fix https://github.com/GoogleCloudPlatform/microservices-demo/issues/222 (#224) 2019-07-01 14:49:31 -07:00
Yoshi Yamaguchi
1c057fcbd8 aligning function name and log message to the official product name (#229)
* log: change log format to JSON payload for better log in Stackdriver

change the log format in Go written service from text payload to
JSON payload using 3rd party logging library (logrus).

https://cloud.google.com/logging/docs/structured-logging
33a1e118e1/json_formatter.go (L40-L49)

Effected services are frontend, productcatalogservice, checkoutservice,
and shippinservice.

Also change target container registry and locust scenario for testing.

* revert kubernetes manifests to point to the original container registry URLs

* revert skaffold.yaml to point to the original registry

* loadgenerator: revert locust settings

* align all function names and messages to the official product name "Stackdriver"
2019-06-13 00:46:33 -07:00
Steven Dake
dc98b16a4d Add a demo of Hipster Shop + Istio across 3 clouds (#219)
Hipster Shop was demonstrated in front of rougly 700 individuals at Kubecon
EU. The demo itself was shown on 3 cloud providers (Azure, Google, On-prem).

The full speaking engagement recording:

https://www.youtube.com/watch?v=-t2BfT59zJA
2019-05-27 00:35:56 +02:00
Dinesh Nagar
ce03eb3c36 removed left-pad module (#218) 2019-05-22 10:16:09 +02:00
askmeegs
27df445fc2 Release v0.1.1 2019-05-14 10:02:35 -04:00
Abhilash Gnan
55f5061532 Use env in service manifests for PORT (#212)
* fix shipping service ports

* fix product catalog servicde ports

* fix paymentservice ports

* fix currenservice ports

* fix checkoutservice ports

* fix emailservice ports

* fix frontend app ports

* fix recommendationservice ports

* fix indentation in service yaml files
2019-05-08 19:39:14 -07:00
Kalyana Chadalavada
876d4f966f Add Stackdriver Profiler Java agent to adservice (#210)
* Add Stackdriver Profiler Java agent to adservice.

* Add Stackdriver Profiler Java agent to adservice.
2019-05-08 19:31:33 -07:00
Kalyana Chadalavada
86fb1662a3 Add Stackdriver Profiler Python agent (#176)
* Add Stackdriver Profiler Python agent to EmailService and
RecommendationService

* Update recommendation_server.py

* Moved Profiler init to a function

* Moved Profiler init to a function

* Delete key.json

* Delete key.json

* Delete key.json
2019-05-03 10:29:34 -07:00
Chris Proto
f276995585 Follow OWASP best practices on CC presentation on checkout form (#207)
* Follow OWASP best practices on CC presentation on checkout form

See OWASP recommendations here:
<https://www.owasp.org/index.php/Handling_E-Commerce_Payments#Displaying_portions_of_the_credit_card>

* Use `input type=password`
* Set `autocomplete="off"`

* Change credit_card_number input type back to "text"
2019-04-30 09:46:50 -07:00
Dinesh Bolkensteyn
f2f382f6bb README: Point to Skaffold's website rather than repo (#208)
All mentioned projects (Kubernetes, Istio, etc.) point to their websites expect for Skaffold that points to its source code repository.

The website should be a better entry point to understand the big picture, access the quickstart guides and more in-depth howtos.
2019-04-17 09:00:38 -07:00
Pradip Caulagi
57b316c045 Update docker images for go to 1.12 (#203) 2019-04-01 10:50:44 -07:00
Ihor Dvoretskyi
3f9dc85965 Cleanup instructions added (#202)
* Cleanup instrucions added

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>

* Update README.md
2019-03-29 09:25:34 -07:00
Riccardo M. Cefala
a84331eda1 make hack/make-release-artifacts.sh work on Linux (#201) 2019-03-27 08:54:56 -07:00
Mohamed Shahat
0cccf586a4 Update development-principles.md (#195)
correct wording
2019-03-14 15:29:37 -07:00
Ahmet Alp Balkan
9d95e4ce15
Add min disk space for docker-for-desktop 2019-03-14 00:02:32 -07:00
John Howard
11e282824e Update ServiceEntries for Istio 1.1 (#183) 2019-03-11 07:49:27 -07:00
Ahmet Alp Balkan
a0a9852afe
hack: comment out autogenerated warning (#182)
Fixes #181.
2019-03-07 23:29:18 -08:00
Ahmet Alp Balkan
b44d855e5c
update the architecture diagram (#179)
- remove external service call of currencyservice
- add a dependency to productcatalog from checkout service.
2019-03-07 12:12:26 -08:00
Ahmet Alp Balkan
342318a9ae
hack: remove redundant license headers in release (#171)
* remove per-yaml license headers in release manifests
* manually insert a license header in release manifests
* add README.md to /kubernetes-manifests indicating they're not ready to use
  (and refer to /release instead).
* regenerate manifests

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2019-03-07 09:54:56 -08:00
Heechul Ryu
d23fe9cf33 Fix the half-broken url for skaffold installation (#178)
* Fix the half-broken url for skaffold installation

* fix install skaffold link
2019-03-07 09:54:40 -08:00
Ahmet Alp Balkan
b72f32d66d
istio-manifests: remove external currency api (#175)
this is not unused per #173.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2019-03-06 23:23:28 -08:00
Ace Nassri
f7580958cc Switch currencyservice to static JSON file (#173) 2019-03-06 16:42:08 -08:00
Mehdi El Gueddari
d5db024763 kubernetes: use apps/v1 for Deployment (#166)
In certain situations (see details below), the deployment to Kubernetes fails with:

> "The Deployment [DEPLOYMENT_OBJECT] is invalid: [...] `selector` does not match template `labels`".

This is caused by the K8S Deployment manifests missing an explicit `selector` value.

This commit:
* adds explicit `selector` values for all Deployment objects.
* bumps the K8S API from the deprecated `extensions/v1beta1` version to the stable `apps/v1` version. This version made the `selector` property of the Deployment a required value, preventing any issues with missing selectors in the future.

This change is backwards compatible with existing deployments of the microservices demo app. I.e. you should be able to pull this change and run `skaffold run` against an existing deployment of the app without issues.

This will not however resolve the issue for existing deployments. Selectors are immutable and will therefore retain their current defaulted value. You should run `skaffold delete` followed by `skaffold run` after having pulled this change to do a clean re-deployment of the app, which will resolve the issue.

**The nitty-gritty details**

In the `extensions/v1beta1` version of K8S API (the version that was used by this project), the `selector` property of a Deployment object is optional and is defaulted to the labels used in the pod template. This can cause subtle issues leading to deployment failures. This project, where Deployment selectors were omitted, is a good example of what can go wrong with defaulted selectors.

Consider this:

1. Run `skaffold run` to build locally with Docker and deploy.

Since the Deployment specs don't have explict selectors, they will be defaulted to the pod template labels. And since skaffold adds additional labels to the pod template like `skaffold-builder` and `skaffold-deployer`, the end-result will be a selector that looks like this:

> app=cartservice,cleanup=true,docker-api-version=1.39,skaffold-builder=local,skaffold-deployer=kubectl,skaffold-tag-policy=git-commit,tail=true

So far, so good.

2. Now run `skaffold run -p gcb --default-repo=your-gcr-repo` to build on Google Cloud Build instead of building locally.

This will blow up when attempting to deploy to Kubernetes with an error similar to:

> The Deployment "cartservice" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"skaffold-builder":"google-cloud-build", "profiles"="gcb", "skaffold-deployer":"kubectl", "skaffold-tag-policy":"git-commit", "docker-api-version":"1.39", "tail":"true", "app":"cartservice", "cleanup":"true"}: `selector` does not match template `labels`

(and the same error for every other deployment object)

This is because the skaffold labels that were automatically added to the pod template have changed to include references to Google Cloud Build. That normally shouldn't be an issue.

But without explicit Deployment selectors, this results in the defaulted selectors for our Deployment objects to have also changed. Which means that the new version of our Deployment objects are now managing different sets of Pods. Which is thankfully caught by kubectl before the deployment happens (otherwise this would have resulted in orphaned pods).

In this commit, we explicitely set the `selector` value of all Deployment objects, which fixes this issue. We also bump the K8S API version to the stable `apps/v1`, which makes the `selector` property a required value and will avoid accidently forgetting selectors in the future.

More details if you're curious:

* Why defaulted Deployment selectors cause problems: https://github.com/kubernetes/kubernetes/issues/26202
* Why Deployment selectors should be (and were made) immutable: https://github.com/kubernetes/kubernetes/issues/50808
2019-03-04 10:52:55 -08:00
sebright
d08d419a94 adservice: use Stackdriver special field to set sampling decision in log entries (#168)
This commit sets the new sampling decision field that is recognized by the
Stackdriver Logging agent, "logging.googleapis.com/traceSampled".  The sampling
decision field was added in
https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud/pull/297, and
it won't be available until the new version of fluent-plugin-google-cloud is
used in GKE.
2019-02-28 22:34:57 -07:00