Giter VIP home page Giter VIP logo

leverege-google-wm-demo's Introduction

Google Waste Management Demo

Getting Started

This repository contains a set of tools for quickly building, deploying, and running the Google Waste Management demo in Kubernetes (with Helm).

Since markdown does not support opening a new tab from a link, all of the links that are clicked through from this page will open the link from within this tab. To avoid this and have a new tab from each link simply hold the shift key down before clicking the link.

Prerequisites

Before running the setup script, you will need to install some local deployment tools, configure your Firebase and GCP projects, and gather your API keys.

Local Installs

We start by installing NodeJS, the Google Cloud SDK, Firebase CLI, Kubernetes CLI and helm in order to get the command line tools necessary to deploy the Waste Management system.

On MacOS, using brew:

brew install node@8
brew cask install google-cloud-sdk
brew install kubernetes-cli
brew install firebase-cli
brew install kubernetes-helm

For other operating systems:

Create and Configure a New Firebase Project

Creating a new Firebase project. Creating a Firebase project will also create a linked Google Cloud Project of the same name.

Google maps


Setup and Deployment

Clone repo

Clone this repo

git clone [email protected]:Leverege/leverege-google-wm-demo.git && cd leverege-google-wm-demo

Add service account credentials and configure its roles

  1. Create the Service Account

  2. Add the following project roles:

    • Cloud IoT > Cloud IoT Admin
    • Firebase > Firebase Rules System
    • Pub/Sub > Pub/Sub Admin
    • BigQuery > BigQuery Admin
  3. Click + Create Key and, leave key type as "JSON"

  4. Click Save and download the file to this repo's scripts/platform-secrets/ folder.

Add your Google Maps API key to the environment variable

Open the scripts/platform-secrets/fontend-env file with a text editor. In that file, replace the phrase GOOGLE_MAPS_API_KEY with your Google Maps API key (keeping the quotes).

The file should look like this before you add your key:

Blue.start({
  devices: {
    root: 'data/google-asset-tracking',
    firestore: 'FIRESTORE_CONFIG',
  },
  sim: {
    host: '/sim',
  },
  pubsub: {
    host: '/pubsub',
  },
  keys: {
    mapsKey: 'GOOGLE_MAPS_API_KEY',
  },
});

Save the scripts/platform-secrets/frontend-env file.

Also open the values.yaml file with a text editor. In that file replace the phrase [YOUR_GOOGLE_MAPS_API_KEY] with your Google Maps API key (keeping the quotes). Save the values.yaml file.

Run the deployment script

Run: ./scripts/Build_Google_Waste_Management

This script will provision a Kubernetes cluster and deploy all project services. You can customize the enviroment variables on the values.yaml file.

When the script starts, it will launch a browser and prompt you to log into your GCP account. Log in, and click allow. Then, return to the console and enter your project's id.


Teardown cluster and resources

To delete remove the service from the cluster using Helm, delete the Kubernetes cluster and empty IoT Core Registry, run: ./scripts/TearItDown


Built With

leverege-google-wm-demo's People

Contributors

alvarowolfx avatar mattgif avatar yitaek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.