doc/book/fr/03-03-cubicweb-ctl.fr.txt
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 21 Jun 2010 15:29:10 +0200
branchstable
changeset 5812 d970049d7cfd
parent 1898 39b37f90a8a4
permissions -rw-r--r--
[dbapi] Connection.load_appobjects should load site_cubicweb files as well, they may contains necessary RQL extension function definitions. Also kill some broken deprecated code in this method.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     1
.. -*- coding: utf-8 -*-
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     2
20
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
     3
.. _cubicweb-ctl:
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
     4
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     5
L'outil `cubicweb-ctl`
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
     6
======================
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     7
`cubicweb-ctl` est le couteau suisse pour la gestion d'instances CubicWeb.
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     8
La syntaxe générale est ::
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     9
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    10
  cubicweb-ctl <commande> [options commande] <arguments commandes>
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    11
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    12
Pour voir les commandes disponibles ::
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    13
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    14
  cubicweb-ctl
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    15
  cubicweb-ctl --help
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    16
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    17
A noter que les commandes disponibles varient en fonction des parties d'CubicWeb
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    18
qui sont installées.
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    19
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    20
Pour voir l'aide pour une commande spécifiques ::
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    21
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    22
  cubicweb-ctl <commande> --help
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    23
20
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    24
Commandes pour la création d'un cube
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
    25
------------------------------------
20
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    26
* ``newcube``, crée un nouveau cube sur le système de fichiers
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    27
  à partir du nom passé en paramètre. Cette commande crée le cube à partir
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    28
  d'une squelette d'application, incluant également les fichiers pour le
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    29
  packaging debian)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    30
  
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    31
Commandes pour la création d'une instance
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
    32
-----------------------------------------
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    33
* ``create``, crée les fichiers de configuration d'une instance
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    34
* ``db-create``, crée la base de données système d'une instance (tables et
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    35
  extensions uniquement)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    36
* ``db-init``, initialise la base de données système d'une instance (schéma,
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    37
  groupes, utilisateurs, workflows...)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    38
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    39
Par défaut ces trois commandes sont enchainées.
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    40
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    41
Commande pour la création d'une instance pour Google App Engine
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
    42
---------------------------------------------------------------
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    43
* ``newgapp``, crée les fichiers de configuration d'une instance
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    44
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    45
Cette commande doit être suivie de l'exécution de commandes
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    46
permettant l'initialisation de la base de données spécifique à  
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    47
Google App Engine, appellée ``datastore``.
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    48
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    49
Pour plus de détails veuillez vous référer à `LAX <>`_
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    50
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    51
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    52
Commandes pour le lancement des instances
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
    53
-----------------------------------------
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    54
* ``start``, démarre une, plusieurs, ou toutes les instances
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    55
* ``stop``, arrêt une, plusieurs, ou toutes les instances
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    56
* ``restart``, redémarre une, plusieurs, ou toutes les instances
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    57
* ``status``, donne l'état des instances
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    58
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    59
Commandes pour la maintenance des instances
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
    60
-------------------------------------------
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    61
* ``upgrade``, lance la migration d'instance(s) existante(s) lorsqu'une nouvelle
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    62
  version d'CubicWeb ou du composant est installée
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    63
* ``shell``, ouvre un shell de migration pour la maintenance manuelle d'une instance
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    64
* ``db-dump``, crée un dump de la base de données système
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    65
* ``db-restore``, restore un dump de la base de données système
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    66
* ``db-check``, vérifie l'intégrité des données d'une instance. Si la correction
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    67
  automatique est activée, il est conseillé de faire un dump avant cette
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    68
  opération
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    69
* ``schema-sync``, , synchronise le schéma persistent d'une instance avec le schéma
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    70
  de l'application. Il est conseillé de faire un dump avant cette opération
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    71
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    72
Commandes pour la maintenance des catalogues i18n
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
    73
-------------------------------------------------
1898
39b37f90a8a4 [cw-ctl] rename i18n commands (see #342889)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 93
diff changeset
    74
* ``i18ncubicweb``, regénère les catalogues de messages de la librairie CubicWeb
39b37f90a8a4 [cw-ctl] rename i18n commands (see #342889)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 93
diff changeset
    75
* ``i18ncube``, regénère les catalogues de messages d'un composant
39b37f90a8a4 [cw-ctl] rename i18n commands (see #342889)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 93
diff changeset
    76
* ``i18ninstance``, recompile les catalogues de messages d'une instance. Cela est
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    77
  effectué automatiquement lors d'une upgrade
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    78
20
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    79
Cf :ref:`Internationalisation`.
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    80
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    81
Autres commandes
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
    82
----------------
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    83
* ``list``, donne la liste des configurations, des composants et des instances
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    84
  disponibles
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    85
* ``delete``, supprime une instance (fichiers de configuration et base de données)
20
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    86
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    87
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    88
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    89
Exemples
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
    90
--------
20
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    91
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    92
Creation d'une instance a partir de cube existant
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
    93
`````````````````````````````````````````````````
20
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    94
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    95
Afin de creer une instance a partir d'un cube existant, executez la commande
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    96
suivant ::
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    97
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    98
   cubicweb-ctl create <nom_cube> <nom_instance>
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
    99
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   100
Cette commande va creer les fichiers de configuration d'une instance dans
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   101
``~/etc/cubicweb.d/<nom_instance>``.
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   102
L'outil ``cubicweb-ctl`` va vous autoriser a executer au sein de ``create``
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   103
les commandes ``db-create`` et ``db-init`` afin de completer la creation de
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   104
votre instance en une seule commande.
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   105
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   106
Si vous decidez de ne pas le faire lorsque ``cubicweb-ctl create`` vous le 
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   107
propose, alors n'oubliez pas de lancer ces commandes (``cubicweb-ctl db-create``,
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   108
``cubicweb-ctl db-init`` ) par la suite, sinon
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   109
votre installation ne sera pas complete.
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   110
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   111
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   112
Creation d'une instance a partir d'une nouveau cube
21
09cad2ba7bc7 Splits main content in two chapters : what is required to know to develop an application, and the other describing more as a reference others specific functionnalities.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 20
diff changeset
   113
```````````````````````````````````````````````````
20
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   114
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   115
Creez avant tout votre nouveau cube ::
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   116
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   117
   cubicweb-ctl newcube <nom_cube>
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   118
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   119
Cette commande va creer un nouveau cube dans ``/path/to/forest/cubicweb/cubes/<nom_cube>``.
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   120
dfddcbef6684 Add links between sections.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 0
diff changeset
   121