Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding change log blurb #22

Merged
merged 11 commits into from
May 18, 2022
Prev Previous commit
Next Next commit
fix markdown lint
  • Loading branch information
cartersocha committed May 17, 2022
commit 77bda571cc43aaf05d95bc59d3547ecac317a4e1
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Webstore Demo

<p align="center">
<img src="src/frontend/static/icons/Hipster_HeroLogoCyan.svg" width="300" alt="Online Boutique" />
</p>

---

## Under Construction

This repo is a work in progress
Expand Down Expand Up @@ -57,7 +51,7 @@ Find **Protocol Buffers Descriptions** at the [`./pb` directory](./pb).
Microservices use a high volume of gRPC calls to communicate to each other.
- **[OpenTelemetry Traces](https://opentelemetry.io):**
All services are instrumented using OpenTelemetry available instrumentation libraries.
- **[OpenTelemetry Collector](https://opentelemetry.io/docs/collector/getting-started):**
- **[OpenTelemetry Collector](https://opentelemetry.io/docs/collector/getting-started):**
All services are instrumented and sending the generated traces to the
OpenTelemetry Collector via gRPC. The received traces are then exported to the
logs and to Jaeger.
Expand Down
15 changes: 9 additions & 6 deletions src/adservice/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
# Ad Service

The Ad service provides advertisement based on context keys. If no context keys are provided then it returns random ads.
The Ad service provides advertisement based on context keys. If no context keys
are provided then it returns random ads.

## Building locally

The Ad service uses gradlew to compile/install/distribute. Gradle wrapper is already part of the source code. To build Ad Service, run:
The Ad service uses gradlew to compile/install/distribute. Gradle wrapper is
already part of the source code. To build Ad Service, run:

```
```sh
./gradlew installDist
```

It will create executable script src/adservice/build/install/hipstershop/bin/AdService

### Upgrading gradle version

If you need to upgrade the version of gradle then run

```
```sh
./gradlew wrapper --gradle-version <new-version>
```

## Building docker image

From `src/adservice/`, run:

```
```sh
docker build ./
```

4 changes: 3 additions & 1 deletion src/checkoutservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

Run the following command to restore dependencies to `vendor/` directory:

dep ensure --vendor-only
```sh
dep ensure --vendor-only
```
4 changes: 3 additions & 1 deletion src/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

Run the following command to restore dependencies to `vendor/` directory:

dep ensure --vendor-only
```sh
dep ensure --vendor-only
```
31 changes: 18 additions & 13 deletions src/productcatalogservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

Run the following command to restore dependencies to `vendor/` directory:

dep ensure --vendor-only
```sh
dep ensure --vendor-only
```

## Dynamic catalog reloading / artificial delay

This service has a "dynamic catalog reloading" feature that is purposefully
not well implemented. The goal of this feature is to allow you to modify the
`products.json` file and have the changes be picked up without having to
restart the service.
This service has a "dynamic catalog reloading" feature that is purposefully not
well implemented. The goal of this feature is to allow you to modify the
`products.json` file and have the changes be picked up without having to restart
the service.

However, this feature is bugged: the catalog is actually reloaded on each
request, introducing a noticeable delay in the frontend. This delay will also
Expand All @@ -19,20 +21,23 @@ of the CPU time.
You can trigger this feature (and the delay) by sending a `USR1` signal and
remove it (if needed) by sending a `USR2` signal:

```
```sh
# Trigger bug
kubectl exec \
$(kubectl get pods -l app=productcatalogservice -o jsonpath='{.items[0].metadata.name}') \
-c server -- kill -USR1 1
$(kubectl get pods -l app=productcatalogservice -o jsonpath='{.items[0].metadata.name}') \
-c server -- kill -USR1 1
# Remove bug
kubectl exec \
$(kubectl get pods -l app=productcatalogservice -o jsonpath='{.items[0].metadata.name}') \
-c server -- kill -USR2 1
$(kubectl get pods -l app=productcatalogservice -o jsonpath='{.items[0].metadata.name}') \
-c server -- kill -USR2 1
```

## Latency injection

This service has an `EXTRA_LATENCY` environment variable. This will inject a sleep for the specified [time.Duration](https://golang.org/pkg/time/#ParseDuration) on every call to
to the server.
This service has an `EXTRA_LATENCY` environment variable. This will inject a
sleep for the specified
[time.Duration](https://golang.org/pkg/time/#ParseDuration) on every call to to
the server.

For example, use `EXTRA_LATENCY="5.5s"` to sleep for 5.5 seconds on every request.
For example, use `EXTRA_LATENCY="5.5s"` to sleep for 5.5 seconds on every
request.
11 changes: 7 additions & 4 deletions src/shippingservice/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
# Shipping Service

The Shipping service provides price quote, tracking IDs, and the impression of order fulfillment & shipping processes.
The Shipping service provides price quote, tracking IDs, and the impression of
order fulfillment & shipping processes.

## Local

Run the following command to restore dependencies to `vendor/` directory:

dep ensure --vendor-only
```sh
dep ensure --vendor-only
```

## Build

From `src/shippingservice`, run:

```
```sh
docker build ./
```

## Test

```
```sh
go test .
```