Commit Graph

99 Commits

Author SHA1 Message Date
Vincent Batts ddc67a84fa
demo time
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2020-10-15 21:14:19 -04:00
TPS a301040778
[ImgBot] Optimize images (#379)
*Total -- 9,700.78kb -> 7,363.19kb (24.1%)

/docs/img/online-boutique-frontend-1.png -- 5,226.25kb -> 3,464.34kb (33.71%)
/docs/img/online-boutique-frontend-2.png -- 845.23kb -> 570.46kb (32.51%)
/docs/img/architecture-diagram.png -- 70.77kb -> 52.80kb (25.39%)
/src/frontend/static/images/HeroBannerImage.png -- 820.54kb -> 653.61kb (20.34%)
/src/frontend/static/icons/Hipster_DownArrow.svg -- 0.27kb -> 0.22kb (17.86%)
/src/frontend/static/icons/Hipster_HelpIcon.svg -- 0.45kb -> 0.39kb (13.64%)
/src/frontend/static/icons/Hipster_SearchIcon.svg -- 0.36kb -> 0.31kb (13.44%)
/src/frontend/static/images/VRHeadsets.png -- 408.29kb -> 356.61kb (12.66%)
/src/frontend/static/icons/Hipster_ProfileIcon.svg -- 0.51kb -> 0.44kb (12.16%)
/src/frontend/static/icons/Hipster_CheckOutIcon.svg -- 0.51kb -> 0.45kb (12%)
/src/frontend/static/icons/Hipster_PinterestIcon.svg -- 0.59kb -> 0.53kb (10.47%)
/src/frontend/static/icons/Hipster_GooglePlayIcon.svg -- 6.05kb -> 5.42kb (10.42%)
/src/frontend/static/icons/Hipster_TwitterIcon.svg -- 0.51kb -> 0.46kb (9.63%)
/src/frontend/static/icons/Hipster_CartIcon.svg -- 0.67kb -> 0.60kb (9.24%)
/src/frontend/static/icons/Hipster_CurrencyIcon.svg -- 0.68kb -> 0.62kb (9.09%)
/src/frontend/static/img/products/film-camera.jpg -- 145.81kb -> 133.48kb (8.46%)
/src/frontend/static/icons/Hipster_NavLogo.svg -- 2.66kb -> 2.46kb (7.77%)
/src/frontend/static/icons/Hipster_FacebookIcon.svg -- 0.79kb -> 0.73kb (7.75%)
/src/frontend/static/icons/Hipster_YoutubeIcon.svg -- 0.88kb -> 0.82kb (7.51%)
/src/frontend/static/icons/Hipster_InstagramIcon.svg -- 1.06kb -> 0.99kb (6.26%)
/src/frontend/static/img/products/terrarium.jpg -- 55.75kb -> 52.27kb (6.24%)
/src/frontend/static/img/products/air-plant.jpg -- 94.18kb -> 88.69kb (5.83%)
/src/frontend/static/img/products/camera-lens.jpg -- 155.02kb -> 147.69kb (4.73%)
/src/frontend/static/img/products/city-bike.jpg -- 145.42kb -> 140.56kb (3.34%)
/src/frontend/static/images/AdvertBannerImage.png -- 526.28kb -> 510.26kb (3.04%)
/src/frontend/static/img/products/record-player.jpg -- 137.53kb -> 133.64kb (2.83%)
/src/frontend/static/icons/Hipster_HeroLogo.svg -- 15.91kb -> 15.53kb (2.39%)
/src/frontend/static/icons/Hipster_HeroLogoCyan.svg -- 15.92kb -> 15.54kb (2.39%)
/src/frontend/static/img/products/barista-kit.jpg -- 211.11kb -> 206.06kb (2.39%)
/src/frontend/static/img/products/typewriter.jpg -- 82.90kb -> 81.11kb (2.16%)
/src/frontend/static/icons/Hipster_HotProducts.svg -- 8.79kb -> 8.60kb (2.07%)
/src/frontend/static/icons/Hipster_KitchenwareOffer.svg -- 20.21kb -> 19.97kb (1.22%)
/src/frontend/static/icons/Hipster_Advert2.svg -- 19.24kb -> 19.02kb (1.12%)
/src/frontend/static/icons/Hipster_OtherProducts.svg -- 25.76kb -> 25.50kb (1.02%)
/src/frontend/static/images/Advert2BannerImage.png -- 653.90kb -> 653.01kb (0.14%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-10-14 14:04:53 -07:00
Ahmet Alp Balkan a9e95bc05c
Move to go modules (#410)
Simplifies and modernizes the go build process.
Old vs new build times (without cache):

- frontend: 185s vs 33s.
- productcatalog: 190s vs 30s.
- shippingservice: 200s vs 36s.
- checkoutservice: 129s vs 27s.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2020-10-13 13:05:53 -07:00
keziasulami 65b5da1a9b
Fix multiply item price by quantity (#378) 2020-10-13 12:25:06 -07:00
Daniel Sanche c4d86703c5
Add licenses (#367) 2020-07-15 11:56:37 -07:00
Ben Wells 87505f1a42
Handle error template errors (#332) 2020-06-17 17:01:02 -07:00
Megan O'Keefe 05758f56b8
Hide currency conversion after checkout (#343) 2020-05-06 09:22:02 -04:00
Megan O'Keefe 52fdde2e7f
CSS fix for Azure platform flag (#330)
* CSS fix for Azure platform flag

* update default flag
2020-04-24 12:27:40 -04:00
Megan O'Keefe 814088f788
Rebrand Hipstershop as OnlineBoutique (#328)
* update productcatalog, frontend, readme

* revert productcatalog

* restore currency logic and ad display

* footer cleanup

* Resize header image

* screenshots

* Center align header image in readme

* Show platform flag on every page

* style fixes

* fix currency in UI, remove extra USD

* cart bug, fixing

* attempt to fix breaking build

* fix cart size in handler

* replace images

* # items in cart is total quantity

* Add link to 0.1.4 manifests in readme
2020-04-23 14:12:30 -07:00
Mmadu Manasseh 4d8848bc5e
Updated deps for exporter/jaeger (#282) 2020-04-13 15:23:46 -07:00
Megan O'Keefe 90f9287f3a
Adds option to disable Stackdriver Export (#293) 2020-02-20 15:26:44 -05:00
Evans Wang 13b73067c4 Typo in the months drop down (#237) 2019-07-16 14:00:33 -07: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
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
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
Pradip Caulagi 57b316c045 Update docker images for go to 1.12 (#203) 2019-04-01 10:50:44 -07:00
rghetia 3812cf741d fix typo in Stackdriver init method name. (#130) 2019-01-22 10:37:03 -08:00
rghetia 54f0a8d058 add jaeger support for productcatalog and shipping. (#126) 2019-01-22 09:56:39 -08:00
rghetia 85c7131d43 Add jaeger support for frontend. (#113) 2019-01-08 11:08:20 -08:00
rghetia d69f1a4f25 increase reporting interval. (#96)
also fixed a bug in SD export registration in Ads.
2018-11-14 11:49:17 -08:00
sebright dc7effd601 adservice: find relevant ads by category (#61)
The ad service now returns ads matching the categories of the product that is
currently displayed.  Changes in this commit:

- List all products' categories in products.json.

- Pass the current product's categories from the frontend to the ad service when
  looking up ads.

- Store a statically initialized multimap from product category to ad in the ad
  service.

- Return all ads matching the given categories when handling an ads request.
  The ad service continues to return random ads when no categories are given or
  no ads match the categories.
2018-10-01 22:44:56 -07:00
sebright 86c8c06cc1 pb: add "categories" field to Product (#60)
This field can be used as the context keys to look up relevant ads in the ad
service.

/cc @rghetia 

I also ran the genproto.sh scripts for the Java and Go services and included those changes in the second commit.  I encountered an issue when I ran genproto.sh for the recommendation service, and I'm still looking into it.
2018-10-01 21:33:25 -07:00
Yoshi Yamaguchi 6460427bee Change log format to JSON and log destination to stdout (#48)
* 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
2018-09-25 16:43:17 -07:00
rghetia fc6df2daea Remove monitored resource autodetect (#42) 2018-09-14 12:27:25 -07:00
Ahmet Alp Balkan 0f23d6bbf9
frontend: add simple /healthz endpoint
Decouple frontend health checks from GET /, which relies on other services to
be reachable. See #34.

Closes #34.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-09-04 22:44:05 -07:00
Ahmet Alp Balkan 228105d229
frontend: add link to github repo from footer
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-08-30 10:37:58 -07:00
Ahmet Alp Balkan 7f5bb6c60b
frontend: add vendor/ to dockerignore
this is causing leftover local vendor/ to be used in docker builds

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-08-27 13:29:16 -07:00
Eno Compton 342a2d5754 Resolve compilation error in frontend (#32)
Fixes #31
2018-08-27 09:47:13 -07:00
rghetia 7f2ecfea9e Instrument Go service with Stats and monitored resources. (#30)
added default views for stats  for http and grpc in Go services only.
added monitored resources for go.
2018-08-24 16:30:50 -07:00
Ahmet Alp Balkan 04c3876e94
frontend: add robots.txt to disallow
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-08-22 19:29:55 -07:00
rghetia f35fdbcac3 Initial commit for Ads Service. (#21)
* Initial commit for Ads Service.

* update comments for AdsService and AdsServiceClient

* Refactor Ads to Ad
Move building AdService to Docker
Use default setting for Stackdriver Exporter.
Add license text.

* Revert the projectId

- also remove commented code from frontend/rpc.go

* Add adservie to skaffold.yaml

* Remove skaffold-adservice.yaml

* Replace personal projectId with demo projectId.

* Fix the crash in adservice when ran in locally.

* Ignore .skaffold*yaml file and .kubernetes-manifests-*/ dir for easy ProjectID switch.

* Fixed review comments.
1. Changed Ad redirect urls to products.
2. Removed leftovers from Dockerfile/kub*manifests*yaml
3. Added retry for StackDriver.
4. Added log for Ad request.
5. Added comment for gradle caching.
6. Added README.md to src/adservice.

* Added GRPC Health service to Ad Service
Also added
1. timeout to getAd RPC call in frontend.
2. Async thread for stackdriver init.
2018-08-22 17:02:46 -07:00
Ahmet Alp Balkan 3e90b73464
frontend: add integration for adservice
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-08-16 18:01:52 -07:00
Ahmet Alp Balkan 427f13fcd3
go: use dep in builds, remove relative imports
Fixes #11.
Fixes #12.
Fixes #13.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-08-04 11:21:03 -07:00
Ahmet Alp Balkan 4572974c88
use dep to lock Go dependencies (without vendor/)
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-30 19:18:05 -07:00
Ahmet Alp Balkan 3493cc1cb4
Add more license headers
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-25 21:25:27 -07:00
Ahmet Alp Balkan d0128060e4
Add LICENSE headers to source files
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-25 09:54:28 -07:00
Ahmet Alp Balkan 432c5462a0 frontend: add BANNER_COLOR to control jumbotron bg
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-19 11:28:14 -07:00
Ahmet Alp Balkan b943dda1b7 go services: fix bug that starts profiling 3 times
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-17 22:36:17 -07:00
Ahmet Alp Balkan 0a1054c75d shippingservice: prevent crash on profiler init
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-17 11:56:55 -07:00
Ahmet Alp Balkan 71c47b0869 fix frontend build yet again
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-17 11:49:50 -07:00
Ahmet Alp Balkan f69fd6b0e2 frontend: fix build
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-17 11:48:43 -07:00
Ahmet Alp Balkan 5bb1a3f400 go services: do not fail (+retry) profiler init
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-17 11:45:09 -07:00
Ahmet Alp Balkan c602594c37 fix emailservice dockerfile, rm ports helper script
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-16 17:02:31 -07:00
Ahmet Alp Balkan e4664c22ea refactor fix after profiler patch
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-16 15:17:59 -07:00
morganmclean 99ce1f84c2 Instrumented everything but Python 2018-07-16 14:29:14 -07:00
Ahmet Alp Balkan e53b2956a2 Revert "frontend: temporarily add a port 8090 for healthz in mTLS"
This reverts commit 9c8b4bcad2c9cc4405a2a15b430e9823ebfd0a3e.
2018-07-16 11:02:02 -07:00
Ahmet Alp Balkan b486251773 Revert "frontend: use LISTEN_ADDR, refactor Listen code"
This reverts commit 894c0e2a8dbcc76623c7d3ddf589e30e6b9985a9.
2018-07-16 11:01:58 -07:00
Ahmet Alp Balkan ab2b15723c frontend: use LISTEN_ADDR, refactor Listen code
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-16 10:21:41 -07:00
Ahmet Alp Balkan 7b35fb1291 frontend: temporarily add a port 8090 for healthz in mTLS
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-15 21:28:55 -07:00
Ahmet Alp Balkan 457e2edbdf frontend/static: fix product image aspect ratios
use film-camera.jpg (1331 × 854) as the base aspect ratio

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-15 16:30:18 -07:00