server address example: http://206.12.100.5/DFO_SDM_Shiny_final/
The main resource for this setup is the cloud quickstart guide. The interface is Arbutus's openstack.
-
Setup the ssh keys: first, generate a key pair. The process is different for (Windows)[https://docs.alliancecan.ca/wiki/Generating_SSH_keys_in_Windows/en] and Linux. Then, in openstack, import the key pair by navigating to the key pair tab on the left and following the guide's instructions. For the record, the key is currently named
arbutus_pedersen_key
, is stored here with its passphrase (requires drive access). Only onw key pair per VM is allowed. -
Launch the VM: follow the quickstart guide instructions (the currently running VM is named
shiny_server
). Choose theshinyboot
booting volume (it's Ubuntu Focal), and thep8-16gb
flavor (for maximum use of the resources available). Load thedef-pedersen-prod-network
and theIPv6
networks onto the VM. If no booting volume is available, make sure that when you create one (see guide instructions) you only use half (max) of the maximum storage available so you can use the other half for creating a backup of the volume (to check what is your usgae limit, navigate the side bar to Compute -> Overview) -
Associate the available floating IP to the new VM (navigate to Network -> Floating IPs). If you need to create one, refer once again to the guide to do so.
-
Connect with address
user-name@the-floating-ip>
, currently it is[email protected]
A note on network settings: the guide has all the instructions necessary for setting up the network. A very key element is to make sure to set up the security rules for the IP of any computer from which you will want to ssh to the VM.
- Clone this repository
git clone https://github.com/pedersen-fisheries-lab/shiny-server-setup.git
- Run the setup script, and copy the test app to the serving folder
sudo ./shiny-server-setup/shiny_server_setup.sh
cp -r ~/shiny-server-setup/test-app/ /srv/shiny-server/
-
Edit
/etc/shiny-server/shiny-server.conf
to change the listening port to 80 (HTTP) -
Set up rules on Arbutus to let your IP throught the port.
-
Remember your shiny app may have additionnal package and or/system requirements. For packages, use
renv
(restore then isolate). For system, make a custom script.
# GDAL
sudo apt-get install libgdal-dev
# Udunits
sudo apt-get install libudunits2-dev