Instantly Run An App in the Cloud 2

From Foss2Serve
(Difference between revisions)
Jump to: navigation, search
(added blog and started editing meta data)
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
{| border="1"
+
 
|-
+
{{Learning Activity Overview
|'''Title''' || Instantly Run An App in the Cloud Using OpenShift Part 2
+
|title=
|-
+
Commandeer the command line power of OpenShift
|'''Overview''' || 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.
+
|overview=
|-
+
A follow-on to teaching students about creating apps in an online open source cloud environment - OpenShift. This time students focus on command-line driven tools, and the backends of building and deploying new application code via git.
|'''Prerequisite Knowledge''' ||
+
|prerequisites=
 
* [[Instantly_Run_An_App_in_the_Cloud]]
 
* [[Instantly_Run_An_App_in_the_Cloud]]
* Command line skills
+
* [[Intro to GitHub (Activity)]] - Beginner Git experience (git activity 1)
* [[Git_Activity]] - Beginner Git experience (git activity 1)
+
|objectives=
|-
+
* Give instructor SSH access
|'''Learning Objectives''' ||
+
* Install and run "rhc" command-line client tool
* Understand what Cloud / Utility Computing is
+
* Understand behind-the-scenes workflow of "git push"
* Be able to quickly spin up an app in an online PaaS environment
+
* Add custom build and deployment code
* Learn the context of SSH and URLs and components of online applications
+
* Synchronize Local and Live Environments (Test vs Prod)
|}
+
|process skills=
 +
}}
  
[[File:WordpressOpenShift.png|500px]]
+
[[File:build_phase.png|200px]]
  
=== Background: ===
+
----
What is the rational for this activity?
+
  
See [[Instantly_Run_An_App_in_the_Cloud]]
+
=== Background ===
  
Background readings:
+
''What is the rational for this activity?''
  
* What is Cloud Computing? http://csrc.nist.gov/publications/nistpubs/800-145/SP800-145.pdf
+
This second portion of the cloud app activity goes a little deeper and focuses on de-facto technologies like ssh / shell-access and git / github. Students will now take their new-found knowledge of the cloud paradigm and start to understand how it can link to a more technically flexible solution set. They can now customize their apps via editing and pushing code via a git publication process.
* Read about Cloud Computing paradigm and deployment patterns. http://www.pcmag.com/article2/0,2817,2372163,00.asp
+
* Read about open sources role in cloud computing. http://opensource.com/business/13/1/future-cloud-computing
+
* Read about PaaS. http://www.thoughtsoncloud.com/2014/02/what-is-platform-as-a-service-paas/
+
* Read about Node.js http://blog.langoor.mobi/node-js-mobile-web-apps/
+
  
 +
You will want to have already stepped through this preceding activity: [[Instantly_Run_An_App_in_the_Cloud]]
  
=== Directions: ===
 
  
http://code.tutsplus.com/tutorials/running-wordpress-on-openshift-part-2--cms-19947
+
=== Directions ===
  
 +
==== Give Instructor SSH Access: ====
 +
In order to fully inspect your work, the instructor will need access to your SSH shell that you created.
 +
You do not, however, want to give your same private key away. You could, but it is not the best industry practice.
 +
Instead, you will want to setup access for the instructors Username and his particular Public Key.
 +
Given a Public Key and username access, the instructor can get in with their secret Private Key.
  
 +
You are encouraged to look up instructions on the web or help each other in the classroom.
  
=== Deliverables: ===
+
You will need:
What will the student hand in?
+
<pre>
 +
- THE INSTRUCTORS USERNAME
 +
- THE INSTRUCTORS PUBLIC KEY
 +
</pre>
  
 +
Instructor will need:
 +
<pre>
 +
- YOUR APP'S URL or IP ADDRESS
 +
</pre>
 +
 +
Do this early, so that you can work through issues. Undoubtedly there will be issues and a need to troubleshoot them. You will be graded on your ability to navigate these issues early.
 +
 +
===== Ensure proper file access rights =====
 +
Additionally, assure that the user you create for your instructor has the right file and directory access privileges.
 +
* Hint: learn about and use the '''chmod''' command
 +
* Read http://www.grymoire.com/Unix/Permissions.html or something like it.
  
=== Assessment: ===
 
How will the activity be graded?
 
 
How will learning will be measured?
 
  
Include sample assessment questions/rubrics.
+
==== OpenShift Tutorial 2 ====
 +
Priorly, we setup Wordpress blogging software and used it. Now we will dive into more usage of the command line, specifically the '''rhc''' command, and what occurs when new code is added via git push. Additionally we will learn how to run it all on your local laptop, so that you can test and develop in a safe environment before you push it live (into production).
  
 +
Follow this tutorial:
 +
* <font size="4">http://code.tutsplus.com/tutorials/running-wordpress-on-openshift-part-2--cms-19947</font>
 +
** Optional: Step 6 - SSL Setup
 +
* Take screenshots as you go
 +
** These will be used in your blog hand-in
 +
** Annotate them to make emphasis clear
 +
 +
 +
----
 +
 +
 +
=== Deliverables: ===
 +
# Get instructor access to your applications SSH shell, so that they can check your work.
 +
# Create another blog post, with public URL, that tells:
 +
## What troubles or more info you came across
 +
##* This 2nd edition was much more technical and likely lead to some troubleshooting.
 +
##* Tell a small story; 1-2 paragraphs.
 +
## Your understanding of what steps OpenShift implements when you do a simple "git push"
 +
##* This is the build and deploy process
 +
##* Talk about what you added to customize the build process
 +
## The pro's and con's of synchronizing to a Local / Test coding environment
 +
##* Why might you want to do testing locally on your laptop, instead of out on the Live / Production cloud app?
 +
##* Is the process given in the tutorial cumbersome? Could you find anything better?
 +
 +
=== Assessment: ===
 
{| border="1" class="wikitable"
 
{| border="1" class="wikitable"
 
! Criteria
 
! Criteria
 
! Level 1 (fail)
 
! Level 1 (fail)
 
! Level 2 (pass)
 
! Level 2 (pass)
! Level 3 (good)
+
! Level 3 (exceptional)
! Level 4 (exceptional)
+
 
|-
 
|-
| '''The purpose of the project'''
+
| '''Give instructor SSH access'''
|  
+
| No access; Didnt attempt
|  
+
| Instructor can login but may not have access to files
|
+
| Instructor can login and proper user access is given
|
+
  
 
|-
 
|-
| '''Why the project is open source'''
+
| '''Understand behind-the-scenes workflow of "git push"'''
|  
+
| No explanation in blog about this
|  
+
| Explanation in the blog of the five steps
|  
+
| Explanation in the blog of the five steps and which files can be customized and when they are triggered (hooked)
|  
+
 
 +
|-
 +
| '''Add custom build and deployment code'''
 +
| Hook files not edited or working
 +
| Customized '''action_hooks''' files that are documented in the blog writeup
 +
| Customized '''action_hooks''' files that are documented in the blog writeup and that tried something *different* from what the tutorial did
 +
 
 +
|-
 +
| '''Synchronize Local and Live Environments (Test vs Prod)'''
 +
| No explanation in blog
 +
| Explanation in blog telling the pro's and con's of this method
 +
| Explanation in blog telling the difference between Testing and Production, why this is beneficial, and what other methods might be available or better/worse
  
 
|}
 
|}
Line 74: Line 121:
 
=== Comments: ===
 
=== Comments: ===
 
What should the instructor know before using this activity?
 
What should the instructor know before using this activity?
 +
* Instructor should become familiar with the SSH public/private access mechanism
  
 
What are some likely difficulties that an instructor may encounter using this activity?
 
What are some likely difficulties that an instructor may encounter using this activity?
 +
* Getting yourself SSH access to each students application shell may prove to be some upfront work for yourself
 +
** Make it clear to students that you want this done early (give them a deadline)
 +
** Grade them on this
 +
** Work through it with them; Give them feedback so that they can troubleshoot
 +
** This is a very realistic professional situation:
 +
***Not a lot of direction
 +
***given an end-goal
 +
***need to work with another person (you)
 +
***explorative troubleshooting is likely
 +
* Assure that YOU are crystal clear with sharing SSH access
 +
** Practice it with another teacher or colleague or system
 +
** Otherwise, you could be doing something wrong on your end, and the students wont be able to properly troubleshoot
  
  
=== Additional Information: ===
+
=== Additional Information ===
{| border="1"
+
|-
+
|'''Knowledge Area/Knowledge Unit''' || What ACM Computing Curricula 2013 knowledge area and units does this activity cover? [[ACM_Body_of_Knowledge]]
+
|-
+
|'''Topic''' || What specific topics are addressed? The Computing Curriucula 2013 provides a list of topics - https://www.acm.org/education/CS2013-final-report.pdf
+
|-
+
|'''Level of Difficulty''' || Is this activity easy, medium or challenging?
+
|-
+
|'''Estimated Time to Completion''' ||  How long should it take for the student to complete the activity?
+
|-
+
|'''Materials/Environment''' || What does the student need?  Internet access, IRC client, Git Hub account, LINUX machine, etc.?
+
|-
+
|'''Author''' || Who wrote this activity?
+
|-
+
|'''Source''' || Is there another activity on which this activity is based?  If so, please provide a link to the original resource.
+
|-
+
|'''License''' || Under which license is this material made available? (http://creativecommons.org/licenses/)
+
|}
+
  
 +
{{Learning Activity Info
 +
|acm unit=
 +
PD. Parallel and Distributed Computing / PD - Cloud Computing, PBD - Platform-based Development / PBD Web Platforms
 +
|acm topic=
 +
Cloud services , Infrastructure as a service, Web programming languages (e.g., HTML5, Java Script, PHP, CSS)  , Web platform constraints
 +
|difficulty=
 +
Difficult
 +
|time=
 +
5-6 hours
 +
|environment=
 +
What does the student need?  Internet access, Wordpress application from prior activity, Their own laptop with shell access
 +
|author=
 +
[https://www.linkedin.com/in/nickyeates Nick Yeates], Vinh Quốc Nguyễn
 +
|source=
 +
http://code.tutsplus.com/tutorials/running-wordpress-on-openshift-part-2--cms-19947
 +
|license=
 +
{{License CC BY}}
 +
}}
  
=== Suggestions to Open Source Mentors: ===
+
=== Suggestions to Open Source Mentors ===
 
Suggestions for an open source community member who is working in conjunction with the instructor.
 
Suggestions for an open source community member who is working in conjunction with the instructor.
 +
* Does your project utilize the linux command line and do you SSH into boxes?
 +
** Explain to students how important these basic command-line skills are in developing today.
 +
* Does your project or professional life use the concept of "Testing" and "Production"
 +
** Explain to students how this is a separation that many project use in differing degrees and ways
  
 
+
[[Category:Learning Activity]]
--------------------
+
[[Category:Introduction]]
This work is licensed under a
+
[[Category:Communication and Tools]]
[http://creativecommons.org/licenses/by-sa/4.0/ Creative Commons Attribution-ShareAlike 4.0 International License]
+
[[Category:Use and Evaluate]]
 
+
[[Category:Good Draft]]
[[File:CC_license.png]]
+
 
+
[[Category: Learning_Activity]]
+
[[Category: LEARNING_ACTIVITY_SUBCATEGORY]]
+

Latest revision as of 00:21, 8 September 2018


Title

Commandeer the command line power of OpenShift

Overview

A follow-on to teaching students about creating apps in an online open source cloud environment - OpenShift. This time students focus on command-line driven tools, and the backends of building and deploying new application code via git.

Prerequisites
Learning
Objectives
After successfully completing this activity, the learner should be able to:
  • Give instructor SSH access
  • Install and run "rhc" command-line client tool
  • Understand behind-the-scenes workflow of "git push"
  • Add custom build and deployment code
  • Synchronize Local and Live Environments (Test vs Prod)
Process Skills
Practiced


Build phase.png


Background

What is the rational for this activity?

This second portion of the cloud app activity goes a little deeper and focuses on de-facto technologies like ssh / shell-access and git / github. Students will now take their new-found knowledge of the cloud paradigm and start to understand how it can link to a more technically flexible solution set. They can now customize their apps via editing and pushing code via a git publication process.

You will want to have already stepped through this preceding activity: Instantly_Run_An_App_in_the_Cloud


Directions

Give Instructor SSH Access:

In order to fully inspect your work, the instructor will need access to your SSH shell that you created. You do not, however, want to give your same private key away. You could, but it is not the best industry practice. Instead, you will want to setup access for the instructors Username and his particular Public Key. Given a Public Key and username access, the instructor can get in with their secret Private Key.

You are encouraged to look up instructions on the web or help each other in the classroom.

You will need:

- THE INSTRUCTORS USERNAME
- THE INSTRUCTORS PUBLIC KEY

Instructor will need:

- YOUR APP'S URL or IP ADDRESS

Do this early, so that you can work through issues. Undoubtedly there will be issues and a need to troubleshoot them. You will be graded on your ability to navigate these issues early.

Ensure proper file access rights

Additionally, assure that the user you create for your instructor has the right file and directory access privileges.


OpenShift Tutorial 2

Priorly, we setup Wordpress blogging software and used it. Now we will dive into more usage of the command line, specifically the rhc command, and what occurs when new code is added via git push. Additionally we will learn how to run it all on your local laptop, so that you can test and develop in a safe environment before you push it live (into production).

Follow this tutorial:




Deliverables:

  1. Get instructor access to your applications SSH shell, so that they can check your work.
  2. Create another blog post, with public URL, that tells:
    1. What troubles or more info you came across
      • This 2nd edition was much more technical and likely lead to some troubleshooting.
      • Tell a small story; 1-2 paragraphs.
    2. Your understanding of what steps OpenShift implements when you do a simple "git push"
      • This is the build and deploy process
      • Talk about what you added to customize the build process
    3. The pro's and con's of synchronizing to a Local / Test coding environment
      • Why might you want to do testing locally on your laptop, instead of out on the Live / Production cloud app?
      • Is the process given in the tutorial cumbersome? Could you find anything better?

Assessment:

Criteria Level 1 (fail) Level 2 (pass) Level 3 (exceptional)
Give instructor SSH access No access; Didnt attempt Instructor can login but may not have access to files Instructor can login and proper user access is given
Understand behind-the-scenes workflow of "git push" No explanation in blog about this Explanation in the blog of the five steps Explanation in the blog of the five steps and which files can be customized and when they are triggered (hooked)
Add custom build and deployment code Hook files not edited or working Customized action_hooks files that are documented in the blog writeup Customized action_hooks files that are documented in the blog writeup and that tried something *different* from what the tutorial did
Synchronize Local and Live Environments (Test vs Prod) No explanation in blog Explanation in blog telling the pro's and con's of this method Explanation in blog telling the difference between Testing and Production, why this is beneficial, and what other methods might be available or better/worse

Comments:

What should the instructor know before using this activity?

  • Instructor should become familiar with the SSH public/private access mechanism

What are some likely difficulties that an instructor may encounter using this activity?

  • Getting yourself SSH access to each students application shell may prove to be some upfront work for yourself
    • Make it clear to students that you want this done early (give them a deadline)
    • Grade them on this
    • Work through it with them; Give them feedback so that they can troubleshoot
    • This is a very realistic professional situation:
      • Not a lot of direction
      • given an end-goal
      • need to work with another person (you)
      • explorative troubleshooting is likely
  • Assure that YOU are crystal clear with sharing SSH access
    • Practice it with another teacher or colleague or system
    • Otherwise, you could be doing something wrong on your end, and the students wont be able to properly troubleshoot


Additional Information

ACM BoK
Area & Unit(s)

PD. Parallel and Distributed Computing / PD - Cloud Computing, PBD - Platform-based Development / PBD Web Platforms

ACM BoK
Topic(s)

Cloud services , Infrastructure as a service, Web programming languages (e.g., HTML5, Java Script, PHP, CSS) , Web platform constraints

Difficulty

Difficult

Estimated Time
to Complete

5-6 hours

Environment /
Materials

What does the student need? Internet access, Wordpress application from prior activity, Their own laptop with shell access

Author(s)

Nick Yeates, Vinh Quốc Nguyễn

Source

http://code.tutsplus.com/tutorials/running-wordpress-on-openshift-part-2--cms-19947

License

This work is licensed under a Creative Commons Attribution 4.0 International License

CC-BY.png


Suggestions to Open Source Mentors

Suggestions for an open source community member who is working in conjunction with the instructor.

  • Does your project utilize the linux command line and do you SSH into boxes?
    • Explain to students how important these basic command-line skills are in developing today.
  • Does your project or professional life use the concept of "Testing" and "Production"
    • Explain to students how this is a separation that many project use in differing degrees and ways
Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox