Open main menu

CDOT Wiki β

Changes

Scripting Compatibility for Current OPS235 labs: (Week-by-week)

1,420 bytes removed, 19:11, 23 January 2015
no edit summary
{|cellpadding="15" width="100%"
|-
|<blockquote><blockquote>'''Example of a more sophisticated shell script demo''':<br>[ [https://scs.senecac.on.ca/~murray.saul/report3.bash report3.bash] ]<br>'''Result:''' [ [https://scs.senecac.on.ca/~murray.saul/installation_report.html installation_report.html] ]<br><br>'''Scripting Skills:'''<blockquote><ul><li>'''if''' statement</li><li>'''exit''' command</li><li>USER '''Environment Variable'''</li><li>'''redirection''' (both &gt; and &gt;&gt;)</li><li>'''for''' loop</li><li>'''Command Substitution'''</li><li>'''positional parameters'''</li><li>'''sed'''</li><li>'''zenity'''</li></ul></blockquote>'''Scripting Skills Match:'''<br>[ [https://docs.google.com/document/d/1CvdVdzUljH3ubcPFc6diSD3fnlMvVF59IOwTs-uA_r0/edit?usp=sharing ULI101] ] [https://docs.google.com/document/d/1UkrR9Bi431BEyWz7iTUIlIg1ycdqJTwwzHfbLkBdYnQ/edit?usp=sharing OPS235] ]<br>[ [https://docs.google.com/document/d/17nTZZEg6rPYZT-rGiC2MHrz7TVHTw8aIMIvE6tqHnUk/edit?usp=sharing ops335] ] [ [https://docs.google.com/document/d/1RP_1QjQkKrvV8BLGRoglVZAg4v8Y1Bquuo7aVkS8glg/edit?usp=sharing OPS435] ]<br><br>'''Practical Consideration for scripting in lab1:<br><blockquote>''' Students use '''wget''' to download existing shell script and run it to see what happens. Students are '''encouraged to view contents of more advanced shell script(s)''', to see where the commands are being used (from previous shell script), but are '''not required to understand more complex elements''' of these shell scripts.<br><br></blockquote></blockquote>
|[[Image:report3_1.png|thumb|left|275px|When executed as '''root''' or using '''sudo''' command, generate HTML and JavaScript code and launches in Firefox]]
|[[Image:report3_2.png|thumb|left|275px|Note in web-browser, user can click "expandable" areas to view detail, or "collapse" to original form.]]
{|cellpadding="15" width="100%"
|-
|<blockquote><blockquote>Example of Shell Scripts:<br><ul><li>'''Using virsh (Virtual Shell):''' [ [https://scs.senecac.on.ca/~murray.saul/vm-start.bash vm-start.bash] ] [https://scs.senecac.on.ca/~murray.saul/vm-stop.bash vm-stop.bash] ]</li><li>'''Backing up VMs:''' [ ] (to be created)</li></ul><br><br>'''Scripting Skills:'''<blockquote><ul><li>'''if''' statement</li><li>'''for''' loop</li><li>'''Command Substitution'''</li><li>Advanced '''awk'''</li><li>'''positional parameters'''</li><li>'''sed'''</li><li>'''IO Stream vs Graphical Interaction''' (eg. zenity)</li><li>'''Scripting Samples (View and adapt)'''- don't "re-invent the wheel completely")</li><li>'''virsh''' command</li></ul></blockquote>'''Scripting Skills Match:''' [ [https://docs.google.com/document/d/1CvdVdzUljH3ubcPFc6diSD3fnlMvVF59IOwTs-uA_r0/edit?usp=sharing ULI101] ] [https://docs.google.com/document/d/1UkrR9Bi431BEyWz7iTUIlIg1ycdqJTwwzHfbLkBdYnQ/edit?usp=sharing OPS235] ]<br>[ [https://docs.google.com/document/d/17nTZZEg6rPYZT-rGiC2MHrz7TVHTw8aIMIvE6tqHnUk/edit?usp=sharing ops335] ] [ [https://docs.google.com/document/d/1RP_1QjQkKrvV8BLGRoglVZAg4v8Y1Bquuo7aVkS8glg/edit?usp=sharing OPS435] ]<br><br>'''Practical Consideration for scripting in lab2:<br><blockquote>''' Students use '''wget''' to download existing shell script and run it to see what happens. Students are '''encouraged to view contents of more advanced shell script(s)''', to see where the commands are being used (from previous shell script), but are '''not required to understand more complex elements''' of these shell scripts.<br><br>|[[Image:lab2-script-1.png|thumb|left|275px175px|When executed as '''root''' or using '''sudo''' command, provides VM status and opportunity to '''start''' VMs]]|[[Image:lab2-script-2.png|thumb|left|275px175px|When executed as '''root''' or using '''sudo''' command, provides VM status and opportunity to stop '''running''' VMs]]
|}
:: This lab deals with software installation and introduction to LVM. Not certain shell scripting would benefit software installation with yum, since can use yum to install multiple instances of software. On the other hand, would be useful to expose students to '''shell scripts that manage LVM for practical situations''' (i.e. case scenarios - real world situations). Should consult with professors and industry SMEs to provide good examples of scripts involving LVM. LVM scripting example should be included in this lab since lab4 is a big lab and keeps students very involved.<blockquote><blockquote>OPS435 Elements (Scripting Demo Contents):<blockquote><ul><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li><li>x</li></ul></blockquote><br><br>Example of Shell script Demo 1 (untested): [ [[lab3 Shell Script Demo 1|x.bash]] ] (to be created)<br></blockquote></blockquote>
::'''Scripting Skills Match:''' [ [https://docs.google.com/document/d/1CvdVdzUljH3ubcPFc6diSD3fnlMvVF59IOwTs-uA_r0/edit?usp=sharing ULI101] ] [https://docs.google.com/document/d/1UkrR9Bi431BEyWz7iTUIlIg1ycdqJTwwzHfbLkBdYnQ/edit?usp=sharing OPS235] ] [ [https://docs.google.com/document/d/17nTZZEg6rPYZT-rGiC2MHrz7TVHTw8aIMIvE6tqHnUk/edit?usp=sharing ops335] ] [ [https://docs.google.com/document/d/1RP_1QjQkKrvV8BLGRoglVZAg4v8Y1Bquuo7aVkS8glg/edit?usp=sharing OPS435] ]<br><br>'''Practical Consideration for scripting in lab3:''' Do students create simple bash shell script, add elements, then have them copy and paste, then run this more complex script? Is lab2 too long for scripting element to be included? Key elements of scripting elements should be contained in information boxes in lab. Should midterm and/or final exam contain a scripting question? (recommended)<br><br>
== Lab 4:==
13,420
edits