Code Monkey home page Code Monkey logo

iketutg / cloud-ops-sandbox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/cloud-ops-sandbox

0.0 2.0 0.0 39.29 MB

Cloud Operations Sandbox is an open source tool that helps practitioners to learn Service Reliability Engineering practices from Google and apply them on their cloud services using Cloud Operations suite of tools.

Home Page: https://cloud-ops-sandbox.dev

License: Apache License 2.0

Shell 2.90% Python 15.44% Dockerfile 0.87% Java 0.83% C# 1.30% Batchfile 0.20% Go 5.42% JavaScript 4.21% HTML 63.75% HCL 3.78% Makefile 0.13% CSS 1.15% Smarty 0.02%

cloud-ops-sandbox's Introduction

Cloud Operations Sandbox (Alpha)

Continuous Integration

Cloud Operations Sandbox is an open-source tool that helps practitioners to learn Service Reliability Engineering practices from Google and apply them on their cloud services using Cloud Operations (formerly Stackdriver). It is based on Hipster Shop, a cloud-native microservices application.

Sandbox offers:

  • Demo Service - an application built using microservices architecture on modern, cloud-native stack.
  • One-click deployment - a script handles the work of deploying the service to Google Cloud Platform.
  • Load Generator - a component that produces synthetic traffic on a demo service.
  • (Soon) SRE Runbook - pre-built routine procedures for operating the deployed sample service that follow best SRE practices using Cloud Operations.

Why Sandbox

Google Cloud Operations Suite is a suite of tools that helps you gain full observability of your code and applications. You might want to take Cloud Operations to a "test drive" in order to answer the question, "will it work for my application needs"? The most effective way to learn is by testing the tool in "real-life" conditions, but without risking a production system. With Sandbox, we provide a tool that automatically provisions a new demo cluster, which receives traffic, simulating real users. Practitioners can experiment with various Cloud Operations tools to solve problems and accomplish standard SRE tasks in a sandboxed environment.

Getting Started

Using Sandbox

Prerequisites

Set Up

Click the Cloud Shell button for automated one-click installation of a new Sandbox cluster in a new Google Cloud Project.

Open in Cloud Shell

Note: If installation stops due to billing account errors, set up the billing account and type: sandboxctl create.

Next Steps

Clean Up

When you are done using Cloud Operations Sandbox, you can tear down the environment by deleting the GCP project that was set up for you. This can be accomplished in any of the following ways:

  • Use the sandboxctl script:
sandboxctl destroy
  • If you no longer have the Cloud Operations Sandbox files downloaded, delete your project manually using gcloud
gcloud projects delete $YOUR_PROJECT_ID

Service Overview

This project contains a multi-tier microservices application. It is a web-based e-commerce app called “Hipster Shop”, where users can browse items, add them to the cart, and purchase them.

Screenshots

Home Page Checkout Screen
Screenshot of store homepage Screenshot of checkout screen

Service Architecture

Hipster Shop is composed of many microservices, written in different languages, that talk to each other over gRPC and REST API.

We are not endorsing the architecture of Hipster Shop as the best way to build such a shop! The architecture is optimized for learning purposes and includes modern stack: Kubernetes, GKE, Istio, Cloud Operations, App Engine, gRPC, OpenTelemetry, and similar cloud-native technologies.

Architecture of microservices

Find the gRPC protocol buffer descriptions in the ./pb directory.

Service Language Description
frontend Go Exposes an HTTP server to serve the website. Does not require signup/login, and generates session IDs for all users automatically.
cartservice C# Manages the items in the user's shipping cart by using Redis.
productcatalogservice Go Provides the list of products from a JSON file and the ability to search and retrieve products.
currencyservice Node.js Converts one currency to another, using real values fetched from the European Central Bank. It's the highest QPS service.
paymentservice Node.js Charges the given credit card info (hypothetically😇) with the given amount and returns a transaction ID.
shippingservice Go Gives shipping-cost estimates based on the shopping cart. Ships items to the given address (hypothetically😇).
emailservice Python Sends users an order-confirmation email (hypothetically😇).
checkoutservice Go Retrieves a user's cart, prepares the order, and orchestrates payment, shipping, and email notification.
recommendationservice Python Recommends other products based on what's in the user's cart.
adservice Java Provides text ads based on given context words.
loadgenerator Python/Locust Continuously sends requests that imitate realistic shopping flows to the frontend.
ratingservice Python3 Manages ratings of the shop's products. Runs on App Engine.

Technologies

  • Kubernetes/GKE: The app is designed to run on Google Kubernetes Engine.
  • gRPC: Microservices use a high volume of gRPC calls to communicate to each other.
  • OpenTelemetry Tracing: Most services are instrumented using OpenTelemetry tracers and interceptors which handle trace context propagation through gRPC and HTTP.
  • Cloud Operations APM and SRE: Many services are instrumented with Profiling, Tracing, Debugging, Monitoring, Logging and Error Reporting.
  • Skaffold: A tool used for doing repeatable deployments. You can deploy to Kubernetes with a single command using Skaffold.
  • Synthetic Load Generation: The application demo comes with dedicated load generation service that creates realistic usage patterns on Hipster Shop website using Locust load generator.
  • Google App Engine: PaaS for running Web applications and services.
  • Google Cloud SQL: Fully managed relational database service for MySQL, PostgreSQL and SQL Server.

For Developers

If you are a developer and want to contribute to the Sandbox, you can refer to CONTIBUTING.md.


This is not an official Google project.

cloud-ops-sandbox's People

Contributors

daniel-sanche avatar ahmetb avatar renovate-bot avatar eaberman avatar nicklin37 avatar minherz avatar 0xsage avatar gan-tu avatar ayelet41 avatar ymotongpoo avatar bleything avatar crash-ghaun avatar djmailhot avatar dependabot[bot] avatar arbrown avatar jiang95-dev avatar mtwo avatar rghetia avatar nathenharvey avatar tiffunky avatar treedy avatar jkwlui avatar yuriatgoogle avatar orthros avatar sebright avatar davidstanke avatar jba avatar qqqstuv avatar michaelawyu avatar tishen25 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.