doc/book/en/Z012-create-instance.en.txt
changeset 2477 7baebaf44fc2
parent 2175 16d3c37c5d28
child 2544 282261b26774
equal deleted inserted replaced
2476:1294a6bdf3bf 2477:7baebaf44fc2
     6 
     6 
     7 What is an instance?
     7 What is an instance?
     8 --------------------
     8 --------------------
     9 
     9 
    10 A *CubicWeb* instance is a container that
    10 A *CubicWeb* instance is a container that
    11 refers to cubes and configuration parameters for your web application.
    11 refers to cubes and configuration parameters for your web instance.
    12 Each instance is stored as a directory in ``~/etc/cubicweb.d`` which enables 
    12 Each instance is stored as a directory in ``~/etc/cubicweb.d`` which enables 
    13 us to run your application.
    13 us to run your instance.
    14 
    14 
    15 What is a cube?
    15 What is a cube?
    16 ---------------
    16 ---------------
    17 
    17 
    18 Cubes represent data and basic building bricks of your web applications :
    18 Cubes represent data and basic building bricks of your web instances :
    19 blogs, person, date, addressbook and a lot more.
    19 blogs, person, date, addressbook and a lot more.
    20 
    20 
    21 .. XXX They related to each other by a 'Schema' which is also the PostGres representation.
    21 .. XXX They related to each other by a 'Schema' which is also the PostGres representation.
    22 
    22 
    23 Each cube defines entities, their views, their schemas and workflows
    23 Each cube defines entities, their views, their schemas and workflows
    33 
    33 
    34 Creating a basic *CubicWeb* Instance 
    34 Creating a basic *CubicWeb* Instance 
    35 ------------------------------------
    35 ------------------------------------
    36 
    36 
    37 We can create an instance to view our
    37 We can create an instance to view our
    38 application in a web browser. ::
    38 instance in a web browser. ::
    39 
    39 
    40   cubicweb-ctl create blog myblog
    40   cubicweb-ctl create blog myblog
    41 
    41 
    42 .. XXX or ::
    42 .. XXX or ::
    43   
    43   
    53 configuration files. When a user/psswd is requested to access the database
    53 configuration files. When a user/psswd is requested to access the database
    54 please use the login you create at the time you configured the database
    54 please use the login you create at the time you configured the database
    55 (:ref:`ConfigurationPostgres`).
    55 (:ref:`ConfigurationPostgres`).
    56 
    56 
    57 It is important to distinguish here the user used to access the database and
    57 It is important to distinguish here the user used to access the database and
    58 the user used to login to the cubicweb application. When a *CubicWeb* application
    58 the user used to login to the cubicweb instance. When a *CubicWeb* instance
    59 starts, it uses the login/psswd for the database to get the schema and handle
    59 starts, it uses the login/psswd for the database to get the schema and handle
    60 low level transaction. But, when ``cubicweb-ctl create`` asks for
    60 low level transaction. But, when ``cubicweb-ctl create`` asks for
    61 a manager login/psswd of *CubicWeb*, it refers to an application user
    61 a manager login/psswd of *CubicWeb*, it refers to an instance user
    62 to administrate your web application. 
    62 to administrate your web instance. 
    63 The configuration files are stored in *~/etc/cubicweb.d/myblog/*. 
    63 The configuration files are stored in *~/etc/cubicweb.d/myblog/*. 
    64 
    64 
    65 To launch the web application, you just type ::
    65 To launch the web instance, you just type ::
    66 
    66 
    67   cubicweb-ctl start myblog
    67   cubicweb-ctl start myblog
    68 
    68 
    69 You can see how it looks by
    69 You can see how it looks by
    70 visiting the URL `http://localhost:8080`. 
    70 visiting the URL `http://localhost:8080`.