doc/book/en/admin/create-instance.rst
branchtls-sprint
changeset 1714 a721966779be
parent 1461 023b123ab76b
child 2172 cf8f9180e63e
equal deleted inserted replaced
1499:fd8751c3f3ee 1714:a721966779be
       
     1 .. -*- coding: utf-8 -*-
       
     2 
       
     3 Creation of your first instance
       
     4 ===============================
       
     5 
       
     6 Instance creation
       
     7 -----------------
       
     8 
       
     9 Now that we created our cube, we can create an instance to view our
       
    10 application in a web browser. To do so we will use a `all-in-one` 
       
    11 configuration to simplify things ::
       
    12 
       
    13   cubicweb-ctl create -c all-in-one mycube myinstance
       
    14 
       
    15 .. note::
       
    16   Please note that we created a new cube for a demo purpose but
       
    17   you could have use an existing cube available in our standard library
       
    18   such as blog or person for example.
       
    19 
       
    20 A serie of questions will be prompted to you, the default answer is usually
       
    21 sufficient. You can anyway modify the configuration later on by editing
       
    22 configuration files. When a user/psswd is requested to access the database
       
    23 please use the login you create at the time you configured the database
       
    24 (:ref:`ConfigurationPostgres`).
       
    25 
       
    26 It is important to distinguish here the user used to access the database and the
       
    27 user used to login to the cubicweb application. When an instance starts, it uses
       
    28 the login/psswd for the database to get the schema and handle low level
       
    29 transaction. But, when :command:`cubicweb-ctl create` asks for a manager
       
    30 login/psswd of `CubicWeb`, it refers to the user you will use during the
       
    31 development to administrate your web application. It will be possible, later on,
       
    32 to use this user to create others users for your final web application.
       
    33 
       
    34 
       
    35 Instance administration
       
    36 -----------------------
       
    37 
       
    38 start / stop
       
    39 ~~~~~~~~~~~~
       
    40 When this command is completed, the definition of your instance is
       
    41 located in :file:`~/etc/cubicweb.d/myinstance/*`. To launch it, you just type ::
       
    42 
       
    43   cubicweb-ctl start -D myinstance
       
    44 
       
    45 The option `-D` specify the *debug mode* : the instance is not running in
       
    46 server mode and does not disconnect from the termnial, which simplifies debugging
       
    47 in case the instance is not properly launched. You can see how it looks by
       
    48 visiting the URL `http://localhost:8080` (the port number depends of your 
       
    49 configuration). To login, please use the cubicweb administrator login/psswd you 
       
    50 defined when you created the instance.
       
    51 
       
    52 To shutdown the instance, Crtl-C in the terminal window is enough.
       
    53 If you did not use the option `-D`, then type ::
       
    54 
       
    55   cubicweb-ctl stop myinstance
       
    56 
       
    57 This is it! All is settled down to start developping your data model...
       
    58 
       
    59 
       
    60 upgrade
       
    61 ~~~~~~~
       
    62 XXX feed me
       
    63