Skip to content

GWaste/cloud-logbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

GWaste: Get to know your Waste

Waste Cloud Logbook

Contents

Gwaste Architecture

image

Cloud Storage

In our project we use Cloud Shell to create two buckets:

  1. To create the first bucket:
    $ gsutil mb gs://[OUR-PROJECT-ID]
  2. The second bucket:
    $ gsutil mb gs://[OUR-PROJECT-ID]-tf2-models

AI Platform

We use AI Platform (Models) to deploy our model in GCP.

The steps to deploy the model to the AI Platform is:

  1. Click Navigation Menu -> AI Platform
  2. Select Models
  3. Click [+] New Models button.
  4. Fill the name model as 'waste', then select the region, after that click Create
  5. Return to Models menu, click 'waste' model.
  6. Click [+] New Version button.
  7. Fill the version name as 'v1', and fill the Pre-built container settings with: image
  8. Click Save and wait until versioning done.

App Engine

With App Engine (Standard) we deploy the web version of our product.

The steps to deploy is:

  1. Open Cloud Shell, then type commands below:

    $ mkdir wep-app
    $ cd wep-app
    $ git clone https://github.com/HiWaste/web-app.git
    $ cd wep-app
  2. Create two files: app.yaml and main.py, using commands:

    $ sudo touch app.yaml
    $ sudo touch main.py

    Fill the app.yaml with this and main.py with this.

  3. In root project:

    $ cd hiwaste_web
    $ sudo vim settings.py
  4. In settings.py, search ALLOWED_HOST = [], then chage as:

    ALLOWED_HOST = ["*"]

    Save settings.py.

  5. Return to root project:

    $ cd ..
  6. Test the web before deploy, with steps:

    $ virtualenv env
    $ source env/bin/activate
    $ pip install -r requirements.txt
    

    Wait until the dependencies is installed, then type:

    $ python3 manage.py runserver

    Click web preview on Cloud Shell, change port with: 8000, then click Change and Preview. If the web running as well it's time to deploy!

  7. Deploy time!

    Press Ctrl + C to stop web preview and then type:

    $ gcloud app deploy

    And select the region and wait until done.

  8. Result: https://cosmic-quarter-312712.et.r.appspot.com/product/3

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages