PermafrostServerDiluvium: Difference between revisions
m Words |
No edit summary |
||
Line 32: | Line 32: | ||
used to distinguish public and private models, | used to distinguish public and private models, | ||
when the user creates a login.) | when the user creates a login.) | ||
Edit '''conf/wmt.ini''' to include paths for this server. | |||
[paths] | |||
templates = templates | |||
files = files | |||
uploads = files/uploads | |||
downloads = files/downloads | |||
static = static | |||
logs = logs | |||
database = %(db)s/wmt.db | |||
user_db = %(db)s/users.db | |||
submission_db = %(db)s/submission.db | |||
pickup = /data/ftp/pub/users/wmt | |||
db = db | |||
[url] | |||
scheme = https | |||
netloc = csdms.colorado.edu | |||
path = wmt/api-permafrost | |||
[pickup] | |||
scheme = https | |||
netloc = csdms.colorado.edu | |||
path = pub/users/wmt | |||
[passlib] | |||
schemes = sha512_crypt, sha256_crypt | |||
sha256_crypt__default_rounds = 100000 | |||
sha512_crypt__default_rounds = 100000 | |||
[user] | |||
name = <your-name> | |||
email = <your-email> | |||
Create files that describe the executor. | |||
cd $install_dir | |||
mkdir -p db/hosts/beach.colorado.edu/db | |||
cd db/hosts/beach.colorado.edu/db | |||
touch env.json info.json | |||
Add info to the files. | |||
# env.json | |||
{ | |||
"PATH": [ "/home/csdms/wmt/permafrost/conda/bin", "/bin", "/usr/bin" ] | |||
} | |||
# info.json | |||
{ | |||
"name": "beach.colorado.edu", | |||
"wmt_prefix": "/home/csdms/wmt/permafrost/conda" | |||
} | |||
==Install software used by the server== | |||
Install packages used by the WMT server software. | |||
conda install ipython numpy # for debugging | |||
conda install passlib pyyaml | |||
pip install wsgilog | |||
pip install requests-toolbelt | |||
Note that WMT server software has already been installed | |||
(at the install step above) into '''opt/wmt-api'''. | |||
Install the PBS package. | |||
cd $install_dir/opt | |||
git clone git@github.com:permamodel/pbs.git | |||
cd pbs | |||
python setup.py develop | |||
Note that I'm choosing to install with "develop" for this | |||
and all Python packages built from source. | |||
Clone `wmt-metadata`. | |||
cd $install_dir/opt | |||
git clone git@github.com:csdms/wmt-metadata.git | |||
cd wmt-metadata |
Revision as of 15:53, 27 February 2018
Instructions for installing and configuring a WMT server on diluvium for the wmt-permafrost instance.
--Mpiper (talk) 13:59, 27 February 2018 (MST)
Set install directory
The install directory for this server is /data/web/htdocs/wmt/api/permafrost.
install_dir=/data/web/htdocs/wmt/api/permafrost mkdir -p $install_dir
Install Python
Install a Python distribution to be used locally by WMT. We like to use Miniconda.
cd $install_dir curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -o miniconda.sh bash ./miniconda.sh -f -b -p $(pwd)/conda export PATH=$(pwd)/conda/bin:$PATH
If working with an existing Miniconda install, be sure to update everything before continuing:
conda update conda conda update --all
Install and configure server
Get the server install script and run it.
curl -O https://raw.githubusercontent.com/csdms/wmt/master/scripts/install python ./install --with-python=$(which python) $(pwd)
This makes a fresh set of database files. Users will have to create a new login. (This is something that needs to be changed. I can't copy over the users.db file from another WMT instance because the client sets up the user tag, used to distinguish public and private models, when the user creates a login.)
Edit conf/wmt.ini to include paths for this server.
[paths] templates = templates files = files uploads = files/uploads downloads = files/downloads static = static logs = logs database = %(db)s/wmt.db user_db = %(db)s/users.db submission_db = %(db)s/submission.db pickup = /data/ftp/pub/users/wmt db = db [url] scheme = https netloc = csdms.colorado.edu path = wmt/api-permafrost [pickup] scheme = https netloc = csdms.colorado.edu path = pub/users/wmt [passlib] schemes = sha512_crypt, sha256_crypt sha256_crypt__default_rounds = 100000 sha512_crypt__default_rounds = 100000 [user] name = <your-name> email = <your-email>
Create files that describe the executor.
cd $install_dir mkdir -p db/hosts/beach.colorado.edu/db cd db/hosts/beach.colorado.edu/db touch env.json info.json
Add info to the files.
# env.json { "PATH": [ "/home/csdms/wmt/permafrost/conda/bin", "/bin", "/usr/bin" ] }
# info.json { "name": "beach.colorado.edu", "wmt_prefix": "/home/csdms/wmt/permafrost/conda" }
Install software used by the server
Install packages used by the WMT server software.
conda install ipython numpy # for debugging conda install passlib pyyaml pip install wsgilog pip install requests-toolbelt
Note that WMT server software has already been installed (at the install step above) into opt/wmt-api.
Install the PBS package.
cd $install_dir/opt git clone git@github.com:permamodel/pbs.git cd pbs python setup.py develop
Note that I'm choosing to install with "develop" for this and all Python packages built from source.
Clone `wmt-metadata`.
cd $install_dir/opt git clone git@github.com:csdms/wmt-metadata.git cd wmt-metadata