Commit af82d1a5 authored by Nathalie Rousse's avatar Nathalie Rousse
Browse files

Updating deployment documentation

parent 89fc742b
.. _deploy_deployment_environment_install:
Deployment environment installation
.. literalinclude:: include/cmd_install_deploy_environment.rst
ports.conf file modifications
Modify the apache2 ports.conf file so that the Apache2 server listens to
the port dedicated to the erecord_ws site and the port dedicated to the
online documentation.
.. literalinclude:: include/cmd_modify_portsconf.rst
apache2.conf file modifications
.. literalinclude:: include/cmd_modify_apache2conf.rst
.. _deploy_development_environment_install:
Development environment installation
Installation of LibYAML
LibYAML is needed by pyyaml.
.. literalinclude:: include/cmd_install_libyaml.rst
Installation of libcurl
Those libraries are needed by pycurl.
.. literalinclude:: include/cmd_install_libcurl.rst
Installation of the erecordenv virtualenv
The python modules are installed in a **virtualenv**.
erecordenv virtualenv creation
The erecordenv virtualenv is created under :ref:`deploy_erecordenv_path`.
.. literalinclude:: include/cmd_create_erecordenv_virtualenv.rst
.. warning::
Problem met on Ubuntu 14.04 (development situation) while 'virtualenv'
command : " missing in /usr/lib/python2.7/"
Has been resolved by commands : cd /usr/lib/python2.7 ;
sudo ln -s plat-x86_64-linux-gnu/
python modules installation
*Python libraries may be installed via pip, easy_install,
"python install"...*
erecordenv virtualenv activation
The activation command is into the erecordenv virtualenv under
.. literalinclude:: include/cmd_activate_erecordenv_virtualenv.rst
python modules installation
About **requirement.txt** file : :ref:`more <deploy_requirement.txt_file>`.
.. literalinclude:: include/cmd_install_python_modules.rst
Installation of the vle environment
It consists in (i) installing vle-1.1, (ii) installing pyvle-1.1 (into the
erecordenv virtualenv).
!!! todo enlever "installing pyvle"
!!! todo gerer plusieurs versions vle
*Some more notes* : :ref:`cmd_install_vle_pyvle`
.. _deploy_erecord_modify_and_generate:
erecord software modifications and generations
============= file
About **** file : :ref:`more <deploy_wsgi.py_file>`.
Into the file, put the appropriate path about the erecordenv
virtualenv : the file location is 'erecordenv/bin' under :ref:`deploy_erecordenv_path`.
.. literalinclude:: include/cmd_modify_wsgipy.rst file
About **** file : :ref:`more <deploy_config.py_file>`.
.. literalinclude:: include/cmd_modify_configpy.rst file
About **** file : :ref:`more <deploy_settings.py_file>`.
.. literalinclude:: include/cmd_modify_settingspy.rst
erecord_ws file
About **erecord_ws** file : :ref:`more <deploy_erecord_ws_file>`.
Into the erecord_ws file, give the appropriate :ref:`deploy_erecordenv_path`
value :
.. literalinclude:: include/cmd_modify_erecord_ws.rst
Install the erecord_ws file in the appropriate location and activate the
erecord_ws site :
.. literalinclude:: include/cmd_install_and_activate_erecord_ws.rst
Some URL values directly appear in source code (:ref:` file <deploy_config.py_file>`, online_url.rst documentation file...). They have to be in conformity with the :ref:`erecord_ws file <deploy_erecord_ws_file>` and with the documentation installation (see :ref:`below <geninstall_documentation>`) :
.. literalinclude:: include/cmd_modify_urlvalues.rst
.. _geninstall_documentation:
Activate erecordenv virtualenv (if not yet done) :
Main documentation
- Generation :
The generation commands are done under :ref:`erecord_docs_path
.. literalinclude:: include/cmd_make_doc.rst
- Installation :
Installation under /var/www :
.. literalinclude:: include/cmd_install_doc.rst
Some other external documentation
- Generation :
The generation commands are done under :ref:`erecord_docs_path
.. literalinclude:: include/cmd_make_vpzpages.rst
- Installation :
Installation under /var/www :
.. literalinclude:: include/cmd_install_vpzpages.rst
Static files
The static files commands are done under 'erecord/projects/ws' under
.. literalinclude:: include/cmd_static_files.rst
.. _devel_deployment_fromscratch_case:
Installation procedure in 'from scratch' case
Some basic tools, installed once and for all : python 2.7, sudo, virtualenv...
.. literalinclude:: include/cmd_setup.rst
1. Deployment environment installation
The deployment environment installation is done once and for all.
See :ref:`deploy_deployment_environment_install`.
.. _deploy_beginning_of_erecord_project_software_install:
2. Beginning of erecord project software installation
The erecord project software installation begins with the code copying. The
following operations will be done later on (see below).
Software copy
The whole erecord project software is copied as
.. literalinclude:: include/cmd_copy_erecord.rst
.. note::
'factory' and 'repositories' under :ref:`deploy_erecord_path` (ie
'/opt/erecord/factory' and '/opt/erecord/repositories') are empty at
this stage.
*'/opt/erecord/factory' will contain things once they have been
generated later on (see the rest of the 'erecord project software
*'/opt/erecord/repositories' will contain some models repositories once
they have been installed later on.*
3. Development environment installation
Prerequisites :
The :ref:`deploy_beginning_of_erecord_project_software_install` must have
been done before.
Installation :
See :ref:`deploy_development_environment_install`.
4. Rest of the erecord project software installation
Now that the erecord project software has been copied (see
:ref:`Beginning of erecord project software installation
<deploy_beginning_of_erecord_project_software_install>`), this consists
in doing the appropriate modifications and generations.
See :ref:`deploy_erecord_modify_and_generate`.
5. Models software installation
See :ref:`deploy_repositories`.
* erecordenv creation :
virtualenv /opt/erecord/factory/install/erecordenv -p /usr/bin/python2.7 --no-site-packages
* install :
sudo cp /opt/erecord/erecord/projects/ws/ws/erecord_ws /etc/apache2/sites-available/erecord_ws.conf
* activate :
sudo a2ensite erecord_ws.conf
* apache2.2 :
sudo apt-get install apache2 apache2.2-common apache2-utils libexpat1 ssl-cert
* apache2-mpm-prefork :
sudo apt-get install apache2-mpm-prefork
* mod_wsgi :
sudo apt-get install libapache2-mod-wsgi
* add server entry :
sudo cp /opt/erecord/docs/server/docs.html /opt/erecord/factory/docs/docs.html
sudo cp /opt/erecord/docs/server/index.html /opt/erecord/factory/docs/index.html
* save maybe existing /var/www/docs.html,index.html :
sudo mv /var/www/docs.html /var/www/docs_svgnewname.html
sudo mv /var/www/index.html /var/www/index_svgnewname.html
* install under /var/www :
sudo ln -s /opt/erecord/factory/docs /var/www/erecord
sudo ln -s /var/www/erecord/docs.html /var/www/docs.html
sudo ln -s /var/www/erecord/index.html /var/www/index.html
Install about libcurl
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libssl-dev
Install LibYAML version 0.1.5
* Download and extract the source package :
tar -zxvf yaml-0.1.5.tar.gz
* Build and install LibYAML :
sudo make install
* installation from requirement.txt :
pip install -r /opt/erecord/erecord/install/requirement.txt
* remove maybe existing previous generated var/www/docs/vpzpages/gen :
rm -fr /var/www/docs/vpzpages/gen
* install under /var/www :
sudo mv /opt/erecord/factory/docs/vpzpages/gen /var/www/docs/vpzpages/gen
* /etc/apache2/apache2.conf file modifications :
Timeout 600
(to be adapted)
KeepAlive Off
(not KeepAlive On)
* /etc/apache2/mods-available/mpm_prefork.conf modifications :
ServerLimit 150
(same value as MaxRequestWorkers)
MaxConnectionsPerChild 1
(not MaxConnectionsPerChild 0)
* /opt/erecord/erecord/apps/erecord_cmn/configs/ file modifications :
* /opt/erecord/erecord/projects/ws/ws/erecord_ws file modifications :
... /opt/erecord ...
* /etc/apache2/ports.conf file modifications :
Case port 8000 dedicated to the erecord_ws site
(see file /opt/erecord/erecord/projects/ws/ws/erecord_ws file)
Case port 80 dedicated to online documentation
NameVirtualHost *:80
Listen 8000
Listen 80
<IfModule ssl_module>
Listen 443
* /opt/erecord/erecord/projects/ws/ws/ file modifications :
DEBUG = False
* /opt/erecord/erecord/apps/erecord_cmn/configs/ file modifications :
* /opt/erecord/docs/source/devel/design/webapi/include/online_url.rst and
/opt/erecord/docs/source/devel/design/webapi/include/online_*.rst files modifications :
Put the appropriate url value :
(commands, if '' has to be replaced by '' into online_*.rst files :
cd /opt/erecord/docs/source/devel/design/webapi/include ;
sed -i 's/' online_url*.rst ; )
* /opt/erecord/erecord/projects/ws/ws/ file modifications :
Put the appropriate path for :
activate_this = os.path.expanduser("/opt/erecord/factory/install/erecordenv/bin/")
Supports Markdown
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