Commit 470b2801 authored by Nathalie Rousse's avatar Nathalie Rousse
Browse files

Updating while deploying (debian 9.5, apache2.4)

parent 1418b35a
......@@ -2,7 +2,8 @@
<head>
<title>erecord web services</title>
<meta http-equiv="refresh" content="0; URL=http://erecord.toulouse.inra.fr:8000">
<!-- meta http-equiv="refresh" content="0; URL=http://erecord.toulouse.inra.fr:8000"-->
<meta http-equiv="refresh" content="0; URL=http://147.100.179.168:8000">
</head>
<body></body>
......
......@@ -12,7 +12,7 @@ Can erecord web services be used for any agronomic model ?
- The agronomic model software will have to be previously installed on the
erecord server (see an
`illustration <http://147.100.164.34/docs/erecord/erecord.pdf>`_ *(fr)* ), that
`illustration <http://147.100.179.168/docs/erecord/erecord.pdf>`_ *(fr)* ), that
is to say (i) physically stored into one of the models repositories and
(ii) recorded into the databases of the erecord project. For more
information, :ref:`contact us <erecord_contacts>`.
......
......@@ -10,22 +10,22 @@ erecord and my agronomic model project
I intend to develop an agronomic model into the :term:`Record` platform. What about the erecord web services ?
------------------------------------------------------------------------------
See `Modelling into the Record platform and the erecord web services <http://147.100.164.34/docs/erecord/model_owner.pdf>`_ *(fr) (Modélisation sous la plateforme RECORD et services web erecord)*
See `Modelling into the Record platform and the erecord web services <http://147.100.179.168/docs/erecord/model_owner.pdf>`_ *(fr) (Modélisation sous la plateforme RECORD et services web erecord)*
I am developing an agronomic model into the :term:`Record` platform. What about the erecord web services ?
------------------------------------------------------------------------------
See `Modelling into the Record platform and the erecord web services <http://147.100.164.34/docs/erecord/model_owner.pdf>`_ *(fr) (Modélisation sous la plateforme RECORD et services web erecord)*
See `Modelling into the Record platform and the erecord web services <http://147.100.179.168/docs/erecord/model_owner.pdf>`_ *(fr) (Modélisation sous la plateforme RECORD et services web erecord)*
My agronomic model, developed into the :term:`Record` platform, has now reached some stability state. What about the erecord web services ?
------------------------------------------------------------------------------
See `Modelling into the Record platform and the erecord web services <http://147.100.164.34/docs/erecord/model_owner.pdf>`_ *(fr) (Modélisation sous la plateforme RECORD et services web erecord)*
See `Modelling into the Record platform and the erecord web services <http://147.100.179.168/docs/erecord/model_owner.pdf>`_ *(fr) (Modélisation sous la plateforme RECORD et services web erecord)*
My agronomic model, developed into the :term:`Record` platform, is now finalized, operational. What about the erecord web services ?
------------------------------------------------------------------------------
See `Modelling into the Record platform and the erecord web services <http://147.100.164.34/docs/erecord/model_owner.pdf>`_ *(fr) (Modélisation sous la plateforme RECORD et services web erecord)*
See `Modelling into the Record platform and the erecord web services <http://147.100.179.168/docs/erecord/model_owner.pdf>`_ *(fr) (Modélisation sous la plateforme RECORD et services web erecord)*
Can my agronomic model remain private under erecord ?
......
......@@ -64,7 +64,7 @@ Can I use my simulation results later on ?
See :ref:`webapi_opt_storage` | :ref:`webapi_feat_storage`
See also the page "Stockage de résultats de simulation dans le navigateur web" of document : `Using an agronomic model developped with the Record platform and installed into the erecord web services <http://147.100.164.34/docs/erecord/model_user.pdf>`_ *(fr) (Utiliser un modèle agronomique développé sous la plateforme Record et disponible dans les services web erecord)*.
See also the page "Stockage de résultats de simulation dans le navigateur web" of document : `Using an agronomic model developped with the Record platform and installed into the erecord web services <http://147.100.179.168/docs/erecord/model_user.pdf>`_ *(fr) (Utiliser un modèle agronomique développé sous la plateforme Record et disponible dans les services web erecord)*.
- Some resources return **results as files** (simulation results,
parameters values) :
......
......@@ -20,29 +20,29 @@ Some presentations
* **An illustration of erecord web services :**
`Illustration <http://147.100.164.34/docs/erecord/erecord.pdf>`_ *(fr)*
`Illustration <http://147.100.179.168/docs/erecord/erecord.pdf>`_ *(fr)*
* **A general presentation of erecord web services :**
`erecord web services, general presentation <http://147.100.164.34/docs/erecord/erecord_presentation_generale.pdf>`_
`erecord web services, general presentation <http://147.100.179.168/docs/erecord/erecord_presentation_generale.pdf>`_
*(fr) (Services web erecord, présentation générale)*.
* **Using a model through internet with erecord web services :**
`Lesson : Using a model through the web <http://147.100.164.34/docs/erecord/cours_2.5.pdf>`_
`Lesson : Using a model through the web <http://147.100.179.168/docs/erecord/cours_2.5.pdf>`_
*(fr) (Cours : Utiliser un modèle à travers le web)*.
* **In details - the erecord web services for a model of the Record platform :**
`Using an agronomic model developped with the Record platform and installed into the erecord web services <http://147.100.164.34/docs/erecord/model_user.pdf>`_
`Using an agronomic model developped with the Record platform and installed into the erecord web services <http://147.100.179.168/docs/erecord/model_user.pdf>`_
*(fr) (Utiliser un modèle agronomique développé sous la plateforme Record et disponible dans les services web erecord)*.
* **The erecord web services while modelling into the Record platform :**
`Modelling into the Record platform and the erecord web services <http://147.100.164.34/docs/erecord/model_owner.pdf>`_
`Modelling into the Record platform and the erecord web services <http://147.100.179.168/docs/erecord/model_owner.pdf>`_
*(fr) (Modélisation sous la plateforme Record et services web erecord)*.
......@@ -32,5 +32,5 @@ some simulations for example to a R program that manages analysis.
- See : :ref:`model analysis <model_analysis>` based on the WWDM model.
- See : `model analysis <http://147.100.164.34/docs/models/recordschool/sequence_8_3_hackaton_3.pdf>`_ *(fr)* based on the :ref:`recordschool model <recordschool>`.
- See : `model analysis <http://147.100.179.168/docs/models/recordschool/sequence_8_3_hackaton_3.pdf>`_ *(fr)* based on the :ref:`recordschool model <recordschool>`.
......@@ -14,5 +14,5 @@ crop system) of the Record platform.
*Training subject "Développement de Web Services, mise en oeuvre appliquée à deux plates- formes INRA : MEANS et RECORD"*
See `Web services of the Record platform meeting some needs of the Means platform <http://147.100.164.34/misc/webrecord/meansrecord2014.pdf>`_ *(fr) (Services web de la plateforme Record répondant à des besoins de la plateforme Means)*.
See `Web services of the Record platform meeting some needs of the Means platform <http://147.100.179.168/misc/webrecord/meansrecord2014.pdf>`_ *(fr) (Services web de la plateforme Record répondant à des besoins de la plateforme Means)*.
......@@ -8,7 +8,7 @@ The **recordschool** model is a model of the :term:`Record` platform, that has b
This model corresponds with the **recordschool** :term:`models repository` of erecord web services and so **can be requested by erecord web services**, as shown by the following examples :
- See : `recordschool as erecord web services <http://147.100.164.34/docs/models/recordschool/recordschool_erecord.pdf>`_ *(fr) (recordschool sous forme de services web)*.
- See : `recordschool as erecord web services <http://147.100.179.168/docs/models/recordschool/recordschool_erecord.pdf>`_ *(fr) (recordschool sous forme de services web)*.
- See : `R programs of model analysis <http://147.100.164.34/docs/models/recordschool/sequence_8_3_hackaton_3.pdf>`_ that use erecord web services for recordschool simulations *(fr) (Programmes R d'analyse de modèle appelant les services web erecord pour les simulations du modèle recordschool)*.
- See : `R programs of model analysis <http://147.100.179.168/docs/models/recordschool/sequence_8_3_hackaton_3.pdf>`_ that use erecord web services for recordschool simulations *(fr) (Programmes R d'analyse de modèle appelant les services web erecord pour les simulations du modèle recordschool)*.
......@@ -16,5 +16,5 @@ for models of the :term:`Record` platform. Productions are :
application dedicated to their own agronomic model.
The website, that was dedicated to the webrecord project presentation and
productions, is no longer online. See an `archive of the webrecord site <http://147.100.164.34/misc/webrecord/webrecord.pdf>`_ *(fr) (archive du site internet webrecord)*.
productions, is no longer online. See an `archive of the webrecord site <http://147.100.179.168/misc/webrecord/webrecord.pdf>`_ *(fr) (archive du site internet webrecord)*.
......@@ -9,7 +9,7 @@ Overview
As RESTful web services, the :term:`erecord` web services are based on the HTTP protocol (a call takes the form of an HTTP request). As a consequence, there are different ways how to call the :term:`erecord` web services : they can be called from 'anything' that can send an HTTP request.
An `illustration <http://147.100.164.34/docs/erecord/erecord.pdf>`_ *(fr)*
An `illustration <http://147.100.179.168/docs/erecord/erecord.pdf>`_ *(fr)*
The :term:`erecord` web services can be called :
......@@ -19,7 +19,7 @@ The :term:`erecord` web services can be called :
In addition a **Web User Interface** has been developped to make easier calling some erecord web services : see :ref:`webui`.
See also : `Using an agronomic model developped with the Record platform and installed into the erecord web services <http://147.100.164.34/docs/erecord/model_user.pdf>`_ *(fr) (Utiliser un modèle agronomique développé sous la plateforme Record et disponible dans les services web erecord)*.
See also : `Using an agronomic model developped with the Record platform and installed into the erecord web services <http://147.100.179.168/docs/erecord/model_user.pdf>`_ *(fr) (Utiliser un modèle agronomique développé sous la plateforme Record et disponible dans les services web erecord)*.
Calling the web services from programs
======================================
......@@ -77,11 +77,11 @@ Customize html home pages
in, and customize it : choose which parameters to show, add some
information (units...), control the filled in values...
Example : `a WWDM home page <http://147.100.164.34/docs/models/wwdm/accueil_wwdm.html>`_ *(fr)* (for more see : :ref:`html home pages for the WWDM model <wwdm_homepage>`).
Example : `a WWDM home page <http://147.100.179.168/docs/models/wwdm/accueil_wwdm.html>`_ *(fr)* (for more see : :ref:`html home pages for the WWDM model <wwdm_homepage>`).
Such home pages may already exist for some models, for example if the
model owner has given one when he has delivered its model to erecord).
Examples : `a WWDM home page <http://147.100.164.34/docs/models/wwdm/accueil_wwdm.html>`_ *(fr)*, `a recordschool home page <http://147.100.164.34/docs/models/recordschool/accueil_recordschool.html>`_ *(fr)*.
Examples : `a WWDM home page <http://147.100.179.168/docs/models/wwdm/accueil_wwdm.html>`_ *(fr)*, `a recordschool home page <http://147.100.179.168/docs/models/recordschool/accueil_recordschool.html>`_ *(fr)*.
You can modify an existing home page as you want according to your own
case, then keep it for yourself or share it, that is to say send it to
......
......@@ -7,12 +7,12 @@ A html home page for the simulator
*The erecord web services used in this part are some of the ‘vpz’ web
services* (see :ref:`webapi_vpz`).
A `html home page <http://147.100.164.34/docs/models/wwdm/accueil_wwdm.html>`_
A `html home page <http://147.100.179.168/docs/models/wwdm/accueil_wwdm.html>`_
*(fr)* has been written/built for the WWDM model, more precisely for its
simulator ‘wwdm.vpz’ whose Id is :ref:`wwdm_vpz_id`
(:ref:`more <wwdm_vpz_id>`).
This `home page <http://147.100.164.34/docs/models/wwdm/accueil_wwdm.html>`_
This `home page <http://147.100.179.168/docs/models/wwdm/accueil_wwdm.html>`_
*(fr)* contains some examples of customization :
- Some information has been added to help the user : parameters definition, unit...
......@@ -20,7 +20,7 @@ This `home page <http://147.100.164.34/docs/models/wwdm/accueil_wwdm.html>`_
- The html code controls some values chosen by the user (min and max values...).
- ...
**Acces to the html page** : `a home page for WWDM <http://147.100.164.34/docs/models/wwdm/accueil_wwdm.html>`_ *(fr)*.
**Acces to the html page** : `a home page for WWDM <http://147.100.179.168/docs/models/wwdm/accueil_wwdm.html>`_ *(fr)*.
.. note::
There can exist for the WWDM model as many such html home pages as use
......@@ -28,7 +28,7 @@ This `home page <http://147.100.164.34/docs/models/wwdm/accueil_wwdm.html>`_
.. note::
You can save
`the page <http://147.100.164.34/docs/models/wwdm/accueil_wwdm.html>`_
`the page <http://147.100.179.168/docs/models/wwdm/accueil_wwdm.html>`_
*(fr)* and modify it as you want according to your own use case, then keep
it for yourself or share it, that is to say send it to some colleagues.
......
......@@ -16,5 +16,5 @@ See also the :ref:`webui`
See also the :ref:`webapi`
See also : `Using an agronomic model developped with the Record platform and installed into the erecord web services <http://147.100.164.34/docs/erecord/model_user.pdf>`_ *(fr) (Utiliser un modèle agronomique développé sous la plateforme Record et disponible dans les services web erecord)*.
See also : `Using an agronomic model developped with the Record platform and installed into the erecord web services <http://147.100.179.168/docs/erecord/model_user.pdf>`_ *(fr) (Utiliser un modèle agronomique développé sous la plateforme Record et disponible dans les services web erecord)*.
......@@ -12,7 +12,7 @@ Case of development under ubuntu
Case of production under debian
===============================
see /opt/erecord/erecord/install/debian/apache2.4/install.txt
see /opt/erecord/erecord/install/debian/apache/install.txt
*******************************************************************************
Django==1.11
Sphinx==1.6.3
Sphinx
djangorestframework==3.6.4
pyyaml==3.12
pycurl==7.43.0
pyyaml
pycurl
djangorestframework-xml
djangorestframework-jsonp
djangorestframework-yaml
......
"""
WSGI config for ws project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ws.settings")
application = get_wsgi_application()
#
#import os
#
#from django.core.wsgi import get_wsgi_application
#
#import sys
#
## ws.settings path
#ws_settings_path = os.path.normpath( os.path.dirname(os.path.dirname(__file__)))
#if ws_settings_path not in sys.path :
# sys.path.insert(0, ws_settings_path)
#
#os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ws.settings")
#os.environ['DJANGO_SETTINGS_MODULE'] = 'ws.settings'
#
#
#application = get_wsgi_application()
#
a jeter (remplace par ws/wsgi.py)
<VirtualHost *:8000>
ServerAdmin webmaster@localhost
ServerName erecord.toulouse.inra.fr
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
# ServerName erecord.toulouse.inra.fr
ServerName 147.100.179.168
ErrorLog ${APACHE_LOG_DIR}/error.log
......@@ -32,49 +12,20 @@
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Require host 127.0.0.0/255.0.0.0 ::1/128
</Directory>
###############################################################################
AliasMatch ^/([^/]*\.css) /opt/erecord/factory/static/ws/css/$1
Alias /static/ /opt/erecord/factory/static/ws/
<Directory /opt/erecord/factory/static >
Options Indexes
</Directory>
<Directory /opt/erecord/factory/erecordenv/lib/python2.7/site-packages/django/contrib/admin/static/admin>
Options Indexes
Alias /static /opt/erecord/factory/static/ws
<Directory /opt/erecord/factory/static/ws>
Require all granted
IndexOptions FancyIndexing
</Directory>
<Directory /opt/erecord >
AllowOverride None
# public access case
Require all granted
# limited access case
#AuthName "limited access"
#AuthType Basic
#AuthUserFile "/var/private/.htpasswd"
#require valid-user
<Directory /opt/erecord/erecord/projects/ws/ws>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIPassAuthorization On
WSGIScriptAlias / /opt/erecord/erecord/projects/ws/ws/wsgi.py
###############################################################################
WSGIDaemonProcess ws python-path=/opt/erecord/erecord/projects/ws:/opt/erecord/factory/install/erecordenv/lib/python2.7/site-packages
WSGIProcessGroup ws
WSGIScriptAlias / /opt/erecord/erecord/projects/ws/ws/wsgi.py
</VirtualHost>
# -*- coding: utf-8 -*-
"""erecord.projects.ws.ws.wsgi
WSGI config for ws project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
#original
#
#import os
#os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ws.settings")
#
#from django.core.wsgi import get_wsgi_application
#application = get_wsgi_application()
import os
import sys
# ws.settings path
ws_settings_path = os.path.normpath( os.path.dirname(os.path.dirname(__file__)))
if ws_settings_path not in sys.path :
sys.path.insert(0, ws_settings_path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'ws.settings'
# Only if a virtual environment is used
apps_path = os.path.normpath( os.path.join(ws_settings_path, '..', '..', 'apps') )
if apps_path not in sys.path :
sys.path.insert(0, apps_path)
from erecord_cmn.configs.config import IN_PRODUCTION
if IN_PRODUCTION :
activate_path = "/opt/erecord/factory/install/erecordenv/bin/activate_this.py"
activate_this = os.path.expanduser(activate_path)
execfile(activate_this, dict(__file__=activate_this))
# added because were not in pythonpath
python_path = "/opt/erecord/factory/install/erecordenv/lib/python2.7"
if python_path not in sys.path :
sys.path.insert(0, python_path)
libdynload_path = "/opt/erecord/factory/install/erecordenv/lib/python2.7/lib-dynload"
if libdynload_path not in sys.path :
sys.path.insert(0, libdynload_path)
#import django.core.handlers.wsgi
#application = django.core.handlers.wsgi.WSGIHandler()
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
a jeter (remplace par ws/wsgi.py)
<VirtualHost *:8000>
ServerAdmin webmaster@localhost
ServerName erecord.toulouse.inra.fr
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
# ServerName erecord.toulouse.inra.fr
ServerName 147.100.179.168
ErrorLog ${APACHE_LOG_DIR}/error.log
......@@ -32,49 +12,20 @@
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Require host 127.0.0.0/255.0.0.0 ::1/128
</Directory>
###############################################################################
AliasMatch ^/([^/]*\.css) /opt/erecord/factory/static/ws/css/$1
Alias /static/ /opt/erecord/factory/static/ws/
<Directory /opt/erecord/factory/static >
Options Indexes
</Directory>
<Directory /opt/erecord/factory/erecordenv/lib/python2.7/site-packages/django/contrib/admin/static/admin>
Options Indexes
Alias /static /opt/erecord/factory/static/ws
<Directory /opt/erecord/factory/static/ws>
Require all granted
IndexOptions FancyIndexing
</Directory>
<Directory /opt/erecord >
AllowOverride None
# public access case
Require all granted
# limited access case
#AuthName "limited access"
#AuthType Basic
#AuthUserFile "/var/private/.htpasswd"
#require valid-user
<Directory /opt/erecord/erecord/projects/ws/ws>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIPassAuthorization On
WSGIScriptAlias / /opt/erecord/erecord/projects/ws/ws/wsgi.py
###############################################################################
WSGIDaemonProcess ws python-path=/opt/erecord/erecord/projects/ws:/opt/erecord/factory/install/erecordenv/lib/python2.7/site-packages
WSGIProcessGroup ws
WSGIScriptAlias / /opt/erecord/erecord/projects/ws/ws/wsgi.py
</VirtualHost>
......@@ -58,8 +58,9 @@ DEBUG = True # True # False
#ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '[::1]',
'erecord.toulouse.inra.fr', # VM erecord (production)
'147.99.108.17', # VM genotoul erecord
'erecord.toulouse.inra.fr', # VM erecord (production)
'147.99.108.17', # VM genotoul erecord
'147.100.179.168', # VM erecord2 (production in test)
]
# Application definition
......
......@@ -6,47 +6,11 @@ WSGI config for ws project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
#original
#
#import os
#os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ws.settings")
#
#from django.core.wsgi import get_wsgi_application
#application = get_wsgi_application()
import os
import sys
# ws.settings path
ws_settings_path = os.path.normpath( os.path.dirname(os.path.dirname(__file__)))
if ws_settings_path not in sys.path :
sys.path.insert(0, ws_settings_path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'ws.settings'
# Only if a virtual environment is used
apps_path = os.path.normpath( os.path.join(ws_settings_path, '..', '..', 'apps') )
if apps_path not in sys.path :
sys.path.insert(0, apps_path)
from erecord_cmn.configs.config import IN_PRODUCTION
if IN_PRODUCTION :
activate_path = "/opt/erecord/factory/install/erecordenv/bin/activate_this.py"
activate_this = os.path.expanduser(activate_path)
execfile(activate_this, dict(__file__=activate_this))
# added because were not in pythonpath
python_path = "/opt/erecord/factory/install/erecordenv/lib/python2.7"
if python_path not in sys.path :
sys.path.insert(0, python_path)
libdynload_path = "/opt/erecord/factory/install/erecordenv/lib/python2.7/lib-dynload"
if libdynload_path not in sys.path :
sys.path.insert(0, libdynload_path)
#import django.core.handlers.wsgi
#application = django.core.handlers.wsgi.WSGIHandler()
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ws.settings")
application = get_wsgi_application()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment