Skip to content

Commit

Permalink
Merge pull request #21 from randy3k/kernels
Browse files Browse the repository at this point in the history
More kernels
  • Loading branch information
minrk committed Sep 1, 2016
2 parents 96adffa + cadc596 commit dd0bf98
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
roles:
- common
- python
- { role: r, when: install_r_kernel }
- { role: newrelic, when: newrelic_license_key is defined and newrelic_license_key != ''}
- nginx
- supervisor
- saveusers
- bash
- { role: bash, when: install_bash_kernel }
- jupyterhub
- { role: cull_idle, when: use_cull_idle_servers}
- nbgrader
Expand Down
6 changes: 6 additions & 0 deletions host_vars/hostname.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jupyterhub_users:
- student1
- student2

# Install r kernel
install_r_kernel: false

# Install bash kernel
install_bash_kernel: true

# The secret token to use for accessing the proxy
# Create using something like `openssl rand -hex 32`
proxy_auth_token: ''
Expand Down
40 changes: 40 additions & 0 deletions roles/r/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---

- name: repository | add public key
apt_key: id=E084DAB9 keyserver=keyserver.ubuntu.com state=present

- name: repository | add cran-r
apt_repository: repo="deb http://cran.rstudio.com/bin/linux/ubuntu {{ubuntu_codename}}/" state=present update_cache=true

- name: install r and devtools's dependencies
apt: name={{ item }} state=present
with_items:
- r-recommended
- libcurl4-gnutls-dev
- libxml2-dev
- libssl-dev

- name: install IRkernel's dependencies
command: R --quiet -e "if (! '{{item}}' %in% installed.packages()[,'Package']) install.packages('{{item}}', repos='http://cran.rstudio.com/')"
with_items:
- repr
- IRdisplay
- pbdZMQ
- crayon
- devtools

- name: install IRkernel
command: R --quiet -e "if (! '{{item}}' %in% installed.packages()[,'Package']) devtools::install_github('IRkernel/{{item}}')"
with_items:
- IRkernel

- name: install irkernel kernelspec
command: R --quiet -e "IRkernel::installspec(user = FALSE)"

- name: install additional R packages
command: R --quiet -e "if (! '{{item}}' %in% installed.packages()[,'Package']) install.packages('{{item}}', repos='http://cran.rstudio.com/')"
with_items:
- ggplot2
- dplyr
- reshape2
- car

0 comments on commit dd0bf98

Please sign in to comment.