-
Notifications
You must be signed in to change notification settings - Fork 0
/
help.html
311 lines (278 loc) · 17.2 KB
/
help.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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
---
layout: page
redirect_from: "/faq.html"
permalink: /help.html
title: "Help"
---
<div class="row">
<div class="col-md-8">
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq0">
What is OpenCPU?
</a>
</h4>
</div>
<div id="faq0" class="panel-collapse collapse">
<div class="panel-body">
OpenCPU is a software system for embedded statistical computation and reproducible research. The server exposes a web API interfacing R, Latex and Pandoc. This API is used for example to integrate statistical functionality into systems, share and execute scripts or reports on centralized servers, and build R based "apps". The OpenCPU server can run either as a single-user server inside the interactive R session (for local use and development), or as a cloud server that builds on Linux and rApache.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq1">
What license is OpenCPU?
</a>
</h4>
</div>
<div id="faq1" class="panel-collapse collapse">
<div class="panel-body">
The OpenCPU software is released under Apache2 license. However note that some of the dependencies, such as R, have other open source licenses (e.g. GPL).
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq2">
What are OpenCPU Apps?
</a>
</h4>
</div>
<div id="faq2" class="panel-collapse collapse">
<div class="panel-body">
An OpenCPU app is an R package which includes some web page(s) that call the R functions in the package using the OpenCPU API. This makes a convenient way to develop, package and ship portable, standalone R web applications. See the <a href="https://opencpu.github.io/server-manual/opencpu-server.pdf">server manual</a> for more information.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq3">
Does the OpenCPU cloud server support { Fedora | RHEL | Windows | OSX } ?
</a>
</h4>
</div>
<div id="faq3" class="panel-collapse collapse">
<div class="panel-body">
The OpenCPU server is designed to run on a remote host, accessed through the OpenCPU API, and perhaps RStudio server. The operating system of the host should be irrelevant to users and clients. That said, best support for R and OpenCPU is available on Ubuntu Linux, but this <a href="https://github.com/jeroenooms/opencpu-server#readme">readme on github</a> has some instructions for building and running OpenCPU on various other Linux distributions. Alternatively, you can use virtualization software such as VMWare (Windows), Parallels (Mac) or KVM (Linux) to run a virtual Ubuntu Server within your local machine.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq4">
What about security?
</a>
</h4>
</div>
<div id="faq4" class="panel-collapse collapse">
<div class="panel-body">
OpenCPU has no notion of users or privileges. The implementation relies on Mandatory Access Control to implement security policies. On Debian and Ubuntu, AppArmor (a security module for the linux kernel) is used to enforce access control policies on a by-process basis. These policies can easily be customized by modifying the AppArmor profiles that ship with the OpenCPU cloud server. See the <a href="https://opencpu.github.io/server-manual/opencpu-server.pdf">server manual</a> for more information.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq5">
Can I use OpenCPU with RStudio?
</a>
</h4>
</div>
<div id="faq5" class="panel-collapse collapse">
<div class="panel-body">
Yes! Both the OpenCPU single-user server and OpenCPU cloud server have been tested to work with <a href="http://www.rstudio.com/ide/download/">RStudio 0.98</a> and above. See also the appendix in the <a href="https://opencpu.github.io/server-manual/opencpu-server.pdf">server manual</a> on this topic.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq6">
Can OpenCPU be used to build proprietary applications?
</a>
</h4>
</div>
<div id="faq6" class="panel-collapse collapse">
<div class="panel-body">
Absolutely. The current open-source OpenCPU implementation is released under the Apache2 License. You are allowed to use and modify it as you wish (open source or not).
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq7">
Can the cloud server on Amazon EC2? Which instance type do I need?
</a>
</h4>
</div>
<div id="faq7" class="panel-collapse collapse">
<div class="panel-body">
Yes, EC2 is great to get started with OpenCPU. The Ubuntu team provides daily <a href="https://cloud-images.ubuntu.com/locator/ec2/">cloud images</a> for EC2, which contain a pre-installed, up-to-date, ready-to-go Ubuntu Server. Usually you pick the latest stable (LTS) release of Ubuntu Server, currently Xenial 16.04: <a href="https://cloud-images.ubuntu.com/locator/ec2/">https://cloud-images.ubuntu.com/locator/ec2/</a>. R requires CPU more than anything else so it is recommended to pick one of the newer generation <i>compute optimized</i> instance types, preferably with a SSD disk. The <code>small</code> and <code>micro</code> EC2 instance types have only half a CPU or less, which is usually not enough.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq8">
Do you recommend any hosting provider for the cloud server?
</a>
</h4>
</div>
<div id="faq8" class="panel-collapse collapse">
<div class="panel-body">
Finding a good provider can be a bit difficult because most providers focus on traffic, disk space and support,
but OpenCPU really only needs fast CPU (and some memory). Get a server that has a couple of fast, uncapped, preferably private, processors. Ask the provider how many and how fast the processors are and whether or not they are shared with many other users on the same machine. Pick a provider that offers a clean, unmanaged Ubuntu Server. Avoid anything with pre-configured control panels and all that stuff, it will only slow things down. Many providers offer a trial period if you ask for it. Try running some quick <a href="http://r.research.att.com/benchmarks/">R benchmarks</a> to test performance. If you really have no idea where to start looking, in the US <a href="http://www.rackspace.com/cloud/servers/">Rackspace</a>, <a href="https://www.linode.com/">Linode</a> and <a href="http://aws.amazon.com/ec2/pricing/">Amazon EC2</a> are popular, and for Europe <a href="http://www.transip.eu/">TransIP</a> seems pretty good.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq9">
Can I publish my OpenCPU app in the official app repository?
</a>
</h4>
</div>
<div id="faq9" class="panel-collapse collapse">
<div class="panel-body">
Yes! To publish an app in the <a href="https://github.com/opencpu">official repository</a>, first put it in your own github repository. It should then be accessible via e.g. <code>https://cloud.opencpu.org/ocpu/github/:yourname/:yourpkg/www</code>. Let us know by twitter or email that you would like it published, and if it meets the minimum requirements, we'll fork it into the OpenCPU github organization.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq10">
I want to load files/packages from a customized dir on the cloud server, but it doesn't work.
</a>
</h4>
</div>
<div id="faq10" class="panel-collapse collapse">
<div class="panel-body">
When using unconventional locations for files or packages, these locations need to be added to the security profile. Have a look at <code>/var/log/kern.log</code> on your system and search for lines containing "APPARMOR" and "DENIED" to diagnose if this is the problem. The section on <i>Customizing the security profile</i> in the <a href="https://cloud.opencpu.org/download.html">PDF server manual</a> contains more information.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq11">
Is OpenCPU reliable enough for production applications? Are there other server implementations?
</a>
</h4>
</div>
<div id="faq11" class="panel-collapse collapse">
<div class="panel-body">
The purpose of the <a href="https://cloud.opencpu.org/api.html">OpenCPU API</a> is to define a unified, exensible interface to R that allows for developing portable applications and scalable servers. The API is deliberately quite minimal and describes only <i>what</i> it does, not </i>how</i>. The current open-source implementation is written completely in R. It used by several organizations, has undergone lots of testing, and has proven to be stable. However, if it any point you would like to implement an OpenCPU server in e.g. a Java/C++/Node stack (open source or not), you are more than welcome to do so, and we will help out where ever we can. It would be fantastic if the same apps could be hosted on various server implementations.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq12">
How fast or slow is OpenCPU?
</a>
</h4>
</div>
<div id="faq12" class="panel-collapse collapse">
<div class="panel-body">
In most cases, the overhead of the OpenCPU server (especially the cloud server) should be neglectable. The time it takes to call an R function or run a script through OpenCPU is equal to the time it takes to call the same function or script in R, plus the latency of the connection (ping client to server). When using HTTPS there might be a bit of additional SSL handshaking, but if you're using a smart client (e.g. a browser) this is only required for the first request. If you experience slowness, then probably the R code that you are calling is just slow (welcome to R). If there is a big time difference between calling a function locally and calling it through OpenCPU, please report is as a bug. One exception: if you're using the local single-user server on Windows, there is some additional overhead due to the absense of forking in Windows. Rest assured that your application will run faster once it is deployed on the cloud server.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq13">
How do I know which version of OpenCPU or a certain R package is installed on a server?
</a>
</h4>
</div>
<div id="faq13" class="panel-collapse collapse">
<div class="panel-body">
The root path of the package URL shows information about a package. For example, to see which version of <code>knitr</code> is currently installed on the demo server, navigate to <a href="https://cloud.opencpu.org/ocpu/library/knitr/">https://cloud.opencpu.org/ocpu/library/knitr/</a>. OpenCPU is an R package like any other, so to find out which version of OpenCPU a server is running navigate to <a href="https://cloud.opencpu.org/ocpu/library/opencpu/">https://cloud.opencpu.org/ocpu/library/opencpu/</a>.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq14">
How to build the OpenCPU cloud server from source?
</a>
</h4>
</div>
<div id="faq14" class="panel-collapse collapse">
<div class="panel-body">
The source package of the OpenCPU cloud server is available form the <a href="https://github.com/jeroenooms/opencpu-server">opencpu-server</a> repository. The <a href="https://github.com/jeroenooms/opencpu-server#readme">readme</a> contains more information.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq15">
How to do a silent automatic install of opencpu?
</a>
</h4>
</div>
<div id="faq15" class="panel-collapse collapse">
<div class="panel-body">
Try <a href="https://gist.github.com/jeroenooms/ec571226677e1539efba">this script</a>.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#faq16">
Why does installing opencpu-server take so long on Fedora/CentOS?
</a>
</h4>
</div>
<div id="faq16" class="panel-collapse collapse">
<div class="panel-body">
To make OpenCPU work on Fedora / CentOS the installer needs to add a few policies to SELinux. Unfortunately changing SELinux policies is
<a href="http://unix.stackexchange.com/questions/67732/why-setsebool-command-of-selinux-taking-so-long-and-slow">terribly slow</a>.
</div>
</div>
</div>
<br>
</div>
</div>
<div class="col-md-4 fancy">
<h2>Mailing List</h2>
<p>We now have a mailing list! For questions, suggestions, problems or praise, email to <a href="mailto:[email protected]">[email protected]</a>. To subscribe or search archives, visit the <a href="https://groups.google.com/forum/#!forum/opencpu">Google group</a>.</p>
<h2>Technical Questions</h2>
<p>Technical questions about OpenCPU, R, HTTP, JavaScript, etc, can also be asked on <a href="http://stackoverflow.com/">Stack Overflow</a>. Tag your questions with both <a href="http://stackoverflow.com/questions/tagged/opencpu"><code>#opencpu</code></a> and <a href="http://stackoverflow.com/questions/tagged/r"><code>#r</code></a> to maximize the likelihood of an answer.</p>
<h2>Short Questions</h2>
<p>For (short) questions, you can also <a href="http://twitter.com/home?status=%23rstats%20%40opencpu%20">ask <code>@OpenCPU</code></a> on twitter.</p>
</div>
</div>
<script>
$(function(){
//this should happen by default
$("a.accordion-toggle").on("click", function(){
window.location.hash = this.hash;
})
//on page load
var el = $('a[href="' + window.location.hash + '"]');
if(el.length){
$('html, body').animate({
scrollTop: el.offset().top
}, function(){
el.trigger("click")
});
}
})
</script>