Skip to content

Installing jupyterhub::node on CVMFS

Félix-Antoine Fortin edited this page Mar 31, 2020 · 7 revisions

How to install jupyterhub::node on CVMFS

Setup puppet and nodejs

Install puppet

module load ruby
gem install puppet -v 6.13.0 --user-install
puppet module install puppetlabs/stdlib
puppet module install puppet/selinux
puppet module install puppet/nodejs
# patch getwuid - ruby on CVMFS cannot interact correctly with LDAP
# 1. Open .gem/ruby/2.*/gems/facter-*/lib/resolvers/identity_resolver.rb
# 2. Comment lines 20 to 26
# 3. Write and quit

Install node 12

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
nvm install 12

Install latest version of puppet-jupyterhub locally

version=v2.2.0
wget https://github.com/ComputeCanada/puppet-jupyterhub/archive/$version.tar.gz 
puppet module install $version.tar.gz --ignore-dependencies --force

Install jupyterhub::node virtual environment on CVMFS

module load python/3.6
python=$(which python)
prefix=/cvmfs/soft.computecanada.ca/custom/python/envs/jupyterhub_node/$version
mkdir -p $prefix
puppet apply -e "class { 'jupyterhub::base::install::venv': prefix => '${prefix}', python => '${python}' }; class { 'jupyterhub::node::install': prefix => '${prefix}' }" --modulepath=~/.puppetlabs/etc/code/modules/
chmod -R o+rX $prefix
Clone this wiki locally