How to get Python Django Flask Developer Suit on GCP
(Google Cloud Platform)
This section describes how to launch and connect to Python Django Flask Developer Suit in a Google Compute environment using the available Cloud Launcher
- Open Python Django Flask Developer Suit listing on GCP Marketplace
- Click Launch.
- Select a zone where you want to launch the VM(such as us-east1-)
- Optionally change the number of cores and amount of memory. ( This defaults to 1 vCPUs and 3.5 GB ram)
- Optionally change the boot disk type and size. (This defaults to 'Standard Persistent Disk' and 15 GB respectively)
- Optionally change the network name and subnetwork names.
Be sure that whichever network you specify has ports 22 (for ssh), 3389 (for rdp), 80 (for HTTP) and 443 (for HTTPS) exposed.
- Click Deploy when you are done.
Python Django Flask Developer Suit will begin deploying.
- A summary page displays when the compute engine is successfully deployed. Click on the Instance link to go to the instance page .
- On the instance page, click on the "SSH" button, select "Open in browser window".
- This will open SSH window in a browser.
- Run below command to set the password for "ubuntu" user
sudo passwd ubuntu
- Now the password for ubuntu user is set, you can connect to the VM's desktop environment from any local windows machine using RDP protocol.
- To connect using RDP via Windows machine, first note the external IP of the VM from VM details page as highlighted below
- Then From your local windows machine, goto "start" menu , in the search box type and select "Remote desktop connection"
- In the "Remote Desktop connection" wizard, paste the external ip and click connect
- This will connect you to the VM's desktop environment. Provide "ubuntu" as the userid and the password set in step 6 to authenticate. Click OK
- Now you are connected to the out of box Python Django Flask Developer Suit environment.
- For connecting via Web Interface, SSH to the VM as shown in Step 4 and run below command-
Note down auto-generated password.
Note: If the password is empty in the file, wait for 2 minutes and check again.
- Once the vm is up and running, you can access Visual Studio Code by going to https://VM_Public_IP
Make sure you type https and not http.
- You will see certificate warning, accept the warning to proceed for login
- Use above auto-generated password from Step 13
Note: If you happen to see a blank screen in the browser after login or page load error, wait for 1-2 minutes and open again in new browser window to see VSCode load.