Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
fix: Patch version 0.9 to address reported issues (#1060)
Browse files Browse the repository at this point in the history
comment markdown that shows status badges (fixes #1051).
update the 'gcloud auth' subcommands, 'sandboxctl create'
command documentation (fixes #1047).
use SANDBOX_VERSION var to fix behavior of --version param (fixes #1045).
refactor sandboxctl to remove unused vars, store config path in one place.
use the latest 0.8.1 version of microservices-demo with kustomize
(fixes #1053).
remove top boundary on terraform version (fixes #1057).
  • Loading branch information
minherz authored Nov 21, 2023
1 parent 676f520 commit 8c41582
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 25 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 📈 📊 👣 🪵 Cloud Operations Sandbox

![Terraform][tf_badge] ![sandboxctl][cli_badge]
<!-- ![Terraform][tf_badge] ![sandboxctl][cli_badge] -->

Cloud Operations (Ops) Sandbox is an end-to-end demo that helps practitioners to
learn about [Cloud Operations][cloud-ops] (formerly Stackdriver) and Service
Expand Down Expand Up @@ -111,8 +111,8 @@ under Apache 2.0. Full license text is available in [LICENSE](LICENSE).
> This is not an official Google project. Please, report any issues or feature requests related to this project [here].
[1]: https://console.cloud.google.com/?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fgooglecloudplatform%2Fcloud-ops-sandbox&cloudshell_git_branch=0.9.2&cloudshell_tutorial=docs/walkthrough.md
[tf_badge]: https://github.com/GoogleCloudPlatform/cloud-ops-sandbox/actions/workflows/terraform.yaml/badge.svg
[cli_badge]: https://github.com/GoogleCloudPlatform/cloud-ops-sandbox/actions/workflows/cli.yaml/badge.svg
<!-- [tf_badge]: https://github.com/GoogleCloudPlatform/cloud-ops-sandbox/actions/workflows/terraform.yaml/badge.svg
[cli_badge]: https://github.com/GoogleCloudPlatform/cloud-ops-sandbox/actions/workflows/cli.yaml/badge.svg -->
[cloud-ops]: (https://cloud.google.com/products/operations)
[ob]: https://github.com/GoogleCloudPlatform/microservices-demo
[gke]: https://cloud.google.com/kubernetes-engine
Expand Down
9 changes: 5 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

## Overview

## Overview

Cloud Ops Sandbox (**Sandbox** further in this document) lets you to trial
various services and instruments in the [Cloud Operations suite][cloud-ops]
of services by using [Online Boutique][ob], a non-trivial microservice
application deployed on Kubernetes.
[Cloud Operations suite][cloud-ops] of services by using a non-trivial
microservice application deployed on Kubernetes like [Online Boutique][ob].
With Sandbox you can experiment with existing tools to troubleshoot operational
problems in a sandboxed environment or to have hands-on experience with
creating new observability instruments.
Expand Down Expand Up @@ -46,7 +47,7 @@ instructions:

Or, by executing the following commands in your local environment:

```terminal
```shell
git clone https://github.com/GoogleCloudPlatform/cloud-ops-sandbox
gcloud auth application-default login
cloud-ops-sandbox/provisioning/sandboxctl create -p PROJECT_ID
Expand Down
4 changes: 2 additions & 2 deletions docs/walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ To create a new Cloud Ops Sandbox using default settings run the following
command in Cloud Shell:

```bash
provisioning/sandboxctl create --project-id <walkthrough-project-id/>
provisioning/sandboxctl create -p <walkthrough-project-id/>
```

By default the launch installs [Anthos Service Mesh][3](ASM) and provisions
Expand Down Expand Up @@ -166,7 +166,7 @@ avoid incurring additional costs.
To delete the launched Sandbox, run the following command:

```bash
provisioning/sandboxctl delete --project-id <walkthrough-project-id/>
provisioning/sandboxctl delete -p <walkthrough-project-id/>
```

**Warning:** If you customized your launch with additional parameters
Expand Down
10 changes: 5 additions & 5 deletions provisioning/kustomize/online-boutique/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- github.com/GoogleCloudPlatform/microservices-demo/kustomize/base?version=v0.6.0
- github.com/GoogleCloudPlatform/microservices-demo/kustomize/base?version=v0.8.1
components:
- github.com/GoogleCloudPlatform/microservices-demo/kustomize/components/google-cloud-operations?version=v0.6.0
#!DO NOT REMOVE FOLLOWING COMMENTED LINES!
#- github.com/GoogleCloudPlatform/microservices-demo/kustomize/components/service-mesh-istio?version=v0.6.0
#- github.com/GoogleCloudPlatform/microservices-demo/kustomize/components/without-loadgenerator?version=v0.6.0
- github.com/GoogleCloudPlatform/microservices-demo/kustomize/components/google-cloud-operations?version=v0.8.1
# !!DO NOT REMOVE THE COMMENTED LINES!!
#- github.com/GoogleCloudPlatform/microservices-demo/kustomize/components/service-mesh-istio?version=v0.8.1
#- github.com/GoogleCloudPlatform/microservices-demo/kustomize/components/without-loadgenerator?version=v0.8.1
17 changes: 8 additions & 9 deletions provisioning/sandboxctl
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ fi
SCRIPT_NAME="${0##*/}"; readonly SCRIPT_NAME
SCRIPT_DIR="$(realpath "$(dirname "${0}")")"; readonly SCRIPT_DIR
SANDBOX_VERSION="$(tr -d '\n' < "${SCRIPT_DIR}/version.txt")"; readonly SANDBOX_VERSION
SANDBOX_SESSION="${SANDBOX_SESSION:-$(python3 -c 'import uuid; print(uuid.uuid4())')}"; readonly SANDBOX_SESSION
CLOUD_OPS_SANDBOX_DISABLE_TELEMETRY="${CLOUD_OPS_SANDBOX_DISABLE_TELEMETRY:-}"; readonly CLOUD_OPS_SANDBOX_DISABLE_TELEMETRY
AGCLOUD=""
ATERRAFORM=""

main() {
if [[ "${*}" = '' ]]; then
Expand Down Expand Up @@ -168,15 +164,18 @@ help_subcommand() {
}

init() {
ATERRAFORM="$(which terraform || true)"; readonly ATERRAFORM;
AGCLOUD="$(which gcloud || true)"; readonly AGCLOUD;
MICROSERVICE_DEMO_PATH="kustomize/online-boutique"; readonly MICROSERVICE_DEMO_PATH
PROJECT_ID=""
CLUSTER_LOCATION=""
CLUSTER_NAME=""
TERRAFORM_PREFIX=""
SKIP_LOADGENERATOR=0
SKIP_ASM=0
VERBOSE=0
SANDBOX_SESSION="${SANDBOX_SESSION:-$(python3 -c 'import uuid; print(uuid.uuid4())')}"; readonly SANDBOX_SESSION
CLOUD_OPS_SANDBOX_DISABLE_TELEMETRY="${CLOUD_OPS_SANDBOX_DISABLE_TELEMETRY:-}"; readonly CLOUD_OPS_SANDBOX_DISABLE_TELEMETRY
ATERRAFORM="$(which terraform || true)"; readonly ATERRAFORM;
AGCLOUD="$(which gcloud || true)"; readonly AGCLOUD;
CLOUDOPS_SANDBOX_POOL_CFG=${CLOUDOPS_SANDBOX_POOL_CFG:-}
TF_FILE_LOCATION="$(mktemp).tfvars"; readonly TF_FILE_LOCATION
}
Expand Down Expand Up @@ -211,7 +210,7 @@ fatal_with_usage() {
}

version_message() {
echo "${VERSION}"
echo "${SANDBOX_VERSION}"
}

usage() {
Expand Down Expand Up @@ -472,7 +471,7 @@ configure_terraform_input_vars() {
state_bucket_name = "${TF_BUCKET_NAME}"
state_prefix = "${TERRAFORM_PREFIX}"
gcp_project_id = "${PROJECT_ID}"
filepath_manifest = "${SCRIPT_DIR}/kustomize/online-boutique/"
filepath_manifest = "${SCRIPT_DIR}/${MICROSERVICE_DEMO_PATH}"
EOF
)

Expand All @@ -494,7 +493,7 @@ EOF
}

configure_kustomization() {
KUSTOMIZE_FILE="${SCRIPT_DIR}/kustomize/online-boutique/kustomization.yaml"; readonly KUSTOMIZE_FILE
KUSTOMIZE_FILE="${SCRIPT_DIR}/${MICROSERVICE_DEMO_PATH}/kustomization.yaml"; readonly KUSTOMIZE_FILE
cp "${KUSTOMIZE_FILE}" "${KUSTOMIZE_FILE}.origin" > /dev/null
local SED_EXPRESSION; SED_EXPRESSION=""

Expand Down
3 changes: 1 addition & 2 deletions provisioning/terraform/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
# in the data section.

terraform {
# The module has syntax validated vs 1.4.1
required_version = ">= 1.4.1, < 1.6.0"
required_version = ">= 1.4.1"

required_providers {
google = {
Expand Down

0 comments on commit 8c41582

Please sign in to comment.