platform-update-home/doc/working/update-policy.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (view) (download) (as text)

1 : dejan 1.1 <h1>Eclipse Update Policy Control</h1>
2 :     <p>This document describes a new Eclipse Update capability that allows large
3 :     shops with many seats of Eclipse-based products to exert control over how these
4 :     products are updated. </p>
5 :     <p>The document is related to a 3.0 plan item tracked by the following Bugzilla
6 :     entry:</p>
7 :     <p><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=37702">37702</a> [plan
8 :     item] Improve organizational control over product updates</p>
9 :     <h2>1. The Problem</h2>
10 :     <p>Eclipse Update allows users to search for updates to the currently installed
11 : dejan 1.5 features. For each installed feature, Update uses the embedded URL to
12 : dejan 1.1 connect to the remote server and search for new versions. If there are updates,
13 :     Eclipse allows users to initiate the install procedure. After downloading,
14 :     installing and restarting the platform, new feature version is ready for use.</p>
15 :     <p>In companies with many users of the same Eclipse-based product (typically a
16 :     commercial one), several problems can arise from this model:</p>
17 :     <ol>
18 : dejan 1.5 <li>Updates for very large products (e.g. 500+ plug-ins) are also large.
19 : dejan 1.1 I/T support teams may not like the idea of hundreds of developers individually
20 : dejan 1.2 downloading 500MEG updates to their individual machines. In addition to the
21 :     bandwidth hit, such a large download request may fail, leading to repeated
22 : dejan 1.1 attempts and increased developers' downtime.</li>
23 :     <li>Some companies explicitly don't want the developers downloading updates
24 :     directly from the Internet. For example, they can set up a local support team
25 : dejan 1.5 that may not be ready to handle requests related to the version of the product
26 :     already available from the provider's update site. They may want to restrict updates and
27 : dejan 1.1 fixes to the internally approved list. Ideally, they would do that by setting
28 :     up 'proxy' update sites on the LAN (behind the firewall).</li>
29 :     <li>Once updates are set in the proxy sites as above, administrators need a
30 :     way of letting users know that updates are available.</li>
31 :     </ol>
32 :     <h2>2. The Proposal</h2>
33 : dejan 1.2 <p>The proposed solution in Eclipse 3.0 consists of three new capabilities that
34 : dejan 1.5 together address the above problems. </p>
35 : dejan 1.1 <h3>2.1 Support for creating local (proxy) update sites</h3>
36 :     <p>First step for a product administrator would be to set up a local Eclipse
37 :     update site on a server connected to the company's LAN (behind the firewall).
38 :     The update site would be a subset of the product's update site on the Internet
39 :     because it would contain only features and plug-ins related to the updates that
40 : dejan 1.3 the company wants applied at the moment. Technically, this site would be a
41 : dejan 1.5 regular Eclipse update site with site.xml, feature and plug-in archives.</p>
42 : dejan 1.1 <p>Administrators would construct this site in two ways:</p>
43 :     <ol>
44 : dejan 1.5 <li>Product support teams would make a zip file of the update site readily
45 : dejan 1.1 available for this particular purpose. Administrators would simply need to
46 : dejan 1.3 download the zip file from the product support web page using the tool of
47 :     their choice and unzip it in the local server. This approach is useful for
48 :     very large zip files that require modern restartable downloading managers
49 :     (those that can pick up where they left off in case of the connection
50 :     problems).</li>
51 : dbirsan 1.6 <li>Eclipse Update would provide a tool to mirror remote update sites
52 :     entirely or allow administrators to select updates and fixes to download.
53 : dejan 1.5 This mirroring capability would be fully automated and would greatly simplify administrator's task
54 :     but it relies on Update network connection support (improved downloading
55 : dejan 1.1 reliability and performance is addressed in a different Update 3.0 plan item).</li>
56 :     </ol>
57 :     <h3>2.2 Common update policy control</h3>
58 : dejan 1.5 <p>Since features have Update site URL embedded in the manifest, they are unaware of the local
59 :     update sites set up by the administrators. It is therefore important to provide <b>
60 :     redirection capability</b>. This and other update policy settings can be set for
61 :     an Eclipse product by creating an update policy file and configuring Update to
62 : dejan 1.1 use that file when searching.</p>
63 : dejan 1.5 <p>The file in question uses XML format and can have any name. The file can be set in <b>
64 :     Preferences&gt;Install/Update</b><font color="#0000FF"> </font>in the <b>Update
65 :     Policy</b> group. The text field
66 :     is empty by default: users may set the URL of the update policy file. The file
67 :     is managed by the local administrator and is shared for all the product
68 : dejan 1.1 installations. Sharing can be achieved in two ways:</p>
69 :     <ul>
70 :     <li>If users install the product: users are told to open the preference page
71 :     and enter the provided URL</li>
72 :     <li>If administrators install the product: administrators edit the file 'plugin_customization.ini'
73 :     in the primary product feature and set the default value of the 'updatePolicyFile'
74 :     property as follows:<br>
75 :     <br>
76 : dejan 1.5 &nbsp;&nbsp;&nbsp; <code>org.eclipse.update.core/updatePolicyFile = &lt;URL value&gt;<br>
77 :     </code><font color="#0000FF">[this does not work yet]</font><br>
78 : dejan 1.1 <br>
79 : dejan 1.5 This will cause all the installations to have this file set by default.</li>
80 : dejan 1.1 </ul>
81 : dejan 1.5 <p>File-based mechanism has been chosen for two reasons: it allows central control over the
82 : dejan 1.1 update policy settings for an installed product, and it is also 'all or nothing'
83 :     - individual users cannot change some aspects of the policy while keeping
84 :     others.</p>
85 : dejan 1.5 <p>The policy file must conform to the following DTD (note that the syntax is
86 :     subject to change up to the 3.0 API freeze):</p>
87 : dejan 1.1 <blockquote>
88 : dejan 1.5 <p><tt>&lt;?xml encoding=&quot;ISO-8859-1&quot;?&gt;</tt>
89 :     <p><tt>&lt;!ELEMENT update-policy (url-map)*&gt;</tt><br>
90 :     <tt>&lt;!ATTLIST update-policy</tt><br>
91 :     <tt>&gt;</tt></p>
92 :     <p><tt>&lt;!ELEMENT url-map EMPTY&gt;<br>
93 :     &lt;!ATTLIST url-map<br>
94 :     &nbsp;&nbsp;&nbsp; pattern&nbsp;&nbsp;&nbsp; CDATA #REQUIRED<br>
95 :     &nbsp;&nbsp;&nbsp; url&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA
96 :     #REQUIRED<br>
97 :     &gt;</tt></p>
98 : dejan 1.1 </blockquote>
99 : dejan 1.5 <h4>url-map</h4>
100 :     <ul>
101 :     <li><b>pattern</b> - a string that represents prefix of a feature ID (up to
102 : dbirsan 1.7 and including a complete ID). A value of "*" matches all the features.</li>
103 : dejan 1.5 <li><b>url</b> - a URL of the alternative update site that should be used if
104 : dbirsan 1.7 the feature ID begins with the pattern. If the string is emtpy, features matching
105 :     pattern will not be updateable.</li>
106 : dejan 1.5 </ul>
107 :     <p>This element is used to override Update URLs embedded in feature manifests. When
108 :     looking for new updates, Eclipse search will check the update policy (if
109 : dejan 1.1 present) and check if <b>url-map</b> for the matching feature prefix is
110 : dejan 1.5 specified. If a match is found, the mapped URL will be used <b> instead</b> of the
111 : dejan 1.1 embedded one. This way, administrators can configure Eclipse products to search
112 : dbirsan 1.7 for updates in the local server behind the firewall. Meanwhile, third-party
113 : dejan 1.5 features installed by Eclipse Update will continue to be updated using the
114 :     default mechanism because they will not find matches in the policy.</p>
115 :     <p>Several <b>url-map</b> elements may exist in the file. Feature prefixes can be
116 : dejan 1.1 chosen to be less or more specific. For example, to redirect all Eclipse
117 : dejan 1.5 updates, the pattern attribute would be <code>&quot;org.eclipse&quot;</code>. Similarly, it is
118 :     possible to use a complete feature ID as a pattern if redirection is required on
119 :     a per-feature basis.</p>
120 :     <p>Patterns in the file may be chosen to progressively narrow the potential
121 :     matches. This may result in multiple matches for a given feature. In this case,
122 :     the <b>match with a longest pattern</b> will be used. For
123 : dejan 1.4 example:</p>
124 :     <blockquote>
125 : dejan 1.5 <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
126 :     &lt;update-policy&gt;
127 :     &lt;url-map pattern=&quot;org.eclipse&quot; url=&quot;URL1&quot;/&gt;
128 :     &lt;url-map pattern=&quot;org.eclipse.jdt&quot; url=&quot;URL2&quot;/&gt;
129 :     &lt;/update-policy&gt;</pre>
130 : dejan 1.4 </blockquote>
131 : dejan 1.5 <p>In the case above, all Eclipse features will be updated from URL1, except <code>org.eclipse.jdt</code> that will use URL2.</p>
132 :     <p>Update policy files do not contain translatable strings and therefore do not
133 :     require special NL handling. In general, the files should use UTF-8 encoding.</p>
134 : dejan 1.1 <h3>2.3 Automatic discovery of updates</h3>
135 :     <p>The third part of the overall solution is covered by another plan item (<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=37684">Improve
136 :     Update Manager search</a>) but is mentioned here because it is an integral part
137 :     of the solution. Automatic updates will allow Eclipse to run update search on a
138 :     specified schedule (on each startup (the default), once a day, once a week
139 :     etc.). </p>
140 :     <h2>3. Conclusion </h2>
141 : dejan 1.5 <p>Here is the complete sequence of steps that comprise the solution:</p>
142 : dejan 1.1 <ol>
143 :     <li>Administrator allocates a server on the company LAN for hosting local
144 : dejan 1.5 product updates. Initially it contains no update sites. The machine must have
145 :     an HTTP server running.</li>
146 : dejan 1.1 <li>Administrator sets up an update policy file on that server and instructs
147 : dejan 1.5 all users to set the update policy preference the provided URL.</li>
148 :     <li>As the product provider ships updates and fixes on their update sites,
149 :     administrator downloads supported updates onto the local server.</li>
150 :     <li>Automatic update executed at the scheduled frequency when the client's
151 :     product is up picks up the local
152 :     updates and notifies the user</li>
153 : dejan 1.1 <li>User chooses to install the discovered updates</li>
154 :     </ol>
155 :     <h2>4. Schedule</h2>
156 :     <p>Early implementation of the update policy (with redirection) is already in
157 : dejan 1.5 the regular integration builds (since M1) but expect the actual update policy
158 : dbirsan 1.6 DTD to be in flux at least until M2. The tool for creating partial local
159 :     shadows of the remote update sites will appear in M3.</p>