import repository from arizona
[raven.git] / webpage / tutpac.html
1 <html>
2 <head>
3 <title> Stork Project </title>
4 <LINK href="stork.css" rel="stylesheet" type="text/css">
5
6 </head>
7
8 <body>
9
10
11 <div class="display" align="center">
12         <table border="0">
13         <tr>
14                 <td width="170" valign="top">
15
16                                 <br/>
17                                 <table cellpadding="3" width="170" id="links" class="links">
18                                         <tr>
19                                                 <td align="right">
20
21                                                         <ul class="links">
22
23                                                                 <a href = "index.html"><h3>Stork</h3></a>
24                                                                 <li class="links"><a href="tutmain.html">Stork Tutorial</a></li>
25
26                                                                 <li class="links"><a href="advanced.html">Advanced Usage</a></li>
27                                                                 <li class="links"><a href="arch.html">Stork Architecture</a></li>
28                                                                 <li class="links"><a href="filelist.html">Stork File List</a></li>
29                                                                 <li class="links"><a href="about.html">About Us</a></li>
30                                                                 <li class="links"><a href="apps.html">Related Links</a></li>
31                                                                 <li class="links"><a href="contact.html">Contact Stork</a></li>
32                                                                 <h4>Links</h4>
33                                                                 <li class="links"><a href="http://appmanager.berkeley.intel-research.net/plcontrol/apps.php?appid=1029">
34                                                                 Slice Status</a></li>
35                                                                 <li class="links"><a href="https://stork-repository.cs.arizona.edu">Stork Repository</a></li>
36                                                         </ul>
37
38                                                  </td>
39                                         </tr>
40                                 </table>
41                                 <br/>
42                 </td>
43
44                 <td valign="top">
45                 <table class="info" cellpadding="0" width="700" >
46                 <tr  height="75"><td colspan="3"><img style="margin-left: -0px;" src="images/stork-header.png" alt="stork logo"/></td></tr>
47                 <tr  bgcolor="#444444" class="headerrow" width="100%" height="2">
48
49                         <th colspan="2"> Stork Tutorial </th>
50
51                 </tr>
52                 <tr valign="top" align="left">
53
54                         <td>
55                                 <table cellpadding="8" id="content" class="content">
56                                         <tr>
57                                                 <td>
58
59                                                         <h1><a name = "top"></a>Stork Tutorial: Pacman</h1>
60                                                         <a name = "pacman"><h3>Pacman</h3></a>
61                                                         Stork's package manager (pacman) can help you manage your packages
62                                                         across all your nodes. Rather than installing or uninstalling packages on
63                                                         each of your nodes individually, you can assign your nodes to groups and
64                                                         instruct stork to install or remove packages on those groups. Pacman
65                                                         is therefore efficient to use when a package needs to be installed on
66                                                         a large number of nodes. Pacman also allows packages to be automatically
67                                                         updated when the package creator updates them in the repository; this
68                                                         allows Stork to be nearly autonomous.
69                                                         Pacman uses two files; groups and packages. Using storkutil, you can create these two
70                                                         files and upload them. Stork will then distribute these files to your nodes
71                                                         and perform the tasks you assigned.
72
73                                                         <p><b>Pacman Groups</b>
74                                                         <br>Your groups.pacman file allows you organize your nodes into separate
75                                                         groups. You are allowed to include a node into a group or exclude a node
76                                                         from a group. You can also include, exclude, or intersect groups with each
77                                                         other. To define our groups, we can use:
78                                                         <p><code><b>./storkutil.py pacgroups (include|exclude|intersect|remove) group NAME [NAME...]</b></code>
79                                                         <br>where <code>group</code> is the name of the group to be affected, and
80                                                         <code>NAME</code> are the names of the nodes or groups to be included/excluded/removed.
81                                                         <p>We start by adding a node to a group. If a pacman group file for your
82                                                         username does not exist, then storkutil will create a new one.
83
84
85 <p><table width=400 height=200 cellspacing=0 cellpadding=5 border=5 bordercolor="orange"><tr>
86 <td width="100%" align="left" valign="top" bgcolor="teal">
87 <span style="color: white">
88 <code><b>./storkutil.py pacgroups include myGroup foo1.node foo2.node</b>
89 <br>Using groups file: ./foo.~~~.groups.pacman
90 <br>File Not Found, Creating New File
91 <br>File './foo.~~~.groups.pacman' successfully signed</code>
92 <p><code><b>./storkutil.py view groups</b>
93 <br>Viewing: foo.~~~.groups.pacman
94 <br>
95 <br>PACMAN GROUP FILE
96     <br>    GROUP:  myGroup
97          <br>       INCLUDE:        foo1.node
98              <br>   INCLUDE:        foo2.node
99 </code></span></td></tr></table>
100
101
102
103                                                         <p>Storkutil will automatically sign the file using your default private key
104                                                         file, which you created when you <a href="tutfiles.html#genpair">generated your first key pairs</a>. If
105                                                         you want to use a username that is not your default, you can use the <code>--username</code>
106                                                         option to work on a different file.
107                                                         <br>We can continue adding more data
108                                                         into our group definitions. For instance, if we want myGroup to include all the
109                                                         nodes in the group oldGroup, except for the node badNode which is a member of oldGroup,
110                                                         we can run the following commands:
111                                                         <p><b><code>./storkutil.py pacgroups include myGroup oldGroup
112                                                         <br>./storkutil.py pacgroups exclude myGroup badNode</b></code>
113                                                         <br>This means that installing a package to myGroup will install it to every node
114                                                         included in oldGroup except for badNode.
115                                                         <p>We can remove groups or nodes from a group by simply using the <code>remove</code>
116                                                         command, as such:
117                                                         <p><code><b>./storkutil.py pacgroups remove myGroup</b>
118
119
120                                                         <p>If you want to
121                                                         view the contents of the group file, you can use the <code>view groups</code> command in
122                                                         storkutil, but you will first need to add a node to a group to generate a group file.
123                                                         <br>When you are done, you will need to upload the groups.pacman file to the Stork repository.
124
125                                                         <b><p>Pacman Packages</b>
126                                                         <br>The packages.pacman file allows you to manage which packages to
127                                                         install on which nodes. With the pacman packages file, you can tell a node
128                                                         or group (as defined by your <a href = "#pacman">groups.pacman file</a>) to install or
129                                                         uninstall a package. To create and modify our packages file, we will use:
130
131                                                         <p><table width=400 height=50 cellspacing=0 cellpadding=5 border=5 bordercolor="orange"><tr>
132                                                         <td width="100%" align="left" valign="top" bgcolor="teal">
133                                                         <span style="color: white">
134                                                         <code><b><code><b>./storkutil.py pacpackages (node|group|all) NAME (install|remove|update) PACKAGE</b></code>
135 </span></td></tr></table>
136
137
138                                                         <p>We can start by assigning a node to install a package. Be sure your
139                                                         filename follows the pattern <name>.packages.pacman, where the name is the
140                                                         one your configured in your <a href="tutfiles.html#config">Stork configuration file</a>. This will aid
141                                                         your nodes in finding the correct group file to use. If the file you
142                                                         specified does not exist, then storkutil will create a new one.
143
144                                                         <p><b><code>./storkutil.py pacpackages node planetlab.foo.edu install gnuchess</code></b>
145                                                         <br>This will assign the planetlab.foo.edu node to install gnuchess.
146                                                         <p>We can also assign groups to install or remove packages:
147
148                                                         <br><b><code>./storkutil.py pacpackages group myGroup install lynx man gnuchess</b></code>
149                                                         <br>This command will tell myGroup to install the <i>lynx, man, and gnuchess</i> packages
150                                                         in all the nodes in the group.
151
152                                                         <p>We can also instruct Pacman to install packages on multiple nodes without grouping them,
153                                                         using the <code>all</code> command:
154                                                         <br><b><code>./storkutil.py pacpackages all install gnuchess</b></code>
155                                                         <br>Note that in this example, the <code>group</code> and <code>node</code> commands are replaced
156                                                         with <code>all</code> command, and also that there is no group or node name required. This command
157                                                         will instruct Stork to install gnuchess on every node to which the packages.pacman file is distributed.
158
159                                                         <p>Using the <code>update</code> command, Stork will also instruct all nodes in a group
160                                                         to update a preexisting package:
161                                                         <br><code><b>./storkutil.py pacpackages group myGroup update gnuchess</b></code>
162                                                         <br>This will instruct all myGroup nodes to update gnuchess when necessary.
163
164                                                         <p>Storkutil will automatically sign the file using your default private key
165                                                         file, which you created when you <a href = "tutfiles.html#genpair">generated</a> your first key pairs.
166                                                         If you want to work using a different set of keys and files, you can use the
167                                                         <code>--username</code> option.
168                                                         You can view the contents of your package file using the <code>view packages</code>
169                                                         command.
170                                                                                                                 <p><img src="blkfade.gif" width="100%"></img>
171                                                         When you are done,
172                                                         <a href="tutup.html">
173                                                         upload your Pacman config file to the Stork repository.</a>
174
175                                                         <p>Return to the <a href="tutmain.html">tutorial contents.</a>
176
177                                                         <center><a href = "index.html">Home</a>     <a href = "#top">Top</a></center>
178
179
180                                                 </td>
181                                         </tr>
182                                 </table>
183                         </td>
184                 </tr>
185
186        </table>
187        </td>
188
189      </tr>
190      <tr>
191         <td></td>
192         <td>
193                 <a href="http://www.planet-lab.org"><img style="border: 0px; border-style: none;" src="images/powered_by_pl_grey.png" alt="powered by planetlab"></a>
194
195                                         <a href="http://www.cs.arizona.edu"><img style="position:relative; left: 20px; border: 0px; border-style: none;" src="images/template_logo_small_grey.png" alt="University of Arizona, Computer Science logo"></a>
196
197
198
199
200
201         </td>
202      </tr>
203
204 </table>
205
206 </div>
207
208
209 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
210 </script>
211 <script type="text/javascript">
212 _uacct = "UA-1868232-1";
213 urchinTracker();
214 </script>
215 </body>
216 </html>