# HG changeset patch # User Nicolas Chauvat # Date 1580680861 -3600 # Node ID 8e3fda2c60ef66608ab70350183df80efe08ffa4 # Parent a9562c7b4456ad37705a2348cf424db3b65769d2# Parent 96af8cdcdc7d5c1d6c87726e42e8b87e478afcd0 merge 3.27 into default diff -r a9562c7b4456 -r 8e3fda2c60ef doc/announce.en.txt --- a/doc/announce.en.txt Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/announce.en.txt Sun Feb 02 23:01:01 2020 +0100 @@ -19,7 +19,7 @@ * a selection+view mechanism for semi-automatic XHTML/XML/JSON/text generation, * a library of reusable components (data model and views) that fulfill common needs, * the power and flexibility of the Python programming language, - * the reliability of SQL databases, LDAP directories, Subversion and Mercurial for storage backends. + * the reliability of SQL databases, LDAP directories and Mercurial for storage backends. Being built since 2000 by an R&D project still going on today, supporting 100,000s of daily visits at some production sites, CubicWeb is a proven end to diff -r a9562c7b4456 -r 8e3fda2c60ef doc/announce.fr.txt --- a/doc/announce.fr.txt Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/announce.fr.txt Sun Feb 02 23:01:01 2020 +0100 @@ -22,7 +22,7 @@ * une bibliothèque de composants réutilisables (modèle de donnée et vues) qui satisfait les besoins les plus courants, * la puissance et l'adaptabilité du langage de programmation Python, - * la solidité des bases SQL, des annuaires LDAP, de Subversion et Mercurial + * la solidité des bases SQL, des annuaires LDAP et Mercurial pour le stockage des données. Développé depuis 2000 par un projet de R&D qui se poursuit encore aujourd'hui, diff -r a9562c7b4456 -r 8e3fda2c60ef doc/book/admin/config.rst --- a/doc/book/admin/config.rst Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/book/admin/config.rst Sun Feb 02 23:01:01 2020 +0100 @@ -41,7 +41,7 @@ will be chosen when creating the instance. CubicWeb is known to run with Postgresql (recommended), SQLServer and SQLite. -Other possible sources of data include CubicWeb, Subversion, LDAP and Mercurial, +Other possible sources of data include CubicWeb, LDAP and Mercurial, but at least one relational database is required for CubicWeb to work. You do not need to install a backend that you do not intend to use for one of your instances. SQLite is not fit for production use, but it works well for testing diff -r a9562c7b4456 -r 8e3fda2c60ef doc/book/admin/deploy.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/book/admin/deploy.rst Sun Feb 02 23:01:01 2020 +0100 @@ -0,0 +1,68 @@ +.. -*- coding: utf-8 -*- + +Deploy a *CubicWeb* application +=============================== + +Deployment with uwsgi +--------------------- + +`uWSGI `_ is often used to deploy CubicWeb +applications. + +Short version is install `uwsgi`: + +.. sourcecode:: console + + apt install uwsgi + +Deploy a configuration file for your application +`/etc/uwsgi/apps-enabled/example.ini`: + +.. sourcecode:: ini + + [uwsgi] + master = true + http = 0.0.0.0:8080 + env = CW_INSTANCE=example + wsgi-file = /etc/cubicweb.d/example/wsgiapp.py + processes = 8 + threads = 1 + plugins = http,python3 + auto-procname = true + lazy-apps = true + log-master = true + # disable uwsgi request logging + disable-logging = true + stats = 127.0.0.1:1717 + +The `wsgiapp.py` file looks like this: + +.. sourcecode:: python + + import os + from cubicweb.pyramid import wsgi_application_from_cwconfig + from cubicweb.cwconfig import CubicWebConfiguration as cwcfg + + appid = os.environ['CW_INSTANCE'] # instance name + cwconfig = cwcfg.config_for(appid) + + cwconfig.log_format = ('{0} pid:{1} (%(name)s) %(levelname)s: %(message)s' + .format(appid, os.getpid())) + + application = wsgi_application_from_cwconfig(cwconfig) + repo = application.application.registry['cubicweb.repository'] + + +Deployment with SaltStack +------------------------- + +To deploy with SaltStack one can refer themselves to the +`cubicweb-formula `_. + +Deployment with Kubernetes +-------------------------- + +To deploy in a Kubernetes cluster, you can take inspiration from the +instructions included in +`the fresh cube `_ +and the `deployment yaml files `_. diff -r a9562c7b4456 -r 8e3fda2c60ef doc/book/admin/index.rst --- a/doc/book/admin/index.rst Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/book/admin/index.rst Sun Feb 02 23:01:01 2020 +0100 @@ -14,7 +14,7 @@ :numbered: setup - setup-windows + deploy config cubicweb-ctl create-instance diff -r a9562c7b4456 -r 8e3fda2c60ef doc/book/admin/setup-windows.rst --- a/doc/book/admin/setup-windows.rst Fri Jan 31 15:28:55 2020 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -.. -*- coding: utf-8 -*- - -.. _SetUpWindowsEnv: - -Installing a development environement on Windows -================================================ - -Setting up a Windows development environment is not too complicated -but it requires a series of small steps. - -We propose an example of a typical |cubicweb| installation on Windows -from sources. We assume everything goes into ``C:\\`` and for any -package, without version specification, "the latest is -the greatest". - -Mind that adjusting the installation drive should be straightforward. - - - -Install the required elements ------------------------------ - -|cubicweb| requires some base elements that must be installed to run -correctly. So, first of all, you must install them : - -* python >= 2.6 and < 3 - (`Download Python `_). - You can also consider the Python(x,y) distribution - (`Download Python(x,y) `_) - as it makes things easier for Windows user by wrapping in a single installer - python 2.7 plus numerous useful third-party modules and - applications (including Eclipse + pydev, which is an arguably good - IDE for Python under Windows). - -* `lxml `_ library - (version >=2.2.1) allows working with XML and HTML - (`Download lxml `_) - -* `Postgresql `_, - an object-relational database system - (`Download Postgresql `_) - and its python drivers - (`Download psycopg `_) - -* A recent version of `gettext` - (`Download gettext `_). - -* `rql `_, - the recent version of the Relationship Query Language parser. - -Install optional elements -------------------------- - -We recommend you to install the following elements. They are not -mandatory but they activate very interesting features in |cubicweb|: - -* `python-ldap `_ - provides access to LDAP/Active directory directories - (`Download python-ldap `_). - -* `graphviz `_ - which allow schema drawings. - (`Download graphviz `_). - It is quite recommended (albeit not mandatory). - -Other elements will activate more features once installed. Take a look -at :ref:`InstallDependencies`. - -Useful tools ------------- - -Some additional tools could be useful to develop :ref:`cubes ` -with the framework. - -* `mercurial `_ and its standard windows GUI - (`TortoiseHG `_) allow you to get the source - code of |cubicweb| from control version repositories. So you will be able to - get the latest development version and pre-release bugfixes in an easy way - (`Download mercurial `_). - -* You can also consider the ssh client `Putty` in order to peruse - mercurial over ssh (`Download `_). - -* If you are an Eclipse user, mercurial can be integrated using the - `MercurialEclipse` plugin - (`Home page `_). - -Getting the sources -------------------- - -There are two ways to get the sources of |cubicweb| and its -:ref:`cubes `: - -* download the latest release (:ref:`SourceInstallation`) -* get the development version using Mercurial - (:ref:`MercurialInstallation`) - -Environment variables ---------------------- - -You will need some convenience environment variables once all is set up. These -variables are settable through the GUI by getting at the `System properties` -window (by righ-clicking on `My Computer` -> `properties`). - -In the `advanced` tab, there is an `Environment variables` button. Click on -it. That opens a small window allowing edition of user-related and system-wide -variables. - -We will consider only user variables. First, the ``PATH`` variable. Assuming -you are logged as user *Jane*, add the following paths, separated by -semi-colons:: - - C:\Documents and Settings\Jane\My Documents\Python\cubicweb\cubicweb\bin - C:\Program Files\Graphviz2.24\bin - -The ``PYTHONPATH`` variable should also contain:: - - C:\Documents and Settings\Jane\My Documents\Python\cubicweb\ - -From now, on a fresh `cmd` shell, you should be able to type:: - - cubicweb-ctl list - -... and get a meaningful output. - -Running an instance as a service --------------------------------- - -This currently assumes that the instances configurations is located at -``C:\\etc\\cubicweb.d``. For a cube 'my_instance', you will find -``C:\\etc\\cubicweb.d\\my_instance\\win32svc.py``. - -Now, register your instance as a windows service with:: - - win32svc install - -Then start the service with:: - - net start cubicweb-my_instance - -In case this does not work, you should be able to see error reports in -the application log, using the windows event log viewer. diff -r a9562c7b4456 -r 8e3fda2c60ef doc/book/admin/setup.rst --- a/doc/book/admin/setup.rst Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/book/admin/setup.rst Sun Feb 02 23:01:01 2020 +0100 @@ -15,11 +15,10 @@ Depending on your needs, you will chose a different way to install CubicWeb on your system: +- `Installation using docker`_ - `Installation on Debian/Ubuntu`_ -- `Installation on Windows`_ - `Installation in a virtualenv`_ - `Installation with pip`_ -- `Installation with easy_install`_ - `Installation from tarball`_ If you are a power-user and need the very latest features, you will @@ -30,14 +29,24 @@ and advanced features of |cubicweb|. .. _`Installation on Debian/Ubuntu`: DebianInstallation_ -.. _`Installation on Windows`: WindowsInstallation_ .. _`Installation in a virtualenv`: VirtualenvInstallation_ .. _`Installation with pip`: PipInstallation_ -.. _`Installation with easy_install`: EasyInstallInstallation_ .. _`Installation from tarball`: TarballInstallation_ .. _`Install from version control`: MercurialInstallation_ +.. _DockerInstallation: + +Docker install +-------------- + +Detailed instructions on how to deploy CubicWeb using docker can be found +on the `docker hub `_. + +The images there are built using the following source code : +`docker-cubicweb `_, +see it's `README `_ + .. _DebianInstallation: Debian/Ubuntu install @@ -50,9 +59,10 @@ Depending on the distribution you are using, add the appropriate line to your `list of sources` (for example by editing ``/etc/apt/sources.list``), replacing -```` with e.g. ``wheezy`` or ``trusty``:: +```` with e.g. ``buster`` or ``bionic``:: - deb http://download.logilab.org/production/ / + deb http://apt.logilab.fr main # all cubicweb & cubes + deb http://apt.logilab.fr cubicweb-3.26 # latest cubicweb 3.26 & cubes The repositories are signed with `Logilab's gnupg key`_. You can download and register the key to avoid warnings:: @@ -85,25 +95,6 @@ .. _`Logilab's gnupg key`: https://www.logilab.fr/logilab-debian-keyring.gpg .. _`CubicWeb.org Forge`: http://www.cubicweb.org/project/ -.. _WindowsInstallation: - -Windows Install ---------------- - -You need to have `python`_ version >= 2.5 and < 3 installed. - -If you want an automated install, your best option is probably the -:ref:`EasyInstallInstallation`. EasyInstall is a tool that helps users to -install python packages along with their dependencies, searching for suitable -pre-compiled binaries on the `The Python Package Index`_. - -If you want better control over the process as well as a suitable development -environment or if you are having problems with `easy_install`, read on to -:ref:`SetUpWindowsEnv`. - -.. _python: http://www.python.org/ -.. _`The Python Package Index`: http://pypi.python.org - .. _VirtualenvInstallation: `Virtualenv` install @@ -119,12 +110,12 @@ `pip` install ------------- -`pip `_ is a python tool that helps downloading, +`pip `_ is a python tool that helps downloading, building, installing, and managing Python packages and their dependencies. It is fully compatible with `virtualenv`_ and installs the packages from sources published on the `The Python Package Index`_. -.. _`virtualenv`: http://virtualenv.openplans.org/ +.. _`virtualenv`: https://virtualenv.pypa.io A working compilation chain is needed to build the modules that include C extensions. If you really do not want to compile anything, installing `lxml `_, @@ -160,41 +151,6 @@ pip install cubicweb-blog -.. _EasyInstallInstallation: - -`easy_install` install ----------------------- - -.. note:: - - If you are not a Windows user and you have a compilation environment, we - recommend you to use the PipInstallation_. - -`easy_install`_ is a python utility that helps downloading, installing, and -managing python packages and their dependencies. - -Install |cubicweb| and its dependencies, run:: - - easy_install cubicweb - -There is also a wide variety of :ref:`cubes `. You can access a -list of available cubes on `PyPI -`_ -or at the `CubicWeb.org Forge`_. - -For example, installing the *blog cube* is achieved by:: - - easy_install cubicweb-blog - -.. note:: - - If you encounter problem with :ref:`cubes ` installation, - consider using :ref:`PipInstallation` which is more stable - but can not installed pre-compiled binaries. - -.. _`easy_install`: http://packages.python.org/distribute/easy_install.html - - .. _SourceInstallation: Install from source diff -r a9562c7b4456 -r 8e3fda2c60ef doc/book/annexes/mercurial.rst --- a/doc/book/annexes/mercurial.rst Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/book/annexes/mercurial.rst Sun Feb 02 23:01:01 2020 +0100 @@ -111,16 +111,6 @@ 3. `hg ci` 4. `hg push` -Installation of the guestrepo extension -``````````````````````````````````````` - -Set up the guestrepo extension by getting a copy of the sources -from https://bitbucket.org/selinc/guestrepo and adding the following -lines to your ``~/.hgrc``: :: - - [extensions] - guestrepo=/path/to/guestrepo/guestrepo - More information ```````````````` diff -r a9562c7b4456 -r 8e3fda2c60ef doc/book/devweb/ajax.rst --- a/doc/book/devweb/ajax.rst Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/book/devweb/ajax.rst Sun Feb 02 23:01:01 2020 +0100 @@ -3,6 +3,17 @@ Ajax ---- +.. warning:: + + This approach is deprecated in favor of using + `cwclientlibjs `_. + If your use react for your UI, try the react components from the + `cwelements `_ library. + The documentation is kept here as reference. + + For historical reference of what Ajax is and used to be, one can read the + `wikipedia article about Ajax `_. + CubicWeb provides a few helpers to facilitate *javascript <-> python* communications. You can, for instance, register some python functions that will become diff -r a9562c7b4456 -r 8e3fda2c60ef doc/book/intro/concepts.rst --- a/doc/book/intro/concepts.rst Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/book/intro/concepts.rst Sun Feb 02 23:01:01 2020 +0100 @@ -277,7 +277,7 @@ * it is not limited to one specific SQL backend (every one of them having an idiomatic way to encode triggers), nor to SQL backends at - all (think about LDAP or a Subversion repository) + all (think about LDAP or a Mercurial repository) * it is well-coupled to the rest of the framework diff -r a9562c7b4456 -r 8e3fda2c60ef doc/book/pyramid/debug_toolbar.rst --- a/doc/book/pyramid/debug_toolbar.rst Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/book/pyramid/debug_toolbar.rst Sun Feb 02 23:01:01 2020 +0100 @@ -11,7 +11,7 @@ To use the pyramid debug toolbar in CubicWeb, you need to: -* install it either by doing a `pip install pyramid_debugtoobar` or following +* install it either by doing a `pip install pyramid_debugtoolbar` or following `the official installation instructions `_ * launch the pyramid command adding the `-t/--toolbar` argument to enable it diff -r a9562c7b4456 -r 8e3fda2c60ef doc/changes/3.27.rst --- a/doc/changes/3.27.rst Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/changes/3.27.rst Sun Feb 02 23:01:01 2020 +0100 @@ -1,5 +1,5 @@ -3.27 (not yet released) -======================= +3.27 +==== New features ------------ diff -r a9562c7b4456 -r 8e3fda2c60ef doc/dev/continuous-integration.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/dev/continuous-integration.rst Sun Feb 02 23:01:01 2020 +0100 @@ -0,0 +1,33 @@ +====================== +Continuous Integration +====================== + +Jenkins +======= + +A public instance of jenkins is used to test CubicWeb and its cubes : + +* https://jenkins.logilab.org/ +* https://jenkins.logilab.org/view/Cubes/ +* https://jenkins.logilab.org/view/CubicWeb/ + +Badges +------ + +Badges are exported to be displayed on various pages. Here is an example : + +.. raw:: html + + + +
+  is the status for the draft head on branch default of the review repository
+ +Adding a project to Jenkins +--------------------------- + +Adding a project to jenkins needs to be done through the +`jenkins-jobs project `_. + +Changes to the configuration are implemented by the +`jenkins-jobs job `_. diff -r a9562c7b4456 -r 8e3fda2c60ef doc/index.rst --- a/doc/index.rst Fri Jan 31 15:28:55 2020 +0100 +++ b/doc/index.rst Sun Feb 02 23:01:01 2020 +0100 @@ -23,7 +23,7 @@ * the power and flexibility of the Python_ programming language, -* the reliability of SQL databases, LDAP directories, Subversion and Mercurial +* the reliability of SQL databases, LDAP directories and Mercurial for storage backends. Built since 2000 from an R&D effort still continued, supporting 100,000s of @@ -43,6 +43,8 @@ * Discuss on the `mailing-list`_ * Discover on the `blog`_ * Contribute on the forge_ +* Find published python modules on `pypi `_ +* Find published npm modules on `npm `_ .. _Logilab: http://www.logilab.fr/ @@ -118,8 +120,9 @@ :maxdepth: 1 :glob: - How to contribute to the code base + How to contribute to the code base General contribution guide for cubes + Priorities are discussed over on the development dashboard dev/* Indexes