The Future with Google Compute engine P2
Tags: webdev, cloud, beginners, programming
Published: 2023-04-10 04:58:25

# Welcome to this blog! 
I’m Navjot and today’s lesson we will cover **_cloud computing_** in more detail this time, with a coding example. In the previous blog post, we learned about compute engine and how to create a custom virtual machine. In this new blog post, we will be expanding on the previous example and are creating a new project which will be a server on the virtual machine that lets us display a simple site.

Before we get into the example its important to review a few things. We will be using **remote desktop connection** to connect to a virtual machine note because I am using a windows machine I will not be covering how to do so on a different OS. As a refresher remote desktop connection is a feature that allows users to connect to another computer or in this case a virtual machine **remotely** over a network or internet. It is particularly useful to troubleshoot, test, and run software and applications remotely.

We are using **PowerShell** in this example because the Virtual machine is *brand-new* and only has the very basics downloaded, there are pre-built solutions as mentioned in the last blog post which may be more desirable as they have several more niche programs to help with development if it aligns with your goal.

1. First step is to create a new project and you can name this whatever you would like.

2. Second step is to create a custom virtual machine, for the name, zone, and region you can keep the default options. For the boot disk you should choose the following options: 
![Boot Disk Settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b38m7tf126p69l1aupgx.png)
lastly for the firewall options check the box to allow HTTP traffic.

3. The next step is to set up a remote desktop connection so that you can connect to your newly created virtual machine. Navigate to VM instances and go to the connect options.
![Remote Desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fhkeuxde29dm0xoa5f73.png)
set a password, and verify the user account, after that is done you have to download an RDP file then open it up, it will prompt you for the earlier password which you enter, after entering it you will connect to the virtual machine via the remote desktop connection.

4. Now we have to set the virtual machine up to run the website. To do this PowerShell must be run as administrator, and we have to download IIS (Internet Information Services) services the three following lines must be typed in to do so.
![IIS setup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vdjpvqcbecv4cfn2pov.png)
The first two lines are important to set the virtual machine up as a server and the last one will display the message within the html document using the echo command. 

5. Last step is to minimize the remote desktop window and go back to the VM instances and paste the external IP that is shown into the address bar and you should see the message.
![Server works](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wsw9hmb3gn6tl9f8djyt.png)
And voila it works. This can be taken further as the base is there with the functioning web server and it can be repurposed to host a web application. To do this you would have to download and install the necessary software and text editor/ IDE because again the virtual machine is brand new and will not have those things installed and of course code, test, and design your application.

In the example we set up **Internet Information Services** which is an application made by Microsoft to host Windows servers making it crucial yet extremely easy step.

As demonstrated in this example it was super easy to set up the VM which again can be customized and scaled up or down to match whatever our needs are as developers. 

One thing to note is that this example was made using just compute engine which excels at creating servers and hosting it could have been done more efficiently if we were to use googles other cloud services. **App engine** is great for developing web applications and supports the use of many programming languages like Python, Java, Node, and Php to name a few. **Cloud SQL** is used to manage relational databases and can be used with MySQL, PostgreSQL, or SQL Server. When used together these cloud services can create an easily scalable and complex application which they can easily do.

Cloud computing over the years has become wildly popular and you can see why by moving everything online, and by using the computing resources from a provider like Google many hardware limitations effectively fade out and allow for exponentially more freedom when developing things and has given birth to a lot of cool things. 

Cloud computing has allowed different things to be abstracted creating very unique models for services. Infrastructure as a service (**IaaS**)such as compute engine where you can create virtual machines and use them to host servers. Platform as a service (**PaaS**) like Heroku which allows people to develop and manage applications which abstracts the infrastructure part so developers don't have to worry about it. Software as a service (**SaaS**) a popular example would be like GitHub how data is stored and shared to others through.