Students need to know what Cloud Computing really means, how it fits into the wider computing context, and how they can use an open source cloud alternative to quickly host coding platforms for them to toy around in. This activity sets out to do all of this as a walkthrough learn-as-you-go tutorial.

Prerequisite Knowledge

Command line skills and Beginner Git experience (git activity 1)

Learning Objectives

Understand what Cloud / Utility Computing is

Be able to quickly spin up an app in an online PaaS environment

Learn the context of SSH and URLs and components of online applications

Background:

What is the rational for this activity?

Students need to know what Cloud Computing really means, how it fits into the wider computing context, and what the different types are (IaaS, PaaS, SaaS). Students can dig into PasS, as a powerful development platform - and understand how quickly, easily, and powerfully they can spin up new applications. Gone are the days of having to setup a physical server, know the details on how to setup the OS, fiddle with the kernel, setup web-servers (Apache), databases (Postgres, Mysql), and middle-ware micros-services (AMQP Message busses, JBoss Fuse, Apache Camel). In a PaaS environment like OpenShift, the developer just fires up an instance of whatever pieces they want, and start coding. Seriously - its that easy. Of course, the developer has to know how to develop in said language or platform, but it makes development considerably easier by removing focus from lower layers. Basically, those lower layers (most mentioned above) are automated away by the PaaS platform.

We need an activity that can show students, step-by-visual-step, how to start up a new coding environment and actually code a small chunk of working software on Openshift. Make it something sexy, like Node.js. Make it an effective piece of code (contact someone within red hat for advise) and it would be even more amazing.

Directions:

You may have heard of Software as a Service (SaaS), or Cloud Computing before. Examples of SaaS are that of Google Docs, Twitter, DropBox. Another flavor of Cloud Computing is Platform as a Service (PaaS). This cloud-hosted service allows developers to program apps and functionality in an easy to grasp and scale and demo online environment. You can push stuff live very quickly, and you dont have to worry about backup or the Operating System, or getting database services running. Your infrastructure and coding platform are pre-taken-care-of. You just code your app. Lets go signup for one and start a simple blog app.

Overview

Here are the major steps you will implement:

Get OpenShift Online account

Quick Setup

Quick Win - Start Wordpress

Setup Wordpress Instance

Instance launched

Startup / Use Wordpress

Get OpenShift Online account

One such PaaS provider (amongst many) is Red Hats OpenShift. Other examples are Heroku, Google AppEngine, Engineyard, Microsoft Azure, VMWare's CloudFoundry. The list goes on. However, one of the cool things bout OpenShift is that its open sourced. You will remain free to move your code and environment to other vendors within OpenShift. Say that Red Hat starts charging too much - many vendors can be implementing the same environment,allowing you to easily move (at least, more easily than proprietary solutions). Alternatively, you could take OpenShifts code and implement your own PaaS server, on your computer at home. Only those whose source code is open sourced can claim this.

If you know what a public key is, and you have one on your existing machine, go ahead and enter it here

This will allow you to extremely easily access the SSH command line of your virtual app

We will touch on it in a later activity

Quick Win - Start Wordpress

Lets actually do something with OpenShift! Wordpress is an open source blogging platform. They have an online SaaS offering (Software as a Service), and you can also implement your own instance of wordpress to operate and customize your own blog. You might operate your own if you want to customize the looks of it, or add custom functionality via plugins (which there thousands of), or if you just want to be in control of your data. Lets go.

Click on the Applications tab

If you have not started an app already, click the text Create your first application now

A list of applications, coding platforms, coding languages, and middleware appear in a large grid / list.

The choice for one or a handful of users wont make a different - a few milliseconds

However, if you think hundreds of users will access your application from the west coast, or europe, you can change this here

Ok, FINISH IT:

After filling out what is needed, click Create Application

This could take 1-5 minutes, depending on how trafficked the web is currently

Basically you are starting up a new virtual machine and installing a few applications - so it takes time

Note: this slowness may also be a bug of the web interface; when doing this via the command-line, it is often quicker

Instance launched

Change the code?

The next page asks "Will you be changing the code of this application?"

In this activity, we will not be, so you select Now now, continue

However, lets discuss the other options and what this means

If you selected "Yes, help me get started", it brings up some additional prompts explaining that Git is used to sync code, and that you can get interactive SSH shell access to the command line of this virtual app box.

To do this, you would need to setup a public SSH keypair

This is involved, and we wont handle it here; however, know that it exists

Finally, you see the Instance page for this new Wordpress app you have started!

You can see that the PHP and MySQL cartridges were started, and you are even given the login/passwords for these.

RECORD THESE CREDENTIALS, as you will use them later

It tells you what was started, what gears are involved, what location it is hosted at, how many gears it takes (its size), and how much storage it is allotted, amongst other info

You can always visit this Instance Info page once wordpress is running

Technically, this costs someone money; Red Hat is paying for this via Amazon

If you find youself not using it anymore, Delete the application... / Shut it down; Dont waste resources; Recycle; All that jazz!

Startup / Use Wordpress

Now lets actually see our Wordpress Instance running and quickly set it up, so that we can get to a genuinely useful screen (making a new blog, seeing existing blogs).

Multiple creative uses explained for coding applications, and building web platforms; Mentioning of Git being useful because it allows easy open source code insertion

Comments:

What should the instructor know before using this activity?
Instructor should understand what Cloud Computing is; If not, the pre-readings are necessary for the instructor.
It would be useful for instrcutor to step through the instructions and create an app themselves.

What are some likely difficulties that an instructor may encounter using this activity?
Grading the activity may be subjective and note reflective of student effort since much of the effort goes into implementing the Wordpress app, but then they are graded on the blog they post that recaps what they did.

Additional Information:

Knowledge Area/Knowledge Unit

What ACM Computing Curricula 2013 knowledge area and units does this activity cover? ACM_Body_of_Knowledge