<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2703847045961269472</id><updated>2012-03-16T05:46:00.901-07:00</updated><category term='SBR600'/><title type='text'>Andrew's SBR600 Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/-/SBR600'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/search/label/SBR600'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-6033691763043275947</id><published>2010-12-17T06:49:00.000-08:00</published><updated>2010-12-17T06:55:04.861-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>0.3 Release - Part 1</title><content type='html'>&lt;style type="text/css"&gt; @page { size: 8.5inch 11inch; margin-top: 1inch; margin-bottom: 0.5inch; margin-left: 1inch; margin-right: 1inch }  table { border-collapse:collapse; border-spacing:0; empty-cells:show }  td, th { vertical-align:top; }  h1, h2, h3, h4, h5, h6 { clear:both }  ol, ul { padding:0; }  * { margin:0; }  *.fr1 { font-size:12pt; vertical-align:top; text-align:center; margin-left:0.1299in; margin-right:0.1299in; background-color:#ffffff; padding:0.0102in; border-style:none; }  *.fr2 { font-size:12pt; vertical-align:top; text-align:center; margin-left:0.1299in; margin-right:0.1299in; background-color:#ffffff; padding:0.0102in; border-style:none; }  *.fr3 { font-size:12pt; vertical-align:top; text-align:center; margin-left:0in; margin-right:0in; background-color:#ffffff; padding-left:0.1102in; padding-right:0.1102in; padding-top:0.0602in; padding-bottom:0.0602in; border-style:none; }  *.Frame { font-size:12pt; vertical-align:top; text-align:center; }  *.Graphics { font-size:12pt; vertical-align:top; text-align:center; }  *.OLE { font-size:12pt; vertical-align:top; text-align:center; }  *.BalloonText { font-family:Tahoma; font-size:8pt; line-height:100%; text-align:left ! important; }  *.Caption { font-family:Calibri; font-size:9pt; line-height:100%; text-align:left ! important; margin-top:0in; margin-bottom:0.139in; color:#4f81bd; font-weight:bold; }  *.cmds { font-family:'Courier New'; font-size:11pt; line-height:130%; text-align:left ! important; color:#c00000; }  *.Contents1 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0in; margin-right:0in; text-indent:0inch; }  *.Contents10 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:1.7689in; margin-right:0in; text-indent:0inch; }  *.Contents2 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0.1665in; margin-right:0in; margin-top:0in; margin-bottom:0.0693in; text-indent:0inch; }  *.Contents3 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0.3335in; margin-right:0in; margin-top:0in; margin-bottom:0.0693in; text-indent:0inch; }  *.Contents4 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0.5898in; margin-right:0in; text-indent:0inch; }  *.Contents5 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0.7862in; margin-right:0in; text-indent:0inch; }  *.Contents6 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0.9827in; margin-right:0in; text-indent:0inch; }  *.Contents7 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:1.1791in; margin-right:0in; text-indent:0inch; }  *.Contents8 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:1.3756in; margin-right:0in; text-indent:0inch; }  *.Contents9 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:1.572in; margin-right:0in; text-indent:0inch; }  *.files { font-family:'Courier New'; font-size:12pt; line-height:130%; text-align:left ! important; color:#00b050; }  *.Footer { font-family:Calibri; font-size:12pt; line-height:100%; text-align:left ! important; }  *.Framecontents { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-top:0in; margin-bottom:0.0835in; }  *.Header { font-family:Calibri; font-size:12pt; line-height:100%; text-align:left ! important; }  *.Heading { font-family:Arial; font-size:14pt; line-height:130%; text-align:left ! important; margin-top:0.1665in; margin-bottom:0.0835in; }  *.Heading1 { font-family:Cambria; font-size:14pt; line-height:130%; text-align:left ! important; margin-top:0.3335in; margin-bottom:0in; color:#365f91; font-weight:bold; }  *.Heading2 { font-family:Cambria; font-size:13pt; line-height:130%; text-align:left ! important; margin-top:0.139in; margin-bottom:0in; color:#4f81bd; font-weight:bold; }  *.Heading3 { font-family:Cambria; font-size:12pt; line-height:130%; text-align:left ! important; margin-top:0.4165in; margin-bottom:0.0835in; color:#4f81bd; font-weight:bold; }  *.Heading4 { font-family:Cambria; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0in; margin-right:0in; margin-top:0.25in; margin-bottom:0in; text-indent:0.25inch; color:#4f81bd; font-style:italic; font-weight:bold; }  *.Heading5 { font-family:Cambria; font-size:12pt; line-height:130%; text-align:left ! important; margin-top:0.139in; margin-bottom:0in; color:#243f60; }  *.Heading6 { font-family:Cambria; font-size:12pt; line-height:130%; text-align:left ! important; margin-top:0.139in; margin-bottom:0in; color:#243f60; font-style:italic; }  *.Index { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; }  *.List { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-top:0in; margin-bottom:0.0835in; }  *.ListParagraph { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0.5in; margin-right:0in; text-indent:0inch; }  *.NoSpacing { font-family:Calibri; font-size:12pt; }  *.P1 { font-family:Calibri; font-size:12pt; line-height:100%; text-align:right ! important; }  *.P10 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0.1665in; margin-right:0in; margin-top:0in; margin-bottom:0.0693in; text-indent:0inch; }  *.P11 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0.3335in; margin-right:0in; margin-top:0in; margin-bottom:0.0693in; text-indent:0inch; }  *.P12 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; }  *.P13 { font-family:Cambria; font-size:26pt; line-height:100%; text-align:left ! important; color:#17365d; }  *.P14 { font-family:Calibri; font-size:10pt; }  *.P15 { font-family:Cambria; font-size:13pt; line-height:130%; text-align:left ! important; margin-top:0.139in; margin-bottom:0in; color:#4f81bd; font-weight:bold; }  *.P16 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; }  *.P17 { font-family:Calibri; font-size:12pt; }  *.P18 { font-family:Calibri; font-size:10pt; margin-left:0.5in; margin-right:0in; text-indent:0inch; }  *.P19 { font-family:Cambria; font-size:12pt; line-height:130%; text-align:left ! important; margin-top:0.4165in; margin-bottom:0.0835in; color:#4f81bd; font-weight:bold; }  *.P2 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; }  *.P20 { font-family:'Courier New'; font-size:11pt; line-height:130%; text-align:left ! important; color:#c00000; }  *.P21 { font-family:Calibri; font-size:12pt; }  *.P22 { font-family:'Courier New'; font-size:11pt; line-height:130%; text-align:left ! important; color:#c00000; }  *.P23 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; }  *.P24 { font-family:Calibri; font-size:10pt; line-height:130%; text-align:left ! important; }  *.P25 { font-family:'Courier New'; font-size:12pt; line-height:130%; text-align:left ! important; color:#00b050; }  *.P26 { font-family:Calibri; font-size:12pt; margin-left:0in; margin-right:0in; text-indent:0.5inch; }  *.P27 { font-family:Calibri; font-size:12pt; margin-left:0.5in; margin-right:0in; text-indent:0inch; }  *.P28 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0in; margin-right:0in; text-indent:0.5inch; }  *.P29 { font-family:Calibri; font-size:16pt; line-height:130%; text-align:center ! important; color:#000000; font-weight:bold; }  *.P3 { font-family:Cambria; font-size:12pt; }  *.P30 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; font-weight:bold; }  *.P31 { font-family:Calibri; font-size:11pt; line-height:130%; text-align:left ! important; color:#ffffff; font-weight:bold; }  *.P32 { font-family:Calibri; font-size:11pt; line-height:130%; text-align:left ! important; margin-top:0.0835in; margin-bottom:0.0835in; font-weight:bold; }  *.P33 { font-family:Calibri; font-size:11pt; line-height:130%; text-align:left ! important; margin-top:0.0835in; margin-bottom:0.0835in; font-style:italic; }  *.P34 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-top:0.0835in; margin-bottom:0.0835in; }  *.P35 { font-family:Calibri; font-size:11pt; line-height:130%; text-align:left ! important; margin-top:0.0835in; margin-bottom:0.0835in; }  *.P36 { font-family:Cambria; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0in; margin-right:0in; margin-top:0.25in; margin-bottom:0in; text-indent:0.25inch; color:#4f81bd; font-style:italic; font-weight:bold; }  *.P37 { font-family:'Courier New'; font-size:12pt; line-height:130%; text-align:left ! important; color:#00b050; }  *.P38 { font-family:'Courier New'; font-size:12pt; line-height:130%; text-align:left ! important; color:#00b050; }  *.P39 { font-family:Calibri; font-size:12pt; }  *.P4 { font-family:Cambria; font-size:40pt; color:#4f81bd; }  *.P40 { font-family:'Courier New'; font-size:12pt; line-height:130%; text-align:left ! important; color:#c00000; }  *.P41 { font-family:'Courier New'; font-size:11pt; line-height:130%; text-align:left ! important; color:#c00000; }  *.P42 { font-family:Cambria; font-size:12pt; line-height:130%; text-align:left ! important; margin-top:0.4165in; margin-bottom:0.0835in; color:#4f81bd; font-weight:bold; }  *.P43 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; }  *.P44 { font-family:Cambria; font-size:12pt; line-height:130%; text-align:left ! important; margin-left:0in; margin-right:0in; margin-top:0.25in; margin-bottom:0in; text-indent:0.25inch; color:#4f81bd; font-style:italic; font-weight:bold; }  *.P5 { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; }  *.P6 { font-family:Calibri; font-size:14pt; color:#4f81bd; font-weight:bold; }  *.P7 { font-family:Calibri; font-size:12pt; color:#4f81bd; }  *.P8 { font-family:Cambria; font-size:14pt; line-height:100%; text-align:left ! important; color:#365f91; font-weight:bold; }  *.P9 { font-family:Cambria; font-size:14pt; line-height:115%; text-align:left ! important; margin-top:0.3335in; margin-bottom:0in; color:#365f91; font-weight:bold; }  *.Quote { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; color:#000000; font-style:italic; }  *.Standard { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; }  *.Subtitle { font-family:Arial; font-size:14pt; line-height:130%; text-align:center ! important; margin-top:0.1665in; margin-bottom:0.0835in; font-style:italic; }  *.TableContents { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; }  *.TableHeading { font-family:Calibri; font-size:12pt; line-height:130%; text-align:center ! important; font-style:italic; font-weight:bold; }  *.Textbody { font-family:Calibri; font-size:12pt; line-height:130%; text-align:left ! important; margin-top:0in; margin-bottom:0.0835in; }  *.Title { font-family:Cambria; font-size:26pt; line-height:100%; text-align:left ! important; margin-top:0in; margin-bottom:0.2083in; color:#17365d; }  *.TOCHeading { font-family:Cambria; font-size:14pt; line-height:115%; text-align:left ! important; margin-top:0.3335in; margin-bottom:0in; color:#365f91; font-weight:bold; }  *.Sect1 { }  *.Sect2 { }  *.Table1 { width:5.3278in; float:none; }  *.Table2 { width:5.3278in; float:none; }  *.Table3 { width:6.6778in; margin-left:-0.0889in; }  *.Table1A1 { vertical-align:top; padding-left:0.0799in; padding-right:0.0799in; padding-top:0.15in; padding-bottom:0.15in; border-left-width:0.0353cm; border-left-style:solid; border-left-color:#808080; border-right-style:none; border-top-style:none; border-bottom-style:none; }  *.Table1A2 { vertical-align:top; padding-left:0.075in; padding-right:0.075in; padding-top:0in; padding-bottom:0in; border-left-width:0.0353cm; border-left-style:solid; border-left-color:#808080; border-right-style:none; border-top-style:none; border-bottom-style:none; }  *.Table2A1 { vertical-align:top; padding-left:0.0799in; padding-right:0.0799in; padding-top:0.15in; padding-bottom:0.15in; border-style:none; }  *.Table3A1 { vertical-align:top; background-color:#4f81bd; padding-left:0.075in; padding-right:0.075in; padding-top:0in; padding-bottom:0in; border-left-width:0.0353cm; border-left-style:solid; border-left-color:#c0c0c0; border-right-style:none; border-top-width:0.0353cm; border-top-style:solid; border-top-color:#c0c0c0; border-bottom-width:0.0353cm; border-bottom-style:solid; border-bottom-color:#c0c0c0; }  *.Table3A2 { vertical-align:top; background-color:#d3dfee; padding-left:0.075in; padding-right:0.075in; padding-top:0in; padding-bottom:0in; border-left-width:0.0353cm; border-left-style:solid; border-left-color:#c0c0c0; border-right-style:none; border-top-style:none; border-bottom-width:0.0353cm; border-bottom-style:solid; border-bottom-color:#c0c0c0; }  *.Table3A3 { vertical-align:top; padding-left:0.075in; padding-right:0.075in; padding-top:0in; padding-bottom:0in; border-left-width:0.0353cm; border-left-style:solid; border-left-color:#c0c0c0; border-right-style:none; border-top-style:none; border-bottom-width:0.0353cm; border-bottom-style:solid; border-bottom-color:#c0c0c0; }  *.Table3B1 { vertical-align:top; background-color:#4f81bd; padding-left:0.075in; padding-right:0.075in; padding-top:0in; padding-bottom:0in; border-left-style:none; border-right-style:none; border-top-width:0.0353cm; border-top-style:solid; border-top-color:#c0c0c0; border-bottom-width:0.0353cm; border-bottom-style:solid; border-bottom-color:#c0c0c0; }  *.Table3B2 { vertical-align:top; background-color:#d3dfee; padding-left:0.075in; padding-right:0.075in; padding-top:0in; padding-bottom:0in; border-left-style:none; border-right-style:none; border-top-style:none; border-bottom-width:0.0353cm; border-bottom-style:solid; border-bottom-color:#c0c0c0; }  *.Table3B3 { vertical-align:top; padding-left:0.075in; padding-right:0.075in; padding-top:0in; padding-bottom:0in; border-left-style:none; border-right-style:none; border-top-style:none; border-bottom-width:0.0353cm; border-bottom-style:solid; border-bottom-color:#c0c0c0; }  *.Table3C1 { vertical-align:top; background-color:#4f81bd; padding-left:0.075in; padding-right:0.075in; padding-top:0in; padding-bottom:0in; border-left-style:none; border-right-width:0.0353cm; border-right-style:solid; border-right-color:#c0c0c0; border-top-width:0.0353cm; border-top-style:solid; border-top-color:#c0c0c0; border-bottom-width:0.0353cm; border-bottom-style:solid; border-bottom-color:#c0c0c0; }  *.Table3C2 { vertical-align:top; background-color:#d3dfee; padding-left:0.075in; padding-right:0.075in; padding-top:0in; padding-bottom:0in; border-left-style:none; border-right-width:0.0353cm; border-right-style:solid; border-right-color:#c0c0c0; border-top-style:none; border-bottom-width:0.0353cm; border-bottom-style:solid; border-bottom-color:#c0c0c0; }  *.Table3C3 { vertical-align:top; padding-left:0.075in; padding-right:0.075in; padding-top:0in; padding-bottom:0in; border-left-style:none; border-right-width:0.0353cm; border-right-style:solid; border-right-color:#c0c0c0; border-top-style:none; border-bottom-width:0.0353cm; border-bottom-style:solid; border-bottom-color:#c0c0c0; }  *.Table1A { width:5.3278in; }  *.Table2A { width:5.3278in; }  *.Table3A { width:1.45in; }  *.Table3B { width:2.3125in; }  *.Table3C { width:2.9153in; }  *.Table11 { }  *.Table21 { }  *.Table31 { }  *.Absatz-Standardschriftart { }  *.BalloonTextChar { font-family:Tahoma; font-size:8pt; }  *.cmdsChar { color:#c00000; font-family:'Courier New'; font-size:12pt; }  *.DefaultParagraphFont { }  *.Emphasis { font-style:italic; }  *.filesChar { color:#00b050; font-family:'Courier New'; font-size:12pt; }  *.FooterChar { font-size:12pt; }  *.HeaderChar { font-size:12pt; }  *.Heading1Char { color:#365f91; font-family:Cambria; font-size:14pt; font-weight:bold; }  *.Heading2Char { color:#4f81bd; font-family:Cambria; font-size:13pt; font-weight:bold; }  *.Heading3Char { color:#4f81bd; font-family:Cambria; font-size:12pt; font-weight:bold; }  *.Heading4Char { color:#4f81bd; font-family:Cambria; font-size:12pt; font-style:italic; font-weight:bold; }  *.Heading5Char { color:#243f60; font-family:Cambria; font-size:12pt; }  *.Heading6Char { color:#243f60; font-family:Cambria; font-size:12pt; font-style:italic; }  *.Internetlink { color:#0000ff; text-decoration:underline; }  *.NoSpacingChar { font-size:12pt; }  *.NumberingSymbols { }  *.QuoteChar { color:#000000; font-size:12pt; font-style:italic; }  *.SubtleEmphasis { color:#808080; font-style:italic; }  *.T1 { color:#000000; font-size:12pt; font-style:italic; }  *.T10 { color:#00b050; font-family:'Courier New'; }  *.T11 { color:#808080; font-style:italic; font-size:12pt; }  *.T12 { }  *.T13 { color:#0000ff; text-decoration:underline; font-size:12pt; }  *.T14 { color:#0000ff; text-decoration:underline; font-size:11pt; }  *.T15 { color:#00b050; font-size:12pt; }  *.T16 { color:#00b050; font-size:12pt; font-weight:bold; }  *.T17 { color:#000000; font-size:12pt; }  *.T18 { color:#000000; font-size:12pt; font-style:italic; }  *.T19 { font-size:12pt; }  *.T2 { font-size:12pt; }  *.T20 { font-style:italic; font-size:12pt; }  *.T21 { font-size:12pt; font-style:italic; }  *.T22 { color:#00b050; font-family:'Courier New'; font-size:12pt; }  *.T23 { font-size:10pt; }  *.T24 { color:#0000ff; text-decoration:underline; font-size:12pt; font-style:italic; }  *.T25 { font-size:12pt; font-style:italic; }  *.T26 { font-size:12pt; font-style:italic; font-weight:bold; }  *.T27 { font-size:12pt; font-weight:bold; }  *.T28 { color:#0000ff; text-decoration:underline; font-size:12pt; }  *.T29 { font-size:12pt; }  *.T3 { font-style:normal; }  *.T4 { font-style:normal; text-decoration:underline; }  *.T5 { font-style:italic; }  *.T6 { color:#000000; }  *.T7 { font-weight:bold; }  *.T8 { font-weight:bold; }  *.T9 { color:#00b050; font-family:'Courier New'; font-size:12pt; }  *.TitleChar { color:#17365d; font-family:Cambria; font-size:26pt; }  *.WW8Num1z1 { color:#00b050; font-family:'Courier New'; }  *.WW8Num2z1 { color:#00b050; font-family:'Courier New'; }  *.WW8Num4z0 { font-family:Symbol; font-size:10pt; }  *.WW8Num4z1 { font-family:'Courier New'; font-size:10pt; }  *.WW8Num4z2 { font-family:Wingdings; font-size:10pt; }   &lt;/style&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, I did not fully accomplish my goal for release 0.3 - I was able to make progress but in the end I did not turn out the way I had hoped. I tried to get JSON output working as exampled in the BuildAPI existing scripts but could not get it going. However, I did learn a tremendous amount of information which can be seen by browsing through my blog. &lt;br /&gt;&lt;br /&gt;In addition, I have created a quick and concise How-to document for BuildAPI in hopes that the next student that possibly takes on BuildAPI will have a head start into the project and a better understanding of its inner workings without wasting too much time figuring it out.&lt;br /&gt;Furthermore, there will also be a second document that provides more information on the controllers, models and template files that will be posted later.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style="color: #6aa84f;"&gt;&lt;b&gt;Documentation&lt;/b&gt;&lt;/h3&gt;Here is a link to the documentation: &lt;a href="http://asdesigned.ca/sbr/BuildAPI-How-To-Setup.pdf"&gt;http://asdesigned.ca/sbr/BuildAPI-How-To-Setup.pdf&lt;/a&gt;&lt;br /&gt;It is in PDF form (clickable links included).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below is my Getting Started documentation in HTML format, although I'd recommend viewing the PDF version instead:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="P2"&gt;&lt;div class="fr1" id="Frame1" style="width: 5.328in;"&gt;&lt;div style="text-align: left;"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="Table1"&gt;&lt;colgroup&gt;&lt;col width="591"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr class="Table11"&gt;&lt;td class="Table1A1" style="text-align: left; width: 5.3278in;"&gt;&lt;div class="P3"&gt;Seneca College&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="Table11"&gt;&lt;td class="Table1A2" style="text-align: left; width: 5.3278in;"&gt;&lt;div class="P4"&gt;BuildAPI&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="Table11"&gt;&lt;td class="Table1A1" style="text-align: left; width: 5.3278in;"&gt;&lt;div class="P3"&gt;How to Get Started with BuildAPI&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P5"&gt;&lt;div class="fr2" id="Frame2" style="width: 5.328in;"&gt;&lt;div style="text-align: left;"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="Table2"&gt;&lt;colgroup&gt;&lt;col width="591"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr class="Table21"&gt;&lt;td class="Table2A1" style="text-align: left; width: 5.3278in;"&gt;&lt;div class="P6"&gt;Andrew Singh&amp;nbsp;&lt;/div&gt;&lt;div class="P7"&gt;12/17/2010&amp;nbsp;&lt;/div&gt;&lt;div class="P7"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="P8"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P9"&gt;Table of Contents&amp;nbsp;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P10"&gt;&lt;colgroup&gt;&lt;col style="width: 6.3335in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Introduction&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P10"&gt;&lt;colgroup&gt;&lt;col style="width: 6.3335in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Purpose&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P10"&gt;&lt;colgroup&gt;&lt;col style="width: 6.3335in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Tasks Summary&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P11"&gt;&lt;colgroup&gt;&lt;col style="width: 6.1665in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;I. Install MySQL and Import Database Snapshots&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P11"&gt;&lt;colgroup&gt;&lt;col style="width: 6.1665in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;II. Install Python and Python SetupTools (Easy_install)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P11"&gt;&lt;colgroup&gt;&lt;col style="width: 6.1665in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;III. Install Google Python Visualizations Library&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P11"&gt;&lt;colgroup&gt;&lt;col style="width: 6.1665in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;IV. Install MySQL-Python (MySQLdb for Python)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P11"&gt;&lt;colgroup&gt;&lt;col style="width: 6.1665in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;V. Install BuildAPI Files&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P11"&gt;&lt;colgroup&gt;&lt;col style="width: 6.1665in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;VI. Configure and Run BuildAPI&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P11"&gt;&lt;colgroup&gt;&lt;col style="width: 6.1665in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;VII. Optional: Set up sample project files&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="P11"&gt;&lt;colgroup&gt;&lt;col style="width: 6.1665in;"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;VIII. Resources&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="Sect2"&gt;&lt;div class="P12"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P13"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Title"&gt;BuildAPI&amp;nbsp;&lt;/div&gt;&lt;div class="Quote"&gt;&lt;span class="T1"&gt;“BuildAPI is a Pylons project used by RelEng to surface information collected from two databases updated through our buildbot masters as they run jobs.”&lt;/span&gt;&lt;/div&gt;&lt;div class="P14"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P15"&gt;Introduction&amp;nbsp;&lt;/div&gt;&lt;div class="P16"&gt;This project consists of generating analytic reports which can be used for a multitude of purposes such as performance and usage tests or discovering rogue buildbot slave machines. Moreover, it will require querying databases for information on the BuildBot jobs, which will then be used to generate the necessary reports.&amp;nbsp;&lt;/div&gt;&lt;div class="P14"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P15"&gt;Purpose&amp;nbsp;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;span class="T2"&gt;&amp;nbsp;To install, configure and run BuildAPI&lt;/span&gt;&lt;/div&gt;&lt;div class="P14"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P15"&gt;Tasks Summary&amp;nbsp;&lt;/div&gt;&lt;ol style="list-style-type: upper-roman; margin-left: 0.5cm;"&gt;&lt;li class="P17" style="margin-left: 0cm;"&gt;&lt;div class="P17" style="margin-left: 0.75cm;"&gt;Install MySQL and import database snapshots&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="P17" style="margin-left: 0cm;"&gt;&lt;div class="P17" style="margin-left: 0.75cm;"&gt;Install Python, Python SetupTools (Easy_install) and Pylons&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="P17" style="margin-left: 0cm;"&gt;&lt;div class="P17" style="margin-left: 0.75cm;"&gt;Install Google Python Visualizations Library&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="P17" style="margin-left: 0cm;"&gt;&lt;div class="P17" style="margin-left: 0.75cm;"&gt;Install MySQL-Python (MySQLdb for Python)&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="P17" style="margin-left: 0cm;"&gt;&lt;div class="P17" style="margin-left: 0.75cm;"&gt;Install BuildAPI Files&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="P17" style="margin-left: 0cm;"&gt;&lt;div class="P17" style="margin-left: 0.75cm;"&gt;Configure and Run BuildAPI&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="P17" style="margin-left: 0cm;"&gt;&lt;div class="P17" style="margin-left: 0.75cm;"&gt;Optional: Set up sample project files&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="P17" style="margin-left: 0cm;"&gt;&lt;div class="P17" style="margin-left: 0.75cm;"&gt;Resources&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="P18"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P19"&gt;I.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Install MySQL and Import Database Snapshots&lt;/div&gt;&lt;div class="Heading4"&gt;Install MySQL&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;Install Mysql and Mysql Server:&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;yum –y install mysql mysql-server&amp;nbsp;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="NoSpacing"&gt;Enable the service at startup:&amp;nbsp;&lt;/div&gt;&lt;div class="P20"&gt;/sbin/chkconfig mysqld on&amp;nbsp;&lt;/div&gt;&lt;div class="P21"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="NoSpacing"&gt;Start the MySQL server&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;/sbin/service mysqld start&amp;nbsp;&lt;/div&gt;&lt;div class="NoSpacing"&gt;Set the MySQL root password&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;mysqladmin -u root password 'new-password'&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="SubtleEmphasis"&gt;The quotes around the new password are required&lt;/span&gt;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T3"&gt;Root can be used to access MySQL or a new MySQL user can be created for the project. &lt;/span&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T3"&gt;For &lt;/span&gt;&lt;span class="T4"&gt;testing purposes&lt;/span&gt;&lt;span class="T3"&gt;, root can be used.&lt;/span&gt;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Heading4"&gt;&lt;span class="Emphasis"&gt;Install Snapshots&lt;/span&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T3"&gt;Download the database snapshot files, which are in bunzip2 format. Please check &lt;/span&gt;&lt;a href="https://wiki.mozilla.org/ReleaseEngineering/BuildAPI"&gt;&lt;span class="Internetlink"&gt;https://wiki.mozilla.org/ReleaseEngineering/BuildAPI&lt;/span&gt;&lt;/a&gt;&lt;span class="T3"&gt; for the latest snapshot releases, under “Project Requirements”. &lt;/span&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T3"&gt;If bunzip2 does not exist on the system, install it using: &lt;/span&gt;&lt;span class="cmdsChar"&gt;yum install bzip2&lt;/span&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T3"&gt;Extract the databases&lt;/span&gt;&lt;/div&gt;&lt;div class="P20"&gt;bunzip2 schedulerdb-2010-10-22.sql.bz2&amp;nbsp;&lt;/div&gt;&lt;div class="P22"&gt;bunzip2 statusdb-2010-10-22.sql.bz2&amp;nbsp;&lt;/div&gt;&lt;div class="P23"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T3"&gt;Create the respective databases; &lt;/span&gt;&lt;span class="Emphasis"&gt;Example: statusdb and schedulerdb in MySQL&lt;/span&gt;&lt;/div&gt;&lt;div class="cmds"&gt;$ mysql –u&lt;span class="T5"&gt;root&lt;/span&gt; -p&lt;span class="T5"&gt;password&lt;/span&gt;&lt;/div&gt;&lt;div class="cmds"&gt;mysql&amp;gt; &amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;mysql&amp;gt; create database statusdb;&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;mysql&amp;gt; create database schedulerdb;&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;mysql&amp;gt; exit&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Import the databases into mysql server&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;mysql –uroot -p&lt;span class="T5"&gt;password&lt;/span&gt; -hlocalhost statusdb &amp;lt; statusdb.sql&lt;/div&gt;&lt;div class="cmds"&gt;mysql –uroot -p&lt;span class="T5"&gt;password&lt;/span&gt; -hlocalhost statusdb &amp;lt; schedulerdb.sql&lt;/div&gt;&lt;div class="cmds"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Heading3"&gt;II.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Install Python and Python SetupTools (Easy_install)&lt;/div&gt;&lt;div class="Standard"&gt;Install Python&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;yum install python&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Install Setup Tools&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;yum install python-setuptools&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Install Pylons&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;yum install pylons &lt;span class="T6"&gt;or&lt;/span&gt; easy_install Pylons&lt;/div&gt;&lt;div class="cmds"&gt;yum install python-pylons&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Heading4"&gt;Virtual Environment&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;We can also set up a virtual environment to work in, whereby it allows us to have multiple isolated environments for Python so it is possible to run different applications on the same system, but using different sets of installed Python packages. This is recommended by the Mozilla Release Engineering team.&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="NoSpacing"&gt;Install virtual environment using easy_install and read the readme file to activate&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;easy_install virtualenv&amp;nbsp;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Heading5"&gt;Manually installing virtual environment&amp;nbsp;&lt;/div&gt;&lt;div class="NoSpacing"&gt;Use &lt;span class="cmdsChar"&gt;wget&lt;/span&gt; to get the latest package from &lt;a href="http://pypi.python.org/packages/source/v/virtualenv/"&gt;&lt;span class="Internetlink"&gt;http://pypi.python.org/packages/source/v/virtualenv/&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="NoSpacing"&gt;Untar the downloaded file, create a directory and activate the environment&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;$ tar zxfv filename.tar.gz&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;$ virtualenv.py ~/venv/sandbox&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;$ source ~/venv/sandbox/bin/activate&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Once in the sandbox, install packages as necessary, example:&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;(sandbox)$ easy_install Pylons==0.9.6.1&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T7"&gt;&lt;/span&gt;&lt;span class="T8"&gt; If you will be working within a virtual environment, it is important that you install the necessary packages below in the same environment as well.&lt;/span&gt;&lt;/div&gt;&lt;div class="Heading3"&gt;III.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Install Google Python Visualizations Library&lt;/div&gt;&lt;div class="Standard"&gt;Download the library from &lt;a href="http://google-visualization-python.googlecode.com/"&gt;&lt;span class="Internetlink"&gt;http://google-visualization-python.googlecode.com/&lt;/span&gt;&lt;/a&gt; and extract it.&lt;/div&gt;&lt;div class="P24"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;To install the library:&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="cmdsChar"&gt;cd&lt;/span&gt; into the extracted directory and run the command:&lt;/div&gt;&lt;div class="cmds"&gt;python ./setup.py install&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Test the library by running &lt;span class="cmdsChar"&gt;python ./setup.py test &lt;/span&gt;to make sure it is installed correctly&lt;/div&gt;&lt;div class="Heading3"&gt;IV.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Install MySQL-Python (MySQLdb for Python)&lt;/div&gt;&lt;div class="Heading4"&gt;Install Dependencies&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;This package requires the &lt;span class="cmdsChar"&gt;python-devel&lt;/span&gt; dependency or it will not install properly.&lt;/div&gt;&lt;div class="cmds"&gt;yum install python-devel&amp;nbsp;&lt;/div&gt;&lt;div class="Heading4"&gt;Install Package&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;Once that is complete, we can install MySQLdb. &amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="Emphasis"&gt;You can stop the mysql server before installing MySQL-Python and restart it once complete.&lt;/span&gt;&lt;/div&gt;&lt;div class="cmds"&gt;yum install mysql-python&amp;nbsp;&lt;/div&gt;&lt;div class="Heading5"&gt;In the event that it fails, you can also try a manual installation:&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;Download the source file from &lt;a href="http://download.sourceforge.net/sourceforge/mysql-python/"&gt;&lt;span class="Internetlink"&gt;http://download.sourceforge.net/sourceforge/mysql-python/&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Extract the downloaded file and change to its directory&amp;nbsp;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Run the commands:&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;python setup.py build&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;python setup.py install&amp;nbsp;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Optional: run the test to see if it is installed properly: &lt;span class="cmdsChar"&gt;python setup.py test&lt;/span&gt;&lt;/div&gt;&lt;div class="Heading3"&gt;V.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Install BuildAPI Files&lt;/div&gt;&lt;div class="Standard"&gt;The easiest way to install BuildAPI is to use Python’s setup tools:&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;easy_install buildapi&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;This will also install &lt;span class="cmdsChar"&gt;SQLAlchemy &lt;/span&gt;which is required; otherwise it can be installed using &lt;span class="cmdsChar"&gt;easy_install SQLAlchemy&lt;/span&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;For manual installation, you can download the source files from &lt;a href="http://hg.mozilla.org/build/buildapi"&gt;&lt;span class="Internetlink"&gt;http://hg.mozilla.org/build/buildapi&lt;/span&gt;&lt;/a&gt; and extract it to a directory called &lt;span class="filesChar"&gt;buildapi&lt;/span&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;This will create a directory structure similar to the following:&amp;nbsp;&lt;/div&gt;&lt;div class="P25"&gt;------buildapi/&amp;nbsp;&lt;/div&gt;&lt;div class="P26"&gt;&lt;span class="T9"&gt;&amp;nbsp;-------MANIFEST.in&lt;/span&gt;&lt;/div&gt;&lt;div class="P26"&gt;&lt;span class="T9"&gt;&amp;nbsp;-------README.txt&lt;/span&gt;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;span class="T10"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  -------docs&lt;/span&gt;&lt;/div&gt;&lt;div class="P27"&gt;&lt;span class="T9"&gt;&amp;nbsp;-------ez_setup.py&lt;/span&gt;&lt;/div&gt;&lt;div class="P27"&gt;&lt;span class="T9"&gt;&amp;nbsp;-------buildapi &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="T11"&gt;(This is a nested directory)&lt;/span&gt;&lt;/div&gt;&lt;div class="P27"&gt;&lt;span class="T9"&gt;&amp;nbsp;-------buildapi.egg-info&lt;/span&gt;&lt;/div&gt;&lt;div class="P27"&gt;&lt;span class="T9"&gt;&amp;nbsp;-------setup.cfg&lt;/span&gt;&lt;/div&gt;&lt;div class="P27"&gt;&lt;span class="T9"&gt;&amp;nbsp;-------setup.py &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="T11"&gt;(used for application setup)&lt;/span&gt;&lt;/div&gt;&lt;div class="P28"&gt;&lt;span class="T9"&gt;&amp;nbsp;-------test.ini &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="T11"&gt;(used for testing, i.e. when you run python setup.py test)&lt;/span&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Run the command:&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;python setup.py install&amp;nbsp;&lt;/div&gt;&lt;div class="Heading3"&gt;VI.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Configure and Run BuildAPI&lt;/div&gt;&lt;div class="Standard"&gt;Next, BuildAPI must be configured to host content on your system, either through localhost or on the internet. Moreover, it uses the Paster server for hosting and requires creating and editing a configuration file.&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;We will create our own configuration file using the command:&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;paster make-config buildapi config.ini&amp;nbsp;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;span class="SubtleEmphasis"&gt;This command produces a different configuration file with sensible options for production use&lt;/span&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Now we can edit the created &lt;span class="filesChar"&gt;config.ini&lt;/span&gt; configuration file and make changes as below.&lt;/div&gt;&lt;div class="cmds"&gt;[server:main]&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;use = egg:Paste#http&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;host = 127.0.0.1&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;port = 5000&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="cmds"&gt;# SQLAlchemy database URL&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;sqlalchemy.scheduler_db.url = mysql://root:root@localhost/schedulerdb&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;sqlalchemy.status_db.url = mysql://root:root@localhost/statusdb&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;sqlalchemy.pool_recycle = 3600&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;span class="T8"&gt;Note: &lt;/span&gt;&lt;span class="cmdsChar"&gt;host&lt;/span&gt; can be set to any value such as &lt;span class="Emphasis"&gt;iraq.proximity.on.ca &lt;/span&gt;&lt;span class="T3"&gt;to make it accessible on the internet provided configurations such as &lt;/span&gt;&lt;span class="T4"&gt;firewalls&lt;/span&gt;&lt;span class="T3"&gt; allow it. &amp;nbsp;The &lt;/span&gt;&lt;span class="cmdsChar"&gt;sqlalchemy&lt;/span&gt;&lt;span class="T3"&gt; database url and username:password fields as they may need editing accordingly if you have used different names or different databases.&lt;/span&gt;&lt;/div&gt;&lt;div class="Heading4"&gt;Run BuildAPI&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;To &lt;span class="T5"&gt;run&lt;/span&gt;, &lt;span class="T5"&gt;stop&lt;/span&gt; or &lt;span class="T5"&gt;reload&lt;/span&gt; BuildAPI, make sure you are in the &lt;span class="filesChar"&gt;buildapi&lt;/span&gt; directory (first level, where the &lt;span class="filesChar"&gt;config.ini&lt;/span&gt; file resides) and use the following commands&lt;/div&gt;&lt;div class="cmds"&gt;paster serve --start --daemon config.ini&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;paster serve --stop --daemon config.ini&amp;nbsp;&lt;/div&gt;&lt;div class="cmds"&gt;paster serve --reload --daemon config.ini&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Whenever a change is made to the configuration file, or major changes made to controller files, the paster server must be reloaded.&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;Check the current directory (&lt;span class="filesChar"&gt;buildapi&lt;/span&gt;), there should be two files that were created:&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="filesChar"&gt;paster.pid&lt;/span&gt; – contains the PID number for the Paster process&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="filesChar"&gt;paster.log&lt;/span&gt; – &lt;span class="T8"&gt;All messages are contained in this file. Extremely useful file for troubleshooting!&lt;/span&gt;&lt;/div&gt;&lt;div class="Heading4"&gt;Test it out!&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;Depending on your config.ini configuration settings, direct the browser to &amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;a href="http://localhost:5000/"&gt;&lt;span class="Internetlink"&gt;http://localhost:5000&lt;/span&gt;&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; or &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  &amp;nbsp; &lt;a href="http://domain:5000/"&gt;&lt;span class="Internetlink"&gt;http://domain:5000&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P29"&gt;And that’s it! BuildAPI should now be live on your system!&amp;nbsp;&lt;/div&gt;&lt;div class="Heading3"&gt;VII.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Optional: Set up sample project files&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T2"&gt;These are files that were part of the BuildAPI project. They can be used to get a better understanding of BuildAPI and to understand of how it works, along with the blog posts (on &lt;/span&gt;&lt;a href="http://andrewasdesigned.blogspot.com/"&gt;&lt;span class="T13"&gt;http://andrewasdesigned.blogspot.com/&lt;/span&gt;&lt;/a&gt;&lt;span class="T2"&gt;).&lt;/span&gt;&lt;/div&gt;&lt;div class="P16"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T2"&gt;Additionally, see the &lt;/span&gt;&lt;a href="https://wiki.mozilla.org/ReleaseEngineering/BuildAPI"&gt;&lt;span class="T13"&gt;https://wiki.mozilla.org/ReleaseEngineering/BuildAPI&lt;/span&gt;&lt;/a&gt;&lt;span class="T2"&gt; page for a quick beginner tutorial as well.&lt;/span&gt;&lt;/div&gt;&lt;div class="P30"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="Table3"&gt;&lt;colgroup&gt;&lt;col width="161"&gt;&lt;/col&gt;&lt;col width="257"&gt;&lt;/col&gt;&lt;col width="324"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr class="Table31"&gt;&lt;td class="Table3A1" style="text-align: left; width: 1.45in;"&gt;&lt;div class="P31"&gt;File&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3B1" style="text-align: left; width: 2.3125in;"&gt;&lt;div class="P31"&gt;Description&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3C1" style="text-align: left; width: 2.9153in;"&gt;&lt;div class="P31"&gt;Download Location&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="Table31"&gt;&lt;td class="Table3A2" style="text-align: left; width: 1.45in;"&gt;&lt;div class="P32"&gt;config.ini&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3B2" style="text-align: left; width: 2.3125in;"&gt;&lt;div class="P33"&gt;Paster Configuration file&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3C2" style="text-align: left; width: 2.9153in;"&gt;&lt;div class="P34"&gt;&lt;a href="http://asdesigned.ca/SBR/config.ini"&gt;&lt;span class="T14"&gt;http://asdesigned.ca/SBR/config.ini&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="Table31"&gt;&lt;td class="Table3A3" style="text-align: left; width: 1.45in;"&gt;&lt;div class="P32"&gt;hello.py&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3B3" style="text-align: left; width: 2.3125in;"&gt;&lt;div class="P33"&gt;Hello World controller file – a Getting Started controller&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3C3" style="text-align: left; width: 2.9153in;"&gt;&lt;div class="P34"&gt;&lt;a href="http://asdesigned.ca/SBR/hello.py"&gt;&lt;span class="T14"&gt;http://asdesigned.ca/SBR/hello.py&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="Table31"&gt;&lt;td class="Table3A2" style="text-align: left; width: 1.45in;"&gt;&lt;div class="P32"&gt;project.py&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3B2" style="text-align: left; width: 2.3125in;"&gt;&lt;div class="P33"&gt;Project Controller file&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3C2" style="text-align: left; width: 2.9153in;"&gt;&lt;div class="P34"&gt;&lt;a href="http://asdesigned.ca/SBR/project.py"&gt;&lt;span class="T14"&gt;http://asdesigned.ca/SBR/project.py&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="Table31"&gt;&lt;td class="Table3A3" style="text-align: left; width: 1.45in;"&gt;&lt;div class="P32"&gt;query.py&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3B3" style="text-align: left; width: 2.3125in;"&gt;&lt;div class="P33"&gt;Project Query file, which is the BuildAPI query file with Project queries appended&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3C3" style="text-align: left; width: 2.9153in;"&gt;&lt;div class="P34"&gt;&lt;a href="http://asdesigned.ca/SBR/query.py"&gt;&lt;span class="T14"&gt;http://asdesigned.ca/SBR/query.py&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="P35"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="Table31"&gt;&lt;td class="Table3A2" style="text-align: left; width: 1.45in;"&gt;&lt;div class="P32"&gt;project.mako&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3B2" style="text-align: left; width: 2.3125in;"&gt;&lt;div class="P33"&gt;Project template file&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3C2" style="text-align: left; width: 2.9153in;"&gt;&lt;div class="P34"&gt;&lt;a href="http://asdesigned.ca/SBR/project.mako"&gt;&lt;span class="T14"&gt;http://asdesigned.ca/SBR/project.mako&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class="Table31"&gt;&lt;td class="Table3A3" style="text-align: left; width: 1.45in;"&gt;&lt;div class="P32"&gt;routing.py&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3B3" style="text-align: left; width: 2.3125in;"&gt;&lt;div class="P33"&gt;Project routing.py file&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class="Table3C3" style="text-align: left; width: 2.9153in;"&gt;&lt;div class="P34"&gt;&lt;a href="http://asdesigned.ca/SBR/routing.py"&gt;&lt;span class="T14"&gt;http://asdesigned.ca/SBR/routing.py&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P36"&gt;Directory Structure showing where files should be placed:&amp;nbsp;&lt;/div&gt;&lt;div class="P37"&gt;buildapi/&amp;nbsp;&lt;/div&gt;&lt;div class="P37"&gt;+-- buildapi&amp;nbsp;&lt;/div&gt;&lt;div class="P38"&gt;&lt;span class="T15"&gt;¦ &amp;nbsp; +-- config&lt;/span&gt;&lt;span class="T16"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="T17"&gt;#routing.py, &lt;/span&gt;&lt;span class="T18"&gt;placed in config&lt;/span&gt;&lt;/div&gt;&lt;div class="P38"&gt;&lt;span class="T15"&gt;¦ &amp;nbsp; +-- controllers&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="T17"&gt;#project.py, hello.py &lt;/span&gt;&lt;span class="T18"&gt;placed in controllers&lt;/span&gt;&lt;/div&gt;&lt;div class="P38"&gt;&lt;span class="T15"&gt;¦ &amp;nbsp; +-- model&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="T17"&gt;#query.py, &lt;/span&gt;&lt;span class="T18"&gt;placed in model&lt;/span&gt;&lt;/div&gt;&lt;div class="P38"&gt;&lt;span class="T15"&gt;¦ &amp;nbsp; +-- templates&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="T17"&gt;#project.mako, &lt;/span&gt;&lt;span class="T18"&gt;placed in templates&lt;/span&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T20"&gt;&lt;b&gt;Note &lt;/b&gt;that other directories and files have been omitted&lt;/span&gt;&lt;/div&gt;&lt;div class="P16"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="NoSpacing"&gt;&lt;span class="T2"&gt;The Python library called Routes handles mapping URLs to controllers and their methods, or their &lt;/span&gt;&lt;span class="T21"&gt;action&lt;/span&gt;&lt;span class="T2"&gt; as Routes refers to them. By default, Pylons sets up the following &lt;/span&gt;&lt;span class="T21"&gt;route&lt;/span&gt;&lt;span class="T2"&gt;s (found in &lt;/span&gt;&lt;span class="T22"&gt;config/routing.py&lt;/span&gt;&lt;span class="T2"&gt;):&lt;/span&gt;&lt;/div&gt;&lt;div class="P39"&gt;map.connect('/{controller}/{action}')&amp;nbsp;&lt;/div&gt;&lt;div class="P16"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T2"&gt;Therefore, you can also edit the &lt;/span&gt;&lt;span class="T22"&gt;buildapi/buildapi/config/routing.py&lt;/span&gt;&lt;span class="T23"&gt; &lt;/span&gt;&lt;span class="T2"&gt;file and add the following in manually, instead of using the &lt;/span&gt;&lt;span class="T22"&gt;routing.py&lt;/span&gt;&lt;span class="T2"&gt; provided file:&lt;/span&gt;&lt;/div&gt;&lt;div class="P40"&gt;map.connect('/project', controller='project', action='index')&amp;nbsp;&lt;/div&gt;&lt;div class="P41"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T2"&gt;This file controls how the controller or project site is accessed. The above means that the site is accessed, for example, by &lt;/span&gt;&lt;a href="http://www.domain.com/project"&gt;&lt;span class="T24"&gt;www.domain.com/project&lt;/span&gt;&lt;/a&gt;&lt;span class="T25"&gt; &lt;/span&gt;&lt;span class="T2"&gt;which will automatically redirect it to the &lt;/span&gt;&lt;span class="T25"&gt;index&lt;/span&gt;&lt;span class="T2"&gt; as defined in the controller file. &lt;/span&gt;&lt;/div&gt;&lt;div class="P16"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T2"&gt;See blog posts on &lt;/span&gt;&lt;a href="http://andrewasdesigned.blogspot.com/"&gt;&lt;span class="T13"&gt;http://andrewasdesigned.blogspot.com/&lt;/span&gt;&lt;/a&gt;&lt;span class="T2"&gt; regarding how the model works.&lt;/span&gt;&lt;/div&gt;&lt;div class="P16"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P36"&gt;A Word on Database and queries:&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;span class="T2"&gt;It is important to understand the database structure and use the resources to figure out which queries and tables would provide the best indication of certain values, such as CPU usage. The queries are also done using SQLAlchemy and it can get complicated with complex queries, therefore, seek out help &lt;/span&gt;&lt;span class="T26"&gt;(See Resources section)&lt;/span&gt;&lt;span class="T2"&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div class="P42"&gt;VIII.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Resources&lt;/div&gt;&lt;div class="P16"&gt;It is extremely important to reach out to the community for help in any area. I cannot stress this enough. There are many resources available, such as IRC, official documentation and discussion groups that you can take advantage of. Some are listed below.&amp;nbsp;&lt;/div&gt;&lt;div class="P36"&gt;IRC&amp;nbsp;&lt;/div&gt;&lt;div class="P43"&gt;&lt;span class="T27"&gt;Server&lt;/span&gt;&lt;span class="T2"&gt;: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; irc.freenode.net &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="P43"&gt;&lt;span class="T27"&gt;channels&lt;/span&gt;&lt;span class="T2"&gt;: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #seneca&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #mozilla&lt;/span&gt;&lt;/div&gt;&lt;div class="P36"&gt;Blogs and Wikis:&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;a href="http://anamariamoz.wordpress.com/"&gt;&lt;span class="T13"&gt;http://anamariamoz.wordpress.com/&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;a href="https://wiki.mozilla.org/ReleaseEngineering/BuildAPI"&gt;&lt;span class="T13"&gt;https://wiki.mozilla.org/ReleaseEngineering/BuildAPI&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;a href="http://andrewasdesigned.blogspot.com/"&gt;&lt;span class="T13"&gt;http://andrewasdesigned.blogspot.com/&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="P36"&gt;Discussion Groups&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;a href="http://groups.google.com/group/pylons-discuss"&gt;&lt;span class="T13"&gt;http://groups.google.com/group/pylons-discuss&lt;/span&gt;&lt;/a&gt;&lt;span class="T2"&gt; (Google Group)&lt;/span&gt;&lt;/div&gt;&lt;div class="P44"&gt;Official Pylons Documentation&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;a href="http://pylonshq.com/docs/en/0.9.7/"&gt;&lt;span class="T28"&gt;http://pylonshq.com/docs/en/0.9.7/&lt;/span&gt;&lt;/a&gt;&lt;span class="T29"&gt; (Pylons Documentation)&lt;/span&gt;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;a href="http://pylonsbook.com/"&gt;&lt;span class="T13"&gt;http://pylonsbook.com/&lt;/span&gt;&lt;/a&gt;&lt;span class="T2"&gt; (Free Online Pylons Book and amazing resource)&lt;/span&gt;&lt;/div&gt;&lt;div class="P36"&gt;SBR600 (Seneca) BuildAPI Project Page:&amp;nbsp;&lt;/div&gt;&lt;div class="Standard"&gt;&lt;a href="http://zenit.senecac.on.ca/wiki/index.php/BuildAPI"&gt;&lt;span class="T13"&gt;http://zenit.senecac.on.ca/wiki/index.php/BuildAPI&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="P16"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P16"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P16"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="P39"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-6033691763043275947?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/6033691763043275947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/12/03-release-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/6033691763043275947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/6033691763043275947'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/12/03-release-part-1.html' title='0.3 Release - Part 1'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-3277809961852852148</id><published>2010-12-17T01:54:00.000-08:00</published><updated>2010-12-17T01:55:07.479-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>SBR600: Reflection</title><content type='html'>&lt;div style="color: #6aa84f;"&gt;&lt;h3&gt;&lt;b&gt;Course Reflections&lt;/b&gt;&lt;/h3&gt;&lt;/div&gt;&lt;br /&gt;For this to be my final semester, I had to take &lt;b&gt;7&lt;/b&gt; courses, and so I did. I figured it would be challenging and it definitely was – especially also working part-time plus other responsibilities, but sometimes you &lt;i&gt;'&lt;span style="color: black;"&gt;just gotta do what you gotta do&lt;/span&gt;'&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;I know I’m probably not the only one as there were others that were in similar positions; and to you all out there who’s graduating: Kudos! Cheers! This chapter is done, complete or whatever your word is, either way, &lt;i style="color: #38761d;"&gt;run and tell that, run and tell that, run and tell that, home home home homeboy&lt;/i&gt; (if you don’t get the reference, &lt;a href="http://www.youtube.com/watch?v=VKsVSBhSwJg"&gt;click here&lt;/a&gt; and enjoy)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Okay, on to what is important though: My reflections on the course.&lt;/b&gt;&lt;br /&gt;The first half was interesting, and I liked the fact that we had a tentative schedule that allowed us divide and devote our time appropriately to the course.&lt;br /&gt;&lt;br /&gt;It was good to learn about Fedora’s &lt;b&gt;build and release &lt;/b&gt;and I enjoyed creating RPMs and going through the process of creating our own SPEC files, testing build times, signing our RPMS and testing packages on different platforms.&lt;br /&gt;&lt;br /&gt;I have to say that was &lt;u&gt;definitely&lt;/u&gt; one of my favorite parts of this course. If I had to do this course again (and not that I want to, lol) and choose a project I would have chosen one to rebuild packages or test builds and build times, but no worries, there was only love for BuildAPI...&lt;span style="font-size: x-small;"&gt;and some frustration&lt;/span&gt;. I’ll leave my thoughts on that for last.&lt;br /&gt;&lt;br /&gt;As I mentioned in my &lt;b&gt;GIT&lt;/b&gt; blog post I’ve used version control clients (SVN) before but never GIT. However, after playing around with it for this course, I actually used it for another course, INT620, which involved creating a website using PERL and TT2. I used GIT to keep track of changes to the website files and it worked out quite well…for the period of time I used it as we eventually switched to using Mercurial. I’m kind of ranting off topic here. Let’s move on to the projects.&lt;br /&gt;&lt;br /&gt;It was my fault for missing the class where Chris Tyler explained each project and the respective general expectations. However, we were given a wide choice of projects to choose from that were well thought out and incorporated a little bit of everything; it definitely gains points on my recommendation scale for this course! In regards to that, if there any students who have not taken SBR600 yet, I would highly suggest that you do and also see my “&lt;b&gt;&lt;i&gt;Advice&lt;/i&gt;&lt;/b&gt;” section later on this post.&lt;br /&gt;&lt;br /&gt;The second half of the course focused on developing my chosen project - &lt;b&gt;BuildAPI&lt;/b&gt;. I must say there were difficulties along the way and these projects require our own initiative to progress. There were the tasks of learning Python, Pylons, SQLAlchemy queries, MVC model (see previous blog posts) and integrating it all. Although, I may have went too deep into it and should have been more focused on specific goals rather than trying to figure out everything in such a short time.&lt;br /&gt;&lt;br /&gt;BuildAPI was especially challenging at the beginning, but I pushed along albeit slowly to gain results and ultimately new knowledge. However, as I worked my way through and progressed, there was a satisfying sense of accomplishment from researching, learning and putting the knowledge to practical use. &lt;br /&gt;&lt;br /&gt;Even while working on my INT620 website project using Perl and TT2, I often reflected on how our project can also be done in pylons since it encompassed similar processes as my BuildAPI project: querying databases, displaying/managing data and using a model like the MVC to separate the application code from business.&lt;br /&gt;&lt;br /&gt;But I also believe I learned something much greater than learning the ropes on my project. And that is the value of the resources available - the large community of able-bodied and willingly helpful souls. SBR600 opened my eyes to the “&lt;u&gt;community&lt;/u&gt;”. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What about my advice for those who plan on taking this course?&lt;/b&gt;&lt;br /&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; Do it, take it&lt;br /&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; Choose your project wisely and one that you will thoroughly enjoy&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; o&amp;nbsp;&amp;nbsp;&amp;nbsp; Some projects involve scripting – such as learning Python (which you ultimately do by yourself)&lt;br /&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; Get involved with the community – seek help, and do not be afraid to ask ANY question regardless of how “ridiculous” you may think it sounds&lt;br /&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; Get INVOLVED with the COMMUNITY, success in the course, project and perhaps your career depend on it&lt;br /&gt;&lt;br /&gt;Lastly, Cheers and Thanks to: Chris Tyler, Armen Zambrano, Mike Orr, fellow students, IRC users cthomas and aki, blogs, Mozilla Release Engineering, others and the Google group - Pylons-Discuss for all the help!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;b&gt;Oh wait....I have to post 0.3 for the project! I will do that shortly! &lt;/b&gt;&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-3277809961852852148?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/3277809961852852148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/12/course-reflections-for-this-to-be-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/3277809961852852148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/3277809961852852148'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/12/course-reflections-for-this-to-be-my.html' title='SBR600: Reflection'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-8938854055428832692</id><published>2010-11-26T03:44:00.000-08:00</published><updated>2010-11-26T18:40:35.320-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>BuildAPI: 0.2</title><content type='html'>&lt;div style="color: #666666;"&gt;Quick note: &lt;/div&gt;&lt;span style="color: #666666;"&gt;Last week I posted a series of blog posts that I did not have time to post during the past week or more. They were all sort of backed up and hence all posted at once.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;h3&gt;&lt;b&gt;BuildAPI 0.2&lt;/b&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div style="color: #6aa84f;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;On to the BuildAPI project: Let me just say that I have been doing this project in a step-by-step approach in order to learn what I need to learn, understand what I am working with, and apply it practically.&lt;br /&gt;Also, the BuildAPI wiki page has been updated: &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/BuildAPI"&gt;http://zenit.senecac.on.ca/wiki/index.php/BuildAPI&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To see it running: &lt;a href="http://iraq.proximity.on.ca:5000/"&gt;http://iraq.proximity.on.ca:5000/&lt;/a&gt;&lt;br /&gt;Please click on Project 0.2 under BuildAPI Project Test, or &lt;a href="http://iraq.proximity.on.ca:5000/project"&gt;http://iraq.proximity.on.ca:5000/project&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;0.1x - Between 0.1 and 0.2&lt;/b&gt;&lt;/div&gt;My 0.1 release included getting BuildAPI set up and taking a peek at the extensively used MVC model.&lt;br /&gt;However, since BuildAPI uses Pylons framework, I took some time to read The Definitive Guide to Pylons book and skipped to the chapters that were necessary. It's a good thing the book is available online, it is such a great resource! It helped me to learn some of the language and concepts. Next was to create very simple controllers for working with model and view templates and that was the beginning of wrapping my head around the MVC model concepts.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;0.2 - Summary&lt;/b&gt;&lt;/div&gt;For 0.2, I feel very comfortable working with the MVC model and was able to create my own controller, add to the existing BuildAPI universal model script for querying (query.py, orginal seen here), and create my own MAKO template to output my results. (See MVC scripts). In addition, I appended a link to my project to the main BuildAPI index page, which I have set up on http://iraq.proximity.on.ca:5000.&lt;br /&gt;&lt;br /&gt;In regards to the model file, I had to read some of the documentation on SQLAlchemy and how queries work in order to pull data from the database, and from that, I now understand how to formulate basic queries using SQLAlchemy. However, I am still having a bit of trouble with complex queries such as using joins and multiple where clauses (See blog post on SQLAlchemy and Basic Queries).&lt;br /&gt;&lt;br /&gt;I also stripped special formatting from the output and template as I did not fully understand how it works and how it is integrated with Pylons and BuildAPI - it seemed confusing. By special formatting, I am referring to Javascript/JSON and Json tables and charts. &lt;br /&gt;However, after a bit of fiddling and reading on google visualizations documentation, I get the gist of how it works and I have implemented simple json using google viz api. Although, I still need to seek out help and apply it practically - which will be in 0.3.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;MVC – Revisited&lt;/b&gt;&lt;/div&gt;From my 0.1 post, I'd like to revisit the MVC model in terms of the BuildAPI project instead of a generic breakdown. I will also reference the MVC scripts which can be seen later in the post.&lt;br /&gt;Here goes&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The model (query.py) knows about the databases and queries, or in other terms, business objects/data&lt;/li&gt;&lt;li&gt;The template (project.mako) knows about HTML, Javascript, CSS, and the tmpl_context or "c" variables (example: c_output in controller projecy.py script) that are passed to it by the controller.&lt;/li&gt;&lt;li&gt;The controller knows about both the model and the template. Therefore, it will query or modify the model to obtain data, modifies the values of the "c" variables and then passes it to the template.&lt;/li&gt;&lt;li&gt;Also, the model can invoke other models, and the controller other controllers etc&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;After working with it, I can definitely see how each component can be updated separately without affecting the other.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;MVC Scripts&lt;/b&gt;&lt;/div&gt;&lt;u&gt;&lt;b&gt;The Controller&lt;/b&gt;&lt;/u&gt;&lt;b&gt; - &lt;span style="color: #3d85c6;"&gt;project.py&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;import logging&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;from pylons import request, response, session, tmpl_context as c, url&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;from pylons.controllers.util import abort, redirect&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;from pylons.decorators import jsonify&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;from buildapi.lib.base import BaseController, render&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;from buildapi.model.query import GetProjectQuery&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;from buildapi.model.query import GetQueryTest&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;log = logging.getLogger(__name__)&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;class ProjectController(BaseController):&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; def index(self):&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output = GetProjectQuery()&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; results = GetQueryTest()&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.output = output&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.results = results&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return render("/project.mako")&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return self.jsonify(output)&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # What the lines below do is to gather the format of the request using request.GET method &lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; which contains the variables in a query string&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # These variables are set in the template through javascript or through the form request&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # This is commented out for reasons (See JSON/Javascript section)&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #if 'format' in request.GET:&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp; format = request.GET.getone('format')&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #else:&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp; format = 'html'&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #if format not in ('html', 'json'):&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp;&amp;nbsp;&amp;nbsp; abort(400, detail='Unsupported format: %s' % format)&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #if format == "html":&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # assign to c_output&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # return template render&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #else:&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # jsonify the data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # return self.jsonify(results)&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;The Model&lt;/u&gt; - &lt;span style="color: #3d85c6;"&gt;query.py&lt;/span&gt; (My test queries appended to existing file)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;def GetProjectQuery():&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rr = meta.status_db_meta.tables['builders']&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; q = select([rr.c.id, rr.c.name])&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; q = q.limit(50)&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; query_results = q.execute()&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output = []&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for r in query_results:&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this_result = {}&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for key, value in r.items():&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this_result[str(key)] = value&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output.append(this_result)&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return output&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;def GetQueryTest():&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rr = meta.status_db_meta.tables['builders']&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bb = meta.status_db_meta.tables['builds']&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; q = select([rr.c.name, bb.c.starttime, bb.c.endtime])&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #q = q.join(rr, bb.c.builder_id = rr.c.id)&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; q = q.where(and_(rr.c.id == bb.c.builder_id))&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; q = q.where(and_(rr.c.name.like('%moz%')))&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; q = q.limit(50)&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; query_results = q.execute()&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; results = []&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for r in query_results:&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this_result = {}&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for key, value in r.items():&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this_result[str(key)] = value&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; results.append(t&lt;/span&gt;his_result)&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return results&lt;/div&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;u&gt;&lt;b&gt;The Template&lt;/b&gt;&lt;/u&gt;&lt;b&gt; - project.mako&lt;/b&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;Only the important parts shown. This creates the table using the results from the query that are passed in as variables.&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;This is for the first table:&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;tr&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;% for key in ('Builder ID','Builder Name'):&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;td&amp;gt;&amp;lt;h3&amp;gt;${key}&amp;lt;/h3&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;% endfor&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;/tr&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&amp;lt;tbody&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;%&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; from pytz import timezone&lt;/div&gt;&lt;div style="background-color: #eeeeee; color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; from datetime import datetime&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; eastern = timezone('US/Eastern')&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; now = datetime.now().replace(microsecond=0)&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;%&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;% for key in c.output:&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % for x in ('id', 'name'):&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;${key[x]}&amp;lt;/td&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % endfor&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;/tr&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;% endfor&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;/tbody&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;div style="background-color: white;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;This is for the second table:&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;% for key in ('Builder Name','Start Time', 'End Time', 'Duration'):&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;td&amp;gt;&amp;lt;h3&amp;gt;${key}&amp;lt;/h3&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;% endfor&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;/tr&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;% for key in c.results:&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;%&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key['duration'] = key['endtime'] - key['starttime']&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % for x in ('name', 'starttime', 'endtime', 'duration'):&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt; ${key[x]} &amp;lt;/td&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % endfor&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;% endfor&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The below is simply using Google's visualization to create the table, it can also be used to create charts. I just don't know how to loop the data into a chart/table as yet properly.&lt;br /&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;script type="text/javascript" src="http://www.google.com/jsapi"&amp;gt;&amp;lt;/script&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; google.load('visualization', '1', {packages: ['table']});&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;/script&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;% for key in c.output:&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows: [{c:[{v: '${key['id']}'}, {v: '${key['name']}'}]}]};&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;% endfor&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function drawVisualization() {&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create and populate the data table.&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var JSONObject = {&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cols: [{id: 'task', label: 'Builder ID', type: 'string'},&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {id: 'hours', label: 'Builder Name', type: 'string'}],&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows: [{c:[{v: '${key['id']}'}, {v: '${key['name']}'}]}]};&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var data = new google.visualization.DataTable(JSONObject, 0.5);&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create and draw the visualization.&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visualization = new google.visualization.Table(document.getElementById('table'));&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visualization.draw(data, {'allowHtml': true});&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; google.setOnLoadCallback(drawVisualization);&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;/script&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="background-color: white;"&gt;&lt;span style="background-color: white;"&gt;After the above script, this is all that's needed in the HTML file that displays the table:&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;span style="background-color: white;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;div id="table"&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;Javascript, JSON and Outputting data in special formats&lt;/b&gt;&lt;/div&gt;That being said, JSON is just another data format structure, which is used for formatting the tables and charts. However, I am trying to get JSON and javascript to work so I can integrate with existing BuildAPI structure, but honestly, it is quite a lot to learn in a short time.&lt;br /&gt;&lt;br /&gt;Whatever it is that I am doing or learning, I like to make sure I understand why I am doing it and how it works.&lt;br /&gt;&lt;br /&gt;I've researched that the controller can produce the json on request using several methods, one of which is by passing the format specifier. In addition, this can be done either by passing it from a template using javascript to the controller or by using what is called "&lt;a href="http://routes.groovie.org/restful.html"&gt;RESTful services&lt;/a&gt;". In Python documentation for Routes and &lt;a href="http://routes.groovie.org/restful.html"&gt;RESTful service&lt;/a&gt;s, it shows "Several routes are paired with an identical route containing the format variable. The intention is to allow users to obtain different formats by means of filename suffixes; e.g., "/messages/1.xml".&lt;br /&gt;&lt;br /&gt;This ultimately means that you could put a test in the controller to see if it JSON or HTML data: &lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;def view(self, id, format='html'):&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if format == 'json':&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return self.jsonify(data)&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ('templates/project.mako')&lt;/div&gt;&lt;br /&gt;Then, the output will depend on how the data is called, for example:&lt;br /&gt;http://examplepath/controller/page.html - the format will be html thus displaying an HTML page&lt;br /&gt;or &lt;br /&gt;http://examplepath/controller/page.json - using json format and application/json content type&lt;br /&gt;&lt;br /&gt;However, BuildAPI takes the approach of using javascript to set the format and furthermore, this javascript is inserted into another template file (call it B) that is invoked by the main template (call it A), so A invokes values from B. Maybe I am just confusing things and I have it all wrong? PLEASE correct me if I am wrong! &lt;i&gt;(I've sent some emails out to request for help on the matter)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In BuildAPI, I understand that the controllers will check the 'format' of the request by using Pylon's "request.GET" and I understand that for the "Reports" this format (such as charts) is set in the respective mako template files. If it is an html request, it shows the HTML page, if it is a json request then it shows the json data in the form of a table or chart in the html page. However, some controllers (namely recent.py, running.py and pending.py) - where is the format set? I don't see it set anywhere in the controller, model or template file and it is not inheriting it from anywhere, yet the format seems to be set and it uses html + json to create those nice looking tables! How?&lt;br /&gt;&lt;br /&gt;Moreover, I also received errors when trying to 'jsonify' output with more than one key/value pairs such as a pylons list that contains:&lt;br /&gt;&amp;nbsp;{'name': 'mozilla-1.9.1-win32-unittest', 'starttime': '2009-09-27 14:06:30',&amp;nbsp; 'endtime': '2009-09-27 14:27:50'}&lt;br /&gt;It gives me the error:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Error - &amp;lt;type 'exceptions.TypeError'&amp;gt;: datetime.datetime(2009, 9, 27, 14, 27, 50) is not JSON serializable&lt;/div&gt;&lt;br /&gt;&lt;div style="color: #666666;"&gt;&lt;h3&gt;Aaahh, the frustration!&lt;/h3&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Although, I've thought about a simpler solution:&lt;/b&gt; &lt;br /&gt;&lt;ol&gt;&lt;li&gt;Dump the data from the query into a python list&lt;/li&gt;&lt;li&gt;Then dump that data into json objects and pass it as a c_context variables to the MAKO template&lt;/li&gt;&lt;li&gt;n the template, iterate through the results to display it using google visualizations to create table or charts&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;However, I've read that this may not be as secure as it perhaps uses the javascript eval() function – but I'm not sure.&lt;br /&gt;&lt;br /&gt;I will update this in the near future with a clear path to 0.3.&lt;br /&gt;&lt;br /&gt;Update: I recently exchanged emails with &lt;a href="http://armenzg.blogspot.com/"&gt;Armen Zambrano&lt;/a&gt; regarding the objectives and will post another blog in the coming days of what I've decided to do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-8938854055428832692?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/8938854055428832692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/buildapi-02.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/8938854055428832692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/8938854055428832692'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/buildapi-02.html' title='BuildAPI: 0.2'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-8777602327022866420</id><published>2010-11-18T20:12:00.000-08:00</published><updated>2010-11-18T20:13:00.816-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Getting BuildAPI online + Previous Errors - Fixed</title><content type='html'>&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;Preamble&lt;/b&gt;&lt;/div&gt;I had tried to get BuildAPI set up on iraq.proximity.on.ca server before milestone 0.1 release however, I ran into problems that was posted on this linked &lt;a href="http://andrewasdesigned.blogspot.com/2010/11/buildapi-errors.html"&gt;blog post&lt;/a&gt;. I was receiving errors running the command &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;paster serve --reload --daemon config.ini&lt;/span&gt; inside or outside of a python virtual environment.&lt;br /&gt;&lt;br /&gt;I went back onto the iraq server to take a second look at it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;Fixing Errors&lt;/b&gt; &lt;/div&gt;When I ran the paster command by itself it gave me an error. The paster.log provided a lot of information on what could be done to possibly fix it and mentioned to make sure that PasteScript was installed properly.&lt;br /&gt;I ran the command:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;easy_install PasteScript==1.7.3&lt;/div&gt;And what do you know, that got the Paster error resolved. So easy eh?&lt;br /&gt;&lt;br /&gt;However, I was still having errors with BuildAPI but that was quickly solved after running the following command&amp;nbsp; in the BuildAPI directory:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;python setup.py develop&lt;/div&gt;&lt;br /&gt;And that was it, just two commands to solve all my problems...I feel like kicking myself &lt;i&gt;(lol)&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6aa84f;"&gt;Serving Content&lt;/b&gt;&lt;br /&gt;I set Paster server to host on &lt;a href="http://iraq.proximity.on.ca:5000/"&gt;http://iraq.proximity.on.ca:5000&lt;/a&gt; and credits to &lt;u&gt;Chris Tyler&lt;/u&gt; for pointing out that I needed to add an IPtables firewall rule to allow incoming connections to port 5000.&lt;br /&gt;This is so much better than working off of my laptop!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-8777602327022866420?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/8777602327022866420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/getting-buildapi-online-previous-errors.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/8777602327022866420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/8777602327022866420'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/getting-buildapi-online-previous-errors.html' title='Getting BuildAPI online + Previous Errors - Fixed'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-9016572206845675587</id><published>2010-11-18T19:55:00.000-08:00</published><updated>2010-11-18T19:56:05.445-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>SQLAlchemy MySQL error</title><content type='html'>When setting up the Paster server for my BuildAPI project, I used Sqlalchemy and MySQL to connect to the databases. I noticed that if I accessed a page on the server that connects to a database and then several hours later try to access the page again, I received a Server Error on the page.&lt;br /&gt;&lt;br /&gt;Additionally, checking the paster.log file shows:&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #f3f3f3; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Error - &amp;lt;class 'sqlalchemy.exc.OperationalError'&amp;gt;: (OperationalError) (2006, 'MySQL server has gone away') 'SELECT builders.id, builders.name \nFROM builders \n LIMIT 50' ()&lt;/div&gt;&lt;br /&gt;This error is a result of the database connections being specified to stay open forever and the server closing the connection after a period of time. There is an option called pool_recycle that should be set for MySQL connections, as noted in&amp;nbsp;&lt;a href="http://pylonsbook.com/en/1.1/introducing-the-model-and-sqlalchemy.html"&gt;The Definitive Guide to Pylons&lt;/a&gt; book: &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="background-color: #f3f3f3; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;pool_recycle:&lt;/div&gt;The length of time to keep connections open before recycling them. If not specified, the connections will stay open forever. This should be specified for MySQL in particular because servers typically close connections after eight hours, resulting in a “MySQL server has gone away” error.&lt;/blockquote&gt;&lt;br /&gt;Therefore, for example, in the project configuration I specified the pool_recyle as shown below: &lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #f3f3f3; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sqlalchemy.your_db1.url = mysql://user:pass@localhost/your_db1&lt;/div&gt;&lt;div style="background-color: #f3f3f3; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sqlalchemy.your_db2.url = mysql://user:pass@localhost/your_db2&lt;/div&gt;&lt;div style="background-color: #f3f3f3; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;u&gt;&lt;b&gt;sqlalchemy.pool_recycle = 3600&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-9016572206845675587?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/9016572206845675587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/sqlalchemy-mysql-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/9016572206845675587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/9016572206845675587'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/sqlalchemy-mysql-error.html' title='SQLAlchemy MySQL error'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-1804574803055231181</id><published>2010-11-18T19:30:00.000-08:00</published><updated>2010-11-18T19:33:16.373-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Pylons/SQLAlchemy Simple Queries</title><content type='html'>&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;Working with Simple Queries&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;Recently I've been working using the MVC model (&lt;a href="http://andrewasdesigned.blogspot.com/2010/11/buildapi-01.html"&gt;See 0.1 post here&lt;/a&gt;) and feel much more comfortable with it. I have to say, it's awesome! Anyway, I am still have some trouble with complex queries and to be able to complete my 0.3 objective I will have to get some help with it, but for now, I understand and can create simple queries just fine.&lt;br /&gt;&lt;i&gt;&lt;br /&gt;/// Behind the Scenes information not included - such as creating metadata for the tables or binding it to the engine (as can be seen &lt;a href="http://hg.mozilla.org/build/buildapi/file/b13ea5abf9c6/buildapi/model/__init__.py"&gt;here &lt;/a&gt;and &lt;a href="http://hg.mozilla.org/build/buildapi/file/b13ea5abf9c6/buildapi/model/meta.py"&gt;here&lt;/a&gt;). In addition, the query.py model contains the queries and also imports data from other model files ///&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Here is an example from one of the BuildAPI queries:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ss = meta.scheduler_db_meta.tables['sourcestamps']&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;q = select([ss.c.branch]).distinct()&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;q = q.where(not_(ss.c.branch.like("%unittest")))&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;results = q.execute() &lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The database and table information is stored in the ss variable.&lt;/li&gt;&lt;li&gt;In a more readable format, it would be: table &lt;i&gt;sourcestamps &lt;/i&gt;from &lt;i&gt;scheduler_db &lt;/i&gt;database&lt;/li&gt;&lt;li&gt;The q variable is where the query begins. It is first assigned a select statement and reuses the ss variable.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The ss.c.branch simply means the &lt;i&gt;branch  &lt;/i&gt;field/column(.c) in the &lt;i&gt;sourcestamps &lt;/i&gt;table.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The &lt;i&gt;distinct &lt;/i&gt;is added at the end to pull out distinct values.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Then, the q variable is reused again and a &lt;i&gt;where &lt;/i&gt;clause is added.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If this was to translated to a MySQL query it would look like this:&lt;br /&gt;&lt;div style="color: #e69138;"&gt;&lt;b&gt;select distinct(branch) from sourcestamps where branch not like '%unittest';&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;Another simple example is:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rr = meta.status_db_meta.tables['builders']&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;q = select([rr.c.id, rr.c.name])&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;q = q.limit(50)&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;query_results = q.execute()&lt;/div&gt;&lt;br /&gt;Here the query would be:&lt;br /&gt;&lt;div style="color: #e69138;"&gt;&lt;b&gt;select id, name from builders limit 50;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;To put this in context of the MVC model, the results from the query could be assigned to an array variable such as c.results_output that the 'View' template can use to display it. This will be shown in another blog post, perhaps in the 0.2 release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-1804574803055231181?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/1804574803055231181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/pylonssqlalchemy-simple-queries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/1804574803055231181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/1804574803055231181'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/pylonssqlalchemy-simple-queries.html' title='Pylons/SQLAlchemy Simple Queries'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-3605100033593729279</id><published>2010-11-18T18:20:00.000-08:00</published><updated>2010-11-18T19:36:38.743-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Using Vim with Python</title><content type='html'>&lt;b style="color: #6aa84f;"&gt;Getting Vim to work with Python&lt;/b&gt; &lt;br /&gt;I'm sure there are better editors out there but I've been using vim for creating/editing python scripts. Also I should mention that since I am accustomed to typing vi on the command line, I have vi aliased to vim (alias vi=vim). &lt;br /&gt;However, using vim with the default configuration is not ideal for python, especially with its 8 character tab spaces! After doing some research, I came across a few changes you can make to vim's configuration to optimize it for use with python:&lt;br /&gt;&lt;br /&gt;You will need to edit the /etc/vimrc file (on Fedora), and append the following four lines:&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #f3f3f3; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;autocmd BufRead,BufNewFile *.py syntax on&lt;/div&gt;&lt;div style="background-color: #f3f3f3; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;autocmd BufRead,BufNewFile *.py set ai&lt;/div&gt;&lt;div style="background-color: #f3f3f3; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,with,try,except,finally,def,class&lt;/div&gt;&lt;div style="background-color: #f3f3f3; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;au FileType python setl autoindent tabstop=4 expandtab shiftwidth=4 softtabstop=4 &lt;/div&gt;&lt;br /&gt;This will automatically enable syntax highlighting, and do automatic indentation for Python code (indicated by the "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;smartindent cinwords=...&lt;/span&gt;"). In addition, once a python file is loaded, tabs will be expanded to spaces and be 4 characters long instead of the 8 character default tab space.&lt;br /&gt;That's it.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #999999;"&gt;Credits to &lt;a href="http://wiki.python.org/moin/Vim"&gt;http://wiki.python.org/moin/Vim&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-3605100033593729279?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/3605100033593729279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/using-vim-with-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/3605100033593729279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/3605100033593729279'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/using-vim-with-python.html' title='Using Vim with Python'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-71435545381561385</id><published>2010-11-15T19:11:00.000-08:00</published><updated>2010-11-15T23:20:03.827-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Git 'er done</title><content type='html'>&lt;span style="color: #6aa84f; font-size: xx-small;"&gt;[&lt;/span&gt;&lt;span style="color: #6aa84f; font-size: xx-small;"&gt;Apologies for the lame title? lol]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6aa84f;"&gt;Git?&lt;/b&gt;&lt;br /&gt;I’ve heard the word Git thrown around here and there, and in these past years the only thing I knew of Git was that it was some sort of repository. However, after further reading, it seemed very much like Subversion, which I’ve used for &lt;a href="http://blog.papervision3d.org/"&gt;Papervision &lt;/a&gt;(Adobe Flash) projects. I guess it was time to get acquainted with Git.&lt;br /&gt;&lt;br /&gt;Git is a version control system, like subversion, however each user has their own repository and these repositories can push changes to a central repository.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Getting Started - Testing&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;To start off testing git, first change to the directory that you want to work with (project directory). &lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ cd /public/svn/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I added two files in here: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;file.txt &lt;/span&gt;and &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;test.txt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first thing that needs to be done is to initialize your repository.&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ git init&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Output: &lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Initialized empty Git repository in /public/svn/.git/&lt;/span&gt;&lt;/blockquote&gt;Notice that the .git directory is hidden.&lt;br /&gt;&lt;br /&gt;If you would like to name the repository or to add a description, there is a file appropriately named &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;description&lt;/span&gt; in the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;.git/ &lt;/span&gt;directory that you can edit.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Adding Files&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;To add files to the repository, we would use the command:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ git add .&lt;/span&gt;&lt;br /&gt;This recursively adds all files in the current directory. Of course, we can specify only to add specific files or a group of files rather than all files by simply specifying the files as arguments after &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;git add&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;To commit importing the files and thereby adding them to the repository index, we use:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ git commit&lt;/span&gt;&lt;br /&gt;At which git will open the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;.git/COMMIT_EDITMSG&lt;/span&gt; file and prompt you to enter a “commit message” or a description of the changes or what has been done.&lt;br /&gt;This can be done quicker by simply using the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;–m “description”&lt;/span&gt; argument:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ git commit –m “Initial repository setup”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Output:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;[master (root-commit) a980722] Initial repository setup&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;0 files changed, 0 insertions(+), 0 deletions(-)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;create mode 100644 file.txt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;create mode 100644 test.txt&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Making Changes to Files&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;Now if we were to make any changes to our files:&lt;br /&gt;1. We first have to use the&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; $ git add &lt;/span&gt;command again as this will incrementally add these changes to the repository index&lt;br /&gt;2. Then we use the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ git commit &lt;/span&gt;command once more to commit these changes.&lt;br /&gt;&lt;br /&gt;To simplify this two step process, we can simply use the following:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ git commit –a &lt;/span&gt;&lt;br /&gt;Any files that are already in Git’s repository index that have been changed will be updated in the repository. This one command will stage and commit in one step.&lt;br /&gt;&lt;br /&gt;However, it is important to note that these files have to be already known by git, that is, in its index or else it would not commit any changes. If the file is not already in the index, just use the&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; $ git add &lt;/span&gt;command to add it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6aa84f;"&gt;Renaming and Removing Files&lt;/b&gt;&lt;br /&gt;To remove or rename files it is just the same as doing it on the command line except we add git in front of the command, such as:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ git mv file.txt file2.txt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ git rm test.txt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note: There is the git log command that’s awesome, it shows you a list of recent commits (and also their hashes). &lt;br /&gt;Also use the git status command to check the status of the local repository (it will show you if files have been changed/committed). If you use the git status command and notice “&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;nothing added to commit but untracked files present&lt;/span&gt;” that means you either need to tell git to ignore those files as you perhaps don’t want it to track them, or if you do, use &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;git add &lt;/span&gt;to start tracking.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Branches&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;I noticed all of these changes were being done under the “master” branch. It is a good idea to create different branches for different parts or features of your project. This is done by:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ git branch branchnam&lt;/span&gt;e&lt;br /&gt;And you can create as many as you need. It is also very easy to switch between branches by using&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ git checkout branchname&lt;/span&gt;&lt;br /&gt;Branches can be checked out individually or merged with the master branch or other branches.&lt;br /&gt;&lt;br /&gt;There is a lot of information on Git available, such as on:&lt;br /&gt;&lt;a href="http://git-scm.com/documentation"&gt;Git Documentation&lt;/a&gt; or the &lt;a href="http://book.git-scm.com/index.html"&gt;Git Community Book&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6aa84f;"&gt;Plans&lt;/b&gt; &lt;br /&gt;So far I’m liking Git, and I want to use it for my BuildAPI project to track changes – maybe after release 0.2 I’ll try to set it up.&lt;br /&gt;&lt;br /&gt;All I gotta say is I just need to &lt;i style="color: #e69138;"&gt;&lt;b&gt;Git ‘er done!&lt;/b&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-71435545381561385?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/71435545381561385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/git-er-done.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/71435545381561385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/71435545381561385'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/git-er-done.html' title='Git &apos;er done'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-5644588664325809780</id><published>2010-11-09T19:57:00.000-08:00</published><updated>2010-11-09T19:59:11.752-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>BuildAPI: Errors</title><content type='html'>&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;Problems Getting BuildAPI to Work on Seneca's Iraq Host&lt;/b&gt; &lt;/div&gt;From my previous post, it is apparent that I had BuildAPI running on a virtual machine on my laptop. However, I tried running and installing it on one of our Seneca host systems, iraq.proximity.on.ca,&amp;nbsp; but it only gave me errors and I could not figure out why (see errors below).&lt;br /&gt;&lt;br /&gt;I followed the same steps as I did on my virtual machine, and checked online for similar issues/errors but was left with little. I even tried working with it in a python virtual environment and also set SELinux to permissive to test but it was the same issue. I ended up doing most of the work on my VM but I would still like to get it working on the Iraq machine.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Running in a Virtual Environment&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;The following error was encountered when running &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;paster serve --reload --daemon config.ini &lt;/span&gt;in a virtual environment:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;--From the paster.log file-- &lt;/i&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;File "/usr/lib/python2.6/site-packages/paste/config.py", line 76, in _current_obj&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "No configuration has been registered for this process "&lt;br /&gt;AttributeError: No configuration has been registered for this process or thread&lt;br /&gt;Removing PID file paster.pid&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;I checked the /var/log/messages file and it showed:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Nov&amp;nbsp; 9 22:39:00 iraq python: abrt: detected unhandled Python exception in /home/asingh114/newbuild/venv/bin/paster&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Nov&amp;nbsp; 9 22:39:00 iraq abrtd: dumpsocket: New client connected&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Nov&amp;nbsp; 9 22:39:00 iraq abrtd: dumpsocket: Saved Python crash dump of pid 10494 to /var/spool/abrt/pyhook-1289360340-10494&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Nov&amp;nbsp; 9 22:39:00 iraq abrtd: dumpsocket: Socket client disconnected&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Nov&amp;nbsp; 9 22:39:00 iraq abrtd: Directory 'pyhook-1289360340-10494' creation detected&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Nov&amp;nbsp; 9 22:39:00 iraq abrtd: Executable '/home/asingh114/newbuild/venv/bin/paster' doesn't belong to any package&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Nov&amp;nbsp; 9 22:39:00 iraq abrtd: Corrupted or bad crash /var/spool/abrt/pyhook-1289360340-10494 (res:4), deleting&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Nov&amp;nbsp; 9 22:39:17 iraq python: abrt: detected unhandled Python exception in ../venv/bin/paster&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;If I run yum info python, it shows python 2.6.4 installed, but if I do python -V, it shows python 2.6.6 installed. In addition, python-setuptools are installed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Running Outside Virtual Environment &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;I also tried running &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;paster serve --reload --daemon config.ini&lt;/span&gt; outside of the virtual environment (after all dependencies and packages were installed) and I also get an error:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Traceback (most recent call last):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; File "/usr/bin/paster", line 5, in &amp;lt;module&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from pkg_resources import load_entry_point&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ImportError: No module named pkg_resources&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;And in the /var/log/messages file:&lt;br /&gt;&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Nov&amp;nbsp; 9 22:39:00 iraq abrtd: Executable '/home/asingh114/newbuild/venv/bin/paster' doesn't belong to any package&lt;br /&gt;Nov&amp;nbsp; 9 22:39:00 iraq abrtd: Corrupted or bad crash /var/spool/abrt/pyhook-1289360340-10494 (res:4), deleting&lt;br /&gt;Nov&amp;nbsp; 9 22:39:17 iraq python: abrt: detected unhandled Python exception in ../venv/bin/paster&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I will check into it further, and in the meantime I will continue to work on BuildAPI on my virtual machine and get my scripts going.&lt;br /&gt;&lt;br /&gt;I would remove and reinstall the packages but don't want to screw up anyone's work on the Iraq system.&lt;br /&gt;&lt;br /&gt;Additionally, I don't want to spend all my time trying to get it to work on Iraq when I have it working on my virtual machine anyway&lt;b&gt; but if anyone has any ideas or input, please let me know! &lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-5644588664325809780?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/5644588664325809780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/buildapi-errors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/5644588664325809780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/5644588664325809780'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/buildapi-errors.html' title='BuildAPI: Errors'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-2590590755403162453</id><published>2010-11-05T20:55:00.000-07:00</published><updated>2010-11-05T21:03:34.819-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>BuildAPI: 0.1</title><content type='html'>&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Getting Started&lt;/span&gt;&lt;/b&gt;To run BuildAPI locally, there were a few things that needed to be done, as outlined in the &lt;a href="https://wiki.mozilla.org/ReleaseEngineering/BuildAPI"&gt;ReleaseEngineering/BuildAPI wiki&lt;/a&gt; (&amp;lt; Many thanks for that!!).&lt;br /&gt;&lt;br /&gt;These were the steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install MySQL and import database snapshots&lt;/li&gt;&lt;li&gt;Install Python and Python SetupTools (Easy_install)&lt;/li&gt;&lt;li&gt;Install Pylons (or use a virtual environment) &lt;/li&gt;&lt;li&gt;Install Google Python Visualizations Library&lt;/li&gt;&lt;li&gt;Install MySQL-Python (MySQLdb for Python)&lt;/li&gt;&lt;li&gt;Configure BuildAPI&lt;/li&gt;&lt;/ol&gt;&amp;nbsp;&lt;b&gt;1. Installing MySQL&lt;/b&gt;Installing MySQL is easy: &lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$ yum install mysql-server&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then create a new user and password for MySQL (&lt;i&gt;optional&lt;/i&gt;), create the two databases (schedulerdb &lt;i&gt;and &lt;/i&gt;statusdb) in MySQL and import the two snapshots into the appropriate databases. As noted in my previous post, I did run into problems getting the snapshots into MySQL, &lt;a href="http://andrewasdesigned.blogspot.com/2010/11/buildapi-pre-01-free-disk-space-problem.html"&gt;see here&lt;/a&gt;. However, that was resolved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2.&lt;/b&gt;&lt;b&gt;&amp;nbsp; Python and Python SetupTools&lt;/b&gt;&lt;br /&gt;There were a few version of Python that I could have installed, however I chose to install version 2.6.6 as I had noted that the newest version 3.x was &lt;i&gt;(maybe)&lt;/i&gt; not compatible with some of the components such as &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;python mysqldb&lt;/span&gt;. I had used yum install to install it but it installed version 2.4 through yum so I downloaded the source and compiled it.&lt;br /&gt;The &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;python-setuptools &lt;/span&gt;package is necessary as it contains &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;easy_install&lt;/span&gt;, which definitely lives up to its name and makes our lives &lt;i&gt;soooo &lt;/i&gt;much easier (it resolves dependencies for python packages, just like &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;yum&lt;/span&gt;)!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Install Pylons &lt;/b&gt;&lt;br /&gt;What do you know, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;yum install pylons&lt;/span&gt; could work as well but instead I did &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;easy_install pylons&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Install Google Python Visualizations Library&lt;/b&gt;&lt;br /&gt;The visualizations library is used for, you guessed it, creating&amp;nbsp; graphical output such as graphs and charts for BuildAPI reports. After downloading the source code, I used &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;python setup.py install&lt;/span&gt; to install it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. Install MySQL-Python (MySQLdb for Python)&lt;/b&gt;&lt;br /&gt;This one took me a while to get installed and working. There were several dependencies that I needed to have installed before it could build, such as &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;python-devel.&lt;/span&gt;&lt;br /&gt;Smooth-sailing after that though.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="color: #6aa84f;"&gt;6. BuildAPI&lt;/b&gt;&lt;br /&gt;Once the BuildAPI source has been downloaded (&lt;a href="http://hg.mozilla.org/build/buildapi"&gt;buildapi source&lt;/a&gt;), I had to extract it to a directory called buildapi/ (by default it did not do this). Then run easy_install buildapi - it seems that easy_install goes into the folder and runs the python setup.py.&lt;br /&gt;&lt;br /&gt;Once that is done, a default config.ini file was created (using &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;paster make-config buildapi config.ini&lt;/span&gt; while in the buildapi directory) which would serve as the runtime configuration file. Changes needed to be made in here to allow BuildAPI to be accessible on the localhost and to be able to access the MySQL databases (&lt;a href="http://www.sqlalchemy.org/"&gt;SQLAlchemy&lt;/a&gt; is used with MySQL).&lt;br /&gt;&lt;br /&gt;Thus, the following changes were made to the default config.ini file that was created using paster:&lt;br /&gt;&amp;nbsp;    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[server:main]&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;use = egg:Paste#http&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;host = 127.0.0.1&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;port = 5000&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# SQLAlchemy database URL&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sqlalchemy.scheduler_db.url = mysql://root:root@localhost/schedulerdb&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sqlalchemy.status_db.url = mysql://root:root@localhost/statusdb&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sqlalchemy.pool_recycle = 3600&lt;/div&gt;&lt;br /&gt;That's it, that sets up BuildAPI to be accessible on &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;http://127.0.0.1:5000/&lt;/span&gt;. Accessing it on the browser produces the following:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFCO7MAGI/AAAAAAAAABA/pLLMYi-MtGE/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFCO7MAGI/AAAAAAAAABA/pLLMYi-MtGE/s320/1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Each of the links work, as the database is set up as well. Here are a few example outputs:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFF01LLII/AAAAAAAAABE/olSIwyl912U/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFF01LLII/AAAAAAAAABE/olSIwyl912U/s320/4.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFH1sGzzI/AAAAAAAAABI/PRuD7a2jwEg/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFH1sGzzI/AAAAAAAAABI/PRuD7a2jwEg/s320/2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_OHI1urhny5Y/TNTFL2FtgcI/AAAAAAAAABQ/frUUYZf3FgE/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://2.bp.blogspot.com/_OHI1urhny5Y/TNTFL2FtgcI/AAAAAAAAABQ/frUUYZf3FgE/s320/5.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_OHI1urhny5Y/TNTFNU6vJqI/AAAAAAAAABU/MEx-l-NSGsg/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://4.bp.blogspot.com/_OHI1urhny5Y/TNTFNU6vJqI/AAAAAAAAABU/MEx-l-NSGsg/s320/3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;MVC: Model–View–Controller&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;This is the concept that I need to understand in order to create the necessary code for the project. I noticed it is very similar to Perl's Templating Toolkit, where it allows you to separate the logic and view.&amp;nbsp;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;From what I understand so far, the controller contains the logic, the model has the data and the view is basically the template that the end user will read the data from, as on a webpage for example.&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Controller &lt;/b&gt;&lt;br /&gt;When I am creating the scripts, I understand that the controller will call on the models or the views and return data to the model (please correct if this is wrong). It was also possible to use just a controller to show data on a webpage, however, it was not formatted. Using the command paster controller &lt;i&gt;name&lt;/i&gt; created a default template controller that I could play around with.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Model&lt;/b&gt;&lt;br /&gt;&lt;div class="MsoNoSpacing"&gt;The model is where I can put the database connection and queries and store it into values that the template would then also use. I did read that for passing arguments from the model to the template, BuildAPI can use a function called "tmpl_context as c". Variables are called using the ${c.&lt;i&gt;name&lt;/i&gt;} and this allows us to use the objects assigned as attributes of c anywhere else in the application - therefore, like global variables. &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;View&lt;/b&gt;&lt;br /&gt;The model passes the data to the view/template which will display that information on a webpage with graphs and charts. These templates use a library set called &lt;a href="http://www.makotemplates.org/"&gt;Mako&lt;/a&gt;, which again, is similar to Perl's Templating Toolkit. It has many functions, expressions and tags that can be used. The template files are saved as &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;i&gt;name&lt;/i&gt;.mako&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is a diagram of it (from wikipedia):&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/ModelViewControllerDiagram2.svg/500px-ModelViewControllerDiagram2.svg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="145" src="http://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/ModelViewControllerDiagram2.svg/500px-ModelViewControllerDiagram2.svg.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Well, this is how I understand the code will be created using MVC and its quite a lot to learn!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Testing&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;i&gt;One of the difficulties is knowing how all the components fit together, but after playing around with BuildAPI and taking a look at the structure of the pre-existing controllers, mako templates and model files, I have a fairly better understanding to progress into milestone 0.2.&lt;/i&gt; &lt;br /&gt;&lt;br /&gt;I managed to create a few controllers myself, along with models and views using documentation on the internet (such as on &lt;a href="http://pylonshq.com/"&gt;PylonsHQ)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However, they were pretty simple and I need to learn more about the syntax and formats.&lt;br /&gt;Example:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFJhL8OyI/AAAAAAAAABM/_nWKUV1l-X0/s1600/6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="164" src="http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFJhL8OyI/AAAAAAAAABM/_nWKUV1l-X0/s320/6.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;As an example, I was able to pull data (only used one column and a simple select query) and print it out on the screen using just a controller. I ran the command &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;paster controller datatest,&lt;/span&gt; which created the template controller file and I modified that.&lt;br /&gt;&lt;span style="color: red;"&gt;Note: &lt;/span&gt;To print to console, I had to edit the config.ini file and set     &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sqlalchemy.echo = True&lt;/span&gt;. &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Simple Controller: datatest.py&lt;/b&gt; &lt;br /&gt;&lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span lang="EN-CA"&gt;from sqlalchemy import *&lt;br /&gt;&lt;br /&gt;engine = create_engine('mysql://root:root@localhost/schedulerdb&lt;/span&gt;&lt;span lang="EN-CA"&gt; &lt;/span&gt;charset=utf8&amp;amp;use_unicode=0'&lt;span lang="EN-CA"&gt;)&lt;br /&gt;connection = engine.connect()&lt;br /&gt;&lt;br /&gt;result = engine.execute("select name from schedulers")&lt;br /&gt;for row in result:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "name:", row['name']&lt;br /&gt;result.close()&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This printed out all the names from the schedulers table from the schedulerdb database:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFO5LIyrI/AAAAAAAAABY/AyOTilu9Yng/s1600/7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="312" src="http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFO5LIyrI/AAAAAAAAABY/AyOTilu9Yng/s320/7.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I believe I can get this to display on a webpage, but I need a little help. I can use a controller file, datatest.py, such as this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;import logging&lt;br /&gt;&lt;br /&gt;from pylons import request, response, session, tmpl_context as c, url&lt;br /&gt;from pylons.controllers.util import abort, redirect&lt;br /&gt;&lt;br /&gt;from buildapi.lib.base import BaseController, render&lt;br /&gt;from buildapi.model.getmydata import &lt;u&gt;&lt;i&gt;functionnname&lt;/i&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;log = logging.getLogger(__name__)&lt;br /&gt;&lt;br /&gt;class DatatestController(BaseController):&lt;br /&gt;&lt;br /&gt;    def index(self):&lt;br /&gt;        # Return a rendered template&lt;br /&gt;        c.message = GetMessage()&lt;br /&gt;        return render('/displaydata.mako')&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The return render will call on the displaydata.mako View/Template.&lt;br /&gt;In the line &lt;br /&gt;&lt;pre&gt;"from buildapi.model.getmydata import &lt;u&gt;&lt;i&gt;functionnname&lt;/i&gt;&lt;/u&gt;"&lt;/pre&gt;&lt;br /&gt;It will call the model &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;getmydata.py&lt;/span&gt; (indicated by &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;buildapi.model.getmydata&lt;/span&gt; - i.e. directory/directory/file) and in this file is where I could define the &lt;i&gt;functionname&lt;/i&gt;.&lt;br /&gt;For example, if the function name is &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;GetMessage&lt;/span&gt;, then it would be defined as:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;def GetMessage():&lt;br /&gt;    return "Gimme my data fool!"&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;br /&gt;In the template, I simply use ${c.message}to get the data. If it is defined as above, then in the webpage (view) that is displayed, it will replace ${c.message} with "Gimme my data fool!".&lt;br /&gt;Note: as shown in the controller file, datatest.py, c.message was defined as:&lt;br /&gt;&lt;pre&gt;c.message = GetMessage()&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Expectations&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I would like to be able to print the data out to a webpage but will need to understand MVC and pylons syntax more. I will use the resources as listed on the &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/BuildAPI"&gt;BuildAPI wiki&lt;/a&gt; to help me with this&lt;/li&gt;&lt;li&gt;Once that is done, then I will try to put that data into a graph or chart&lt;/li&gt;&lt;li&gt;Next would be to pull the correct data and generate graphs based on the project objectives&lt;/li&gt;&lt;li&gt;And finally, get it all documented!&lt;/li&gt;&lt;/ul&gt;&lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;Quick Note about Python Virtual Environment&lt;/b&gt;&lt;/div&gt;A python virtual environment was highly recommended by&amp;nbsp; Release Engineering, and therefore I also set up one for testing BuildAPI code before I brought it over to my actual installation on Fedora. It was extremely easy to set up, and literally took a few minutes to get it running.&lt;br /&gt;Using easy_install, you can simply use easy_install virtualenv and it will install the virtualenv script to your path. Then you just need to create a directory, run the script wit the directory as your argument and it will set up a sandbox environment. Inside the sandbox/bin folder is an activate script, which as the name implies, activates the virtual environment.&lt;br /&gt;&lt;br /&gt;Here are the commands if you are interested: &lt;br /&gt;$ easy_install virtualenv &lt;br /&gt;&lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNoSpacing"&gt;$ mkdir ~/venv&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;$ virtualenv ~/venv/sandbox&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;$ source ~/venv/sandbox/bin/activate&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;(sandbox)$ easy_install [&lt;i&gt;packagename&lt;/i&gt;]&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Once you're in the sandbox, you can install whatever else you need to install&amp;nbsp;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="color: #444444;"&gt;&lt;i&gt;I kept detailed instructions on how to do each step, and I will leave that for the final documentation&lt;/i&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-2590590755403162453?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/2590590755403162453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/buildapi-01.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/2590590755403162453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/2590590755403162453'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/buildapi-01.html' title='BuildAPI: 0.1'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_OHI1urhny5Y/TNTFCO7MAGI/AAAAAAAAABA/pLLMYi-MtGE/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-8590118963630655811</id><published>2010-11-05T19:20:00.000-07:00</published><updated>2010-11-05T19:25:56.351-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>BuildAPI: Pre 0.1 - free disk space problem</title><content type='html'>&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;MySQL Database in my space!&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;For BuildAPI, I needed to install MySQL and import snapshots of two databases that I would be using. So it was installed on my Fedora virtual machine (with a 25GB raw  disk (&lt;i&gt;yes, it should have been LVM)&lt;/i&gt;)... and that eventually ran out of space. The database snapshots 'statusdb' and 'schedulerdb' were almost 10GB of  space combined - something I did not expect, and did not account for.&lt;br /&gt;&lt;br /&gt;I  was close to cloning my virtual machine into another with a larger  disk but after consulting with Chris Tyler, there were  much simpler options - such as simply adding another raw disk, and this  is what I did.&lt;br /&gt;&lt;br /&gt;Moreover, I edited my MySQL configuration file  (/etc/my.cnf) and pointed the data directory to be on the new virtual  raw disk and worked on it from there. Although my VM was terribly slow  at importing the (very large) sql dumpfile, and even failed once, it  worked out worked out fine in the end.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Lesson: use LVM, or better yet, do this all on an actual host and not a virtual machine&lt;/u&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-8590118963630655811?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/8590118963630655811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/buildapi-pre-01-free-disk-space-problem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/8590118963630655811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/8590118963630655811'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/buildapi-pre-01-free-disk-space-problem.html' title='BuildAPI: Pre 0.1 - free disk space problem'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-7068498012466396069</id><published>2010-11-05T05:28:00.000-07:00</published><updated>2010-11-05T18:05:21.718-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>BuildAPI: Milestone 0.1 Release (To be blogged)</title><content type='html'>&lt;i style="color: #666666;"&gt;Three cups of coffee later...&lt;/i&gt;&lt;br /&gt;Instead of posting everything for my BuildAPI 0.1 release now, I am going to get some sleep and post it later on today. However, the &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/BuildAPI"&gt;BuildAPI Project Page&lt;/a&gt; has been updated with what has been done for 0.1 so far and what needs to be done between now and milestone 0.2.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;Here's a quick summary of 0.1&lt;/b&gt;:&lt;/div&gt;&lt;ul&gt;&lt;li&gt; Completed a local installation of Python, Pylons, MySQL (with databases snapshots loaded) and google virtualization &lt;/li&gt;&lt;li&gt; Set up BuildAPI and ran the &lt;i&gt;Paste&lt;/i&gt; server to use the pre-existing BuildAPI controllers&amp;nbsp;&lt;/li&gt;&lt;li&gt;Created several test controllers, models and templates for testing and gaining a practical understanding how Pylons work &lt;/li&gt;&lt;li&gt; Created my own script using SQLAlchemy and MySQL engine to pull information from the &lt;a href="http://people.mozilla.org/%7Ecatlee/schedulerdbschema.png"&gt;SchedulerDB&lt;/a&gt; and &lt;a href="http://people.mozilla.org/%7Ecatlee/schema.png"&gt;StatusDB &lt;/a&gt;database.&amp;nbsp;&lt;/li&gt;&lt;li&gt;However, it displays only text (one line - refreshing page shows next line etc) and I need it to loop the values on the page to display all (should not be hard at all)&lt;/li&gt;&lt;li&gt;Before milestone 0.2, I would like to be able to generate a simple graph from the data I pulled so far. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;--and would you believe it, I actually had fun working with BuildAPI all night...until the caffeine was gone and dawn broke.&lt;br /&gt;&lt;br /&gt;&lt;i style="color: #444444;"&gt;Oh, and save the procrastination lecture for later. I have just been &lt;b&gt;extremely&amp;nbsp;&lt;/b&gt;busy &lt;/i&gt;&lt;i style="color: #444444;"&gt;(if you want to know - drop me a comment and I'll tell ya) &lt;/i&gt;&lt;i style="color: #444444;"&gt;and did not find enough time to work on the project. However, this is what&lt;/i&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #444444;"&gt; &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;span style="color: #444444;"&gt;all-nighters&lt;/span&gt;&lt;/i&gt;&lt;i style="color: #444444;"&gt; are for, because I'm a crazy workhorse!! &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #444444; font-size: x-small;"&gt;&lt;i&gt;zzzzzzzzzzz......&lt;/i&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-7068498012466396069?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/7068498012466396069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/buildapi-milestone-01-release-to-be.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/7068498012466396069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/7068498012466396069'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/11/buildapi-milestone-01-release-to-be.html' title='BuildAPI: Milestone 0.1 Release (To be blogged)'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-2217195612761552143</id><published>2010-10-26T12:11:00.000-07:00</published><updated>2010-10-26T12:11:55.731-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>BuildAPI: A First Look</title><content type='html'>&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;The Beginning&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Previously we had a conference call with Armen Zambrano from Mozilla regarding Mozharness, BuildAPI and Simple Release Bugs (Thanks Armen!). He had introduced us to these topics and got us rolling on projects that we could tackle. Consequently, I took an interest in BuildAPI which is a Pylons project used by RelEng (Release Engineering) to surface information collected from two databases updated through Buildbot (http://buildbot.net/trac) masters as they run jobs.&lt;br /&gt;&lt;br /&gt;The BuildAPI project wiki page can be found &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/BuildAPI"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;A Little About BuildAPI&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;This project involves generating analytic reports by querying databases, which can be used for a multitude of purposes such as performance or usage reports or discovering rogue Buildbot slave machines. Furthermore, it uses Pylons which combines the very best ideas from the worlds of Ruby, Python and Perl, providing a structured but extremely flexible Python web framework.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Getting Started&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;However, there is a great deal of information that needs to be learned and it would definitely require me to take a strong iniative. The first step is figuring out where exactly to start and how to progress.&lt;br /&gt;Fortunately, Armen had posted more information about BuildAPI on his blog (http://armenzg.blogspot.com/search/label/mozharness), which provided an objective:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="background-color: #666666;"&gt;What I need students to do is one of the two:&lt;br /&gt;1) generate graphs, charts, CSVs and CPU totals for infrastructure load blog posts like &lt;a href="http://oduinn.com/blog/2010/09/09/infrastructure-load-for-august-2010/"&gt;this&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; a) this is very useful and could move us forward towards having this information being published publicly for consumption&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; b)&amp;nbsp; I highly encourage this one as understanding the mental model behind it is easier&lt;br /&gt;2) write a tool that analyzes our statusDB and figure out slaves that have been continually been burning jobs (sometimes it takes us several days to spot them)&lt;/blockquote&gt;&lt;br /&gt;He also provided us with snapshots from the database and extremely helpful links such as &lt;a href="https://wiki.mozilla.org/ReleaseEngineering/BuildAPI"&gt;How to get started with BuildAPI &lt;/a&gt;and &lt;a href="http://code.google.com/intl/hy-AM/apis/chart/"&gt;Google Chart API&lt;/a&gt;&amp;nbsp; (more on that later).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #38761d; font-size: large;"&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Challenges&lt;/span&gt; &lt;/b&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="color: #6aa84f;"&gt;(I love 'em, bring 'em on!)&lt;/span&gt;&lt;/i&gt;&lt;span style="color: #6aa84f;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Need to wrap my head around BuildAPI's concepts&lt;/li&gt;&lt;li&gt;Absolutely no experience with Python (although it is similar to BASH, which I am fine with) and just barely touched Ruby&lt;/li&gt;&lt;li&gt;Need to learn how to integrate Google Chart API / how it works&lt;/li&gt;&lt;li&gt;Figure out the database structure and which information needs to be pulled to generate the required reports&lt;/li&gt;&lt;li&gt;How to integrate it all and create a tool that can accomplish the latter&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #6aa84f; font-size: large;"&gt;&lt;b&gt;What I have done so far:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;- I have looked at the links Armen had posted, especially the &lt;a href="https://wiki.mozilla.org/ReleaseEngineering/BuildAPI"&gt;ReleaseEngineering/BuildAPI&lt;/a&gt;&amp;nbsp; as it provides instructions on how to get started with BuildAPI.&lt;br /&gt;- Went over the database and its structure, which can be seen &lt;a href="http://people.mozilla.org/%7Ecatlee/schedulerdbschema.png"&gt;here&lt;/a&gt; and &lt;a href="http://people.mozilla.org/%7Ecatlee/schema.png"&gt;here&lt;/a&gt; or below:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://people.mozilla.org/%7Ecatlee/schedulerdbschema.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://people.mozilla.org/%7Ecatlee/schedulerdbschema.png" width="194" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&amp;nbsp;and&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://people.mozilla.org/%7Ecatlee/schema.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://people.mozilla.org/%7Ecatlee/schema.png" width="269" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;- Started reading on Pylons framework from the following sources: &lt;br /&gt;&lt;a href="http://pylonshq.com/docs/en/0.9.7/gettingstarted/"&gt;http://pylonshq.com/docs/en/0.9.7/gettingstarted/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://pylonshq.com/docs/en/0.9.7/tutorials/"&gt;http://pylonshq.com/docs/en/0.9.7/tutorials/&lt;/a&gt;&lt;br /&gt;- Also, briefly went over Google Chart API (It's awesome!)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;A Note about Google Chart API:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;The Google Chart API allows you to dynamically generate charts using a URL string.&lt;br /&gt;It is the perfect tool as the charts can be embedded on web pages which the advantage is there are no files to save or serve. Although, the API does provide the option to download the image for local or offline use.&lt;br /&gt;&lt;br /&gt;Here is an example:&lt;br /&gt;&lt;a href="http://chart.apis.google.com/chart?cht=p3&amp;amp;chd=t:60,40&amp;amp;chs=250x100&amp;amp;chl=Work%7CPlay"&gt;http://chart.apis.google.com/chart?cht=p3&amp;amp;chd=t:60,40&amp;amp;chs=250x100&amp;amp;chl=Work|Play&lt;/a&gt;&lt;br /&gt;&lt;i style="color: #e69138;"&gt;&lt;br /&gt;Isn't that awesome?&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-2217195612761552143?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/2217195612761552143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/10/beginning-previously-we-had-conference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/2217195612761552143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/2217195612761552143'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/10/beginning-previously-we-had-conference.html' title='BuildAPI: A First Look'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-4030549208356256574</id><published>2010-10-25T21:02:00.000-07:00</published><updated>2010-10-25T21:02:52.230-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Signing RPM Packages and Creating Your Own Repository</title><content type='html'>&lt;i&gt;So much for "break" week&lt;/i&gt;.&lt;i&gt; With so much to do, I'll be spending most of it just doing work.&lt;/i&gt;&lt;br /&gt;Anyway, aside from that, let's look at another lab which consists of two phases:&lt;br /&gt;- signing RPM packages, and then &lt;br /&gt;- creating our own yum repository from where we will serve our signed packages.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt; First Phase - Signing Packages&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;The first phase involved signing rpm packages and I had chosen to sign two rpms that I created using spec files: nled and snort.&lt;br /&gt;This was an easy task which is accomplished by:&lt;br /&gt;- generating a GPG key (using &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gpg --gen-key&lt;/span&gt;), &lt;br /&gt;- editing the&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; .rpmmacros&lt;/span&gt; file and adding my email address (adding &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;%_gpg_name "asingh114@learn.senecac.on.ca&lt;/span&gt;"), and finally, &lt;br /&gt;- signing the desired rpm packages using &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rpm --addsign packagefilename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Instructions can be found on our &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Fall_2010_SBR600_Weekly_Schedule"&gt;SBR600 Weekly Schedule wiki&lt;/a&gt; under "Week 5 (October 4) - Repositories/Distributing)"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt; Second Phase - Creating a Yum Repository&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;Again, instructions can be found on our &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Fall_2010_SBR600_Weekly_Schedule"&gt;SBR600 Weekly Schedule wiki&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Since I am running my host system (Fedora 12) in a virtual machine, I decided to create a local or internal yum repository and test it using another fedora virtual machine that I already had installed. The test virtual machine is running Fedora 13 64-bit edition. Furthermore, I will be using HTTP as the protocol to serve my repository directories and of course, Apache Web Server was already installed and running on the system.&lt;br /&gt;&lt;br /&gt;The repository directories were created in the public HTTP directory, and will be served out of &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/var/www/html/fedora/12/&lt;/span&gt;. However, in order to organize content I created two additional directories: &lt;br /&gt;- i386, for 32 bit Fedora editions, and&lt;br /&gt;- x86_64 for 64 bit.&lt;br /&gt;&lt;br /&gt;The following command was used:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;mkdir -p /var/www/html/fedora/{i386,x86_64}&lt;/div&gt;&lt;br /&gt;Then, I copied my signed repositories from Phase 1 over to their respective directory (either i386 or x86_64). Next is creating the repository metadata for both of the directories, which can be accomplished through the command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;createrepo /var/www/html/fedora/i386&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/span&gt;and then do the same for x86_64 directory.&lt;br /&gt;&lt;br /&gt;Or through a script such as this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#!/bin/bash&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;destdir="/var/www/html/repo/fedora"&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;for repo in i386 x86_64&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pushd ${destdir}/${repo}&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; createrepo .&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;done&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;Modified from &lt;a href="http://blogs.techrepublic.com.com/opensource/?p=609"&gt;http://blogs.techrepublic.com.com/opensource/?p=609&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Either way, this will create a repodata directory containing the repository metadata in both of those directories.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt; Testing the Repository&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;We will be using a GPG key for our repository, so I also had to create a GPG key file. This is simply done by using the command:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gpg --export --armour asingh114@learn.senecac.on.ca &amp;gt; RPM-GPG-KEY-asingh114&lt;/div&gt;This created the gpg key output which is saved into the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;RPM-GPG-KEY-asingh114&lt;/span&gt; file. This file is placed into the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/etc/pki/rpm-gpg/ &lt;/span&gt;directory and will be used by the repository.&lt;br /&gt;&lt;br /&gt;As mentioned before, this repository will be tested by serving to internal clients. Therefore, I created a new repository file in the&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; /etc/yum.repos.d &lt;/span&gt;directory called asingh114.repo, which contained the following:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[asingh114 repo]&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;name=Asingh114 Repository&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;failovermethod=priority&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;baseurl=http://localhost/repo/fedora/$basearch&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;enabled=1&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;metadata_expire=7d&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gpgcheck=1&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-asingh114&lt;/div&gt;&lt;br /&gt;Notes:&lt;br /&gt;- The &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;gpgkey&lt;/span&gt; is pointing to the file I generated earlier.&lt;br /&gt;- Notice the baseurl is pointing to my localhost. The yum built-in &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$basearch&lt;/span&gt; variable denotes the architecture such as i386 or x86_64, etc, hence using $basearch at the end allows it to be able to find the proper repository directories for the host depending on the host's architecure.&lt;br /&gt;- Additionally, I could have used another yum variable, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$releasever&lt;/span&gt;, which is the release version of the system (e.g. Fedora 12, 13 etc) to further organize content, but this is just a simple repository test and I figured it is not needed.&lt;br /&gt;&lt;br /&gt;When I tested this on my host machine, it worked fine. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Moreover, these two files were packaged into the RPM below that was created using a SPEC file:&lt;br /&gt;&lt;a href="http://asdesigned.ca/asingh114-repo-1-1.fc12.i686.rpm"&gt;http://asdesigned.ca/asingh114-repo-1-1.fc12.i686.rpm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I wanted to try this on the test virtual machine (Fedora 13 64 bit) so I temporarily moved all other repository files from the test machines' /etc/yum.repos.d directory and installed the rpm I created. This placed my repository file and my GPG key file into the proper locations. &lt;br /&gt;Then I ran yum to test it, which I was then prompted to import the keys - after which, it was able to pull from my own repository. Cool stuff!&lt;br /&gt;&lt;br /&gt;By the way, we can also use &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rpm --import GRPM-GPG-KEY-asingh114&lt;/span&gt; to import the GPG key files manually. &lt;br /&gt;&lt;br /&gt;To summarize, the setup was as follows:&lt;br /&gt;Host machine: Fedora 12 (32 bit)&lt;br /&gt;- Repository Serving Protocol: HTTP, Web Server&lt;br /&gt;- Repository Directories: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/var/www/html/fedora/i386 &lt;/span&gt;and &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/var/www/html/fedora/x86_64&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Test Virtual machine: Fedora 13 64 bit&lt;br /&gt;- Moved all other repository files out of the&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; /etc/yum.repos.d &lt;/span&gt;directory temporarily&lt;br /&gt;- Repository configuration file installed: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/etc/yum.repos.d/asingh114.repo&lt;/span&gt; via my RPM package&lt;br /&gt;- GPG Key file installed:&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; /etc/pki/rpm-gpg/RPM-GPG-KEY-asingh114&lt;/span&gt; via my RPM package&lt;br /&gt;- Ran &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;yum&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-4030549208356256574?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/4030549208356256574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/10/signing-rpm-packages-and-creating-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/4030549208356256574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/4030549208356256574'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/10/signing-rpm-packages-and-creating-your.html' title='Signing RPM Packages and Creating Your Own Repository'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-5348641345732179973</id><published>2010-10-11T15:08:00.000-07:00</published><updated>2010-10-11T15:08:47.180-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Mock and Koji testing with NLED (simple)</title><content type='html'>&lt;b style="color: #6aa84f;"&gt;Mock: &lt;/b&gt;&lt;br /&gt;After recreating my own NLED spec file, I test it with Mock using:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;mock -r fedora-12-i386 --rebuild nled-252-6.fc12.src.rpm&lt;/div&gt;&lt;br /&gt;The results were successful. I checked the log files in &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/var/lib/mock/fedora-12-i386/results/&lt;/span&gt;, mainly the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;root.log&lt;/span&gt; file and went through it. There were no errors and I did see the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ncurses-devel &lt;/span&gt;dependency that I had originally placed into my spec file was tested. NLED was &lt;i&gt;really simple&lt;/i&gt; so I didn't expect any errors anyway.&lt;br /&gt;I expect to run into issues when I try my own SNORT and Irrsi spec file (when I get around to finishing them).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Koji:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Next, I installed Koji - the instructions are on &lt;a href="http://fedoraproject.org/wiki/PackageMaintainers/UsingKoji"&gt;http://fedoraproject.org/wiki/PackageMaintainers/UsingKoji&lt;/a&gt;&lt;br /&gt;The basic steps are running &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;yum install fedora-packager&lt;/span&gt; and then running the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;fedora-packager-setup&lt;/span&gt;, at which point you will be prompted to enter your FAS username and password.&lt;br /&gt;&lt;br /&gt;In LAB 1 (Communication Lab), we created our FAS accounts, so I used those credentials successfully. It then creates the necessary certificates (see the fedoraproject.org link above for more information) and allows you to access the Koji Fedora Build system where you can see your builds and tests.&lt;br /&gt;&lt;br /&gt;Here is a link to mine: &lt;a href="http://koji.fedoraproject.org/koji/userinfo?userID=1552"&gt;Koji Fedora Builds&lt;/a&gt;&lt;br /&gt;If you click on my "Tasks", you will see that I have tested NLED on Fedora 12 platforms and all were successful.&lt;br /&gt;&lt;br /&gt;Below is the command and ouput for Koji on my Fedora system:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# koji build dist-f12 --scratch nled-2.52-6.fc12.src.rpm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;2528731 build (dist-f12, nled-2.52-6.fc12.src.rpm) completed successfully&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;I have to say that Koji is excellent and was very easy to set up! It's good to have such a resource available.&lt;br /&gt;&lt;br /&gt;Well, I am going to test SNORT and Irssi source RPMs here later and will post results.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: orange;"&gt;&lt;b style="color: #e69138;"&gt;P.S.&lt;/b&gt;&lt;b&gt;&lt;span style="color: #e69138;"&gt; Happy Thanksgiving! Mmm Turkey....&lt;span style="font-size: xx-small;"&gt;and if you don't get any work done, blame it on the Tryptophan&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: xx-small;"&gt;!!!&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-5348641345732179973?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/5348641345732179973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/10/mock-and-koji-testing-with-nled-simple.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/5348641345732179973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/5348641345732179973'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/10/mock-and-koji-testing-with-nled-simple.html' title='Mock and Koji testing with NLED (simple)'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-5836598123979646605</id><published>2010-10-11T14:49:00.000-07:00</published><updated>2010-10-11T14:49:51.434-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>NLED Spec file revisited</title><content type='html'>&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Revisited:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;In one of my previous posts, &lt;a href="http://andrewasdesigned.blogspot.com/2010/09/success-creating-my-own-spec-file.html"&gt;Creating an NLED Spec file&lt;/a&gt;, I had posted my spec file and RPM. However, I might not have had ran rpmlint on it so therefore there were some Warnings (no errors) that needed to be fixed.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;Rpmlint Warnings&lt;/b&gt;:&amp;nbsp;&lt;/div&gt;When I ran rpmlint on the spec file, I received warnings that I had macros in the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;%changelog&lt;/span&gt; section, which I did have.&lt;br /&gt;&lt;br /&gt;Warning messages:&amp;nbsp; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;"W: macro-in-%changelog %files"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;"W: macro-in-%changelog %Install"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That was an easy fix, and I learned that no macro should be placed in the %changelog section at all (I initially thought it did not matter).&lt;br /&gt;&lt;br /&gt;Running rpmlint on the nled-2.52-6.fc12.i686.rpm file, gave me two warnings:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;nled.i686: W: no-documentation&lt;br /&gt;nled.i686: W: no-manual-page-for-binary nled&lt;/div&gt;&lt;br /&gt;After checking the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;SOURCE/nled-2.52/ &lt;/span&gt;directory under &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;~/rpmbuild&lt;/span&gt;, there is a nled.txt file there. So it was simple as adding &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;%doc nled.txt&lt;/span&gt; to the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;%files&lt;/span&gt; section. Now the original source rpm does not have a manual page for the NLED binary so that is a warning that we can safely ignore (am I assuming right?)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;Update:&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;I decided, for testing purposes, to add a man page to the NLED rpm. I used the output from the command "?" within NLED that gives the list of hotkeys and shortcuts to create a man page file called nled.1.&lt;br /&gt;(To create your own man page, see&amp;nbsp;&lt;a href="http://anaturb.net/create_man_p.htm"&gt;here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Then I edited the nled.spec file and added to the sections below.&lt;br /&gt;Please note that comments were added in for explanations.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #999999; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# I used Source1 &lt;span style="color: #f1c232;"&gt;&lt;span style="color: #999999;"&gt;instead of using PATCH&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #999999; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="color: #f1c232;"&gt;&lt;span style="color: #999999;"&gt;# &lt;/span&gt;&lt;/span&gt;because it is just a straight file&amp;nbsp;&lt;/div&gt;&lt;div style="color: #999999; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# that doesn't need to be uncompressed&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="color: #f1c232;"&gt;Source1:&lt;/span&gt;&amp;nbsp; nled.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #999999;"&gt;#This was put in the SOURCES directory&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="color: #f1c232;"&gt;%prep&lt;/span&gt;&lt;br /&gt;%setup -q&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; &lt;span style="color: #999999;"&gt;#This copies the nled.1 to the BUILD directory&lt;/span&gt;&lt;br /&gt;cp -p %SOURCE1 %{_builddir}/%{name}-%{version}/ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="color: #f1c232;"&gt;%install&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rm -rf %{buildroot}&lt;br /&gt;mkdir -p %{buildroot}%{_bindir}/&lt;br /&gt;cp -p&amp;nbsp; nled %{buildroot}%{_bindir}/&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;span style="color: #999999;"&gt;# This creates the man directory in the BUILDROOT &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;mkdir -p %{buildroot}%{_mandir}/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="color: #999999;"&gt;# and this copies the nled.1 from the BUILD to the BUILDROOT man directory&lt;/span&gt;&lt;br /&gt;cp -p nled.1 %{buildroot}%{_mandir}/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="color: #f1c232;"&gt;%files&lt;/span&gt;&lt;br /&gt;%defattr(-,root,root,-)&lt;br /&gt;%doc nled.txt&amp;nbsp; #This adds the nled documentation&lt;br /&gt;%{_bindir}/*&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: #999999; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;# This tells rpm that the nled.1 man file is part of the package&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;%{_mandir}/*&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I will have to reupload the SPEC file and the RPM as they have changed, and the previous blog entry's versions were not tested.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-5836598123979646605?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/5836598123979646605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/10/nled-spec-file-revisited.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/5836598123979646605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/5836598123979646605'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/10/nled-spec-file-revisited.html' title='NLED Spec file revisited'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-6964134867539292961</id><published>2010-10-04T22:14:00.000-07:00</published><updated>2010-10-04T22:14:57.660-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Revisited: Testing RPM build times - Part 2</title><content type='html'>In one of my previous blog posts, &lt;a href="http://andrewasdesigned.blogspot.com/2010/09/revisited-testing-rpm-build-times-part.html"&gt;Revisited: Testing RPM build times - Part 1&lt;/a&gt;, I had indicated that I would be testing the build time of SNORT using an automated script. Well that didn't turn out too well. I had left it running overnight on my laptop and when I checked in the morning, my VirtualBox was not responding - it crashed. Of course, I lost all the data.&lt;br /&gt;&lt;br /&gt;Anyway, I redid this test using &lt;a href="http://www.aircrack-ng.org/"&gt;aircrack-ng&lt;/a&gt; which is much faster to build because I honestly do not have much time to try SNORT again and wait with 7 courses + work + web design work. Besides, I need to use my laptop tonight and don't want to skewer the build time results.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;h3&gt;&lt;b&gt;Summary of my results:&lt;/b&gt;&lt;/h3&gt;&lt;/div&gt;The first, and very first time I ran&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; rpmbuild -ba aircrack-ng&lt;/span&gt;, it took approximately 1 minute and 31 seconds. I ran it again after it had "warmed up" and I was surprised to see that it now took 43 seconds to complete.&lt;br /&gt;&lt;br /&gt;From the results, using a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-j1&lt;/span&gt; value proved to be the fastest which correlates with the fact that my virtual machine is only using 1 CPU.&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;h3&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/h3&gt;&lt;h3&gt;&lt;b&gt;The Results:&lt;/b&gt;&lt;/h3&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;-j1 &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;real&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m43.798s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;user&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m9.046s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;sys&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m27.381s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;-j2 &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;real&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m45.369s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;user&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m9.536s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;sys&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m28.681s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;-j3 &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;real&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m46.145s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;user&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m9.595s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;sys&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m29.114s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;-j4 &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;real&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m46.829s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;user&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m9.774s&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;sys&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0m29.842&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;h3 style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Quick Notes&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;&lt;/div&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Quote on time output: real, user, sys from a &lt;a href="http://stackoverflow.com/questions/556405/what-do-real-user-and-sys-mean-in-the-output-of-time1"&gt;site on the internet&lt;/a&gt;:&lt;/span&gt; &lt;br /&gt;&lt;blockquote style="background-color: #444444; color: black;"&gt;&lt;div style="color: white; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Real refers to actual elapsed time; User and Sys refer to CPU time used only by the process.&lt;/span&gt;&lt;/div&gt;&lt;ul style="color: white; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Real is wall clock time - time from start to finish of the call. This is all elapsed time including time slices used by other processes and time the process spends blocked (for example if it is waiting for I/O to complete).&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="color: white; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt; User is the amount of CPU time spent in user-mode code (outside the kernel) within the process. This is only actual CPU time used in executing the process. Other processes and time the process spends blocked do not count towards this figure.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="color: white;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt; Sys is the amount of CPU time spent in the kernel within the process. This means executing CPU time spent in system calls within the kernel, as opposed to library code, which is still running in user-space. Like 'user', this is only CPU time used by the process. See below for a brief description of kernel mode (also known as 'supervisor' mode) and the system call mechanism&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-6964134867539292961?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/6964134867539292961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/10/revisited-testing-rpm-build-times-part.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/6964134867539292961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/6964134867539292961'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/10/revisited-testing-rpm-build-times-part.html' title='Revisited: Testing RPM build times - Part 2'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-6297472953218459067</id><published>2010-09-30T23:53:00.000-07:00</published><updated>2010-09-30T23:56:32.140-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Success! Creating my own spec file for NLED</title><content type='html'>&lt;div style="color: #6aa84f;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;i&gt;Success!&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I finally got around to finishing my own spec file for NLED. I can tell you this - I learned quite a lot going through each one of the errors and trying to research and fix it. I'll admit it was quite frustrating at first. Getting it to finally work was good, but the &lt;u&gt;best&lt;/u&gt; part was gaining a MUCH better understanding of how the .spec file works.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo"&gt;Fedora How to&lt;/a&gt; pointed me in all the right directions, and of course, can't forget man's new best friend - Google. I just needed to spend some time going through the sections and understand what each is supposed to do.&lt;br /&gt;&lt;br /&gt;I will attach my RPM file here as well as the SPEC file for those of you who are interested. Please see below:&lt;br /&gt;&lt;br /&gt;Spec file: &lt;a href="http://asdesigned.ca/nled.spec"&gt;http://asdesigned.ca/nled.spec&lt;/a&gt;&lt;br /&gt;&lt;div style="color: #999999;"&gt;&lt;span style="font-size: small;"&gt;Please Right-click and use "Save as" to download the nled.spec file or just simply click on it to view it in the browser&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #999999;"&gt;&lt;br /&gt;&lt;/div&gt;RPM File: &lt;a href="http://asdesigned.ca/nled-2.52-8.fc12.i686.rpm"&gt;http://asdesigned.ca/nled-2.52-8.fc12.i686.rpm&lt;/a&gt;&lt;b style="color: #6aa84f;"&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b style="color: #6aa84f;"&gt; &lt;/b&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: 12pt; line-height: 115%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;span style="color: #6aa84f;"&gt;A Few Notes&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;NLED does not require any &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;./configure&lt;/span&gt; or &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;make&lt;/span&gt; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;install &lt;/span&gt;commands, instead it is simply compiled using the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;make&lt;/span&gt; command, where it will create the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;nled &lt;/span&gt;binary that can be placed into &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/usr/bin/ &lt;/span&gt;and executed anywhere on the command line.&lt;/li&gt;&lt;li&gt;Therefore, you will have to remove the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;./configure &lt;/span&gt;option from the %build section of the spec file and also remove the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;make install&lt;/span&gt; option from the %install section&lt;/li&gt;&lt;li&gt;I took a look at the original NLED Makefile and at the top it showed that the make options were CCOPTIONS=–O –c and LDOPTIONS=–lcurse    &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;.&amp;nbsp;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/span&gt;&lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote style="color: #999999;"&gt;&lt;blockquote&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;# AIX: CCOPTIONS=-qnoro -O -c&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;# some Linuxes: CCOPTIONS=-O -c -I /usr/include/ncurses&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;# other Linuxes (try this first):&lt;/span&gt;&lt;br /&gt;&lt;span lang="FR-CA" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;CCOPTIONS=-O -c&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span lang="FR-CA" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;# AIX: LDOPTIONS=-lcurses&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;# some Linuxes: LDOPTIONS=-lncurses&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;# other Linuxes:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;LDOPTIONS=-lcurses&lt;/span&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;So I added to the %build section:&amp;nbsp; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;make %{?_smp_mflags} CCOPTIONS="-O -c" LDOPTIONS="-lcurses"&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Next, the installation needs to be done "by hand" and the files need to be copied to the correct locations. Therefore, we need to create the directories (using&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; mkdir -p&lt;/span&gt;) and then copy the files from inside the build directory to the buildroot directory (using &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;cp -p&lt;/span&gt;). So following the Fedora How To resource, I added:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;%install&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rm -rf %{buildroot}&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;mkdir -p %{buildroot}%{_bindir}/&amp;nbsp;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;cp -p  nled %{buildroot}%{_bindir}/ &lt;/span&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;After doing that, I got an error when running rpmbuild: &lt;/li&gt;&lt;/ul&gt;&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;blockquote&gt;&lt;span style="color: #999999;"&gt;error: Installed (but unpackaged) file(s) found:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #999999;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /usr/bin/nled&lt;/span&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;This just means that I did not count those files under the %files section, as the %files section identifies what files and directories were added by the package - and thus, which files and directories are owned by the package.&lt;br /&gt;&lt;br /&gt;To fix it, I just needed to add &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;%{_bindir}/* &lt;/span&gt;under the %files section, and the rest is history.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-6297472953218459067?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/6297472953218459067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/success-creating-my-own-spec-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/6297472953218459067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/6297472953218459067'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/success-creating-my-own-spec-file.html' title='Success! Creating my own spec file for NLED'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-8514663539834124951</id><published>2010-09-29T22:30:00.000-07:00</published><updated>2010-09-29T22:52:59.197-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Revisited: Testing RPM build times - Part 1</title><content type='html'>In my last post, &lt;a href="http://andrewasdesigned.blogspot.com/2010/09/j1-j2-j3-whos-got-faster-build-than-me.html"&gt;Testing RPM Build times&lt;/a&gt;, I had used different -j values in the ~/.rpmmacros file to find the best value that resulted in the fastest build time for NLED, which is a very small package and the build time was relatively fast at around 6 seconds. However, after reading Chris Tyler's email today and chatting with him on IRC (irc.freenode.net, #seneca channel), it came to my attention that&lt;br /&gt;&lt;blockquote&gt;"most of that time is spent in unpacking the tarball and packing the RPMs, which are unaffected by the -j value"&lt;/blockquote&gt;In addition, Chris informed us of a build log file that contained a list of packages and build times that we could use to find a solid package to rebuild and test the -j value properly. This file can be found at     &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;span style="font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%;"&gt;&lt;a href="http://scotland.proximity.on.ca/sbr600/buildall.log"&gt;http://scotland.proximity.on.ca/sbr600/buildall.log&lt;/a&gt;&lt;/span&gt;&lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;br /&gt;Therefore, I am rebuilding SNORT, which I had compiled from &lt;a href="http://andrewasdesigned.blogspot.com/2010/09/instructions-were-to-build-two-software.html"&gt;source &lt;span style="font-size: small;"&gt;here&lt;/span&gt;&lt;/a&gt;, to finally get the proper results of the -j values.&lt;br /&gt;&lt;br /&gt;Oh and lucky me! According to the build log file, SNORT typically takes approximately 433 seconds to build!&lt;br /&gt;&lt;br /&gt;Regardless, I am using a script to let it run overnight and I will post the results tomorrow evening.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-8514663539834124951?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/8514663539834124951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/revisited-testing-rpm-build-times-part.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/8514663539834124951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/8514663539834124951'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/revisited-testing-rpm-build-times-part.html' title='Revisited: Testing RPM build times - Part 1'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-8952130028527179255</id><published>2010-09-24T20:57:00.000-07:00</published><updated>2010-09-24T20:58:54.596-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Testing RPM build times</title><content type='html'>&lt;u&gt;&lt;b&gt;The rpmmacros file &lt;/b&gt;&lt;/u&gt;&lt;br /&gt;This week we were experimenting with the rpmbuild macros configuration file:&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; ~/.rpmmacros. &lt;/span&gt;&lt;br /&gt;The&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; –j&lt;/span&gt; value of the     &lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: 11pt; line-height: 115%;"&gt;&lt;span style="font-size: small;"&gt;smp_mflags&lt;/span&gt; &lt;/span&gt;in the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;~/.rpmmacros&lt;/span&gt; file controls how many simultaneous jobs make starts and thus we can change it to see which value would give us the fastest build time.&lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;The Setup&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;For the first test, I used my laptop, which is running Fedora12 in an Oracle VM VirtualBox virtual machine with 1GB of RAM allocated. &lt;br /&gt;My laptop specifications are shown below: &lt;br /&gt;&lt;b&gt;CPU:&lt;/b&gt; Intel Core 2 Duo Mobile T5800 @ 2.00GHz&lt;br /&gt;&lt;b&gt;Ram:&lt;/b&gt; 4.00 GB&lt;br /&gt;&lt;br /&gt;The package I chose to build was &lt;a href="http://cdot.senecac.on.ca/software/nled/"&gt;NLED&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;The Test&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;The following command was used to gather the results:&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;time rpmbuild -ba nled.spec&lt;/span&gt;&lt;br /&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;u&gt;&lt;b&gt;The Results&lt;/b&gt;&lt;/u&gt; &lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;b&gt;Values:&lt;/b&gt; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;j1, -&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;j3&lt;/span&gt; (default), &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;j4&lt;/span&gt;&lt;b&gt;,&lt;/b&gt; -j5&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;This resulted in an elapsed time of 15.8 seconds. Keeping in mind that this test is on Fedora running in a virtual machine, I ran it again. This time the result was16.9 seconds which I attributed to factors such as the CPU being used for other processes on the host machine. Values 1, 4 and yielded similar results of times between 15.8 - 16.9 seconds and value 5 yielded close to 18 seconds.&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;b&gt;Best Value: &lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-j2&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;However, using a value of j2 yielded an elapsed build time of 14.3 seconds, so it seems that this is the optimal value to use, at least in a virtual machine.&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;i&gt;I re-did the test a second time after restarting the machine, and all the times dropped about &lt;b&gt;40%&lt;/b&gt; for each of the respective values!&lt;/i&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;u&gt;&lt;b&gt;Unsatisfied&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;I couldn't just have my cake and eat it too. I wanted seconds. So I pulled out the big guns and used my desktop with Fedora 13 installed.&lt;u&gt;&lt;b&gt; &lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;u&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;u&gt;&lt;b&gt;The Setup Revisited&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;b&gt;CPU:&amp;nbsp;&amp;nbsp; &lt;/b&gt;Intel i7 920 Overclocked&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;b&gt;Ram:&lt;/b&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &lt;/b&gt;6GB&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;u&gt;&lt;b&gt;The Results Revisited&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;Blazing.&amp;nbsp;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;No, really. The best value was a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-j4&lt;/span&gt; &lt;span style="font-family: inherit;"&gt;which yielded 3 seconds to build NLED.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;I would definitely say that the benefits of changing the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;-j&lt;/span&gt; values of the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;smp_mflags &lt;/span&gt;would be more noticeable when compiling larger builds, but it was still interesting to test out the build times.&lt;/div&gt;&lt;div style="margin: 0in 0in 0.0001pt;"&gt;&lt;u&gt;&lt;b&gt; &lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-8952130028527179255?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/8952130028527179255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/j1-j2-j3-whos-got-faster-build-than-me.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/8952130028527179255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/8952130028527179255'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/j1-j2-j3-whos-got-faster-build-than-me.html' title='Testing RPM build times'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-7724062348903600223</id><published>2010-09-24T19:50:00.000-07:00</published><updated>2010-09-24T21:17:08.375-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>A Prequel: Rebuilding an Existing Fedora SRPM</title><content type='html'>&lt;u&gt;&lt;b&gt;Rebuilding an Existing Fedora SRPM:&lt;/b&gt;&lt;/u&gt; &lt;br /&gt;I chose to rebuild the NLED package on my machine which was quite simple.&lt;br /&gt;&lt;br /&gt;Steps: &lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install the necessary packages: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rpm-build, rpmdevtools, rpmlint, yum-utils&lt;/span&gt;&amp;nbsp; &lt;/li&gt;&lt;li&gt;Setup your system, see &lt;a href="http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo"&gt;here &lt;/a&gt;&lt;/li&gt;&lt;li&gt;Download the source file &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;wget &lt;/span&gt;&lt;a href="http://cdot.senecac.on.ca/software/nled/nled_2_52_src.tgz" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;http://cdot.senecac.on.ca/software/nled/nled_2_52_src.tgz&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Install it, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rpm -ivh nled_2_52_src.tgz&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Go in the: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;cd&lt;/span&gt; &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;~/rpmbuild/SPECS&lt;/span&gt; directory&lt;/li&gt;&lt;li&gt;Run the command &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rpmbuild -ba packagename.spec&lt;/span&gt;&lt;span style="font-family: inherit; font-size: small;"&gt;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;The &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;.spec&lt;/span&gt; file was fairly straightforward. This took about 15 seconds to complete (also see &lt;a href="http://andrewasdesigned.blogspot.com/2010/09/j1-j2-j3-whos-got-faster-build-than-me.html"&gt;Testing Build Times&lt;/a&gt;), and was done without breaking a sweat - unlike the next section below. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Creating my own &lt;/b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;.spec&lt;/span&gt;&lt;b&gt; file &lt;/b&gt;&lt;/u&gt;&lt;br /&gt;In the second week of the course, I had built Snort from source using ./configure, make and make install, which can be found &lt;a href="http://andrewasdesigned.blogspot.com/2010/09/instructions-were-to-build-two-software.html"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A few nights ago, I tried building my own spec file for Snort but ran into a &lt;i&gt;few&lt;/i&gt; problems. Thus I took a look at the original Snort spec file after installing the source (To see how, &lt;a href="http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo"&gt;click here&lt;/a&gt;), and it was filled with information that I am unfamiliar with (&lt;b&gt;for now&lt;/b&gt; – &lt;i&gt;can’t emphasize that enough&lt;/i&gt; – &lt;b&gt;for now&lt;/b&gt;). However, I did take some time to go over it to try to understand out what each line was doing. &lt;br /&gt;&lt;br /&gt;Next, I figured I can write my own (&lt;b&gt;much&lt;/b&gt;) simpler snort spec file and get it to build into an rpm package – but I’ll do that at a later time. Since this was my first attempt at creating my own spec file, I wanted to try something much easier at first and get practice, understand it more. &lt;br /&gt;&lt;br /&gt;I will post my experience of creating my rpm build via a spec file in the coming days along with a link to download the respective spec file, source and package for your perusal or curiosity.&lt;br /&gt;&lt;br /&gt;Heck, I’m still going through &lt;a href="http://sourceforge.net/"&gt;SourceForge &lt;/a&gt;looking at all the goodies available.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-7724062348903600223?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/7724062348903600223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/prequel-rebuilding-existing-fedora-srpm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/7724062348903600223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/7724062348903600223'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/prequel-rebuilding-existing-fedora-srpm.html' title='A Prequel: Rebuilding an Existing Fedora SRPM'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-7616863265066634639</id><published>2010-09-12T22:44:00.000-07:00</published><updated>2010-09-12T22:56:38.045-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>Compiling NLED and Snort from source</title><content type='html'>&lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNoSpacing"&gt;The instructions were to build two software packages from their source files, of which one must be NLED and any other software of your choice.&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;First let’s begin wiith &lt;a href="http://cdot.senecac.on.ca/software/nled/"&gt;NLED&lt;/a&gt;:&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;&lt;u&gt;Compiling NLED from Source&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Download and extract the Tarball:&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;$ wget http://cdot.senecac.on.ca/software/nled/nled_2_52_src.tgz&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;$ tar -xvz nled_2_52_src.tgz&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Next, run make and make install to compile and install:&lt;/div&gt;&lt;div class="MsoNoSpacing" style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;$ make&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing" style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;$ make install&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Incidentally, this installation ran without issues and I am successfully using NLED.&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;For the second software, I decided to install &lt;a href="http://www.snort.org/"&gt;Snort&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;blockquote style="color: #999999;"&gt;&lt;div class="MsoNoSpacing"&gt;"Snort® is an open source network intrusion prevention and detection system (IDS/IPS) developed by &lt;a href="http://sourcefire.com/" target="_blank"&gt;Sourcefire&lt;/a&gt;. Combining the benefits of signature, protocol and anomaly-based inspection, Snort is the most widely deployed IDS/IPS technology worldwide."&lt;/div&gt;&lt;/blockquote&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="color: #6aa84f;"&gt;&lt;b&gt;&lt;u&gt;Compiling Snort from Source&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNoSpacing"&gt;You can download the &lt;b&gt;Source&lt;/b&gt; snort package from:&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;a href="http://www.snort.org/snort-downloads"&gt;http://www.snort.org/snort-downloads&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;m:smallfrac m:val="off"&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val="0"&gt;    &lt;m:rmargin m:val="0"&gt;    &lt;m:defjc m:val="centerGroup"&gt;    &lt;m:wrapindent m:val="1440"&gt;    &lt;m:intlim m:val="subSup"&gt;    &lt;m:narylim m:val="undOvr"&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class="MsoNoSpacing"&gt;Untar the Source file:&lt;/div&gt;&lt;blockquote&gt;&lt;div style="background-color: #444444;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;$ tar -xvf snort-2.8.6.1.tar.gz &lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #444444;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt; $ cd snort-2.8.6.1/&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;The Snort website (&lt;a href="http://www.snort.org/"&gt;www.snort.org&lt;/a&gt;) showed that before installing Snort you need have a number of software packages installed such as Libpcap, PCRE, Libnet and Barnyard.&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;I ran the following commands to see if these packages are installed:&lt;/div&gt;&lt;blockquote&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;;"&gt;rpm -q libpcap&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; - Yes, installed&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;;"&gt;rpm -q pcre&lt;/span&gt;&lt;span style="background-color: #444444;"&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Yes, installed&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;;"&gt;rpm -q libnet&lt;/span&gt;&lt;span style="background-color: #444444;"&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - No, not installed (or at least rpm did not find it)&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;;"&gt;rpm -q barnyard&lt;/span&gt;&lt;span style="background-color: #444444;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - No, not installed (or at least rpm did not find it)&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;However, I decided to run the configure file to see what would happen.&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style="background-color: #444444; color: white;"&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;$ ./configure&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;But alas, I got the following error&lt;span style="color: black;"&gt;:&lt;/span&gt;&lt;/div&gt;&lt;blockquote style="background-color: #444444;"&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Snort Error:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; ERROR!&amp;nbsp; Libpcap library/headers (libpcap.a (or .so)/pcap.h)not found, go get it from &lt;a href="http://www.tcpdump.org/" target="_blank"&gt;http://www.tcpdump.org&lt;/a&gt;&amp;nbsp; or use the --with-libpcap-* options, if you have it installed in unusual place.&amp;nbsp; Also check if your libpcap depends on another shared library that may be installed in an unusual place&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;But wait, the latest lipbcap package WAS installed according to rpm (as I had run rpm –q libpcap above).&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Perhaps, I was missing something else. I checked the &lt;a href="http://www.tcpdump.org/"&gt;www.tcpdump.org&lt;/a&gt; website but it had the same libcap I had installed. I ran the command:&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style="background-color: #444444;"&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;$ yum search libpcap&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Loaded plugins: presto, refresh-packagekit&lt;br /&gt;=================Matched: libpcap ================= libpcap.i686 : A system-independent interface for user-level packet capture&lt;br /&gt;libpcap-devel.i686 : Libraries and header files for the libpcap library&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;…&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Since libpcap was installed, I figured I needed the development libpcap library as well so I installed it using:&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style="background-color: #444444;"&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;$ yum install libpcap-devel&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Then I ran &lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style="background-color: #444444;"&gt;./configure&lt;/span&gt;&lt;/span&gt; again, as it was going through I noticed:&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style="background-color: #444444;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;./configure: line 13616: pcre-config: command not found&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt; ./configure: line 13622: pcre-config: command not found&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt; checking pcre.h usability... no&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt; checking pcre.h presence... no&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt; checking for pcre.h... no&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;br /&gt;I knew what was coming and then BAM! Another error:&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;blockquote style="background-color: #444444;"&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;ERROR!&amp;nbsp; Libpcre header not found.&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Get it from &lt;a href="http://www.pcre.org/" target="_blank"&gt;http://www.pcre.org&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;So I checked &lt;a href="http://www.pcre.org/"&gt;www.pcre.org&lt;/a&gt; and found the same pcre library I have installed already. Now I know there must be a pcre development library like libpcap so I ran yum search pcre and it came back with:&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;/div&gt;&lt;blockquote style="background-color: #444444;"&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Loaded plugins: presto, refresh-packagekit&lt;br /&gt;==========Matched: pcre ============&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;…&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote style="background-color: #444444;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;pcre.i686 : Perl-compatible regular expression library&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt; pcre-devel.i686 : Development files for pcre&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="MsoNoSpacing"&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Of course, I then ran &lt;span style="color: #444444; font-family: &amp;quot;Courier New&amp;quot;;"&gt;yum install prce-devel&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Finally, I ran &lt;span style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;;"&gt;./configure&lt;/span&gt; again, and voila! It completed (although I didn’t seem to have barnyard or libnet according to rpm –q)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you need to run &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;./configure&lt;/span&gt; with special options, then please see this resource I found on the configuration options you can use:&lt;br /&gt;&lt;a href="http://204.152.191.100:8080/wiki/index.php/Configure_options_-_snort"&gt;http://204.152.191.100:8080/wiki/index.php/Configure_options_-_snort&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Next I ran &lt;span style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;;"&gt;make&lt;/span&gt; as my current user, followed by &lt;span style="background-color: #444444; font-family: &amp;quot;Courier New&amp;quot;;"&gt;make install&lt;/span&gt; &lt;b style="color: red;"&gt;as root&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNoSpacing"&gt;Snort is successfully installed. Time to start snortin’…or not (insert fail comment here).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-7616863265066634639?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/7616863265066634639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/instructions-were-to-build-two-software.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/7616863265066634639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/7616863265066634639'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/instructions-were-to-build-two-software.html' title='Compiling NLED and Snort from source'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2703847045961269472.post-481402737644420530</id><published>2010-09-10T00:25:00.000-07:00</published><updated>2010-09-10T00:36:25.931-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBR600'/><title type='text'>SBR600 Communication Lab</title><content type='html'>Hello, &lt;br /&gt;My name is Andrew Singh. I am currently a 6th (and final) semester student at Seneca College in the Computer Systems Technology course. I plan to graduate with high honours so here's to the start of another to-be-great semester (&lt;i&gt;and with that: raises a glass of beer&lt;/i&gt;)!&lt;br /&gt;&lt;br /&gt;This blog was created for two purposes:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;For my current Software Build and Release course SBR600, and&lt;/li&gt;&lt;li&gt;as a blog for my web and graphic designs.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;A few thing about me:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I love programming (PERL, PHP and learning JavaScript and AJAX. I am willing to learn any programming language!)&amp;nbsp;&lt;/li&gt;&lt;li&gt;My flavour of Linux would definitely be Fedora&lt;/li&gt;&lt;li&gt;I create web and graphic designs, currently for my (own) company ASDesigned (Site will be up shortly)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;There's more but let's get started with SBR600. Our first assignment was to complete the &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/Fall_2010_SBR600_Weekly_Schedule#Week_1_.28September_6.29_-_Introduction"&gt;&lt;b&gt;Communication Lab&lt;/b&gt;&lt;/a&gt;, and&lt;b&gt; &lt;/b&gt;without further ado:&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;Here is my Seneca Wiki:&amp;nbsp; &lt;a href="http://zenit.senecac.on.ca/wiki/index.php/User:Asingh"&gt;Seneca Wiki&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;And here you will find me on Fedora Wiki: &lt;a href="https://fedoraproject.org/wiki/User:Asingh"&gt;Fedora Wiki&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;For IRC, I've decided to use the firefox plugin called ChatZilla (which can be found here: &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/16/"&gt;ChatZilla Plugin for Firefox&lt;/a&gt;). It is definitely a lightweight and easy-to-use extension with similar capabilities as usual IRC clients as noted from the official description:&lt;/div&gt;&lt;blockquote&gt;&lt;div class="MsoNormal"&gt;ChatZilla provides all the usual IRC client features: multiple servers, a  built-in list of standard networks, easy searching and sorting of  available channels, logging, and DCC chat and file transfers, plus easy  customization with JavaScript plug-ins and CSS styling.&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="MsoNormal"&gt;You may find me on IRC under the freenode network (&lt;a class="external free" href="irc://irc.freenode.net/" rel="nofollow" title="irc://irc.freenode.net"&gt;irc://irc.freenode.net&lt;/a&gt;) under the&lt;b&gt; &lt;/b&gt;&lt;span style="color: orange;"&gt;&lt;b&gt;#seneca&lt;/b&gt; &lt;/span&gt;channel.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;IRC username: &lt;b&gt;&lt;span style="color: orange;"&gt;asingh&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Additionally, here is a screenshot of ChatZilla in the #seneca channel on the freenode network:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OHI1urhny5Y/TInR6lcLxdI/AAAAAAAAAAU/JMloYiBr2TA/s1600/IRC.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="357" src="http://1.bp.blogspot.com/_OHI1urhny5Y/TInR6lcLxdI/AAAAAAAAAAU/JMloYiBr2TA/s400/IRC.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2703847045961269472-481402737644420530?l=andrewasdesigned.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://andrewasdesigned.blogspot.com/feeds/481402737644420530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/sbr600-communication-lab.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/481402737644420530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2703847045961269472/posts/default/481402737644420530'/><link rel='alternate' type='text/html' href='http://andrewasdesigned.blogspot.com/2010/09/sbr600-communication-lab.html' title='SBR600 Communication Lab'/><author><name>Andrew S</name><uri>http://www.blogger.com/profile/00011226653839485089</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_OHI1urhny5Y/TInR6lcLxdI/AAAAAAAAAAU/JMloYiBr2TA/s72-c/IRC.PNG' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
