src/source/appstart.rst
changeset 53 05a4f2c07b84
parent 50 6ed429390935
equal deleted inserted replaced
46:5fe8d5ffccde 53:05a4f2c07b84
       
     1 .. _appstart:
       
     2 
       
     3 Starting the application
       
     4 ========================
       
     5 
       
     6 When database upgrade process has ended ( :ref:`zodbinit` ) , you can start the web application process with the standard Pyramid's
       
     7 *pserve* command line tool:
       
     8 
       
     9 .. code-block:: bash
       
    10 
       
    11     (env) $ ./bin/pserve etc/development.ini
       
    12 
       
    13 In standard debug mode, all registered components are displayed in the console, until the final line (here using ZEO):
       
    14 
       
    15 .. code-block:: bash
       
    16 
       
    17     2018-01-14 11:37:54,339 INFO  [ZEO.ClientStorage][MainThread] [('127.0.0.1', 8100)] ClientStorage (pid=28695) created RW/normal for storage: 'pyams'
       
    18     2018-01-14 11:37:54,340 INFO  [ZEO.cache][MainThread] created temporary cache file 3
       
    19     2018-01-14 11:37:54,345 INFO  [ZODB.blob][MainThread] (28695) Blob directory `/var/local/env/pyams/var/db/blobs` is used but has no layout marker set. Selected `lawn` layout.
       
    20     2018-01-14 11:37:54,345 WARNI [ZODB.blob][MainThread] (28695) The `lawn` blob directory layout is deprecated due to scalability issues on some file systems, please consider migrating to the `bushy` layout.
       
    21     2018-01-14 11:37:54,346 DEBUG [asyncio][[('127.0.0.1', 8100)] zeo client networking thread] Using selector: EpollSelector
       
    22     2018-01-14 11:37:54,347 DEBUG [ZEO.asyncio.client][[('127.0.0.1', 8100)] zeo client networking thread] disconnected <ZEO.asyncio.client.Client object at 0x7feeb1de7390> None
       
    23     2018-01-14 11:37:54,348 DEBUG [ZEO.asyncio.client][[('127.0.0.1', 8100)] zeo client networking thread] try_connecting
       
    24     2018-01-14 11:37:54,349 INFO  [ZEO.asyncio.base][[('127.0.0.1', 8100)] zeo client networking thread] Connected Protocol(('127.0.0.1', 8100), 'pyams', False)
       
    25     2018-01-14 11:37:54,355 INFO  [ZEO.ClientStorage][[('127.0.0.1', 8100)] zeo client networking thread] [('127.0.0.1', 8100)] Connected to storage: ('localhost', 8100)
       
    26     2018-01-14 11:37:54,358 DEBUG [txn.140663320073984][MainThread] new transaction
       
    27     2018-01-14 11:37:54,360 DEBUG [txn.140663320073984][MainThread] commit
       
    28     2018-01-14 11:37:54,484 DEBUG [config][MainThread] include /home/tflorac/Dropbox/src/PyAMS/pyams_template/src/pyams_template/configure.zcml
       
    29     2018-01-14 11:37:54,485 DEBUG [config][MainThread] include /var/local/env/pycharm/lib/python3.5/site-packages/pyramid_zcml/configure.zcml
       
    30     ...
       
    31     2018-01-14 11:37:54,833 DEBUG [PyAMS (utils)][MainThread] Registering utility <class 'pyams_utils.timezone.utility.TimezoneGenerationsChecker'> named 'PyAMS timezone' providing <InterfaceClass pyams_utils.interfaces.site.ISiteGenerations>
       
    32     2018-01-14 11:37:54,834 DEBUG [PyAMS (utils)][MainThread] Registering class <class 'pyams_utils.timezone.vocabulary.TimezonesVocabulary'> as vocabulary with name "PyAMS timezones"
       
    33     2018-01-14 11:37:54,835 DEBUG [PyAMS (utils)][MainThread] Registering adapter <class 'pyams_utils.traversing.PathElementsAdapter'> for (<InterfaceClass zope.location.interfaces.IContained>,) providing <InterfaceClass pyams_utils.interfaces.traversing.IPathElements>
       
    34     2018-01-14 11:37:54,839 DEBUG [PyAMS (utils)][MainThread] Registering adapter <class 'pyams_utils.url.AbsoluteUrlTalesExtension'> for (<InterfaceClass zope.interface.Interface>, <InterfaceClass zope.interface.Interface>, <InterfaceClass zope.interface.Interface>) providing <InterfaceClass pyams_utils.interfaces.tales.ITALESExtension>
       
    35     2018-01-14 11:37:54,847 DEBUG [PyAMS (utils)][MainThread] Registering adapter <class 'pyams_utils.widget.decimal.DottedDecimalDataConverter'> for (<InterfaceClass pyams_utils.schema.IDottedDecimalField>, <InterfaceClass z3c.form.interfaces.IWidget>) providing <InterfaceClass z3c.form.interfaces.IDataConverter>
       
    36     2018-01-14 11:37:54,942 DEBUG [PyAMS (utils)][MainThread] Registering adapter <class 'pyams_utils.zmi.intids.IntIdsLengthAdapter'> for (<InterfaceClass zope.intid.interfaces.IIntIds>,) providing <InterfaceClass pyams_utils.interfaces.intids.IIndexLength>
       
    37     2018-01-14 11:37:54,943 DEBUG [PyAMS (pagelet)][MainThread] Registering pagelet view "properties.html" for <InterfaceClass zope.intid.interfaces.IIntIds> (<class 'pyams_utils.zmi.intids.IntIdsPropertiesDisplayForm'>)
       
    38     2018-01-14 11:37:54,949 DEBUG [PyAMS (pagelet)][MainThread] Registering pagelet view "properties.html" for <InterfaceClass pyams_utils.interfaces.timezone.IServerTimezone> (<class 'pyams_utils.zmi.timezone.ServerTimezonePropertiesEditForm'>)
       
    39     2018-01-14 11:37:54,980 DEBUG [PyAMS (utils)][MainThread] Registering class <class 'pyams_utils.zodb.ZEOConnectionVocabulary'> as vocabulary with name "PyAMS ZEO connections"
       
    40     2018-01-14 11:37:54,981 DEBUG [PyAMS (utils)][MainThread] Registering class <class 'pyams_utils.zodb.ZODBConnectionVocabulary'> as vocabulary with name "PyAMS ZODB connections"
       
    41     2018-01-14 11:37:55,015 DEBUG [PyAMS (pagelet)][MainThread] Registering pagelet view "add-zeo-connection.html" for <InterfaceClass zope.component.interfaces.ISite> (<class 'pyams_utils.zmi.zeo.ZEOConnectionAddForm'>)
       
    42     2018-01-14 11:37:55,016 DEBUG [PyAMS (utils)][MainThread] Registering adapter <class 'pyams_utils.zmi.zeo.ZEOConnectionNameAdapter'> for (<InterfaceClass pyams_utils.interfaces.zeo.IZEOConnection>, <InterfaceClass pyams_zmi.layer.IAdminLayer>) providing <InterfaceClass pyams_skin.interfaces.container.ITableElementName>
       
    43     2018-01-14 11:37:55,017 DEBUG [PyAMS (pagelet)][MainThread] Registering pagelet view "properties.html" for <InterfaceClass pyams_utils.interfaces.zeo.IZEOConnection> (<class 'pyams_utils.zmi.zeo.ZEOConnectionPropertiesEditForm'>)
       
    44     ...
       
    45     2018-01-14 11:41:13,214 DEBUG [PyAMS (utils)][MainThread] Registering adapter <class 'pyams_default_theme.skin.ResourcesAdapter'> for (<InterfaceClass zope.interface.Interface>, <InterfaceClass pyams_default_theme.layer.IPyAMSDefaultLayer>, <InterfaceClass zope.interface.Interface>) providing <InterfaceClass pyams_skin.interfaces.resources.IResources>
       
    46     2018-01-14 11:43:36,665 INFO  [ZEO.ClientStorage][MainThread] [('127.0.0.1', 8100)] ClientStorage (pid=29335) created RW/normal for storage: 'pyams'
       
    47     2018-01-14 11:43:36,665 INFO  [ZEO.cache][MainThread] created temporary cache file 9
       
    48     2018-01-14 11:43:36,673 DEBUG [asyncio][[('127.0.0.1', 8100)] zeo client networking thread] Using selector: EpollSelector
       
    49     2018-01-14 11:43:36,674 DEBUG [ZEO.ClientStorage.check_blob_cache][[('127.0.0.1', 8100)] zeo client check blob size thread] 140712483907328 Checking blob cache size. (target: 966367642)
       
    50     2018-01-14 11:43:36,674 DEBUG [ZEO.asyncio.client][[('127.0.0.1', 8100)] zeo client networking thread] disconnected <ZEO.asyncio.client.Client object at 0x7ffa54058860> None
       
    51     2018-01-14 11:43:36,675 DEBUG [ZEO.ClientStorage.check_blob_cache][[('127.0.0.1', 8100)] zeo client check blob size thread] 140712483907328   blob cache size: 0
       
    52     2018-01-14 11:43:36,675 DEBUG [ZEO.asyncio.client][[('127.0.0.1', 8100)] zeo client networking thread] try_connecting
       
    53     2018-01-14 11:43:36,675 DEBUG [ZEO.ClientStorage.check_blob_cache][[('127.0.0.1', 8100)] zeo client check blob size thread] 140712483907328   -->
       
    54     2018-01-14 11:43:36,677 INFO  [ZEO.asyncio.base][[('127.0.0.1', 8100)] zeo client networking thread] Connected Protocol(('127.0.0.1', 8100), 'pyams', False)
       
    55     2018-01-14 11:43:36,679 INFO  [ZEO.ClientStorage][[('127.0.0.1', 8100)] zeo client networking thread] [('127.0.0.1', 8100)] Connected to storage: ('localhost', 8100)
       
    56     2018-01-14 11:43:36,682 DEBUG [txn.140713340237568][MainThread] new transaction
       
    57     2018-01-14 11:43:36,683 DEBUG [txn.140713340237568][MainThread] commit
       
    58     2018-01-14 11:43:36,690 INFO  [PyAMS (scheduler][MainThread] Starting tasks scheduler <SchedulerProcess(SchedulerProcess-1, initial)>...
       
    59     2018-01-14 11:43:36,698 INFO  [PyAMS (scheduler][MainThread] Started tasks scheduler with PID 29361.
       
    60     2018-01-14 11:43:36,701 INFO  [apscheduler.scheduler][MainThread] Scheduler started
       
    61     2018-01-14 11:43:36,702 DEBUG [apscheduler.scheduler][APScheduler] Looking for jobs to run
       
    62     2018-01-14 11:43:36,704 DEBUG [apscheduler.scheduler][APScheduler] No jobs; waiting until a job is added
       
    63     2018-01-14 11:43:36,719 INFO  [ZEO.ClientStorage][MainThread] [('127.0.0.1', 8100)] ClientStorage (pid=29335) created RW/normal for storage: 'pyams'
       
    64     2018-01-14 11:43:36,720 INFO  [ZEO.cache][MainThread] created temporary cache file 15
       
    65     2018-01-14 11:43:36,724 DEBUG [asyncio][[('127.0.0.1', 8100)] zeo client networking thread] Using selector: EpollSelector
       
    66     2018-01-14 11:43:36,725 DEBUG [ZEO.asyncio.client][[('127.0.0.1', 8100)] zeo client networking thread] disconnected <ZEO.asyncio.client.Client object at 0x7ffa557e8b00> None
       
    67     2018-01-14 11:43:36,726 DEBUG [ZEO.asyncio.client][[('127.0.0.1', 8100)] zeo client networking thread] try_connecting
       
    68     2018-01-14 11:43:36,727 DEBUG [ZEO.ClientStorage.check_blob_cache][[('127.0.0.1', 8100)] zeo client check blob size thread] 140712483907328 Checking blob cache size. (target: 966367642)
       
    69     2018-01-14 11:43:36,728 INFO  [ZEO.asyncio.base][[('127.0.0.1', 8100)] zeo client networking thread] Connected Protocol(('127.0.0.1', 8100), 'pyams', False)
       
    70     2018-01-14 11:43:36,729 DEBUG [ZEO.ClientStorage.check_blob_cache][[('127.0.0.1', 8100)] zeo client check blob size thread] 140712483907328   blob cache size: 0
       
    71     2018-01-14 11:43:36,729 DEBUG [ZEO.ClientStorage.check_blob_cache][[('127.0.0.1', 8100)] zeo client check blob size thread] 140712483907328   -->
       
    72     2018-01-14 11:43:36,732 INFO  [ZEO.ClientStorage][[('127.0.0.1', 8100)] zeo client networking thread] [('127.0.0.1', 8100)] Connected to storage: ('localhost', 8100)
       
    73     2018-01-14 11:43:36,735 DEBUG [txn.140713340237568][MainThread] new transaction
       
    74     2018-01-14 11:43:36,736 DEBUG [txn.140713340237568][MainThread] commit
       
    75     2018-01-14 11:43:36,743 INFO  [PyAMS (media)][MainThread] Starting medias converter <MediaConversionProcess(MediaConversionProcess-2, initial)>...
       
    76     2018-01-14 11:43:36,751 INFO  [PyAMS (media)][MainThread] Started medias converter with PID 29367.
       
    77     Starting server in PID 29335.
       
    78     Serving on http://0.0.0.0:6543
       
    79 
       
    80 
       
    81 Congrats: PyAMS is running !
       
    82 
       
    83 Launch a browser and open URL http://127.0.0.1:6543/admin to get access to PyAMS management interface.
       
    84 
       
    85 .. warning::
       
    86 
       
    87     By default:
       
    88 
       
    89     - Login: admin
       
    90 
       
    91     - Password: admin
       
    92 
       
    93     **You must change it as soon as possible!**
       
    94     (see :ref:`pyams_security`)!!.
       
    95