Recent Changes - Search:

Services

Technical Doc. Index

edit SideBar

VZ Guest for WhaleMap

Setting up a VZ for the WhaleMap shiny webapp

This is an example run through of the creation of the Shiny WhaleMap OpenVZ template.

Create basic Ubuntu-16.04 template

vzctl create 791606 --ostemplate ubuntu-16.04
prlctl clone 791606 --name ubuntu-16.04-201804 --template

We now have a template ubuntu-16.04-201814:

# prlctl list -t
UUID                                    DIST            T  NAME
{ce4813a0-7da3-447f-b78d-562920bbf57a}  ubuntu          CT ubuntu-16.04-201804

Local configuration

vzctl set 791606 --save --name goldthree \
    --physpages 1024M \
    --swappages 512M \
    --diskspace 10G \
    --ipadd 192.168.128.203 \
    --nameserver 192.168.128.1 \
    --nameserver 129.173.23.237 \
    --nameserver 129.173.1.100 \
    --searchdomain phys.ocean.dal.ca \
    --searchdomain ocean.dal.ca \
    --searchdomain dal.ca \
    --searchdomain phys.ocean.lan \
    --hostname goldthree.ocean.lan \
    --gw 192.168.128.1 \
    --dhcp6 no

vzctl start goldthree
vzctl enter goldthree
perl -i -pe 's/archive.ubuntu.com/mirror.its.dal.ca/' /etc/apt/sources.list

Setup mail

echo phys.ocean.dal.ca > /etc/mailname
vim /etc/postfix/main.cf
--- .old/main.cf.20180502.005240	2018-04-22 13:16:18.534789877 -0300
+++ main.cf	2018-05-02 00:58:33.792185884 -0300
@@ -4,7 +4,7 @@
 # Debian specific:  Specifying a file name will cause the first
 # line of that file to be used as the name.  The Debian default
 # is /etc/mailname.
-#myorigin = /etc/mailname
+myorigin = /etc/mailname

 smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
 biff = no
@@ -32,7 +32,7 @@
 alias_maps = hash:/etc/aliases
 alias_database = hash:/etc/aliases
 mydestination = $myhostname, localdomain, localhost, localhost.localdomain, localhost
-relayhost = 
+relayhost = [mail.phys.ocean.dal.ca]
 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
 mailbox_command = procmail -a "$EXTENSION"
 mailbox_size_limit = 0

systemctl reload postfix

Remove apache

apt purge -y apache2

Shiny webapps

Proceed with Installing Shiny

Make Shiny OS template

Back on VZ server host:
prlctl clone goldthree --name ubuntu1604-shiny --template

Now, continuing in guest goldthree

WhaleMap

Prerequisites for WhaleMap

apt update
apt install -y libgdal-dev libproj-dev libudunits2-dev git pandoc
R -e "install.packages(c('leaflet', \
                         'rgdal', \
                         'udunits2', \
                         'maptools', \
                         'readxl', \
                         'rgeos', \
                         'googlesheets', \
                         'oce', 'ocedata', \
                         'measurements', \
                         'plotly', \
                         'shinydashboard', \
                         'rhandsontable', \
                         'leaflet.extras', \
                         'lubridate'))"

Installation

cd /srv/shiny-server
git clone http://github.com/hansenjohnson/whalemap WhaleMap

All non-sensitive data is now installed. Time to create another template.

Make Shiny with whalemap OS template

Back on VZ server host:
prlctl clone goldthree --name ubuntu1604-shiny-whalemap --template

cd WhaleMap
rsync -SHaxv goldleader:/srv/shiny-server/data/raw data/  # data archive provided by Hansen
cp /tmp/password.rds . # provided by Hansen
Edit - History - Print - Recent Changes - Search
Page last modified on July 07, 2019, at 02:44 PM ADT