Commit graph

444 commits

Author SHA1 Message Date
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
Ahmet Alp Balkan
458bf50b95
credit card expired (#167)
fixes #164

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2019-02-27 09:54:18 -07:00
David Ebbo
b9792c94c8 Add missing extension to pre-built images instructions in readme (#160) 2019-02-22 09:55:40 -08:00
Ahmet Alp Balkan
5f41e12b2f
README formatting (#158)
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2019-02-20 14:34:12 -08:00
Ahmet Alp Balkan
bae651f7ea
Release v0.1.0 2019-02-20 11:17:45 -08:00
Ahmet Alp Balkan
ef64fdae86
Show option to use prebuilt images (#156)
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2019-02-20 11:07:37 -08:00
Ahmet Alp Balkan
f3e29f7450
hack: fix release scripts (#157)
Previous release script wasn't committing/tagging in the right order.
Also made scripts resistant to:
* empty env vars
* current workdir the script is invoked from

cc: @m-okeefe
2019-02-20 11:07:26 -08:00
Ahmet Alp Balkan
cedf3ce827
Release v0.1.0 2019-02-20 09:47:52 -08:00
Ahmet Alp Balkan
3b4c04fe65
loadgenerator: check curl install (#153)
without &&, load generator startup was failing intermittently when it fails
to install curl from apk-add.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2019-02-18 15:54:01 -08:00
Ahmet Alp Balkan
1605c21f69
readme: hide option 3
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2019-02-18 14:28:14 -08:00
Dennis Lumpkins
1c1c8b42ef Fix small typo in installation section of README (#148)
Fix typo in README.md
2019-02-15 14:48:20 -08:00
Alex Rebert
7eb028d747 Fix typo in skaffold.yaml comment (#147) 2019-02-15 13:58:05 -08:00
Selçuk Usta
e99d0808bf Fixing ./gradlew: Permission denied problem on Dockerfile (#146) 2019-02-15 08:22:48 -08:00
rghetia
741c669c34 adservice: restore old grpc views until new grpc version is released. (#144) 2019-02-14 18:14:42 -08:00
Ahmet Alp Balkan
09f5ce89da
Update README.md 2019-02-14 09:49:46 -08:00
Ahmet Alp Balkan
bb31c3f15e
Update README.md 2019-02-14 09:37:08 -08:00
Ahmet Alp Balkan
0dcd8cd947
hack: compile istio manifests as well (#137)
- compile k8s manifests to release/kubernetes-manifests.yaml
- compile istio manifests to release/istio-manifests.yaml
2019-01-31 15:25:33 -08:00
Bogdan Drutu
31df60f050 Updates deps, OC instrumentation, formatting. (#131) 2019-01-30 13:35:03 -08:00
Ahmet Alp Balkan
02b2018b0e
recommendationservice: compile deps from requirements.in (#135)
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2019-01-30 00:24:07 -08:00
Megan O'Keefe
1d045de655 productcatalog: introduce configurable latency (#134) 2019-01-29 16:08:24 -08:00
Ahmet Alp Balkan
3da0ae3b31
hack: polish scripts (#133)
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2019-01-29 14:05:37 -08:00
Megan O'Keefe
1d452f449a Adds make-release script, static k8s manifests (#132)
Closes #75.  

### Changelog 

Adds 4 scripts to the `hack/` directory for building/pushing images, injecting images tags into static manifests, and tagging new releases. See [hack/README.md](https://github.com/m-okeefe/microservices-demo/tree/release-script/hack). 

**Note**: since we have not pushed images yet, the images in the `./release/` manifests are still set to the skaffold defaults (eg. `adservice`).
2019-01-29 11:23:33 -08:00
Ahmet Alp Balkan
ea424cb9f7
add skaffold version note
Fixes #127
2019-01-22 12:30:30 -08:00