I recently had the opportunity to introduce first-time Cloud Computing students to a first-hand experience of what it means to work with a IaaS Provider.
The goals of the hands-on session was the following:
- Provision a Virtual Machine for each of the students.
- Allow the students to SSH into their respective VMs.
- Deploy one of the following:
- Apache Web Server with a web site
- Node.js application
- No installing any tools/runtimes on the participant machines. A browser is all they have.
I grappled with what would be a quick way to not just demonstrate an IaaS platform but also give practical experience to each of the students. Keep in mind that none of the students are in a position to sign up with their credit card, so that does not work.
I went with the Google Cloud Platform and specifically Google Compute Engine. I had my account with Google Cloud Platform and decided to use up some of my credits for the benefit of the students. If you are looking to do the same for any class of 15-20 participants to whom you want to give access for about 2-3 hours, I will highlight the process that worked for me.
The steps are given below:
Create the Project
Assuming that you have a Google Cloud Platform account and are the Administrator/Owner, create a separate project via the Developers Console. This helps to manage the resources and does not mix things up with any of your other projects. The billing statement will also allow you to see what happened in that project.
While creating the project above, link it to the Billing Account that you want to get charged for.
Collect participant Google Account emails
I created a Google Sheet, where I asked the participants to give their Google Account IDs.
Add each Participant as Project Member
Once the participants gave their Google account ids, I added each one of them as a member of the project.
To do that, follow these steps:
- Go to your project in the Developer Console.
- Navigate to Permissions in the left menu. You will see a list of accounts on the right side. On top will be your account and the role will be that of Owner.
- Go ahead and add each participant by clicking on Add Member . Add their account email address and ensure that their permission is to Can Edit as shown below:Click on Add to create the project member. Do that for each of the participants. Each of the participants will receive an invitation email to work on the project. They can accept that and they will be lead to the project.
Now that the participants are setup with the project, the next set of instructions (given to them as a hands-on exercise) were as follows:
Create the VM
Each participant was told to go to Compute –> Compute Engine –> VM Instances and click on Create Instance to provision a VM for themselves. They were guided to do the following:
a) Name the VM as the name-01
b) Select the option for allowing HTTP Traffic. I already created a HTTP Network Rule to allow traffic on port 80.
c) Go with defaults for all the other fields. I explained them in the class what each of the fields are.
d) Finally, click on Create to create the instance and get it in a running state.
SSH into the VM
The participants can see their VM listed in the list of VM Instances. All they need to do is click on the SSH button for each instance and the browser based SSH client will kick in. This worked like a charm.
Deploy their Application
Once they were logged in, I provided them with simple instructions to update the OS, install git, apache, node, npm, etc and then clone the projects directly from Github. Instructions to configure and run the applications were also provided. The intent of this hands-on was to get them comfortable with the VM, etc and deploying the app and not about writing the application.
Explore other services
The participants can then explore other services too like Storage, Cloud SQL and more. Since they have been given “Can Edit” permissions, they can provision the other services too.
Remember to Clean up
Finally, it is important to clean up the resources, so that your charges are kept to a minimum. Do delete off all the instances, disks and any other stuff that the participants setup. Finally delete off the project.
Hope this helps. Do let me know if you have used any other useful methods of doing the same with a class of 25-30 participants, especially if they are not able to sign up with their own credit card. Remember I did want to allow them to explore the Developers console and try out provisioning stuff beyond just Compute Engine VM Instances.