Skip to content

Setting Up VM on Google Cloud

Bryan Runck edited this page Feb 10, 2022 · 3 revisions

Google Cloud

  • Go to https://cloud.google.com
  • Login > console > Menu Bar Left Side
  • In menu > compute engine -- should show VM instances
  • Create Instance
  • Name: flaskapi
  • Select smallest RAM / CPU possible for demo
  • Bootdisk: any Ubuntu
  • Firewall: Allow HTTP and HTTPS traffic
  • Click create

Next, we need to allow network access to the VM. For learning purposes, we will allow all IP addresses the option to connect.

  • Menu Bar Left Side > VPC Network
  • Reserve External IP: VPC Network > External IP address > click reserve for flaskapi instance

Next create firewall rules

  • Menu Bar Left Side > VPC Network > Firewall
  • Create Firewall Rule
  • Title: flaskapi
  • Targets: all instances in network
  • Source IPv4 Source Ranges > 0.0.0.0/0 (insecure for learning purposes only)
  • Specified ports and protocols: select TCP > 5000
  • Save

Finally, go SSH into the web server, clone the repo, cd into the web server directory, and run bash web_server_setup.py.

Clone this wiki locally