-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtutorial.html
232 lines (204 loc) · 9.72 KB
/
tutorial.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tutorial — polyphemus 0.1 documentation</title>
<link rel="stylesheet" href="_static/numpy_friendly.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Noticia+Text|Open+Sans|Droid+Sans+Mono" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/jquery.cookie.js"></script>
<script type="text/javascript" src="_static/cloud.js"></script>
<link rel="shortcut icon" href="_static/polyphemus.ico"/>
<link rel="top" title="polyphemus 0.1 documentation" href="index.html" />
<link rel="next" title="Polyphemus Continuous Integration" href="batlab.html" />
<link rel="prev" title="Polyphemus-CI" href="index.html" />
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="relbar-top">
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> </li>
<li class="right" >
<a href="np-modindex.html" title="Python Module Index"
>modules</a> </li>
<li class="right" >
<a href="batlab.html" title="Polyphemus Continuous Integration"
accesskey="N">next</a> </li>
<li class="right" >
<a href="index.html" title="Polyphemus-CI"
accesskey="P">previous</a> </li>
<li><a href="index.html">polyphemus 0.1 documentation</a> »</li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="tutorial">
<span id="id1"></span><h1>Tutorial<a class="headerlink" href="#tutorial" title="Permalink to this headline">¶</a></h1>
<p>Polyphemus is a continuous integration tool that ties together services like
GitHub to the build & test laboratory (BaTLab). There are many options that you
might include.</p>
<div class="section" id="putting-it-all-together">
<h2>Putting It All Together<a class="headerlink" href="#putting-it-all-together" title="Permalink to this headline">¶</a></h2>
<p>The following is a more complete, realistic example of a <cite>polyphemusrc.py</cite> file that
one might run across in a production level environment.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># Generic Settings</span>
<span class="c"># the URL or IP address where Polyphemus is running</span>
<span class="n">server_name</span> <span class="o">=</span> <span class="n">server_url</span> <span class="o">=</span> <span class="s">'cycamore-ci.fuelcycle.org'</span>
<span class="c"># The port to run Polyphemus on</span>
<span class="n">port</span> <span class="o">=</span> <span class="mi">80</span>
<span class="c"># GitHub settings</span>
<span class="c"># a user name with rights to the target repository</span>
<span class="n">github_user</span> <span class="o">=</span> <span class="s">'cyclus-ci'</span>
<span class="c"># the user or organization that owns the repo</span>
<span class="n">github_owner</span> <span class="o">=</span> <span class="s">'cyclus'</span>
<span class="c"># the repo name</span>
<span class="n">github_repo</span> <span class="o">=</span> <span class="s">'cycamore'</span>
<span class="c"># local file to store github login info</span>
<span class="n">github_credentials</span> <span class="o">=</span> <span class="s">'/root/polyphemusrc/gh.cred'</span>
<span class="c"># BaTLab settings</span>
<span class="c"># The BaTLab username</span>
<span class="n">batlab_user</span> <span class="o">=</span> <span class="s">'cyclusci'</span>
<span class="c"># Location to grab batlab scripts from, may be a zip file or a git repo</span>
<span class="n">batlab_scripts_url</span> <span class="o">=</span> <span class="s">'https://github.com/cyclus/ciclus/archive/master.zip'</span>
<span class="c"># the fetch file, will be overwritten with pull request location</span>
<span class="n">batlab_fetch_file</span> <span class="o">=</span> <span class="s">'fetch/cycamore.git'</span>
<span class="c"># top-level run specification</span>
<span class="n">batlab_run_spec</span> <span class="o">=</span> <span class="s">'cycamore.fast.run-spec'</span>
<span class="c"># Optional custom batlab submission command</span>
<span class="n">batlab_submit_cmd</span> <span class="o">=</span> <span class="s">'./submit.sh'</span>
<span class="c"># Apache settings</span>
<span class="c"># Directory for log file, must be writeable and exist.</span>
<span class="n">log_dir</span> <span class="o">=</span> <span class="s">'/root/polyphemusrc'</span>
</pre></div>
</div>
</div>
<div class="section" id="rackspace-install">
<h2>Rackspace Install<a class="headerlink" href="#rackspace-install" title="Permalink to this headline">¶</a></h2>
<div class="highlight-bash"><div class="highlight"><pre><span class="c"># Install Dependencies</span>
apt-get install -y git python-argcomplete python-flask python-paramiko apache2 libapache2-mod-wsgi
easy_install github3.py
service apache2 stop
<span class="c"># Install Polyphemus</span>
git clone https://github.com/polyphemus-ci/polyphemus
<span class="nb">cd </span>polyphemus
python setup.py install
<span class="nb">cd</span> ..
<span class="c"># Make SSH key (if you haven't done so)</span>
ssh-keygen -t rsa
<span class="c"># Get run control files</span>
git clone https://github.com/cyclus/polyphemusrc
<span class="nb">cd </span>polyphemusrc
<span class="c"># Setup polyphemus for a given run control file,</span>
<span class="c"># kill these commands with ^C after they start</span>
polyphemus --rc cyclusrc.py
polyphemus --rc cyclusrc.py --plugins polyphemus.apache2 --apache2-setup
a2ensite cyclus-ci.fuelcycle.org
<span class="c"># Verify permissions for apache</span>
cp -r ~/.ssh/ /var/www/.ssh
chmod +rx /var/www/ /var/www/.ssh /root /root/polyphemusrc
chmod +r /var/www/.ssh/id_rsa
<span class="c"># Start apache!</span>
service apache2 start
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/polyphemus.gif" alt="Logo"/>
</a></p>
<div class="sphinxlocaltoc">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Tutorial</a><ul>
<li><a class="reference internal" href="#putting-it-all-together">Putting It All Together</a></li>
<li><a class="reference internal" href="#rackspace-install">Rackspace Install</a></li>
</ul>
</li>
</ul>
</div>
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">Polyphemus-CI</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="batlab.html"
title="next chapter">Polyphemus Continuous Integration</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/tutorial.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="relbar-bottom">
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> </li>
<li class="right" >
<a href="np-modindex.html" title="Python Module Index"
>modules</a> </li>
<li class="right" >
<a href="batlab.html" title="Polyphemus Continuous Integration"
>next</a> </li>
<li class="right" >
<a href="index.html" title="Polyphemus-CI"
>previous</a> </li>
<li><a href="index.html">polyphemus 0.1 documentation</a> »</li>
</ul>
</div>
</div>
<div class="footer">
© Copyright 2013, Anthony Scopatz.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
<!-- cloud_sptheme 1.4 -->
</body>
</html>