Skip to content

Commit

Permalink
installation section improved, start section dedicated to user manage…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
landam committed Jul 10, 2017
1 parent 272a1c5 commit de57793
Show file tree
Hide file tree
Showing 12 changed files with 145 additions and 57 deletions.
Binary file removed docs/img/install-gisquick-plugin.png
Binary file not shown.
Binary file added docs/img/installation/docker-login.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/installation/qgis-plugin-install.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/installation/qgis-plugin-repo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/installation/ssl-exception.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/installation/vagrant-login.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 33 additions & 2 deletions docs/installation/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ example is shown below.
volumes:
- ./_data/etc/letsencrypt/:/etc/letsencrypt/
ports:
- "433:443"
- "443:443"
It is important to set up shared directories mounted by Docker images
as volumes. *QGIS Server* requires setting up :file:`publish`
Expand Down Expand Up @@ -112,7 +112,38 @@ them. Gunicorn logs (see lines ``20`` and ``21`` in
usermod -aG docker martin
Gisquick platform is accessible on localhost port 443, https://localhost
By default, Gisquick platform is accessible on localhost port 443 (see
line ``33``), https://localhost

.. note:: When using self-signed SSL certificates an exception in web
browser will be probably required to be added.

.. figure:: ../img/installation/ssl-exception.png

.. figure:: ../img/installation/docker-login.png

Gisquick login screen.

Update installation
-------------------

First, running instance should be stopped.

.. code-block:: bash
$ docker-compose down
Docker containers will be updated by ``pull`` request.

.. code-block:: bash
$ docker-compose pull
And up-to-date container can be afterwards combined as described above.

.. code-block:: bash
$ docker-compose up
Useful tips
-----------
Expand Down
21 changes: 12 additions & 9 deletions docs/installation/index.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Installation
############

Gisquick publishing platform consists of two parts: Django-based
server application and QGIS client plugin. This section describes
installation process of both components. In the first subsection is
described an easy and quick way of :doc:`deploying virtual server
<vagrant>` controlled by Vagrant. It's very useful for testing or
development since no other hardware equipment except of host machine
is required. Second procedure is dedicated for :doc:`production usage
<docker>`, it is based on Docker containers.
Gisquick publishing platform consists of two parts: **Django-based
server application** and **QGIS client plugin**. This section
describes installation process of both components. In the first
subsection is described an easy and quick way of :doc:`deploying
virtual server <vagrant>` controlled by Vagrant. It's very useful for
testing or development since no other hardware equipment except of
host machine is required. Second procedure is dedicated for
:doc:`production usage <docker>`, it is based on Docker containers.

In both cases, for deploying virtual server or installation using
Docker containers, Gisquick source code is required. The source code
Expand All @@ -20,11 +20,14 @@ can be easily downloaded from GitHub reposirory using ``git`` command.
$ git clone https://github.com/gislab-npo/gisquick.git
The last section shows installation of QGIS plugin on client side.
Following section shows installation of :doc:`QGIS plugin <plugin>` on
**client side**. The last part is dedicated to user management of
running Gisquick server application.

.. toctree::
:maxdepth: 1

vagrant
docker
plugin
user-management
76 changes: 32 additions & 44 deletions docs/installation/plugin.rst
Original file line number Diff line number Diff line change
@@ -1,57 +1,45 @@
Gisquick plugin
===============
Gisquick QGIS plugin
====================

As it was noticed in previous subsection, very important part is represented
by :ref:`Gisquick QGIS plugin <gisquick-qgis-plugin>`.
Very important part of Gisquick publishing platform is represented by
**Gisquick QGIS plugin**. Gisquick plugin builds Gisquick bundle from
any QGIS desktop project. It allows adding base layers, creating
topics from layers list, setting access constraints or project
expiration.

This plugin is part of ``gisquick`` source code, so all necessary files
are downloaded with cloning process. But let us stick to this order of
things.
Source code of the plugin is available from GitHub
`gisquick-qgis-plugin
<https://github.com/gislab-npo/gisquick-qgis-plugin>`_ repository and
licenced under `GNU General Public License
<https://github.com/gislab-npo/gisquick-qgis-plugin/blob/master/LICENSE>`__
version 2 or later.

Gisquick plugin builds GIS.lab web bundle from any QGIS desktop project.
It allows adding base layers, creating topics from layers list,
setting access constraints or project expiration.
Plugin can be installed into QGIS in the standard way by
:menuselection:`Plugins --> Manage and Install Plugins`.

.. _gisquick-qgis-plugin-logo:

.. figure:: img/gisquick-qgis-plugin-logo.svg
:align: center
:width: 150
.. important:: |imp| Currently Gisquick plugin **is not** available
from QGIS Plugins Repository. Therefore is neccessary to register
new repository, see URL bellow

Gisquick QGIS plugin icon.
::
https://raw.githubusercontent.com/gislab-npo/gisquick-qgis-plugin/gh-pages/qgis-plugins.xml

.. figure:: ../img/installation/qgis-plugin-repo.png

All installed QGIS plugins are usually located in ``.qgis/python/plugins``
directory.
If ``gisquick`` repository is correctly cloned, for GIS.lab QGIS plugin
installation just symbolic link is enough. Create it from ``gisquick``
source code directory.
Add Gisquick repository.

.. code:: sh
.. figure:: ../img/installation/qgis-plugin-install.png

ln -s $(pwd)/qgis/gisquick ~/.qgis2/python/plugins/gisquick
Install Gisquick QGIS plugin.

After successfull installation, a new icon should appear in QGIS
plugin toolbar.

Let's continue in QGIS environment. Create ordinary QGIS project or use some
existing one.

.. _qgis-project:

.. figure:: img/qgis-project.png
:align: center
:width: 750

Some QGIS project.

Go to :menuselection:`Plugins --> Manage and install plugins` and
in ``Installed`` tab of dialog window find **Gisquick plugin**.
Activate this plugin by checking the toggle beside it, see figure
:num:`#install-gisquick-plugin`.

.. _install-gisquick-plugin:
.. _gisquick-qgis-plugin-logo:

.. figure:: img/install-gisquick-plugin.png
.. figure:: ../img/logo.png
:align: center
:width: 750

Gisquick QGIS plugin activation.
:width: 64

Gisquick QGIS plugin icon.
39 changes: 39 additions & 0 deletions docs/installation/user-management.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
User management
===============

Currently it is not possible to manage user accounts from web
interface. The only way is to use terminal on the server and manage
accounts manually.

At first, someone needs to log in to the server where is running
Gisquick Django application.

In the case of virtual server deployed using Vagrant, see
:doc:`vagrant`, log in by

.. code-block:: bash
$ vagrant ssh
When running Gisquick by Docker containers, see :doc:`docker`, at
first Django app docker must be identified. The following command will
enter Django shell.

.. code-block:: bash
$ docker exec -it `docker ps -qf "ancestor=gisquick/django"` django-admin shell
Then you can create users programmatically

.. code-block:: python
from django.contrib.auth import get_user_model
get_user_model().objects.create_user('user1', email='user@gisquick.org',
password='user1', first_name='User1')
Django shell can be quited by

.. code-block:: python
exit()
4 changes: 2 additions & 2 deletions docs/other.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ Packaging
License
-------

`GNU General Public License version 2
<https://github.com/gislab-npo/gisquick/blob/master/LICENSE>`__ or
`GNU General Public License
<https://github.com/gislab-npo/gisquick/blob/master/LICENSE>`__ version 2 or
later
27 changes: 27 additions & 0 deletions docs/project-publishing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@
Project publishing
==================

It is assumed that Gisquick application is running on the server, see
:doc:`../installation/vagrant` or :doc:`../installation/docker`. This
section shows QGIS project publishing process. It is required to
install on the client machine `QGIS Desktop
<http://qgis.org/en/site/forusers/download.html>`__ and :doc:`Gisquick
plugin <../installation/plugin>`.

QGIS project dedicated for publishing is prepared in the standard
way. Map layers can be combined from various data sources, like flat
files (Esri Shapefile, GML), file-based databases (SQLite,
SpatiaLite), server-client-based databases (PostGIS), or OGC Web
Services (WMS, WFS, WCS).

Before publishing using Gisquick plugin, the project must be saved.

.. note:: When using flat files or file-based databases as data stores
it is recommended to save all the files (data and QGIS project) in
the same directory. QGIS project must be set up to use **relative**
paths (see *Project Properties*).

When using any kind of authentatization (databases, web services)
it must be ensured that server used for publishing will have access
to such data sources.

Publishing QGIS project will be demostrated on :ref:`Prague sample
project <dataset-prague>`.

When ``Publish`` button is successfully pressed in GIS.lab QGIS plugin
:ref:`dialog <gisquick-qgis-plugin-publish>`,
unique project file name with timestamp together with it's metafile are created.
Expand Down

0 comments on commit de57793

Please sign in to comment.