Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

moved configuration directory to conf

  • Loading branch information...
commit 2bf6bce7541d739c54feeabc86e0eca89db69c99 1 parent b978470
Carlos Scheidegger authored
View
4 .gitignore
@@ -8,7 +8,7 @@ js/node_modules
htdocs/lib/node_modules
htdocs/js/node_modules
data
-code/rcloud.auth
-code/github_info.txt
+conf/rcloud.auth
+conf/github_info.txt
rcloud.support_1.0-0.tar.gz
View
78 README.md
@@ -1,5 +1,77 @@
-Before running RCloud, first install the rcloud.support package, which
-exists in source form inside this directory:
+# Getting it to work
-$ R CMD INSTALL rcloud.support
+## Installation requirements
+### Packages
+
+You'll need a recent version of Rserve. From R, type:
+
+ > install.packages("Rserve",,"http://rforge.net")
+
+You'll need the following packages from CRAN:
+
+* Cairo
+* FastRWeb
+* png
+* knitr
+* markdown
+* base64enc
+* rjson
+
+You'll need the following packages from github (Installing via devtools is the easiest):
+
+ > library(devtools) # or install.packages("devtools")
+ > install_github("hadley", "httr")
+ > install_github("cscheid", "github")
+
+### Github authentication
+
+Rcloud uses [gists](http://gist.github.com) for storage and Github
+accounts for authentication.
+
+You'll need to create a
+[github application](https://github.com/settings/applications). This
+github application will need to point to the location you will deploy
+rcloud (let's assume you're only testing it for now, so 127.0.0.1
+works). In that case, your application's URL will most likely be
+`http://127.0.0.1:8080`, and your Callback URL *must* be
+`http://127.0.0.1:8080/login_successful.R`. (the host and port needs
+to match the URL, and the path must be `login_successful.R`).
+
+Then, you need to create a file under your configuration root
+(typically that's `/conf`) called github_info.txt. This file will
+contain the information necessary to connect to the github website and
+API. If you're using github.com, then your file will look like this:
+
+ your.20.character.client.id
+ your.40.character.client.secret
+ https://github.com/
+ https://api.github.com/
+
+The third and fourth lines are the base URL of the github website and
+the entry point for the github API (these might differ in
+[Enterprise Github](http://enterprise.github.com) deployments).
+
+### Will you be hacking on the code? Read on
+
+If you're just running rcloud, skip this session. If you're going to
+be hacking the code, you'll need to install a recent version of
+[node.js](http://nodejs.org). Then, in your shell:
+
+ $ cd rcloud/htdocs/js
+ $ npm install
+
+This will install the node.js dependencies necessary to create the
+minified javascript files used in Rcloud.
+
+### Starting rcloud
+
+The safest way to install rcloud currently is to simply run the
+`scripts/fresh_start.sh` script. This will reinstall the
+`rcloud.support` package, recompile the javascript files (if you have
+node.js and the necessary dependencies installed), kill any old
+instances of Rcloud running, deauthorize all login tokens, and start a
+new version of Rcloud.
+
+FIXME: currently `fresh_start.sh` actually kills all Rserve instances
+via killall. Yes, this is blunt and stupid.
View
0  code/rserve.R → conf/rserve.R
File renamed without changes
View
0  code/rserve.conf → conf/rserve.conf
File renamed without changes
View
0  code/setup → conf/setup
File renamed without changes
View
10 code/start → conf/start
@@ -1,5 +1,5 @@
#!/bin/sh
-# script to start Rserve with the configuration FastRWeb/code/rserve.conf
+# script to start Rserve with the configuration FastRWeb/conf/rserve.conf
# add -d if you want to start the debugging version
#
# honored environment variables:
@@ -8,7 +8,7 @@
if [ -z "$ROOT" ]; then ## some auto-detection if ROOT is not set...
for c in /data/rcloud /data/ws /var/www/ws /var/FastRWeb /data/FastRWeb "`pwd`"; do
- if [ -e "$c/code/rserve.conf" ]; then
+ if [ -e "$c/conf/rserve.conf" ]; then
ROOT="$c"
break
fi
@@ -38,6 +38,6 @@ if [ "$1" = -d ]; then
PX=.dbg
fi
-# --vanilla is intentional - use code/rserve.R for additional configuration NOT user R startup files
-echo $RBIN CMD ${PRE}Rserve$PX --RS-conf $ROOT/code/rserve.conf --RS-source $ROOT/code/rserve.R --vanilla --no-save
-$RBIN CMD ${PRE}Rserve$PX --RS-conf "$ROOT/code/rserve.conf" --RS-source "$ROOT/code/rserve.R" --vanilla --no-save
+# --vanilla is intentional - use conf/rserve.R for additional configuration NOT user R startup files
+echo $RBIN CMD ${PRE}Rserve$PX --RS-conf $ROOT/conf/rserve.conf --RS-source $ROOT/conf/rserve.R --vanilla --no-save
+$RBIN CMD ${PRE}Rserve$PX --RS-conf "$ROOT/conf/rserve.conf" --RS-source "$ROOT/conf/rserve.R" --vanilla --no-save
View
2  rcloud.support/R/rcloud.support.R
@@ -104,7 +104,7 @@ configure.rcloud <- function () {
# until replaced by something more sensible (if at all)
.rc.conf$configuration.root <- Sys.getenv("CONFROOT")
if (!nzchar(.rc.conf$configuration.root))
- .rc.conf$configuration.root <- file.path(.rc.conf$root, "code")
+ .rc.conf$configuration.root <- file.path(.rc.conf$root, "conf")
cat("Using CONFROOT =", .rc.conf$configuration.root, "\n")
.rc.conf$data.root <- Sys.getenv("DATAROOT")
View
12 scripts/fresh_start.sh
@@ -1,6 +1,12 @@
#!/bin/bash
-cd htdocs/js; make; cd ../..
+cd htdocs/js;
+if [ -d node_modules ]; then
+ make;
+else
+ echo Skipping javascript build because node.js modules are not installed. Refer to Readme.md for details.
+fi
+cd ../..
R CMD build rcloud.support && R CMD INSTALL rcloud.support_`sed -n 's/Version: *//p' rcloud.support/DESCRIPTION`.tar.gz
killall -9 Rserve.dbg
-rm -f code/rcloud.auth
-./code/start -d
+rm -f conf/rcloud.auth
+./conf/start -d
Please sign in to comment.
Something went wrong with that request. Please try again.