passenger 5.0.14 → 5.0.15

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (70) hide show
  1. checksums.yaml +8 -8
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/CHANGELOG +9 -0
  5. data/INSTALL.md +1 -1
  6. data/LICENSE +1 -1
  7. data/README.md +1 -1
  8. data/bin/passenger-install-apache2-module +6 -10
  9. data/bin/passenger-install-nginx-module +6 -9
  10. data/doc/CloudLicensingConfiguration.html +1 -216
  11. data/doc/CloudLicensingConfiguration.txt.md +1 -192
  12. data/doc/Design and Architecture.html +4 -4
  13. data/doc/Design and Architecture.txt +4 -4
  14. data/doc/ServerOptimizationGuide.html +1 -489
  15. data/doc/ServerOptimizationGuide.txt.md +1 -399
  16. data/doc/Users guide Apache.html +594 -6720
  17. data/doc/Users guide Apache.idmap.txt +15 -12
  18. data/doc/Users guide Apache.txt +113 -2047
  19. data/doc/Users guide Nginx.html +565 -6720
  20. data/doc/Users guide Nginx.idmap.txt +15 -12
  21. data/doc/Users guide Nginx.txt +94 -1862
  22. data/doc/Users guide Standalone.html +53 -2183
  23. data/doc/Users guide Standalone.idmap.txt +9 -6
  24. data/doc/Users guide Standalone.txt +16 -360
  25. data/doc/Users guide.html +3 -145
  26. data/doc/Users guide.txt +2 -54
  27. data/doc/users_guide_snippets/analysis_and_system_maintenance.txt +36 -175
  28. data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +9 -215
  29. data/doc/users_guide_snippets/environment_variables.txt +11 -243
  30. data/doc/users_guide_snippets/installation.txt +66 -946
  31. data/doc/users_guide_snippets/rackup_specifications.txt +1 -75
  32. data/doc/users_guide_snippets/support_information.txt +1 -48
  33. data/doc/users_guide_snippets/tips.txt +103 -704
  34. data/doc/users_guide_snippets/troubleshooting/default.txt +16 -130
  35. data/doc/users_guide_snippets/troubleshooting/rails.txt +15 -12
  36. data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +2 -113
  37. data/ext/apache2/Configuration.hpp +2 -2
  38. data/ext/apache2/Hooks.cpp +2 -2
  39. data/ext/common/AgentsStarter.h +18 -10
  40. data/ext/common/ApplicationPool2/ErrorRenderer.h +0 -3
  41. data/ext/common/ApplicationPool2/Options.h +8 -1
  42. data/ext/common/Constants.h +3 -9
  43. data/ext/common/agent/Core/RequestHandler/InitRequest.cpp +2 -0
  44. data/ext/common/agent/Watchdog/Main.cpp +1 -1
  45. data/ext/nginx/ContentHandler.c +2 -3
  46. data/ext/nginx/config +2 -2
  47. data/lib/phusion_passenger.rb +1 -22
  48. data/lib/phusion_passenger/abstract_installer.rb +10 -10
  49. data/lib/phusion_passenger/config/agent_compiler.rb +5 -5
  50. data/lib/phusion_passenger/config/nginx_engine_compiler.rb +4 -4
  51. data/lib/phusion_passenger/config/validate_install_command.rb +3 -3
  52. data/lib/phusion_passenger/constants.rb +1 -5
  53. data/lib/phusion_passenger/loader_shared_helpers.rb +16 -5
  54. data/lib/phusion_passenger/platform_info/apache_detector.rb +2 -2
  55. data/lib/phusion_passenger/public_api.rb +11 -2
  56. data/lib/phusion_passenger/request_handler/thread_handler.rb +2 -3
  57. data/lib/phusion_passenger/ruby_core_io_enhancements.rb +4 -1
  58. data/lib/phusion_passenger/standalone/start_command.rb +1 -1
  59. data/resources/oss-binaries.phusionpassenger.com.crt +124 -0
  60. data/resources/templates/apache2/deployment_example.txt.erb +5 -23
  61. data/resources/templates/apache2/installing_against_a_different_apache.txt.erb +3 -4
  62. data/resources/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb +3 -3
  63. data/resources/templates/apache2/rpm_installation_recommended.txt.erb +1 -1
  64. data/resources/templates/installer_common/low_amount_of_memory_warning.txt.erb +4 -5
  65. data/resources/templates/nginx/deployment_example.txt.erb +5 -17
  66. data/resources/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb +3 -3
  67. data/resources/templates/standalone/config.erb +1 -1
  68. data/resources/templates/undisclosed_error.html.template +4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pCZk=
11
+ =8Zp2
12
12
  -----END PGP SIGNATURE-----
data.tar.gz.asc CHANGED
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABAgAGBQJVpfw1AAoJECrHRaUKISqM2AAH/0H0z/5TLWyFnWd3ZipZ5yX/
6
- Ls373qV5k+PaHBHjHDti7d+/nRXFVXFTxbRRDbxuHvX7s/7o6yuligBKJTG9H5NQ
7
- JZ4ezdeq03WVzmuLuR/yw3vN1yCm85ouQY94HwTrxK/v6NQJn/qXro/47oDwp2h4
8
- b0FNsHfSDx2d8t91nyX+MRxdJzQ78d2Q36V/1usRHQcupxxMFd2AkW7KGc+OSaM4
9
- hREU8tsMgCDBcxTmFEsgwpOa8vGQG835PZvDEXDvw7SflKQhx6GV2lOhHJh5fMWN
10
- m0qyEdmM8nzfTU8oPI/51oMUAEh9kmWKrpkWrHU9cVdVunjPi9vpoxVOAOTY3WA=
11
- =NoNs
5
+ iQEcBAABAgAGBQJVuJ34AAoJECrHRaUKISqM6soIALpuDRkmefIcwE9Tq/vrVE4/
6
+ KsV/qPlJ6izfkfJhIAaQ8AZfXRzWV6vXD05FN91G7n7qgrBJbrd1ClS8lNEiey1C
7
+ PM/o/0gGwJi5eIgPmtqhwLqjEhr561w5yKyW61d8NTiF0yEAX0w+XVKXfnmTjUb3
8
+ H9uZJnFqBBMhaFHttqVtjB563+D+sK3YrqaDjzOS8bO7QgHv/G622/6bcnFMIqn6
9
+ 46drtEF3yuEWXTmu2JHBK4g169lzQKYlSMWj+PuWdzxZ4j4LVtWovw8qgISzwMrC
10
+ 1JVo0DcMM+q5/va8GtHHGrI1ozWqAF2Bfv3VDZ8hiq4YICi8hcNWD5c4cc7rewQ=
11
+ =sIbu
12
12
  -----END PGP SIGNATURE-----
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ Release 5.0.15
2
+ --------------
3
+
4
+ * Support SHA256 digests for the Rails asset pipeline, as used by Sprockets 3.x.
5
+ * Support for JRuby 9.0.0.0. Closes GH-1562.
6
+ * Fixes some bugs in Union Station support, which causes some data (such as controller information and exceptions) to not be logged.
7
+ * The old Users Guides have been deprecated in favor of the [Passenger Library](https://www.phusionpassenger.com/library/). The Users Guides now redirect to appropriate sections in the Passenger Library.
8
+
9
+
1
10
  Release 5.0.14
2
11
  --------------
3
12
 
data/INSTALL.md CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  Please read README.md for installation instructions.
4
4
 
5
- If you're having trouble installing Phusion Passenger, please refer to [the manual](http://www.modrails.com/documentation/Users%20guide.html).
5
+ If you're having trouble installing Phusion Passenger, please refer to [the documentation](https://www.phusionpassenger.com/).
6
6
 
7
7
  Documentation and support resources are also available on [the website](https://www.phusionpassenger.com/documentation_and_support).
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2013 Phusion
1
+ Copyright (c) 2010-2015 Phusion Holding B.V.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -16,7 +16,7 @@ Please follow [the installation instructions on the website](https://www.phusion
16
16
 
17
17
  ### Installing the source directly from git
18
18
 
19
- If you mean to install the latest version of Passenger directly from this git repository, then you should run one of the following commands. Installing from the git repository is basically the same as the tarball installation method, as [described in the manual](https://www.phusionpassenger.com/documentation/Users%20guide.html#installation).
19
+ If you mean to install the latest version of Passenger directly from this git repository, then you should run one of the following commands. Installing from the git repository is basically the same as the tarball installation method, as [described in the manual](https://www.phusionpassenger.com/library/install/).
20
20
 
21
21
  ./bin/passenger-install-apache2-module
22
22
 
@@ -103,12 +103,12 @@ class Installer < PhusionPassenger::AbstractInstaller
103
103
  return [specs, ids]
104
104
  end
105
105
 
106
- def users_guide_path
107
- return PhusionPassenger.apache2_doc_path
106
+ def install_doc_url
107
+ "https://www.phusionpassenger.com/library/install/apache/"
108
108
  end
109
109
 
110
- def users_guide_url
111
- return APACHE2_DOC_URL
110
+ def troubleshooting_doc_url
111
+ "https://www.phusionpassenger.com/library/admin/apache/troubleshooting/"
112
112
  end
113
113
 
114
114
  def run_steps
@@ -849,18 +849,14 @@ private
849
849
  def show_deployment_example
850
850
  new_screen
851
851
  render_template 'apache2/deployment_example',
852
- :users_guide_path => users_guide_path,
853
- :users_guide_url => users_guide_url,
852
+ :deployment_guide_url => "https://www.phusionpassenger.com/library/deploy/apache/deploy/",
854
853
  :phusion_website => PHUSION_WEBSITE,
855
- :passenger_website => PASSENGER_WEBSITE,
856
- :languages => @languages
854
+ :passenger_website => PASSENGER_WEBSITE
857
855
  end
858
856
 
859
857
  def show_possible_solutions_for_compilation_and_installation_problems
860
858
  new_screen
861
859
  render_template 'apache2/possible_solutions_for_compilation_and_installation_problems',
862
- :users_guide_path => users_guide_path,
863
- :users_guide_url => users_guide_url,
864
860
  :support_url => SUPPORT_URL
865
861
  end
866
862
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # Phusion Passenger - https://www.phusionpassenger.com/
3
- # Copyright (c) 2010-2014 Phusion
3
+ # Copyright (c) 2010-2015 Phusion
4
4
  #
5
5
  # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
6
6
  #
@@ -79,12 +79,12 @@ class Installer < PhusionPassenger::AbstractInstaller
79
79
  return [specs, ids]
80
80
  end
81
81
 
82
- def users_guide_path
83
- return PhusionPassenger.nginx_doc_path
82
+ def install_doc_url
83
+ "https://www.phusionpassenger.com/library/install/nginx/"
84
84
  end
85
85
 
86
- def users_guide_url
87
- return NGINX_DOC_URL
86
+ def troubleshooting_doc_url
87
+ "https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/"
88
88
  end
89
89
 
90
90
  def run_steps
@@ -498,8 +498,7 @@ private
498
498
  line
499
499
  puts
500
500
  render_template 'nginx/deployment_example',
501
- :users_guide_path => users_guide_path,
502
- :users_guide_url => users_guide_url,
501
+ :deployment_guide_url => "https://www.phusionpassenger.com/library/deploy/nginx/deploy/",
503
502
  :phusion_website => PHUSION_WEBSITE,
504
503
  :passenger_website => PASSENGER_WEBSITE
505
504
  end
@@ -508,8 +507,6 @@ private
508
507
  line
509
508
  puts
510
509
  render_template 'nginx/possible_solutions_for_compilation_and_installation_problems',
511
- :users_guide_path => users_guide_path,
512
- :users_guide_url => users_guide_url,
513
510
  :support_url => SUPPORT_URL
514
511
  end
515
512
 
@@ -136,222 +136,7 @@
136
136
 
137
137
  <h1>Phusion Passenger Enterprise cloud licensing configuration</h1>
138
138
 
139
- <p>When using the <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> cloud license, you are billed per server per hour. There is a mechanism which automatically reports usage to the Phusion licensing server. This is implemented by sending a certain HTTPS request to the Phusion Passenger website, https://www.phusionpassenger.com, every 15 minutes, on every server that Phusion Passenger Enterprise is running with a cloud license.</p>
140
-
141
- <p>Sometimes, this manner of reporting usage data is not desirable, e.g. because of organizational security policies. For example, the servers that run Phusion Passenger Enterprise might block all outgoing traffic, or the network intrusion detection system might flag the usage reports as suspicious. To address these concerns, Phusion Passenger Enterprise 4.0.54 and later provide the ability to report usage through periodic batch jobs.</p>
142
-
143
- <h2>Conceptual overview</h2>
144
-
145
- <p>The setup works as follows:</p>
146
-
147
- <ol>
148
- <li>Phusion Passenger Enterprise stores usage data on the local disk, but does not send them to the Phusion licensing server.</li>
149
- <li>On each server that runs Phusion Passenger Enterprise, a batch job A generates a package from the usage data that's stored on disk.</li>
150
- <li>All these packages are copied to another machine (let's call this "Reporter"), e.g. through SCP, USB stick, etc. The reporter machine may be any machine that you choose, as long as it can access the Phusion licensing server. The method of copying does not matter.</li>
151
- <li>On the reporter machine, a batch job B uploads all these packages to the Phusion licensing server.</li>
152
- </ol>
153
-
154
-
155
- <p><img src="images/cloud_licensing_batch_job.png" alt="Conceptual overview" /></p>
156
-
157
- <h2>Phase 1: setting up web servers</h2>
158
-
159
- <p>Follow these instructions on each server running Phusion Passenger Enterprise with a cloud license.</p>
160
-
161
- <ol>
162
- <li><p>Login to the web server and open a superuser shell. For example:</p>
163
-
164
- <pre><code>bash$ sudo -H bash
165
- </code></pre>
166
-
167
- <p>Or, if you're an RVM user, use rvmsudo instead of sudo:</p>
168
-
169
- <pre><code>bash$ rvmsudo -H bash
170
- </code></pre></li>
171
- <li><p>Add the following configuration to your Apache or Nginx configuration file:</p>
172
-
173
- <pre><code># Apache
174
- PassengerCtl licensing_data_points_auto_send false
175
-
176
- # Nginx
177
- passenger_ctl licensing_data_points_auto_send false;
178
- </code></pre>
179
-
180
- <p>Then restart Apache/Nginx. This configuration tells Phusion Passenger Enterprise not to automatically send usage data to the Phusion licensing server.</p></li>
181
- <li><p>Find out what user the Passenger core process is running as.</p>
182
-
183
- <p>First, look for the PID of the Passenger core process.</p>
184
-
185
- <pre><code>bash# passenger-memory-stats
186
- ...
187
- ------ Passenger processes ------
188
- PID VMSize Resident Name
189
- ---------------------------------
190
- 11243 2405.8 MB 2.7 MB Passenger: core
191
- ...
192
- </code></pre>
193
-
194
- <p>Then use <code>ps</code> to determine what user it's running as. Usually, it's running as root.</p>
195
-
196
- <pre><code>bash# ps -o pid,user -p 11243
197
- PID USER
198
- 11245 root
199
- </code></pre></li>
200
- <li><p>Create a directory in which to store usage data packages. For example:</p>
201
-
202
- <pre><code>bash# mkdir /var/lib/passenger-enterprise-usage
203
- </code></pre>
204
-
205
- <p>Ensure that it's owned by the user that the core runs as, and make it owner-accessible only:</p>
206
-
207
- <pre><code>bash# chown root: /var/lib/passenger-enterprise-usage
208
- bash# chmod 700 /var/lib/passenger-enterprise-usage
209
- </code></pre></li>
210
- <li><p>Create a script inside the previous directory for generating a usage data package, and for copying packages to the reporter machine. This script is part of batch job A.</p>
211
-
212
- <pre><code>bash# touch /var/lib/passenger-enterprise-usage/script
213
- bash# chmod +x /var/lib/passenger-enterprise-usage/script
214
- bash# editor /var/lib/passenger-enterprise-usage/script
215
- </code></pre>
216
-
217
- <p>The script should contain:</p>
218
-
219
- <pre><code>#!/bin/bash
220
- set -e
221
-
222
- REPORTER_MACHINE=foo@reporter-machine-host-name
223
- HOSTNAME=`hostname`
224
- DATE=`date +%s`
225
-
226
- set -x
227
- passenger-config package-cloud-usage /var/lib/passenger-enterprise-usage/$HOSTNAME-$DATE.tar.gz
228
- scp /var/lib/passenger-enterprise-usage/*.tar.gz $REPORTER_MACHINE:passenger-enterprise-usage/
229
- rm -f /var/lib/passenger-enterprise-usage/*.tar.gz
230
- </code></pre>
231
-
232
- <p>Here, <code>foo@reporter-machine-host-name</code> specifies which reporter machine you want to copy the package to, and which username you want to use to login to the reporter machine. Replace this with an appropriate value.</p>
233
-
234
- <p><strong>Notes about SSH keys</strong>: don't forget to setup SSH keys so that the script can scp to the reporter machine. The script will be run as the user that the Passenger core is running as.</p>
235
-
236
- <p><strong>Notes about PATH</strong>: the above script assumes that the <code>passenger-config</code> command is in PATH. This is always the case if you installed Passenger Enterprise using Debian or RPM packages, but may not be the case if you installed it using RubyGems or tarball. If it's not in PATH, or when in doubt, you should specify the full path to passenger-config. You can find out where passenger-config is using <code>which</code>. For example:</p>
237
-
238
- <pre><code>bash# which passenger-config
239
- /opt/passenger-enterprise-x.x.x/bin/passenger-config
240
- </code></pre>
241
-
242
- <p>Then the script should call:</p>
243
-
244
- <pre><code>/opt/passenger-enterprise-x.x.x/bin/passenger-config package-cloud-usage ...
245
- </code></pre></li>
246
- <li><p>Open the crontab of the user that the Passenger core is running as. For example, if the core is running as root:</p>
247
-
248
- <pre><code>bash# sudo -u root -H crontab -e
249
- </code></pre></li>
250
- <li><p>Insert the following entry into the crontab, so that the script is invoked on the 1st of every month:</p>
251
-
252
- <pre><code>0 0 1 * * /var/lib/passenger-enterprise-usage/script
253
- </code></pre></li>
254
- <li><p>Ensure that <code>/var/lib/passenger-enterprise-usage/script</code> is run during system shutdown, as the user that the Passenger core is running as. On most Linux systems, this can be achieved by as follows:</p>
255
-
256
- <pre><code>bash# touch /etc/init.d/passenger-enterprise-cloud-license
257
- bash# chmod +x /etc/init.d/passenger-enterprise-cloud-license
258
- bash# ln -s /etc/init.d/passenger-enterprise-cloud-license /etc/rc0.d/K00passenger-enterprise-cloud-license
259
- bash# ln -s /etc/init.d/passenger-enterprise-cloud-license /etc/rc6.d/K00passenger-enterprise-cloud-license
260
- bash# editor /etc/init.d/passenger-enterprise-cloud-license
261
- </code></pre>
262
-
263
- <p>If the Passenger core is running as root, then <code>/etc/init.d/passenger-enterprise-cloud-license</code> should contain:</p>
264
-
265
- <pre><code>#!/bin/bash
266
- set -e
267
- exec /var/lib/passenger-enterprise-usage/script
268
- </code></pre>
269
-
270
- <p>If the Passenger core is not running as root, then it should contain:</p>
271
-
272
- <pre><code>#!/bin/bash
273
- set -e
274
- exec sudo -u PROPER_USERNAME_HERE -H /var/lib/passenger-enterprise-usage/script
275
- </code></pre>
276
-
277
- <p>Or, if you're an RVM user, use rvmsudo instead of sudo:</p>
278
-
279
- <pre><code>#!/bin/bash
280
- set -e
281
- exec rvmsudo -u PROPER_USERNAME_HERE -H /var/lib/passenger-enterprise-usage/script
282
- </code></pre>
283
-
284
- <p><strong>Note:</strong> If your operating system does not respect /etc/rcX.d, please consult your operating system's manual to learn how to run <code>/var/lib/passenger-enterprise-usage/script</code> during system shutdown.</p></li>
285
- </ol>
286
-
287
-
288
- <h2>Phase 2: setting up the "reporter" machine</h2>
289
-
290
- <p>In phase 1, you've setup web servers to scp usage data packages to the reporter machine, by logging into the reporter machine as a certain user. Let's call that user "foo".</p>
291
-
292
- <ol>
293
- <li><p>Login to the reporter machine as user foo.</p></li>
294
- <li><p>Create a directory that the web servers can scp into:</p>
295
-
296
- <pre><code>bash$ mkdir ~/passenger-enterprise-usage
297
- bash$ chmod 700 ~/passenger-enterprise-usage
298
- </code></pre></li>
299
- <li><p>Install the <a href="https://github.com/phusion/passenger-enterprise-bulk-send-cloud-usage">passenger-enterprise-bulk-send-cloud-usage</a> tool:</p>
300
-
301
- <pre><code>bash$ cd ~
302
- bash$ curl -L -O https://github.com/phusion/passenger-enterprise-bulk-send-cloud-usage/archive/master.tar.gz
303
- bash$ tar xzvf master.tar.gz &amp;&amp; rm master.tar.gz
304
- </code></pre></li>
305
- <li><p>Open the crontab of user foo:</p>
306
-
307
- <pre><code>bash$ crontab -e
308
- </code></pre></li>
309
- <li><p>Insert the following entry into the crontab to upload usage data packages on the 1st of every month:</p>
310
-
311
- <pre><code>0 1 1 * * ~/passenger-enterprise-bulk-send-cloud-usage/passenger-enterprise-bulk-send-cloud-usage --delete ~/passenger-enterprise-usage-*.tar.gz
312
- </code></pre>
313
-
314
- <p>This crontab entry is batch job B as described in the conceptual overview.</p>
315
-
316
- <p>Note that this command is run at 1 AM: 1 hour after the web servers have generated usage data packages and copied them over to the reporter machine. You <em>must</em> therefore ensure that the clocks on the web servers and the reporter machine are properly synchronized, and that they are set to the same time zone.</p></li>
317
- </ol>
318
-
319
-
320
- <h2>Phase 3: testing</h2>
321
-
322
- <p>Once the web servers and the reporter machine are all setup, you can test whether the setup works correctly.</p>
323
-
324
- <ol>
325
- <li><p>On each web server, run <code>/var/lib/passenger-enterprise-usage/script</code> as the user that the Passenger core runs as. For example, if the core is running as root:</p>
326
-
327
- <pre><code>sudo -u root -H /var/lib/passenger-enterprise-usage/script
328
- </code></pre>
329
-
330
- <p>Or, if you're an RVM user, use rvmsudo instead of sudo:</p>
331
-
332
- <pre><code>rvmsudo -u root -H /var/lib/passenger-enterprise-usage/script
333
- </code></pre>
334
-
335
- <p>You should see output like this:</p>
336
-
337
- <pre><code>+ passenger-config package-cloud-usage /var/lib/passenger-enterprise-usage/myhostname-1415377926.tar.gz
338
- + scp /var/lib/passenger-enterprise-usage/myhostname-1415377310.tar.gz hongli@localhost:passenger-enterprise-usage/
339
- myhostname-1415377310.tar.gz 100% 605 0.6KB/s 00:00
340
- + rm -f /var/lib/passenger-enterprise-usage/myhostname-1415377310.tar.gz
341
- </code></pre></li>
342
- <li><p>Login to the reporter machine as the "foo" user (as described in phase 2) and run:</p>
343
-
344
- <pre><code>~/passenger-enterprise-bulk-send-cloud-usage-master/passenger-enterprise-bulk-send-cloud-usage --delete ~/passenger-enterprise-usage/*.tar.gz
345
- </code></pre>
346
-
347
- <p>You should see output like this:</p>
348
-
349
- <pre><code>---- Uploading ~/passenger-enterprise-usage/myhostname-1415377310.tar.gz -----
350
- Success!
351
- Deleting ~/passenger-enterprise-usage/myhostname-1415377310.tar.gz
352
- </code></pre></li>
353
- <li><p>Login to the <a href="https://www.phusionpassenger.com/orders">Phusion Passenger Enterprise Customer Area</a>. Under "Cloud subscription status", click "View usage details". Verify that usage has been properly registered.</p></li>
354
- </ol>
139
+ <p>This documentation has moved. Please visit <a href="https://www.phusionpassenger.com/library/config/cloud_licensing_configuration/">https://www.phusionpassenger.com/library/config/cloud<em>licensing</em>configuration/</a></p>
355
140
 
356
141
 
357
142
  <footer>
@@ -1,194 +1,3 @@
1
1
  # Phusion Passenger Enterprise cloud licensing configuration
2
2
 
3
- When using the [Phusion Passenger Enterprise](https://www.phusionpassenger.com/enterprise) cloud license, you are billed per server per hour. There is a mechanism which automatically reports usage to the Phusion licensing server. This is implemented by sending a certain HTTPS request to the Phusion Passenger website, https://www.phusionpassenger.com, every 15 minutes, on every server that Phusion Passenger Enterprise is running with a cloud license.
4
-
5
- Sometimes, this manner of reporting usage data is not desirable, e.g. because of organizational security policies. For example, the servers that run Phusion Passenger Enterprise might block all outgoing traffic, or the network intrusion detection system might flag the usage reports as suspicious. To address these concerns, Phusion Passenger Enterprise 4.0.54 and later provide the ability to report usage through periodic batch jobs.
6
-
7
- ## Conceptual overview
8
-
9
- The setup works as follows:
10
-
11
- 1. Phusion Passenger Enterprise stores usage data on the local disk, but does not send them to the Phusion licensing server.
12
- 2. On each server that runs Phusion Passenger Enterprise, a batch job A generates a package from the usage data that's stored on disk.
13
- 3. All these packages are copied to another machine (let's call this "Reporter"), e.g. through SCP, USB stick, etc. The reporter machine may be any machine that you choose, as long as it can access the Phusion licensing server. The method of copying does not matter.
14
- 4. On the reporter machine, a batch job B uploads all these packages to the Phusion licensing server.
15
-
16
- ![Conceptual overview](images/cloud_licensing_batch_job.png)
17
-
18
- ## Phase 1: setting up web servers
19
-
20
- Follow these instructions on each server running Phusion Passenger Enterprise with a cloud license.
21
-
22
- 1. Login to the web server and open a superuser shell. For example:
23
-
24
- bash$ sudo -H bash
25
-
26
- Or, if you're an RVM user, use rvmsudo instead of sudo:
27
-
28
- bash$ rvmsudo -H bash
29
-
30
- 2. Add the following configuration to your Apache or Nginx configuration file:
31
-
32
- # Apache
33
- PassengerCtl licensing_data_points_auto_send false
34
-
35
- # Nginx
36
- passenger_ctl licensing_data_points_auto_send false;
37
-
38
- Then restart Apache/Nginx. This configuration tells Phusion Passenger Enterprise not to automatically send usage data to the Phusion licensing server.
39
-
40
- 3. Find out what user the Passenger core process is running as.
41
-
42
- First, look for the PID of the Passenger core process.
43
-
44
- bash# passenger-memory-stats
45
- ...
46
- ------ Passenger processes ------
47
- PID VMSize Resident Name
48
- ---------------------------------
49
- 11243 2405.8 MB 2.7 MB Passenger: core
50
- ...
51
-
52
- Then use `ps` to determine what user it's running as. Usually, it's running as root.
53
-
54
- bash# ps -o pid,user -p 11243
55
- PID USER
56
- 11245 root
57
-
58
- 4. Create a directory in which to store usage data packages. For example:
59
-
60
- bash# mkdir /var/lib/passenger-enterprise-usage
61
-
62
- Ensure that it's owned by the user that the core runs as, and make it owner-accessible only:
63
-
64
- bash# chown root: /var/lib/passenger-enterprise-usage
65
- bash# chmod 700 /var/lib/passenger-enterprise-usage
66
-
67
- 5. Create a script inside the previous directory for generating a usage data package, and for copying packages to the reporter machine. This script is part of batch job A.
68
-
69
- bash# touch /var/lib/passenger-enterprise-usage/script
70
- bash# chmod +x /var/lib/passenger-enterprise-usage/script
71
- bash# editor /var/lib/passenger-enterprise-usage/script
72
-
73
- The script should contain:
74
-
75
- #!/bin/bash
76
- set -e
77
-
78
- REPORTER_MACHINE=foo@reporter-machine-host-name
79
- HOSTNAME=`hostname`
80
- DATE=`date +%s`
81
-
82
- set -x
83
- passenger-config package-cloud-usage /var/lib/passenger-enterprise-usage/$HOSTNAME-$DATE.tar.gz
84
- scp /var/lib/passenger-enterprise-usage/*.tar.gz $REPORTER_MACHINE:passenger-enterprise-usage/
85
- rm -f /var/lib/passenger-enterprise-usage/*.tar.gz
86
-
87
- Here, `foo@reporter-machine-host-name` specifies which reporter machine you want to copy the package to, and which username you want to use to login to the reporter machine. Replace this with an appropriate value.
88
-
89
- **Notes about SSH keys**: don't forget to setup SSH keys so that the script can scp to the reporter machine. The script will be run as the user that the Passenger core is running as.
90
-
91
- **Notes about PATH**: the above script assumes that the `passenger-config` command is in PATH. This is always the case if you installed Passenger Enterprise using Debian or RPM packages, but may not be the case if you installed it using RubyGems or tarball. If it's not in PATH, or when in doubt, you should specify the full path to passenger-config. You can find out where passenger-config is using `which`. For example:
92
-
93
- bash# which passenger-config
94
- /opt/passenger-enterprise-x.x.x/bin/passenger-config
95
-
96
- Then the script should call:
97
-
98
- /opt/passenger-enterprise-x.x.x/bin/passenger-config package-cloud-usage ...
99
-
100
- 6. Open the crontab of the user that the Passenger core is running as. For example, if the core is running as root:
101
-
102
- bash# sudo -u root -H crontab -e
103
-
104
- 7. Insert the following entry into the crontab, so that the script is invoked on the 1st of every month:
105
-
106
- 0 0 1 * * /var/lib/passenger-enterprise-usage/script
107
-
108
- 8. Ensure that `/var/lib/passenger-enterprise-usage/script` is run during system shutdown, as the user that the Passenger core is running as. On most Linux systems, this can be achieved by as follows:
109
-
110
- bash# touch /etc/init.d/passenger-enterprise-cloud-license
111
- bash# chmod +x /etc/init.d/passenger-enterprise-cloud-license
112
- bash# ln -s /etc/init.d/passenger-enterprise-cloud-license /etc/rc0.d/K00passenger-enterprise-cloud-license
113
- bash# ln -s /etc/init.d/passenger-enterprise-cloud-license /etc/rc6.d/K00passenger-enterprise-cloud-license
114
- bash# editor /etc/init.d/passenger-enterprise-cloud-license
115
-
116
- If the Passenger core is running as root, then `/etc/init.d/passenger-enterprise-cloud-license` should contain:
117
-
118
- #!/bin/bash
119
- set -e
120
- exec /var/lib/passenger-enterprise-usage/script
121
-
122
- If the Passenger core is not running as root, then it should contain:
123
-
124
- #!/bin/bash
125
- set -e
126
- exec sudo -u PROPER_USERNAME_HERE -H /var/lib/passenger-enterprise-usage/script
127
-
128
- Or, if you're an RVM user, use rvmsudo instead of sudo:
129
-
130
- #!/bin/bash
131
- set -e
132
- exec rvmsudo -u PROPER_USERNAME_HERE -H /var/lib/passenger-enterprise-usage/script
133
-
134
- **Note:** If your operating system does not respect /etc/rcX.d, please consult your operating system's manual to learn how to run `/var/lib/passenger-enterprise-usage/script` during system shutdown.
135
-
136
- ## Phase 2: setting up the "reporter" machine
137
-
138
- In phase 1, you've setup web servers to scp usage data packages to the reporter machine, by logging into the reporter machine as a certain user. Let's call that user "foo".
139
-
140
- 1. Login to the reporter machine as user foo.
141
-
142
- 2. Create a directory that the web servers can scp into:
143
-
144
- bash$ mkdir ~/passenger-enterprise-usage
145
- bash$ chmod 700 ~/passenger-enterprise-usage
146
-
147
- 3. Install the [passenger-enterprise-bulk-send-cloud-usage](https://github.com/phusion/passenger-enterprise-bulk-send-cloud-usage) tool:
148
-
149
- bash$ cd ~
150
- bash$ curl -L -O https://github.com/phusion/passenger-enterprise-bulk-send-cloud-usage/archive/master.tar.gz
151
- bash$ tar xzvf master.tar.gz && rm master.tar.gz
152
-
153
- 4. Open the crontab of user foo:
154
-
155
- bash$ crontab -e
156
-
157
- 5. Insert the following entry into the crontab to upload usage data packages on the 1st of every month:
158
-
159
- 0 1 1 * * ~/passenger-enterprise-bulk-send-cloud-usage/passenger-enterprise-bulk-send-cloud-usage --delete ~/passenger-enterprise-usage-*.tar.gz
160
-
161
- This crontab entry is batch job B as described in the conceptual overview.
162
-
163
- Note that this command is run at 1 AM: 1 hour after the web servers have generated usage data packages and copied them over to the reporter machine. You *must* therefore ensure that the clocks on the web servers and the reporter machine are properly synchronized, and that they are set to the same time zone.
164
-
165
- ## Phase 3: testing
166
-
167
- Once the web servers and the reporter machine are all setup, you can test whether the setup works correctly.
168
-
169
- 1. On each web server, run `/var/lib/passenger-enterprise-usage/script` as the user that the Passenger core runs as. For example, if the core is running as root:
170
-
171
- sudo -u root -H /var/lib/passenger-enterprise-usage/script
172
-
173
- Or, if you're an RVM user, use rvmsudo instead of sudo:
174
-
175
- rvmsudo -u root -H /var/lib/passenger-enterprise-usage/script
176
-
177
- You should see output like this:
178
-
179
- + passenger-config package-cloud-usage /var/lib/passenger-enterprise-usage/myhostname-1415377926.tar.gz
180
- + scp /var/lib/passenger-enterprise-usage/myhostname-1415377310.tar.gz hongli@localhost:passenger-enterprise-usage/
181
- myhostname-1415377310.tar.gz 100% 605 0.6KB/s 00:00
182
- + rm -f /var/lib/passenger-enterprise-usage/myhostname-1415377310.tar.gz
183
-
184
- 2. Login to the reporter machine as the "foo" user (as described in phase 2) and run:
185
-
186
- ~/passenger-enterprise-bulk-send-cloud-usage-master/passenger-enterprise-bulk-send-cloud-usage --delete ~/passenger-enterprise-usage/*.tar.gz
187
-
188
- You should see output like this:
189
-
190
- ---- Uploading ~/passenger-enterprise-usage/myhostname-1415377310.tar.gz -----
191
- Success!
192
- Deleting ~/passenger-enterprise-usage/myhostname-1415377310.tar.gz
193
-
194
- 3. Login to the [Phusion Passenger Enterprise Customer Area](https://www.phusionpassenger.com/orders). Under "Cloud subscription status", click "View usage details". Verify that usage has been properly registered.
3
+ This documentation has moved. Please visit [https://www.phusionpassenger.com/library/config/cloud_licensing_configuration/](https://www.phusionpassenger.com/library/config/cloud_licensing_configuration/)