Sin descripción
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Yann Weber 747ff25ada Bugfix in slim + enhancement of mass_deploy hace 8 años
doc/img Add autyhentication/session flowcharts hace 8 años
examples Add a new sttings validator + use it hace 8 años
globconf.d Add a new sttings validator + use it hace 8 años
lodel Avoiding fails at session_restore hace 8 años
m4 Add a forgotten (not mandatory file) hace 8 años
plugins Added a "uwsgi-workers" argument for the instances deployment hace 8 años
progs Bugfix in slim + enhancement of mass_deploy hace 8 años
scripts Bugfix in create_instance.sh and install/loader.py hace 8 años
tests Added tests for MultiRef datahandler and modified _check_data_value raise exception hace 8 años
.gitignore Updated the doxygen documentation hace 8 años
AUTHORS Configure autotools for distributing lodel2 hace 8 años
COPYING Configure autotools for distributing lodel2 hace 8 años
ChangeLog Configure autotools for distributing lodel2 hace 8 años
Doxyfile Doxygen documentation update hace 8 años
INSTALL Configure autotools for distributing lodel2 hace 8 años
Makefile.am Removed doxygen from dist target hace 8 años
NEWS Configure autotools for distributing lodel2 hace 8 años
README Enhancement in deployment with autotools and in README file hace 8 años
bootstrap.sh Configure autotools for distributing lodel2 hace 8 años
configure.ac Add a data to buildconf.py hace 8 años
em_test.py Authentification form in Webui interface hace 8 años
requirements.txt Updated the requirements file hace 8 años
runtest.sh Enhancement in deployment with autotools and in README file hace 8 años

README

Dependencies :
==============

lodel2 components :
-------------------
core :
python3 python3-lxml

build dependencies :
autoconf automake make

webui plugin :
python3-jinja2 python3-werkzeug uwsgi-plugin-python3

mongodb_datasource plugin :
python3-pymongo

lodel2 utils :
--------------
mass_deploy dependencies :
pwgen wamerican mongodb-clients

Build & install :
=================

./bootstrap.sh #generate the configure, refresh the Makefile.in files
#--prefix=/usr is mandatory on debian because of a python3.4.2 bug
./configure --sysconfdir=/etc --localstatedir=/var --prefix=/usr
#build lodel2 (actually substitute paths script and buildconf.py files)
make
#Install lodel2 on system
make install
#Uninstall lodel2
make uninstall

Other make targets :
====================

Doxygen documentation generation :
----------------------------------
make doc #or simply run doxygen in the source dir

Run unit tests :
----------------

make check
#or
make unittest

Lodel2 instance management utilities :
======================================

SLIM : Simple Lodel Instance Manager
------------------------------------

- create a new instance named foo :
slim -n foo -c

- list instances :
slim -l

- list instances with details :
slim -lv[v[v]]

- list instances with output formated for bash processing :
slim -l -b [-v[v[v]]

- run make all for instance foo :
slim -n foo -m

- run make for all existing instances :
slim --all -m

- start an instance in forground
slim -n foo --start -f

- start all instances :
slim -a --start

- generate a nginx conf for all instances :
slim -a --nginx-conf

- get some help for more options & actions :
slim -h

mass_deploy.sh :
----------------
Use for easy mass deployment of instances with webui & uwsgi
the script at $prefix/share/lodel2/scripts/mass_deploy.sh

Usage : mass_deploy.sh N #with N the number of instances to deploy
-------

Notes :
-------

- configuration can be found in /etc/lodel2/mass_deploy.cfg
to indicate mongodb admin credentials

- mass deploy create instances directories
in /tmp/lodel2_instances

Instance operations :
=====================

- Two utils are available for instances operations :
* Make for op without parameters
* lodel_admin.py for op with parameters

- Makefile available target :
# Leapi dynamic code creation ( in leapi_dyncode.py in lodel2
#instance root dir)
make dyncode

# Call migration handlers to tell them to init all needed
#databases. (note : this target has dyncode as dependencie)
make init_db
make list_hooks # List all the hooks registered

- lodel_admin.py : see lodel_admin.py -h


##########################################
# Following informations can be obsolete #
##########################################

Dynamic code generation :
python3 scripts/refreshdyn.py examples/em_test.pickle OUTPUTFILE.py

Instance creation :
Use the script in scripts/create_instance.sh

Usage : scripts/create_instance.sh instance_name instance_dir [lodel_libdir]


Instance loader uppdate :
If the install/loader.py is updated you can update instance's loader.py using
scripts/create_instance.sh -u INSTANCE_PATH