Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master dc6162e0d -> f8265bb33


Add R Dependencies to Virtual Machine Script.  Zeppelin-700

### What is this PR for?
Improvement of Virtual Machine Script to support R interpretor

### What type of PR is it?
Improvement of Virtual Machine Script to support R interpretor

### Todos
* [x] - Test with #208
* [x] - Test with #702

### Is there a relevant Jira issue?
Zeppelin-700

### How should this be tested?
Follow the steps in this Read Me to build a VM from scratch:
https://github.com/apache/incubator-zeppelin/blob/master/scripts/vagrant/zeppelin-dev/README.md

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update?  Added to all headers
* Is there breaking changes for older versions?  No
* Does this needs documentation?  Yes, this will be a separate PR to update 
docs and README

Author: Jeff Steinmetz <[email protected]>

Closes #751 from jeffsteinmetz/ZEPPELIN-700 and squashes the following commits:

e03dba5 [Jeff Steinmetz] update to support R interpreter sparkr build profile
a9a2052 [Jeff Steinmetz] add base64enc, repr and htmltools
bdcdf5f [Jeff Steinmetz] removed packages not required for pr702.  repr not 
needed - base64encode not needed - htmltools not needed
d497994 [Jeff Steinmetz] fix so that devtools will install
5643fc6 [Jeff Steinmetz] plotting in r interpreter requires the repr package.  
install devtools package first so repr can be installed.
fb18a2b [Jeff Steinmetz] plotting in r interpreter requires the repr package.  
install devtools package first so repr can be installed.
ef8f638 [Jeff Steinmetz] ZEPPELIN-700.  Add Ansible R role to Virtual Machine 
to support dependencies for the R Interpreter
b940bcd [Jeff Steinmetz] ZEPPELIN-700.  Add Ansible R role to Virtual Machine 
to support dependencies for the R Interpreter


Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/f8265bb3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/f8265bb3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/f8265bb3

Branch: refs/heads/master
Commit: f8265bb33e78bfe9372b19b4b9afb2b9505560d3
Parents: dc6162e
Author: Jeff Steinmetz <[email protected]>
Authored: Mon Mar 28 14:35:16 2016 -0700
Committer: Felix Cheung <[email protected]>
Committed: Sun Apr 3 15:20:30 2016 -0700

----------------------------------------------------------------------
 scripts/vagrant/zeppelin-dev/ansible-roles.yml  |  1 +
 .../zeppelin-dev/roles/r/defaults/main.yml      | 24 ++++++++
 .../vagrant/zeppelin-dev/roles/r/tasks/main.yml | 65 ++++++++++++++++++++
 .../vagrant/zeppelin-dev/show-instructions.sh   |  4 +-
 4 files changed, 92 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/f8265bb3/scripts/vagrant/zeppelin-dev/ansible-roles.yml
----------------------------------------------------------------------
diff --git a/scripts/vagrant/zeppelin-dev/ansible-roles.yml 
b/scripts/vagrant/zeppelin-dev/ansible-roles.yml
index ba2a8c8..cc39522 100644
--- a/scripts/vagrant/zeppelin-dev/ansible-roles.yml
+++ b/scripts/vagrant/zeppelin-dev/ansible-roles.yml
@@ -23,3 +23,4 @@
     - nodejs
     - maven
     - python-addons
+    - r

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/f8265bb3/scripts/vagrant/zeppelin-dev/roles/r/defaults/main.yml
----------------------------------------------------------------------
diff --git a/scripts/vagrant/zeppelin-dev/roles/r/defaults/main.yml 
b/scripts/vagrant/zeppelin-dev/roles/r/defaults/main.yml
new file mode 100644
index 0000000..0072470
--- /dev/null
+++ b/scripts/vagrant/zeppelin-dev/roles/r/defaults/main.yml
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# defaults variables for r role
+---
+r_cran_mirror: http://cran.rstudio.com/
+
+r_repository:
+  - type: deb
+    url: "{{ r_cran_mirror }}/bin/linux/ubuntu {{ ansible_distribution_release 
}}/"
+
+r_packages_repos: "{{ r_cran_mirror }}"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/f8265bb3/scripts/vagrant/zeppelin-dev/roles/r/tasks/main.yml
----------------------------------------------------------------------
diff --git a/scripts/vagrant/zeppelin-dev/roles/r/tasks/main.yml 
b/scripts/vagrant/zeppelin-dev/roles/r/tasks/main.yml
new file mode 100644
index 0000000..54285d8
--- /dev/null
+++ b/scripts/vagrant/zeppelin-dev/roles/r/tasks/main.yml
@@ -0,0 +1,65 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Install R binaries and CRAN packages
+---
+
+# The Ubuntu archives on CRAN are signed with a key with ID E084DAB9. Add this 
key to the system.
+- name: repository | add public key
+  apt_key:
+    id: E084DAB9
+    keyserver: keyserver.ubuntu.com
+    state: present
+
+# in order to get the latest version of R, add CRAN repository to the to the 
list of sources
+- name: repository | add cran-r
+  apt_repository:
+    repo: "{{item.type}} {{item.url}}"
+    state: present
+    update_cache: true
+  with_items: r_repository
+
+- name: Install R. This may take a while.
+  apt: pkg=r-base state=present
+
+- name: openssl and libcurl required for R devtools package
+  apt: pkg={{item}} state=present
+  with_items:
+    - libssl-dev
+    - libcurl4-openssl-dev
+
+# knitr will also pull in the `evaluate` R package as a dependency
+- name: Install R packages required for the R interpreter. This may take a 
while.
+  shell: /usr/bin/Rscript --slave --no-save --no-restore-history -e "if (! 
('{{item}}' %in% installed.packages()[,'Package'])) 
install.packages(pkgs=c('{{item}}'), repos=c('{{r_packages_repos}}'))"
+  with_items:
+    - knitr
+    - devtools
+
+- name: Install rCharts (requires devtools first).
+  shell: /usr/bin/Rscript --slave --no-save --no-restore-history -e "if (! 
('rCharts' %in% installed.packages()[,'Package'])) 
devtools::install_github('rCharts', 'ramnathv')"
+
+- name: Install R repr package recommended for the R interpreter display 
system (requires devtools first).
+  shell: /usr/bin/Rscript --slave --no-save --no-restore-history -e "if (! 
('repr' %in% installed.packages()[,'Package'])) 
devtools::install_github('IRkernel/repr')"
+
+- name: Install R packages recommended for the R interpreter.
+  shell: /usr/bin/Rscript --slave --no-save --no-restore-history -e "if (! 
('{{item}}' %in% installed.packages()[,'Package'])) 
install.packages(pkgs=c('{{item}}'), repos=c('{{r_packages_repos}}'))"
+  with_items:
+    - ggplot2
+    - googleVis
+    - mplot
+    - htmltools
+    - base64enc
+    - data.table
+

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/f8265bb3/scripts/vagrant/zeppelin-dev/show-instructions.sh
----------------------------------------------------------------------
diff --git a/scripts/vagrant/zeppelin-dev/show-instructions.sh 
b/scripts/vagrant/zeppelin-dev/show-instructions.sh
index 43bba76..16a399d 100644
--- a/scripts/vagrant/zeppelin-dev/show-instructions.sh
+++ b/scripts/vagrant/zeppelin-dev/show-instructions.sh
@@ -32,9 +32,9 @@ echo
 echo 'cd /vagrant/incubator-zeppelin'
 echo 'mvn clean package -DskipTests'
 echo
-echo '# or for a specific build'
+echo '# or for a specific Spark/Hadoop build with additional options such as 
python and R support'
 echo
-echo 'mvn clean package -Pspark-1.5 -Ppyspark -Dhadoop.version=2.2.0 
-Phadoop-2.2 -DskipTests'
+echo 'mvn clean package -Pspark-1.6 -Ppyspark -Phadoop-2.4 -Psparkr 
-DskipTests'
 echo './bin/zeppelin-daemon.sh start'
 echo
 echo 'On your host machine browse to http://localhost:8080/'

Reply via email to