Skip to content

Commit 76571f5

Browse files
bourgeoisorNimJay
andauthored
Clean up docs and meta files (GoogleCloudPlatform#1721)
* Clean up docs and meta files * Fix absolute link in release-cluster README * Fix absolute link for the logo in README * Revert move of root README * Fix Online Boutique typo * Update README.md Co-authored-by: Nim Jayawardena <[email protected]> * Update README.md * Fix issues with README quickstart * Fix issues with README quickstart * Update README.md Co-authored-by: Nim Jayawardena <[email protected]> --------- Co-authored-by: Nim Jayawardena <[email protected]>
1 parent a7cb579 commit 76571f5

File tree

29 files changed

+188
-196
lines changed

29 files changed

+188
-196
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

.github/release-cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This directory contains extra deploy manifests for configuring Online Boutique solution on GKE for onlineboutique.dev.
44

5-
_Note: before moving forward, the OnlineBoutique apps should already be deployed [on the online-boutique-release GKE cluster](../../hack#10-deploy-releasekubernetes-manifestsyaml-to-our-online-boutique-release-gke-cluster)._
5+
_Note: before moving forward, the Online Boutique apps should already be deployed [on the online-boutique-release GKE cluster](/docs/releasing#10-deploy-releasekubernetes-manifestsyaml-to-our-online-boutique-release-gke-cluster)._
66

77
## Public static IP address
88

File renamed without changes.

README.md

+85-95
Large diffs are not rendered by default.

docs/cloudshell-tutorial.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This tutorial shows you how to deploy **[Online Boutique](https://github.com/Goo
44

55
You'll be able to run Online Boutique on:
66
- a local **[minikube](https://minikube.sigs.k8s.io/docs/)** cluster, which comes built in to the Cloud Shell instance
7-
- a **[Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine)** cluster using a new or existing [Google Cloud Platform project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project)
7+
- a **[Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine)** cluster using a new or existing [Google Cloud project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project)
88

99
Let's get started!
1010

@@ -29,7 +29,7 @@ Once minikube has started, you're ready to move on to the next step.
2929

3030
### GKE instructions
3131

32-
In order to create a GKE cluster, you'll need to **[create a Google Cloud Platform project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project)** or use an existing project.
32+
In order to create a GKE cluster, you'll need to **[create a Google Cloud project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project)** or use an existing project.
3333

3434
1. Access the command palette by going to **View > Find Command**.
3535

@@ -83,7 +83,7 @@ You can start, stop, and debug apps from the Debug view.
8383

8484
### Clean up
8585

86-
If you've deployed your app to a GKE cluster in your Google Cloud Platform project, you'll want to delete the cluster to avoid incurring charges.
86+
If you've deployed your app to a GKE cluster in your Google Cloud project, you'll want to delete the cluster to avoid incurring charges.
8787

8888
1. Navigate to the <walkthrough-editor-spotlight spotlightId="activity-bar-cloud-k8s">Cloud Code - Kubernetes view</walkthrough-editor-spotlight> in the Activity bar.
8989

docs/development-guide.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Development Guide
22

3-
This doc explains how to build and run the OnlineBoutique source code locally using the `skaffold` command-line tool.
3+
This doc explains how to build and run the Online Boutique source code locally using the `skaffold` command-line tool.
44

55
## Prerequisites
66

77
- [Docker for Desktop](https://www.docker.com/products/docker-desktop).
88
- kubectl (can be installed via `gcloud components install kubectl`)
99
- [skaffold **2.0.2+**](https://skaffold.dev/docs/install/) (latest version recommended), a tool that builds and deploys Docker images in bulk.
10-
- A Google Cloud Project with Google Container Registry enabled.
10+
- A Google Cloud project with Google Container Registry enabled.
1111
- Enable GCP APIs for Cloud Monitoring, Tracing, Profiler:
1212
```
1313
gcloud services enable monitoring.googleapis.com \
@@ -19,7 +19,7 @@ gcloud services enable monitoring.googleapis.com \
1919

2020
## Option 1: Google Kubernetes Engine (GKE)
2121

22-
> 💡 Recommended if you're using Google Cloud Platform and want to try it on
22+
> 💡 Recommended if you're using Google Cloud and want to try it on
2323
> a realistic cluster. **Note**: If your cluster has Workload Identity enabled,
2424
> [see these instructions](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#enable)
2525

docs/releasing/README.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Releasing Online Boutique
2+
3+
This document walks through the process of creating a new release of Online Boutique.
4+
5+
## Creating a new release
6+
7+
1. Decide on the next release version number using [semantic versioning](https://semver.org/), based on the [commits since the previous release](https://github.com/GoogleCloudPlatform/microservices-demo/commits/main).
8+
9+
2. Open a new terminal.
10+
11+
3. Make sure you have `gsed` installed. If not, `brew install gnu-sed`.
12+
13+
4. Set the following environment variables:
14+
15+
- `TAG` - This is the new version (e.g., `v0.3.5`).
16+
- `REPO_PREFIX` - This is the Docker repository.
17+
18+
**Example:**
19+
20+
```
21+
export TAG=v0.3.5
22+
export REPO_PREFIX=gcr.io/google-samples/microservices-demo
23+
```
24+
25+
5. Run `./docs/releasing/make-release.sh`.
26+
27+
- Make sure you run `./docs/releasing/make-release.sh` from this project's root directory — **not** from inside the `docs/releasing/` directory.
28+
- This script:
29+
1. uses `make-docker-images.sh` to build and push a Docker image for each microservice to the previously specified repository.
30+
1. uses `make-release-artifacts.sh` to regenerates (and update the image $TAGS) YAML file at `./release/kubernetes-manifests.yaml` and `./kustomize/base/`.
31+
1. runs `git tag` and pushes a new branch (e.g., `release/v0.3.5`) with the changes to `./release/kubernetes-manifests.yaml`.
32+
33+
6. Make sure the new Docker images were created and pushed.
34+
35+
- Go through [our Container Registry repository](https://pantheon.corp.google.com/gcr/images/google-samples/global/microservices-demo?project=google-samples).
36+
- Make sure a Docker image was created for each microservice (with the new version tag).
37+
38+
7. [Draft a new release on GitHub](https://github.com/GoogleCloudPlatform/microservices-demo/releases).
39+
40+
- Summarize the [commits since the previous release](https://github.com/GoogleCloudPlatform/microservices-demo/commits/main).
41+
- See previous releases for inspiration on release notes.
42+
43+
8. Create a new pull-request.
44+
45+
- When you ran `make-release.sh`, it created a new branch (e.g., `release/v0.3.5`).
46+
- Include the new release draft in the pull-request description for reviewers to see.
47+
48+
9. Once your pull-request is approved, merge it.
49+
50+
10. Connect to our [online-boutique-release GKE cluster](https://pantheon.corp.google.com/kubernetes/clusters/details/us-central1-c/online-boutique-release/details?project=online-boutique-ci).
51+
52+
```
53+
gcloud container clusters get-credentials online-boutique-release \
54+
--zone us-central1-c --project online-boutique-ci
55+
```
56+
57+
11. Deploy `release/kubernetes-manifests.yaml` to our [online-boutique-release GKE cluster](https://pantheon.corp.google.com/kubernetes/clusters/details/us-central1-c/online-boutique-release/details?project=online-boutique-ci).
58+
59+
```
60+
kubectl apply -f ./release/kubernetes-manifests.yaml
61+
```
62+
63+
12. Make sure [onlineboutique.dev](https://onlineboutique.dev) works.
64+
65+
13. [Publish your draft release on GitHub](https://github.com/GoogleCloudPlatform/microservices-demo/releases).
File renamed without changes.

hack/make-docker-images.sh renamed to docs/releasing/make-docker-images.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
# Builds and pushes docker image for each demo microservice.
1818

1919
set -euo pipefail
20-
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
20+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
21+
REPO_ROOT=$SCRIPT_DIR/../..
2122

2223
log() { echo "$1" >&2; }
2324

@@ -50,6 +51,6 @@ while IFS= read -d $'\0' -r dir; do
5051
docker push "${image}-native-grpc-probes"
5152
fi
5253
)
53-
done < <(find "${SCRIPTDIR}/../src" -mindepth 1 -maxdepth 1 -type d -print0)
54+
done < <(find "${REPO_ROOT}/src" -mindepth 1 -maxdepth 1 -type d -print0)
5455

5556
log "Successfully built and pushed all images."

hack/make-helm-chart.sh renamed to docs/releasing/make-helm-chart.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
# Packages and pushes Online Boutique's Helm chart in public Artifact Registry.
1818

1919
set -euo pipefail
20-
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
20+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
21+
REPO_ROOT=$SCRIPT_DIR/../..
2122

2223
log() { echo "$1" >&2; }
2324

2425
TAG="${TAG:?TAG env variable must be specified}"
2526
HELM_CHART_REPO="us-docker.pkg.dev/online-boutique-ci/charts"
2627

27-
cd helm-chart
28+
cd ${REPO_ROOT}/helm-chart
2829
gsed -i "s/^appVersion:.*/appVersion: \"${TAG}\"/" Chart.yaml
2930
gsed -i "s/^version:.*/version: ${TAG:1}/" Chart.yaml
3031
helm package .

hack/make-release-artifacts.sh renamed to docs/releasing/make-release-artifacts.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@
1818
# /release/...
1919

2020
set -euo pipefail
21-
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
21+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
22+
REPO_ROOT=$SCRIPT_DIR/../..
2223
[[ -n "${DEBUG:-}" ]] && set -x
2324

2425
log() { echo "$1" >&2; }
2526

2627
TAG="${TAG:?TAG env variable must be specified}"
2728
REPO_PREFIX="${REPO_PREFIX:?REPO_PREFIX env variable must be specified}"
28-
OUT_DIR="${OUT_DIR:-${SCRIPTDIR}/../release}"
29+
OUT_DIR="${OUT_DIR:-${REPO_ROOT}/release}"
2930

3031
print_license_header() {
31-
cat "${SCRIPTDIR}/license_header.txt"
32+
cat "${SCRIPT_DIR}/license_header.txt"
3233
echo
3334
}
3435

@@ -61,7 +62,7 @@ read_manifests_except_kustomization() {
6162
}
6263

6364
mk_kubernetes_manifests() {
64-
out_manifest="$(read_manifests_except_kustomization "${SCRIPTDIR}/../kubernetes-manifests")"
65+
out_manifest="$(read_manifests_except_kustomization "${REPO_ROOT}/kubernetes-manifests")"
6566

6667
# replace "image" repo, tag for each service
6768
for dir in ./src/*/
@@ -88,7 +89,7 @@ mk_istio_manifests() {
8889

8990
# This just copies the yaml from the component (excluding kustomization.yaml)
9091
# since there is no easy way to render individual kustomize component resources
91-
read_manifests_except_kustomization "${SCRIPTDIR}/../kustomize/components/service-mesh-istio/"
92+
read_manifests_except_kustomization "${REPO_ROOT}/kustomize/components/service-mesh-istio/"
9293
echo '# [END servicemesh_release_istio_manifests_microservices_demo]'
9394
}
9495

hack/make-release.sh renamed to docs/releasing/make-release.sh

+8-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
# - 4. pushing the tag/commit to main.
2222

2323
set -euo pipefail
24-
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
24+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
25+
REPO_ROOT=$SCRIPT_DIR/../..
2526
[[ -n "${DEBUG:-}" ]] && set -x
2627

2728
log() { echo "$1" >&2; }
@@ -45,19 +46,19 @@ git checkout main
4546
git pull
4647

4748
# build and push images
48-
"${SCRIPTDIR}"/make-docker-images.sh
49+
"${SCRIPT_DIR}"/make-docker-images.sh
4950

5051
# update yaml
51-
"${SCRIPTDIR}"/make-release-artifacts.sh
52+
"${SCRIPT_DIR}"/make-release-artifacts.sh
5253

5354
# build and push images
54-
"${SCRIPTDIR}"/make-helm-chart.sh
55+
"${SCRIPT_DIR}"/make-helm-chart.sh
5556

5657
# create git release / push to new branch
5758
git checkout -b "release/${TAG}"
58-
git add "${SCRIPTDIR}/../release/"
59-
git add "${SCRIPTDIR}/../kustomize/base/"
60-
git add "${SCRIPTDIR}/../helm-chart/"
59+
git add "${REPO_ROOT}/release/"
60+
git add "${REPO_ROOT}/kustomize/base/"
61+
git add "${REPO_ROOT}/helm-chart/"
6162
git commit --allow-empty -m "Release $TAG"
6263
log "Pushing k8s manifests to release/${TAG}..."
6364
git tag "$TAG"

hack/README.md

-67
This file was deleted.

kustomize/components/service-mesh-istio/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ INGRESS_HOST="$(kubectl get gateway istio-gateway \
198198
curl -v "http://$INGRESS_HOST"
199199
```
200200

201-
# Additional service mesh demos using OnlineBoutique
201+
# Additional service mesh demos using Online Boutique
202202

203203
- [Canary deployment](https://github.com/GoogleCloudPlatform/istio-samples/tree/master/istio-canary-gke)
204204
- [Security (mTLS, JWT, Authorization)](https://github.com/GoogleCloudPlatform/istio-samples/tree/master/security-intro)
File renamed without changes.
File renamed without changes.

src/adservice/genproto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
# protos are needed in adservice folder for compiling during Docker build.
1919

2020
mkdir -p proto && \
21-
cp ../../pb/demo.proto src/main/proto
21+
cp ../../protos/demo.proto src/main/proto
2222

2323
# [END gke_adservice_genproto]

src/checkoutservice/genproto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# [START gke_checkoutservice_genproto]
1818

1919
PATH=$PATH:$GOPATH/bin
20-
protodir=../../pb
20+
protodir=../../protos
2121

2222
protoc --go_out=plugins=grpc:genproto -I $protodir $protodir/demo.proto
2323

src/currencyservice/genproto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818

1919
# protos are loaded dynamically for node, simply copies over the proto.
2020
mkdir -p proto
21-
cp -r ../../pb/* ./proto
21+
cp -r ../../protos/* ./proto
2222

2323
# [END gke_currencyservice_genproto]

src/emailservice/genproto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
# [START gke_emailservice_genproto]
1818

19-
python -m grpc_tools.protoc -I../../pb --python_out=. --grpc_python_out=. ../../pb/demo.proto
19+
python -m grpc_tools.protoc -I../../protos --python_out=. --grpc_python_out=. ../../protos/demo.proto
2020

2121
# [END gke_emailservice_genproto]

src/frontend/genproto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# [START gke_frontend_genproto]
1818

1919
PATH=$PATH:$GOPATH/bin
20-
protodir=../../pb
20+
protodir=../../protos
2121

2222
protoc --go_out=plugins=grpc:genproto -I $protodir $protodir/demo.proto
2323

src/paymentservice/genproto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818

1919
# protos are loaded dynamically for node, simply copies over the proto.
2020
mkdir -p proto
21-
cp -r ../../pb/* ./proto
21+
cp -r ../../protos/* ./proto
2222

2323
# [END gke_paymentservice_genproto]

src/productcatalogservice/genproto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# [START gke_productcatalogservice_genproto]
1818

1919
PATH=$PATH:$GOPATH/bin
20-
protodir=../../pb
20+
protodir=../../protos
2121

2222
protoc --go_out=plugins=grpc:genproto -I $protodir $protodir/demo.proto
2323

src/recommendationservice/genproto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
# requires gRPC tools:
2222
# pip install -r requirements.txt
2323

24-
python -m grpc_tools.protoc -I../../pb --python_out=. --grpc_python_out=. ../../pb/demo.proto
24+
python -m grpc_tools.protoc -I../../protos --python_out=. --grpc_python_out=. ../../protos/demo.proto
2525

2626
# [END gke_recommendationservice_genproto]

src/shippingservice/genproto.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# [START gke_shippingservice_genproto]
1818

1919
PATH=$PATH:$GOPATH/bin
20-
protodir=../../pb
20+
protodir=../../protos
2121

2222
protoc --go_out=plugins=grpc:genproto -I $protodir $protodir/demo.proto
2323

0 commit comments

Comments
 (0)