doc/book/en/admin/create-instance.rst
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 24 Jul 2009 14:33:37 +0200
changeset 2476 1294a6bdf3bf
parent 2175 16d3c37c5d28
child 2539 0f26a76b0348
permissions -rw-r--r--
application -> instance where it makes sense
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
98
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     3
Creation of your first instance
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     4
===============================
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     5
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     6
Instance creation
106
fa179de1a787 [doc] Adjust TOC for this particular chapter to get the content and not list of links.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 98
diff changeset
     7
-----------------
98
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     8
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
     9
Now that we created our cube, we can create an instance to view our
2476
1294a6bdf3bf application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2175
diff changeset
    10
instance in a web browser. To do so we will use a `all-in-one`
98
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    11
configuration to simplify things ::
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    12
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    13
  cubicweb-ctl create -c all-in-one mycube myinstance
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    14
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    15
.. note::
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    16
  Please note that we created a new cube for a demo purpose but
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    17
  you could have use an existing cube available in our standard library
229
767ff7f5d5a7 [doc] Replace all : s/by example/for example/
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 127
diff changeset
    18
  such as blog or person for example.
98
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    19
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    20
A serie of questions will be prompted to you, the default answer is usually
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    21
sufficient. You can anyway modify the configuration later on by editing
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    22
configuration files. When a user/psswd is requested to access the database
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    23
please use the login you create at the time you configured the database
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    24
(:ref:`ConfigurationPostgres`).
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    25
1714
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    26
It is important to distinguish here the user used to access the database and the
2476
1294a6bdf3bf application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2175
diff changeset
    27
user used to login to the cubicweb instance. When an instance starts, it uses
1714
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    28
the login/psswd for the database to get the schema and handle low level
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    29
transaction. But, when :command:`cubicweb-ctl create` asks for a manager
2175
16d3c37c5d28 [doc] improvements
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2173
diff changeset
    30
login/psswd of *CubicWeb*, it refers to the user you will use during the
2476
1294a6bdf3bf application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2175
diff changeset
    31
development to administrate your web instance. It will be possible, later on,
1294a6bdf3bf application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2175
diff changeset
    32
to use this user to create others users for your final web instance.
98
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    33
1714
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    34
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    35
Instance administration
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    36
-----------------------
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    37
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    38
start / stop
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    39
~~~~~~~~~~~~
98
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    40
When this command is completed, the definition of your instance is
1714
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    41
located in :file:`~/etc/cubicweb.d/myinstance/*`. To launch it, you just type ::
98
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    42
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    43
  cubicweb-ctl start -D myinstance
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    44
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    45
The option `-D` specify the *debug mode* : the instance is not running in
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    46
server mode and does not disconnect from the termnial, which simplifies debugging
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    47
in case the instance is not properly launched. You can see how it looks by
2172
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
    48
visiting the URL `http://localhost:8080` (the port number depends of your
cf8f9180e63e delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 1714
diff changeset
    49
configuration). To login, please use the cubicweb administrator login/psswd you
98
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    50
defined when you created the instance.
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    51
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    52
To shutdown the instance, Crtl-C in the terminal window is enough.
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    53
If you did not use the option `-D`, then type ::
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    54
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    55
  cubicweb-ctl stop myinstance
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    56
f756ead5746a [doc] Initial translation of first two section in installation chapter.
Sandrine Ribeau <sandrine.ribeau@logilab.fr>
parents: 93
diff changeset
    57
This is it! All is settled down to start developping your data model...
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    58
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    59
1714
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    60
upgrade
a721966779be new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents: 1461
diff changeset
    61
~~~~~~~
93
9c919a47e140 [doc] total file reorganisation - phase 1 complete
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
diff changeset
    62
2173
7fae9300b9f9 [doc] improvements
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2172
diff changeset
    63
XXX write me
7fae9300b9f9 [doc] improvements
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 2172
diff changeset
    64