OMERO.web deployment ==================== OMERO.web is the web application component of the OMERO platform which allows for the management, visualization (in a fully multi-dimensional image viewer) and annotation of images from a web browser. It also includes OMERO.webadmin for managing users and groups. OMERO.web is an integral part of the OMERO platform and can be deployed with: - IIS 6.0 or 7.0 on Microsoft Windows - `WSGI `_ using a WSGI capable web server such as `Apache 2.2+ `_ (with `mod wsgi `_ enabled) or `nginx `_ and `gunicorn `_. - The built-in Django lightweight development server (for **testing** only; see the :doc:`/developers/Web/Deployment` page) - FastCGI is DEPRECATED as of 5.1.4 and note that support will be removed in 5.2. You can find more information about FastCGI and where to get modules or packages for your distribution on the `FastCGI website `_. If you need help configuring your firewall rules, see the :doc:`/sysadmins/server-security` page. Prerequisites ------------- - OMERO and its prerequisites (see :doc:`server-installation`). - Python 2 (2.6 or later) - `Pillow`_ should be available for your distribution - Matplotlib_ should be available for your distribution - IIS or WSGI (or FastCGI) capable web server Quick start ----------- .. _using_iis: Using IIS ~~~~~~~~~ Once you have IIS installed on your system, a straightforward set of steps is required to get the `ISAPI WSGI `_ handler for OMERO.web working with your IIS deployment. - Ensure that the ISAPI for IIS options are installed - Download and install `an ISAPI WSGI `_. If you download the *Source Distribution* (should be compatible with all versions of Windows/IIS) unzip the archive and run:: python setup.py install Alternatively if you are using a 32-bit system you can use the *Windows Installer*. - For extended compatibility with multiple IIS versions ISAPI WSGI uses the IIS 6 WMI interface to interact with your IIS deployment. If you are using IIS 7 you must enable the IIS 6 WMI backwards compatibility options, as shown on the figure: .. figure:: /images/installation-images/IIS7Requirements.png :align: center :width: 35% :alt: IIS 7 configuration options IIS 7 configuration options - The :guilabel:`Advanced Settings...` for the application pool assigned to your default site require modification using the *IIS Manager* as follows: - :guilabel:`Idle Time-out (minutes)` - to stop the worker process from suspending during inactivity periods, this setting needs to be changed to 0. .. figure:: /images/installation-images/IIS7ApplicationPool.png :align: center :width: 35% :alt: IIS 7 Application Pool Advanced Settings IIS 7 Application Pool Advanced Settings - To avoid rendering errors on OMERO.web it is recomended to add the custom HTTP response header in the Web site pane. .. figure:: /images/installation-images/IIS7HTTPresponseheader.png :align: center :alt: IIS 7 HTTP response header - Configure OMERO.web bindings for IIS :: C:\omero_dist>bin\omero web iis This will automatically add two applications, `/omero` and `/static`, to the default web site and application pool. You can customise these locations by setting :property:`omero.web.prefix` and :property:`omero.web.static_url`. .. note:: You can make manual changes to the IIS OMERO configuration but they may be lost when OMERO.server is upgraded. .. note:: As OMERO.web 5 is based on Django 1.6, :property:`omero.web.session_engine` and :property:`omero.web.caches` should be unset. :: C:\omero_dist>bin\omero config set omero.web.session_engine C:\omero_dist>bin\omero config set omero.web.caches If your deployment requires additional cache store please follow :djangodoc:`Django documentation ` for more details. Using Apache or Nginx ~~~~~~~~~~~~~~~~~~~~~ If you wish to use Apache or Nginx please follow the Unix instructions, see :doc:`/sysadmins/unix/install-web`. Logging in to OMERO.web ----------------------- Once you have deployed and started the server, you can use your browser to access OMERO.webadmin or the OMERO.webclient: - **http://your\_host/omero** OR, for development server: **http://localhost:4080** .. figure:: /images/installation-images/login.png :align: center :width: 55% :alt: OMERO.webadmin login OMERO.webadmin login .. note:: This starts the server in the foreground. It is your responsibility to place it in the background, if required, and manage its shutdown. OMERO.web Maintenance --------------------- - Session cookies :property:`omero.web.session_expire_at_browser_close`: - A boolean that determines whether to expire the session when the user closes their browser. See :djangodoc:`Django Browser-length sessions vs. persistent sessions documentation ` for more details. Default: ``True``. :: C:\omero_dist>bin\omero config set omero.web.session_expire_at_browser_close "True" - The age of session cookies, in seconds. Default: ``86400``. :: C:\omero_dist>bin\omero config set omero.web.session_cookie_age 86400 - Session engine: - Each session for a logged-in user in OMERO.web is kept in the session store. Stale sessions can cause the store to grow with time. OMERO.web uses by default the OS file system as the session store backend and does not automatically purge stale sessions, see :djangodoc:`Django file-based session documentation ` for more details. It is therefore the responsibility of the OMERO administrator to purge the session cache using the provided management command: :: C:\omero_dist>bin\omero web clearsessions It is recommended to call this command on a regular basis, for example as a daily cron job, see :djangodoc:`Django clearing the session store documentation ` for more information. .. note:: OMERO.web offers alternative session backends to automatically delete stale data using the cache session store backend, see :djangodoc:`Django cached session documentation ` for more details. After installing all the cache prerequisites set the following: :: C:\omero_dist>bin\omero config set omero.web.caches '{"default": { "BACKEND": "django.core.cache.backends.memcached.MemcachedCache", "LOCATION": "127.0.0.1:11211", "TIMEOUT": "86400" } }' C:\omero_dist>bin\omero config set omero.web.session_engine django.contrib.sessions.backends.cache .. _customizing_your_omero_web_installation_windows: Customizing your OMERO.web installation --------------------------------------- All configuration options can be found on various sections of :ref:`web_index` developers documentation. For the full list, refer to :ref:`web_configuration` properties or: :: C:\omero_dist>bin\omero web -h The most popular configuration options include: - Debug mode, see :property:`omero.web.debug`. - Customize login page with your own logo, see :property:`omero.web.login_logo`. - Customizing index page, see :property:`omero.web.index_template`. - Enabling a public user see :doc:`/sysadmins/public`.