doc/book/en/C013-cubicweb-ctl.en.txt
author Sandrine Ribeau <sandrine.ribeau@logilab.fr>
Tue, 23 Dec 2008 13:15:23 -0800
changeset 286 451a74c5652c
parent 282 fe06f5e828c5
child 1440 4fc48f2a1748
permissions -rw-r--r--
[doc] Renaming for data model thematic.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     1
.. -*- coding: utf-8 -*-
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     2
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     3
.. _cubicweb-ctl:
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     4
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     5
``cubicweb-ctl`` tool
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     6
=====================
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
     7
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     8
`cubicweb-ctl` is the swiss knife to manage `CubicWeb` instances.
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     9
The general syntax is ::
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    10
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    11
  cubicweb-ctl <command> [options command] <arguments commands>
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    12
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    13
To view available commands ::
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    14
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    15
  cubicweb-ctl
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    16
  cubicweb-ctl --help
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    17
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    18
Please note that the commands available depends on the `CubicWeb` packages
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    19
and cubes that have been installed.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    20
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    21
To view the help menu on specific command ::
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    22
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    23
  cubicweb-ctl <command> --help
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    24
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    25
Command to create a cube
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    26
------------------------
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    27
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    28
* ``newcube``, create a new cube on the file system based on the name
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    29
  given in the parameters. This command create a cube from an application
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    30
  skeleton that includes default files required for debian packaging.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    31
  
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    32
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    33
Command to create an instance
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    34
-----------------------------
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    35
* ``create``, creates the files for the instance configuration
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    36
* ``db-create``, creates the system database of an instance (tables and
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    37
  extensions only)
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    38
* ``db-init``, initializes the system database of an instance
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    39
  (schema, groups, users, workflows...)
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    40
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    41
By default, those three commandes are encapsulated in ``create`` so
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    42
that they can be executed consecutively.
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    43
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    44
Command to create an instance for Google AppEngine datastore source
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    45
-------------------------------------------------------------------
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    46
* ``newgapp``, creates the configuration files for an instance
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    47
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    48
This command needs to be followed by the commands responsible for
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    49
the database initialization. As those are specific to the `datastore`,
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    50
specific Google AppEgine database, they are not available for now
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    51
in cubicweb-ctl, but they are available in the instance created.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    52
282
fe06f5e828c5 [doc] Add internal links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 280
diff changeset
    53
For more details, please see :ref:`gaecontents` .
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    54
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    55
Commands to launch instance
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    56
---------------------------
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    57
* ``start``, starts one or more or all instances
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    58
* ``stop``, stops one or more or all instances
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    59
* ``restart``, restarts one or more or all instances
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    60
* ``status``, returns the status of the instance
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    61
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    62
Commands to maintain instances
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    63
------------------------------
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    64
* ``upgrade``, launches the existing instances migration when a new version
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    65
  of `CubicWeb` or the cubes installed is available
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    66
* ``shell``, opens a migration shell for manual maintenance of the instance
280
ce829abf7c29 [doc] Improved tutoriel. Moved appropriate content to cubicweb foundations chapter. Adds section to fill about cubicweb-ctl shell.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 272
diff changeset
    67
  (see :ref:`cubicweb-ctl-shell` for more details)
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    68
* ``db-dump``, creates a dump of the system database
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    69
* ``db-restore``, restores a dump of the system database
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    70
* ``db-check``, checks data integrity of an instance. If the automatic correction
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    71
  is activated, it is recommanded to create a dump before this operation.
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    72
* ``schema-sync``, synchronizes the persistent schema of an instance with
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    73
  the application schema. It is recommanded to create a dump before this operation.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    74
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    75
Commands to maintain i18n catalogs
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    76
----------------------------------
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    77
* ``i18nlibupdate``, regenerates messages catalogs of the `CubicWeb` library
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    78
* ``i18nupdate``, regenerates the messages catalogs of a cube
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    79
* ``i18ncompile``, recompiles the messages catalogs of an instance. 
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    80
  This is automatically done while upgrading.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    81
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    82
Cf :ref:`Internationalisation`.
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    83
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    84
Other commands
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    85
--------------
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    86
* ``list``, provides a list of the available configuration, cubes
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    87
  and instances.
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    88
* ``delete``, deletes an instance (configuration files and database)
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    89
280
ce829abf7c29 [doc] Improved tutoriel. Moved appropriate content to cubicweb foundations chapter. Adds section to fill about cubicweb-ctl shell.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 272
diff changeset
    90
ce829abf7c29 [doc] Improved tutoriel. Moved appropriate content to cubicweb foundations chapter. Adds section to fill about cubicweb-ctl shell.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 272
diff changeset
    91
.. _cubicweb-ctl-shell:
ce829abf7c29 [doc] Improved tutoriel. Moved appropriate content to cubicweb foundations chapter. Adds section to fill about cubicweb-ctl shell.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 272
diff changeset
    92
ce829abf7c29 [doc] Improved tutoriel. Moved appropriate content to cubicweb foundations chapter. Adds section to fill about cubicweb-ctl shell.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 272
diff changeset
    93
``cubicweb-ctl shell`` addon
ce829abf7c29 [doc] Improved tutoriel. Moved appropriate content to cubicweb foundations chapter. Adds section to fill about cubicweb-ctl shell.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 272
diff changeset
    94
----------------------------
ce829abf7c29 [doc] Improved tutoriel. Moved appropriate content to cubicweb foundations chapter. Adds section to fill about cubicweb-ctl shell.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 272
diff changeset
    95
282
fe06f5e828c5 [doc] Add internal links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 280
diff changeset
    96
This migration shell provides an interactive interface to all
fe06f5e828c5 [doc] Add internal links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 280
diff changeset
    97
the migrations functions described in the chapter :ref:`migration`.
fe06f5e828c5 [doc] Add internal links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 280
diff changeset
    98
fe06f5e828c5 [doc] Add internal links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 280
diff changeset
    99
Usage
fe06f5e828c5 [doc] Add internal links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 280
diff changeset
   100
`````
fe06f5e828c5 [doc] Add internal links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 280
diff changeset
   101
::
fe06f5e828c5 [doc] Add internal links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 280
diff changeset
   102
  
fe06f5e828c5 [doc] Add internal links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 280
diff changeset
   103
  ``cubicweb-ctl shell myapp``
280
ce829abf7c29 [doc] Improved tutoriel. Moved appropriate content to cubicweb foundations chapter. Adds section to fill about cubicweb-ctl shell.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 272
diff changeset
   104
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   105
Examples
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   106
--------
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   107
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   108
Create an instance from an existing cube
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   109
````````````````````````````````````````
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   110
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   111
To create an instance from an existing cube, execute the following
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   112
command ::
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   113
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   114
   cubicweb-ctl create <cube_name> <instance_name>
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   115
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   116
This command will create the configuration files of an instance in
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   117
``~/etc/cubicweb.d/<instance_name>``.
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   118
The tool ``cubicweb-ctl`` allows you to execute the command ``db-create``
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   119
and ``db-init`` when you run ``create`` so that you can complete an
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   120
instance creation in a single command.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   121
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   122
If you decide not to execut those commands while ``cubicweb-ctl create``,
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   123
then you will have to execute them seperately(``cubicweb-ctl db-create``,
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   124
``cubicweb-ctl db-init`` ) otherwise your installation will not be complete
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   125
and you will not be able to launch your instance.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   126
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   127
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   128
Creation of an instance from a new cube
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   129
```````````````````````````````````````
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   130
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   131
Create first your new cube cube ::
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   132
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   133
   cubicweb-ctl newcube <mycube>
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   134
100
e4d0fd06da7f [doc] Initial translation of cubicweb-tool section.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
   135
This will create a new cube in ``/path/to/forest/cubicweb/cubes/<mycube>``
272
06077d56f2c4 [doc] Does not keep mercurial forest as the only reference for path description.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 127
diff changeset
   136
for a Mercurial forest installation, or in ``/usr/share/cubicweb/cubes``
06077d56f2c4 [doc] Does not keep mercurial forest as the only reference for path description.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 127
diff changeset
   137
for a debian packages installation, and then create an instance as 
06077d56f2c4 [doc] Does not keep mercurial forest as the only reference for path description.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 127
diff changeset
   138
explained just above.
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   139
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
   140