From 575c9ba5279da49dd145d5c219f987696cfad384 Mon Sep 17 00:00:00 2001 From: Emilio Mayorga Date: Fri, 10 Nov 2017 17:49:41 -0800 Subject: [PATCH 1/2] index.html url fix --- wof/flask/templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wof/flask/templates/index.html b/wof/flask/templates/index.html index 01ddaa7..c8b4c71 100644 --- a/wof/flask/templates/index.html +++ b/wof/flask/templates/index.html @@ -186,7 +186,7 @@

Web service access to data and metadata in WaterML formats

See the resources below to obtain SOAP and REST service endpoints for different WOF and WaterML versions, and to explore REST sample requests and responses. SOAP endpoints may be tested in a browser using SOAP online clients such as - SOAPClient. See here and + SOAPClient. See here and here for additional resources on CUAHSI WOF and WaterML 1.x.

From 32e53e78d4d1a3f99e02ff791a11e036559fcc1d Mon Sep 17 00:00:00 2001 From: Emilio Mayorga Date: Tue, 14 Nov 2017 22:43:15 -0800 Subject: [PATCH 2/2] Documentation: removed 4 old documents from docs folder, and revised and updated the primary installation and configuration doc, WOFpyODM2LBR_installation.md --- .../Considerations for WaterML2 in WOFpy.docx | Bin 12157 -> 0 bytes docs/HydroServer_WOF_Exception_Examples.txt | 62 ---- docs/WOFpy Main TODO List.docx | Bin 13466 -> 0 bytes docs/WOFpyODM2LBR_installation.md | 146 ++++---- ...FpyODM2LBRproduction_installation_notes.md | 333 ------------------ 5 files changed, 77 insertions(+), 464 deletions(-) delete mode 100644 docs/Considerations for WaterML2 in WOFpy.docx delete mode 100644 docs/HydroServer_WOF_Exception_Examples.txt delete mode 100644 docs/WOFpy Main TODO List.docx delete mode 100644 docs/WOFpyODM2LBRproduction_installation_notes.md diff --git a/docs/Considerations for WaterML2 in WOFpy.docx b/docs/Considerations for WaterML2 in WOFpy.docx deleted file mode 100644 index fa9e629777e01119fa4d01d40807c6c3c3bdc80d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12157 zcmeHt1y>!*()PxJyL)g#aCZ+H2=4Cg1Pu_}-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Xjn#+=hDgm`xfOP?jnL9IzkqHV(jrSV% zA3IIjf&^;EiW<6(QOZARWWYnNz;EXI>`vKO7~*SE`$wgKo4z-3e-PwilQvx6lVvC` zx%S0|Bk3AXERG)si40azkNAO{1;$OHUmv|U>{G;>8em8IQCg~=r)bpNB=sFJ-x$(E zBA5EkwEw#brYawD(X3}t9P+LlZq?1%)R%8v7Fp-tP+K+p*5GjgbjTkR;Go;WnD692 zdWMLH8;U=QlXUX*soSTBKj%lGedhIkYF^U{CO~29n8zTMppYpEcIP+xLpY zTxETj)bvD5|4@o|C=I~Wwyx7BUHEk_OOe4a+8`Yl>4ia-AU$GTP*e-=f&Wo4l6w=4TNx;nR-UTUBmQX@7 zT>IDMqtX0s(_!ItXVbrfIeoc)3&7ubFPZmF?$$y3anx6X`ZUKC5zu&+w$-4jI@Jnv$Zw^&h ze+lrPOx3U8e+HO;Lji!d_l#{dBT4_7fZeE -- [Install Databases](#install-databases) +- [1. Introduction](#1.-introduction) + - [Deployment Environment](#deployment-environment) +- [2. Install Sample Databases](#2.-install-sample-databases) - [Installing the LBR ODM2 MySQL test database](#installing-the-lbr-odm2-mysql-test-database) - [Downloading the LBR ODM2 SQLite test database](#downloading-the-lbr-odm2-sqlite-test-database) -- [Install WOFpy](#install-wofpy) -- [Installing NGINX](#installing-nginx) -- [Development WOFpy](#development-wofpy) +- [3. Install WOFpy](#3.-install-wofpy) +- [4. Install NGINX](#4.-install-nginx) +- [5. Configure Development-Mode WOFpy](#5.-configure-development-mode-wofpy) - [Get Configuration Folder](#get-configuration-folder) - - [Edit Configuration `.cfg` files](#edit-configuration-cfg-files) - - [Test `.cfg` files](#test-cfg-files) + - [Edit Configuration .cfg files](#edit-configuration-.cfg-files) + - [Test .cfg files](#test-.cfg-files) - [Set up runserver script](#set-up-runserver-script) - [Single Server](#single-server) - [Multi Server](#multi-server) -- [Production WOFpy](#production-wofpy) +- [6. Configure Production-Mode WOFpy](#6.-configure-production-mode-wofpy) - [Get Configuration Folder](#get-configuration-folder-1) - - [Setup `wsgi.py`](#setup-wsgipy) + - [Setup wsgi.py](#setup-wsgi.py) - [Setup upstart script](#setup-upstart-script) - [Setup NGINX](#setup-nginx) -- [Checking Live instance of WOFpy](#checking-live-instance-of-wofpy) +- [7. Check Live instance of WOFpy](#7.-check-live-instance-of-wofpy) ------------------ -## Install Databases + +## 1. Introduction + +**In these instructions, we use the `Little Bear River MySQL` and `SQLite` example ODM2 time series databases to illustrate all steps. These databases are available for download.** + +These notes cover installation of `WOFpy` from its `conda` package; downloading and installing the Little Bear River (LBR) ODM2 MySQL and SQLite test databases; configuring WOFpy for the LBR databases; and running WOFpy. *The instructions enable the creation of "production" -- or live" -- web services exposed to external use as well as a more limited "development" -- or "test" -- version that does not use a public facing web server.* + +WOFpy's architecture is built on the ability to plugin CUAHSI WaterOneFlow (WOF) services to different types of data backends, including csv files, relational databases with different data models, web services, etc. Each WOFpy custom data backend type is called a "Data Access Object" (**DAO**). WOFpy reads data from a DAO and translates it into WaterML. + +Instructions and example databases presented in this document are focused on the ODM2 Time Series DAO. Most steps may be applied to other DAO's, but complete details and testing are only presented for this DAO type. + +Most of the steps were originally copied from [WOFpyODM2LBRtest_installation_notes.md](https://github.com/ODM2/WOFpy/blob/master/docs/WOFpyODM2LBRtest_installation_notes.md) with some modifications; we're no longer actively maintaining that page (it folded into this document in the near future), but it still has useful content, including references to relevant discussions. + +### Deployment Environment + +We tested WOFpy installations on Amazon Web Services. +Deployment of WOFpy was done in an Ubuntu Server version 16.04. WOFpy is served by using [NGINX](https://www.nginx.com/) and [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/). **The instructions below assume that an Amazon AWS EC2 Instance is already set up, or that you're using your own, similar server environment.** + +The example deployment described in these instructions is currently (2017-11-14) live on the AWS cloud (see the [MySQL-database endpoint here](http://54.186.36.247:8080/mysqlodm2timeseries/)). It will be kept live mainly during active testing and may be taken down without prior notice when active testing is over. + +Specifications: +- Ubuntu 16.04 with [`Systemd` init](http://www.freedesktop.org/wiki/Software/systemd/) +- Python 2.7 +- MySQL 5.6 +- NGINX 1.10.2 +- uWGSI + + +## 2. Install Sample Databases + +Two example ODM2 time series databases will be used. Both are versions of the Utah State University Little Bear River ODM2 database, but be aware that their content is slightly different. ### Installing the LBR ODM2 MySQL test database **Note: Do not use MySQL 5.7. We've identified a problem in MySQL 5.7 with loading from the LBR sample database into a geometry column. MySQL 5.6 and 5.5 have been tested successfully.** - 1. Download the Little Bear River (LBR) test MySQL database ```bash wget https://raw.githubusercontent.com/ODM2/ODM2/master/usecases/littlebearriver/sampledatabases/odm2_mysql/LBR_MySQL_SmallExample.sql ``` -2. If MySQL database was a stand alone in Unix, add to /etc/mysql/my.cnf : `lower_case_table_names = 1` under [mysqld] +2. If MySQL server is a stand-alone Linux server not already used by other applications, add to /etc/mysql/my.cnf : `lower_case_table_names = 1` under [mysqld] 3. Create ODM2 database in MySQL. At the bash shell where the LBR SQL file was downloaded: ```bash @@ -84,7 +92,7 @@ wget https://github.com/ODM2/WOFpy/raw/master/test/odm2/ODM2.sqlite ------------------- -## Install WOFpy +## 3. Install WOFpy 1. Install miniconda into the user home directory. `/home/ubuntu/miniconda` @@ -103,9 +111,11 @@ wget https://github.com/ODM2/WOFpy/raw/master/test/odm2/ODM2.sqlite ``` --------------------- -## Installing NGINX +## 4. Install NGINX -**Note: The installation step for NGINX should be the same for both server on AWS and local** +**Notes:** +- The installation step for NGINX should be the same for both AWS and local servers. +- WOFpy has also been deployed on Apache web servers. Instructions will be added in the near future. 1. Install nginx into the system @@ -118,7 +128,7 @@ wget https://github.com/ODM2/WOFpy/raw/master/test/odm2/ODM2.sqlite **This welcome page is located in `/var/www/html/`** -You can check the status of `NGINX` server by running +You can check the status of `NGINX` server by running ```bash systemctl status nginx ``` @@ -127,12 +137,12 @@ systemctl status nginx ------------------------- -## Development WOFpy +## 5. Configure Development-Mode WOFpy -The steps below are used to setup WOFpy +The steps below are used to setup WOFpy in "development" (test) mode. ### Get Configuration Folder -Retrieve WOFpy configuration scripts and files with `wofpy_config` in your `$HOME` directory. +Retrieve WOFpy configuration scripts and files with the `wofpy_config` shell tool (command) in your `$HOME` directory. ```bash wofpy_config wofpyserverdev --mode development @@ -146,16 +156,16 @@ wofpyserverdev | +-- timeseries ``` -**Note: Currently the command only provide configurations for ODM2 TimeSeries** +**Note: Currently the command only provide configurations for ODM2 TimeSeries DAO** -### Edit Configuration `.cfg` files +### Edit Configuration .cfg files 1. Make a copy of `odm2_config_timeseries.cfg` in the newly created `wofpy` folder, so that we can have separate config file for `MySQL` and `SQLite`. ```bash cp wofpyserverdev/odm2/timeseries/odm2_config_timeseries.cfg wofpyserverdev/odm2/timeseries/odm2_config_mysql.cfg ``` -2. Rename `odm2_config_timeseries.cfg` to make things clear that this is sqlite configuration by default. +2. Copy `odm2_config_timeseries.cfg` to a file with a custom, relevant name to make it clear that this is a sqlite configuration by default. ```bash cp wofpyserverdev/odm2/timeseries/odm2_config_timeseries.cfg wofpyserverdev/odm2/timeseries/odm2_config_sqlite.cfg @@ -170,6 +180,7 @@ wofpyserverdev # Edit this to same name above Vocabulary: MySQLODM2Timeseries Menu_Group_Name: ODM2 + URLPATH: wofpyendpoint # Change this to your configuration Service_WSDL: http://serverip:port/networkcode/soap/cuahsi_1_0/.wsdl Timezone: 00:00 @@ -203,7 +214,9 @@ wofpyserverdev Connection_String: mysql+mysqldb://username:password:@127.0.0.1:3306/ODM2 ``` -### Test `.cfg` files +There is also a `[Contact]` section for information about your organization. This metadata is not necessary for WOFpy to run, but it should be populated in a Production deployment to optimize the user experience and your endpoint's customization. + +### Test .cfg files To test `.cfg` files run the command below after activating `wofpy` conda environment `source activate wofpy`: @@ -211,15 +224,9 @@ First change to `wofpy` directory ```bash cd $HOME/wofpyserverdev ``` -- MySQL - ```bash - python runserver_odm2_timeseries.py --config odm2_config_mysql.cfg - ``` -- SQLite - ```bash - python runserver_odm2_timeseries.py --config odm2_config_sqlite.cfg - ``` - +- MySQL: `python runserver_odm2_timeseries.py --config odm2_config_mysql.cfg` +- SQLite: `python runserver_odm2_timeseries.py --config odm2_config_sqlite.cfg` + **If each instance works, we are ready to deploy each database or the two together.** ### Set up runserver script @@ -281,15 +288,13 @@ cd $HOME/wofpyserverdev ... ``` - You should get a result like below. If so, you have successfully deployed `WOFpy` testing server: - ![wofpy home](./img/wofpyhome.png) + You should get a result very similar to the one shown in the previous screenshot for Single Server (above). If so, you have successfully deployed `WOFpy` testing server. ----------------------- -## Production WOFpy - +## 6. Configure Production-Mode WOFpy -**Follow the same steps as Test except for the step of getting configuration folder, use production mode instead.** +**Follow the same steps as in Development-Mode configuration, except for the step of getting configuration folder, use `wofpy_config` Production Mode instead (see below).** ### Get Configuration Folder @@ -308,10 +313,10 @@ wofpyserverprod +-- production_configs ``` -Once that's done, continue with steps in Development and below. +**Once this is done, carry out subsequent steps in the Development-Mode section above. The proceed to the next section, below.** -### Setup `wsgi.py` +### Setup wsgi.py 1. Move `wsgi.py` and `wofpy.ini` to the same folder as your `runserver` script. In this example `$HOME/wofpyserverprod/odm2/timeseries/`. @@ -355,22 +360,22 @@ Once that's done, continue with steps in Development and below. sudo chown -R www-data:www-data /var/www/wofpy ``` -6. Enhance Security for WOFpy. - - Move `.cfg` files to some private directory. In this example, it is moved to `wofpy_prod` in `$HOME` folder. **THIS IS HIGHLY RECOMMENDED** +6. Enhance Security for WOFpy. **THIS IS HIGHLY RECOMMENDED, THOUGH NOT REQUIRED.** + - Move `.cfg` files to some private directory. In this example, it is moved to `wofpy_prod` in `$HOME` folder. ```bash mkdir $HOME/wofpy_prod sudo mv /var/www/wofpy/*.cfg /home/ubuntu/wofpy_prod/ ``` - - Edit `runserver.py` to use the new path (MultiServer). + - *MultiServer*: Edit `runserver.py` to use the new path ```python M_CONFIG_FILE = os.path.join('/home/ubuntu', 'wofpy_prod', 'odm2_config_mysql.cfg') S_CONFIG_FILE = os.path.join('/home/ubuntu', 'wofpy_prod','odm2_config_sqlite.cfg') ``` - - Edit `singlerunserver.py` to use the new path (SingleServer). + - *SingleServer*: Edit `singlerunserver.py` to use the new path ```python dao = Odm2Dao(get_connection(os.path.join('/home/ubuntu', 'wofpy_prod', 'odm2_config_mysql.cfg'))) @@ -408,12 +413,15 @@ Once that's done, continue with steps in Development and below. 2. Edit the server block configuration file to match the endpoints. `http://127.0.0.1:8080/mysqlodm2timeseries/` and `http://127.0.0.1:8080/sqliteodm2timeseries/` ``` bash + # For a Single Server configuration using the MySQL service only, + # use only this (one) service assignment location /mysqlodm2timeseries { include uwsgi_params; uwsgi_pass unix:/var/www/wofpy/wofpy.sock; } - # Leave out the configuration below for (SingleServer) + # For Multi Server configuration, + # include the additional service assignment(s) location /sqliteodm2timeseries { include uwsgi_params; uwsgi_pass unix:/var/www/wofpy/wofpy.sock; @@ -441,6 +449,6 @@ Once that's done, continue with steps in Development and below. sudo systemctl enable nginx ``` -## Checking Live instance of WOFpy +## 7. Check Live instance of WOFpy Go to `ip:8080/mysqlodm2timeseries` and `ip:8080/sqliteodm2timeseries`, *just `ip:8080/mysqlodm2timeseries` for (SingleServer)*. You should see WOFpy running. Click on the links available to see if the application is working properly. diff --git a/docs/WOFpyODM2LBRproduction_installation_notes.md b/docs/WOFpyODM2LBRproduction_installation_notes.md deleted file mode 100644 index 517994a..0000000 --- a/docs/WOFpyODM2LBRproduction_installation_notes.md +++ /dev/null @@ -1,333 +0,0 @@ -# Installing WOFpy with Little Bear River MySQL ODM2 test database - -These notes cover installation of `WOFpy` from its `conda` package; downloading and installing the Little Bear River (LBR) ODM2 MySQL test database; configuring WOFpy for the LBR database; and running WOFpy. *The instructions enable the creation of "live" web services exposed to external use.* - -Most of the steps were originally copied from [WOFpyODM2LBRtest_installation_notes.md](https://github.com/ODM2/WOFpy/blob/master/docs/WOFpyODM2LBRtest_installation_notes.md) with some modifications; we're no longer actively maintaining that page, but it still has useful content, including references to relevant discussions. - -## Table of Contents - -- [Testing Environments](#testing-environments) - + [Amazon Web Services (AWS)](#amazon-web-services-aws) - + [Local Ubuntu Machine](#local-ubuntu-machine) -- [Installing the LBR ODM2 MySQL test database](#installing-the-lbr-odm2-mysql-test-database) -- [Installing WOFpy](#installing-wofpy) -- [Installing NGINX](#installing-nginx) -- [Setting up runserver script and wsgi.py](#setting-up-runserver-script-and-wsgipy) -- [Configuring WSGI](#configuring-wsgi) - + [AWS SysV init system](#aws-sysv-init-system) - + [Local Server Systemd init system](#local-server-systemd-init-system) -- [Configuring NGINX](#configuring-nginx) - + [AWS SysV init system](#aws-sysv-init-system_1) - + [Local Server Systemd init system](#local-server-systemd-init-system_1) -- [Checking Live instance of WOFpy](#checking-live-instance-of-wofpy) - - -## Testing Environments - -We tested WOFpy installations on Amazon Web Services and a local Ubuntu Server. -Deployment of WOFpy was done in an Ubuntu Server. WOFpy is served by using [NGINX](https://www.nginx.com/) and [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/). **These instructions assume that Amazon AWS EC2 Instance or a local Linux Ubuntu Server is already set up.** - -### [Amazon Web Services (AWS)](https://aws.amazon.com/) - -Note that this installation is currently (2017-3-1) [live on the cloud](http://52.40.105.124:8080/odm2timeseries/). It will be kept live only during active testing, and will be taken down without prior notice when active testing is over. It will be reactivated in the future as needed. - -Specifications: -- Ubuntu 14.04 -- MySQL 5.6 -- NGINX 1.10.2 - -The AWS Ubuntu Server is running [SysV init](http://en.wikipedia.org/wiki/Init#SysV-style) system. - -### Local Ubuntu Machine - -Tested on: -- Ubuntu 16.04 -- MySQL 5.5.28 -- NGINX 1.10.2 (*assumed but not confirmed*) - -The Local Ubuntu Server is running [Systemd init](http://www.freedesktop.org/wiki/Software/systemd/) system. - - -## Installing the LBR ODM2 MySQL test database - -**Note 1: This step should be the same for both server on AWS and local** -**Note 2: Do not use MySQL 5.7. We've identified a problem in MySQL 5.7 with loading from the LBR sample database into a geometry column. MySQL 5.6 and 5.5 have been tested successfully.** - - -1. Download the Little Bear River (LBR) test MySQL database - - ```bash - $ wget https://raw.githubusercontent.com/ODM2/ODM2/master/usecases/littlebearriver/sampledatabases/odm2_mysql/LBR_MySQL_SmallExample.sql - ``` -2. If MySQL database was a stand alone in Unix, add to /etc/mysql/my.cnf : `lower_case_table_names = 1` under [mysqld] -3. Create ODM2 database in MySQL. At the bash shell where the LBR SQL file was downloaded: `mysql -u root -p odm2 < LBR_MySQL_SmallExample.sql` -4. **NOTE: Sample database is missing featuregeometrywkt in samplingfeatures** In order to make WOFpy work, alter the table by adding featuregeometrywkt column, at the mysql client: - - ```sql - ALTER TABLE samplingfeatures ADD featuregeometrywkt VARCHAR (8000) NULL; - ``` - - -## Installing WOFpy - -**Note: The installation step for WOFpy should be the same for both server on AWS and local** - -1. Install miniconda into the user home directory. `/home/ubuntu/miniconda2` - ```bash - $ url=https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh - $ curl $url -o miniconda.sh - $ bash miniconda.sh -b - $ export PATH=$HOME/miniconda2/bin:$PATH - ``` - -2. Create the "wofpy" conda environment: `conda create -n wofpy -c ODM2 -c conda-forge python=2.7 wofpy odm2api mysql-python uwsgi`. *Note: `mysql-python` is not installed by the wofpy package and we'll need `uwsgi` for the application* -3. Clone the WOFpy repository `$ git clone https://github.com/ODM2/WOFpy.git` - - -## Installing NGINX - -**Note: The installation step for NGINX should be the same for both server on AWS and local** - -1. Install nginx into the system - - ``` bash - $ sudo add-apt-repository ppa:nginx/stable - $ sudo apt-get update && sudo apt-get upgrade - $ sudo apt-get install nginx - ``` -2. Start nginx webserver and then go to your server ip address - - ``` bash - $ sudo service nginx start - ``` - - You should get a welcome page: - ![nginxhome](./img/nginxhome.png) - - **This welcome page is located in `/var/www/html/`** - -3. Copy the example `odm2/timeseries` folder from WOFpy repository to `/var/www/` - - ```bash - $ sudo cp -r /home/ubuntu/WOFpy/wof/examples/flask/odm2/timeseries /var/www/ - ``` - -4. Currently the folder timeseries is owned by user `root` and group `root`, in order for nginx to be able to access and use this folder, change the owner and group to www-data. - - ```bash - $ sudo chown -R www-data:www-data /var/www/timeseries - ``` - - -## Setting up runserver script and wsgi.py - -**Note: This step for setting up runserver script and wsgi.py should be the same for both server on AWS and local** - -1. Using `runserver_odm2_timeseries.py` as an example, create a `runserver.py` script. Avoid using `localhost` in place of `127.0.0.1` below, to minimize problems. - - ```python - import os, sys - - import wof.flask - - import logging - import wof - - from odm2_timeseries_dao import Odm2Dao - #import private_config - - """ - python runserver_odm2_timeseries.py - --config=odm2_config_timeseries.cfg - --connection=example.connection - """ - #logging.basicConfig(level=logging.DEBUG) - #logging.getLogger('sqlalchemy.engine').setLevel(logging.DEBUG) - - connection = 'mysql+mysqldb://root:password@127.0.0.1:3306/ODM2' - - dao = Odm2Dao(connection) - config_file = 'odm2_config_timeseries.cfg' - timeseries_conf = wof.core.wofConfig(dao, config_file) - app = wof.flask.create_wof_flask_multiple({timeseries_conf}, templates=os.path.join(wof.__path__[0],'flask/templates')) - - def startServer(openPort = 8080): - - app.config['DEBUG'] = True - - - url = "http://127.0.0.1:" + str(openPort) - print "----------------------------------------------------------------" - print "Acess Service endpoints at " - for path in wof.site_map(app): - print "%s%s" % (url,path) - - print "----------------------------------------------------------------" - - app.run(host='0.0.0.0', port=openPort, threaded=True) - - if __name__ == '__main__': - startServer() - ``` - -2. Test that `runserver.py` will deploy WOFpy. Go to `ip:8080/odm2timeseries/` on your browser once it is deployed. - - ```bash - $ source activate wofpy # first activate the correct conda environment - $ python runserver.py - ``` - - ![wofpy home](./img/wofpyhome.png) - -3. Exit from the `runserver.py` and now we will create `wsgi.py`, a file that serves as the entry point for WOFpy. - - ``` python - #! /home/ubuntu/miniconda2/envs/wofpy/bin/python - import sys - sys.path.insert(0,"/var/www/timeseries") - - from runserver import app as application - application.secret_key = 'Thisismysecretkey' - ``` - - -## Configuring WSGI - -1. Testing uWSGI with WSGI. Do this by passing name of entry point, specify socket, and protocol (make sure that wofpy conda environment is still active). Go to `ip:8080/odm2timeseries/` on your browser once it is deployed. - - ``` bash - $ uwsgi --socket 0.0.0.0:8080 --protocol=http -w wsgi - ``` - -2. If everything works, now deactivate the conda environment. `$ source deactivate` - -3. Create uWSGI configuration file `timeseries.ini` in `/var/www/timeseries/` - - ``` bash - # Allows uWSGI to know to apply the settings - [uwsgi] - module = wsgi - # Tells uWSGI to start up in master mode and spawn five worker processes to serve actual request - master = true - processes = 5 - # When we were testing, we exposed uWSGI on a network port. - # However, we're going to be using Nginx to handle actual client connections, which will then pass requests to uWSGI. - # Since these components are operating on the same computer, a Unix socket is preferred because it is more secure and faster. - # We'll call the socket myproject.sock and place it in this directory. - # We'll also have to change the permissions on the socket. - # We'll be giving the Nginx group ownership of the uWSGI process later on, so we need to make sure the group owner of the socket can read information from it and write to it. - # We will also clean up the socket when the process stops by adding the "vacuum" option. - socket = timeseries.sock - chmod-socket = 660 - vacuum = true - # The last thing we need to do is set the die-on-term option. - # This is needed because the Upstart init system and uWSGI have different ideas on what different process signals should mean. - die-on-term = true - ``` - -### AWS SysV init system - -1. Create an upstart script `timeseries.conf` in `/etc/init/. This will allow the init system to automatically start uwsgi and serve out WOFpy when the server boots. - - ``` bash - # description of the script purpose - description "uWSGI server instance configured to serve timeseries" - - # The normal system runtime numbers are 2, 3, 4, and 5, so we'll tell it to start our script when the system reaches one of those runlevels. - # We'll tell it to stop on any other runlevel (such as when the server is rebooting, shutting down, or in single-user mode) - start on runlevel [2345] - stop on runlevel [!2345] - - # The Nginx server runs under the www-data group. - # We need Nginx to be able to read from and write to the socket file, so we'll give this group ownership over the process - setuid www-data - setgid www-data - - # Set the conda environment path - env PATH=/home/ubuntu/miniconda2/envs/wofpy/bin - - # change directory to where the uWSGI configuration file is located then execute uwsgi with the config file - chdir /var/www/timeseries - exec uwsgi --ini timeseries.ini - ``` - -2. Start the uwsgi process. - - ```bash - $ sudo start timeseries - $ ps aux | grep timeseries.ini # This command is to check whether the process started successfully - ``` - -### Local Server Systemd init system - -1. Create the upstart script `timeseries.service` in `/etc/systemd/system/`. Insert the following into the file: - ```bash - [Unit] - Description=uWSGI instance to serve timeseries - - [Service] - ExecStart=/bin/bash -c 'export PATH=/home/ubuntu/miniconda2/bin:$PATH; source activate wofpy; cd /var/www/timeseries; uwsgi --ini timeseries.ini' - - [Install] - WantedBy=multi-user.target - ``` - -2. Start the service by using the following command. - ```bash - $ sudo systemctl start timeseries - $ systemctl status timeseries # This command is to make sure the service is started and running correctly - $ sudo systemctl enable timeseries # This command enables the code to run independently - ``` - - -## Configuring NGINX - -1. Create a new server block configuration file `timeseries` in `/etc/nginx/sites-available/` - - ``` bash - server { - listen 8080; - server_name 127.0.0.1; - - location /odm2timeseries { - include uwsgi_params; - uwsgi_pass unix:/var/www/timeseries/timeseries.sock; - } - } - ``` - -2. Enable the Nginx server block configuration by linking the file to the sites-enabled directory. - - ```bash - $ sudo ln -s /etc/nginx/sites-available/timeseries /etc/nginx/sites-enabled - ``` - -3. Test for syntax errors in the block config - - ```bash - $ sudo nginx -t - ``` - -To view nginx errors checkout the log `/var/log/nginx/error.log`. Ensure that all files in the `timeseries` folder are still owned by www-data. - -### AWS SysV init system - -If no issues restart Nginx server - -```bash -$ sudo service nginx restart -``` - -### Local Server Systemd init system - -After setting up nginx run the following command - -```bash -$ sudo systemctl start nginx -$ sudo systemctl enable nginx -``` - - -## Checking Live instance of WOFpy - -Go to `ip:8080/odm2timeseries` and you should see WOFpy running. Click on the links available to see if the application is working properly.