Skip to content

Commit

Permalink
Upgrade to 1.33.0 (#233)
Browse files Browse the repository at this point in the history
* Add Geonode Apps to Cartoview apps launcher

* Docker build locally (#231)

* Use separate environment file for postgis docker image

* Build image locally

* Use geonode docker build steps

* Update cherrypy to fix can't parse server.socket_host

* Add missing docker environment variables

* Update docs to 1.33.0 (#232)

* Update Cartoview version to 1.33.0 in docs

* Update windows installer docs

* Update install app image in docs

* Add troubleshooting section for the installer in docs

* Update docker installation to 1.33.0 in docs

* Fix old URL for apps page

* Bump to 1.33.0 final

* Fix what is missing in docs due to merge

Co-authored-by: Ahmed Nour Eldeen <ahmednoreldeen@gmail.com>
  • Loading branch information
MoRadwan74 and ahmednoureldeen committed Feb 20, 2022
1 parent df0d798 commit 1f2c65a
Show file tree
Hide file tree
Showing 36 changed files with 218 additions and 97 deletions.
2 changes: 1 addition & 1 deletion cartoview/__init__.py
@@ -1,4 +1,4 @@
__version__ = (1, 33, 0, 'unstable', 0)
__version__ = (1, 33, 0, 'final', 0)
__compatible_with__ = []


Expand Down
63 changes: 58 additions & 5 deletions cartoview/app_manager/templates/app_manager/apps.html
@@ -1,5 +1,5 @@
{% extends "app_manager/app_install_base.html" %}
{% load bootstrap_tags staticfiles cartoview_tags %}
{% load bootstrap_tags staticfiles cartoview_tags base_tags %}
{% load i18n %}

{% block title %} {{ block.super }} - {% trans "Applications" %} {% endblock %}
Expand Down Expand Up @@ -138,11 +138,64 @@ <h4 class="text-center">{{ app.title }}</h4>
</div>
</div>
{% endif %}
{% empty %}
<div class="text-center">
<h1>{% trans "No Apps Installed" %}</h1>
</div>
{# {% empty %}#}
{# <div class="text-center">#}
{# <h1>{% trans "No Apps Installed" %}</h1>#}
{# </div>#}
{% endfor %}
{% with facet_type='geoapps' %}
{% facets as facets %}
<div class="flex-item">
<div class="thumbnail">
<img src="{% static 'app_manager/images/geonode-dashboard.png' %}" class="app-img">
<div class="fill-empty flex-row">
<h4 class="text-center">{% trans 'Geonode Dashboard' %}</h4>
<p class="text-center">
{% trans "Geonode Dashboard" %}
</p>
<div class="fill-empty">
</div>
<div class="text-center" style="display:flex;flex-wrap:wrap">
<div id="card-buttons">
<a href="{% url "apps_browse" %}?limit={{ CLIENT_RESULTS_LIMIT }}&app_type__in=Dashboard"
target="_parent" class="btn btn-sm btn-primary">{% trans "Explore" %} <span
class="badge">{{ facets.Dashboard }}</span></a>
</div>
<div id="card-buttons">
<a class="btn btn-sm btn-primary" href="{% url "new_geoapp" %}?appType=Dashboard">
{% trans "Create New" %}
</a>
</div>
</div>
</div>
</div>
</div>
<div class="flex-item">
<div class="thumbnail">
<img src="" class="app-img">
<div class="fill-empty flex-row">
<h4 class="text-center">{% trans 'GeoStory' %}</h4>
<p class="text-center">
{% trans "GeoStory" %}
</p>
<div class="fill-empty">
</div>
<div class="text-center" style="display:flex;flex-wrap:wrap">
<div id="card-buttons">
<a href="{% url "apps_browse" %}?limit={{ CLIENT_RESULTS_LIMIT }}&app_type__in=GeoStory"
target="_parent" class="btn btn-sm btn-primary">{% trans "Explore" %} <span
class="badge">{{ facets.GeoStory }}</span></a>
</div>
<div id="card-buttons">
<a class="btn btn-sm btn-primary" href="{% url "new_geoapp" %}?appType=GeoStory">
{% trans "Create New" %}
</a>
</div>
</div>
</div>
</div>
</div>
{% endwith %}
</div>
</div>
</div>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 5 additions & 9 deletions docker-compose.yml
Expand Up @@ -5,13 +5,8 @@ services:
volumes:
- postgis-data:/var/lib/postgresql
# - dbbackups:/backups
environment:
# If you need to create multiple database you can add coma separated databases eg gis,data
- POSTGRES_DB=cartoview,cartoview_datastore,cartoview_geodatabase
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- ALLOW_IP_RANGE=0.0.0.0/0
- POSTGRES_MULTIPLE_EXTENSIONS=postgis
env_file:
- ./env/postgis.env
expose:
- "5432"
restart: on-failure
Expand Down Expand Up @@ -61,7 +56,8 @@ services:
ipv4_address: 10.5.0.2
-cartoview-internal:
cartoview:
image: cartologic/cartoview:latest
build: .
image: cartoview:latest
container_name: cartoview_django
command: bash -c "python manage.py cherry_server"
restart: unless-stopped
Expand All @@ -81,7 +77,7 @@ services:
expose:
- "8000"
celery:
image: cartologic/cartoview:latest
image: cartoview:latest
container_name: cartoview_celery
command: bash -c "celery -A cartoview.celery:app worker -B -E --statedb=./worker.state -s ./celerybeat-schedule --loglevel=INFO --concurrency=10 -n worker1@%h -f /var/log/celery.log"
restart: unless-stopped
Expand Down
Binary file removed docs/img/install_app.png
Binary file not shown.
Binary file modified docs/img/installation/Docker/geoserver.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/Installer/admin-configuration-1.png 100644 → 100755
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/Installer/admin-configuration-2.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified docs/img/installation/Installer/admin.png 100644 → 100755
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/Installer/apps.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/Installer/db-mode.png 100644 → 100755
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/Installer/domain-ip.png 100644 → 100755
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/Installer/gis-db.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/Installer/installation-location.png 100644 → 100755
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/Installer/installing.png 100644 → 100755
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/Installer/launch.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/Installer/server-details.png 100644 → 100755
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/Installer/web-db.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/Ubuntu/geoserver.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/manage-apps.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/install-app.md
Expand Up @@ -4,8 +4,8 @@
!!! note
These steps works ONLY if Cartoview is up and running.

- To install apps from [GeoApp Market](https://appstore.cartoview.net/):
Go to ``Apps`` tab, click ``Manage Apps`` button, and install the app you want.
To install apps from [GeoApp Market](https://appstore.cartoview.net/):

Go to ``Apps`` tab, click ``Manage Apps`` button, and install the app you want.

![Install App](img/install_app.png "Install App")
![Install App](img/manage-apps.png "Install App")
4 changes: 2 additions & 2 deletions docs/installation/cartoview-project.md
Expand Up @@ -22,10 +22,10 @@ mkvirtualenv --python=python3.8 cartoview_project_venv
pip install Django==3.2
```

Clone [cartoview-project](https://github.com/cartologic/cartoview-project) and use the branch according to the version you want to. Here, we will use [3.2.x](https://github.com/cartologic/cartoview-project/tree/3.2.x).
Clone [cartoview-project](https://github.com/cartologic/cartoview-project) and use the branch according to the version you want to. Here, we will use [3.3.x](https://github.com/cartologic/cartoview-project/tree/3.3.x).

```shell
git clone https://github.com/GeoNode/cartoview-project.git -b 3.2.x
git clone https://github.com/GeoNode/cartoview-project.git -b 3.3.x
```

This will create a folder called `cartoview-project` from which the custom project will be generated.
Expand Down
19 changes: 6 additions & 13 deletions docs/installation/docker.md
Expand Up @@ -4,7 +4,7 @@
## Introduction
This guide describes how to install and configure a fresh setup of Cartoview to run it in Production mode using Docker on [**Ubuntu 20.04**](#for-ubuntu-2004) or [**Windows 10**](#for-windows-10).

This part of the documentation describes installation of **Cartoview-1.31.0** which comes with **GeoNode-3.1** and **GeoServer-2.17.2**.
This part of the documentation describes installation of **Cartoview-1.33.0** which comes with **GeoNode-3.3.0** and **GeoServer-2.19.x**.

---

Expand Down Expand Up @@ -65,24 +65,17 @@ Make sure that **Use Docker Compose V2** option is **unchecked** to avoid potent
## Cartoview Installation

### Running Cartoview Docker Services
Download **cartoview-1.31.0** by cloning the repository and using the tag **v1.31.0**.
Download **cartoview-1.33.0** by cloning the repository and using the tag **v1.33.0**.

```shell
git clone -b v1.31.0 https://github.com/cartologic/cartoview.git
git clone -b v1.33.0 https://github.com/cartologic/cartoview.git
```

This will create a directory called ``cartoview``. Navigate inside it to install Cartoview with docker.

Open `docker-compose.yml` and navigate to **cartoview** docker service and update as the following:
```yaml
# Change the line
image: cartologic/cartoview:latest
# With:
image: cartologic/cartoview:1.31.0
```
This will create a directory called ``cartoview``. Navigate inside it to build and run Cartoview with docker.

```shell
cd cartoview
docker-compose build --no-cache
docker-compose up -d
```

Expand Down Expand Up @@ -257,7 +250,7 @@ Congratulations! Cartoview is now installed successfully.

You can upload layers, create maps, and install Cartoview apps to visualize these maps.

Once Cartoview is installed, You can navigate to [http://10.5.0.4/apps/](http://10.5.0.4/apps/) to check and install all available apps from the [App Store](https://appstore.cartoview.net/).
Once Cartoview is installed, You can navigate to the [apps](http://10.5.0.4/cv_apps/) page to check and install all available apps from the [App Store](https://appstore.cartoview.net/).

After installing any app, you may need to restart cartoview docker services in order to install the app properly.
```shell
Expand Down
8 changes: 4 additions & 4 deletions docs/installation/ubuntu.md
Expand Up @@ -4,7 +4,7 @@
## Introduction
This guide describes how to install and configure a fresh setup of Cartoview to run it in DEBUG mode (also known as DEVELOPMENT mode) on **Ubuntu 20.04 LTS** 64-bit clean environment (Desktop or Server).

This part of the documentation describes installation of **Cartoview-1.32.0** which comes with **GeoNode-3.2.1** and **GeoServer-2.18.2**.
This part of the documentation describes installation of **Cartoview-1.33.0** which comes with **GeoNode-3.3.0** and **GeoServer-2.19.x**.

!!! warning
Those guides are not meant to be used on a production system. Instead, you can follow the [Docker](docker.md) guide.
Expand Down Expand Up @@ -206,10 +206,10 @@ mkvirtualenv --python=python3.8 cartoview_venv
!!! warning
Make sure you're inside ``cartoview_service`` directory and the ``cartoview_venv`` is still activated.

Download the latest version of cartoview by cloning the repository.
Download Cartoview 1.33.0 version by cloning the repository and checkout the release tag.

```shell
git clone https://github.com/cartologic/cartoview.git
git clone -b v1.33.0 https://github.com/cartologic/cartoview.git
```

This will create a folder called ``cartoview`` inside ``cartoview_service`` directory.
Expand Down Expand Up @@ -386,6 +386,6 @@ Congratulations! Cartoview is now installed successfully.

You can upload layers, create maps, and install Cartoview apps to visualize these maps.

Once Cartoview is installed, You can navigate to [http://localhost:8000/apps/](http://localhost:8000/apps/) to check and install all available apps from the [App Store](https://appstore.cartoview.net/).
Once Cartoview is installed, You can navigate to the [apps](http://localhost:8000/cv_apps/) to check and install all available apps from the [App Store](https://appstore.cartoview.net/).

After installing any app, you may need to restart the running django server if you can't see your app in `/apps`.
78 changes: 59 additions & 19 deletions docs/installation/windows-installer.md
Expand Up @@ -4,7 +4,7 @@
## Introduction
Cartoview has a Windows installer that gives you an up and running instance, having Cartoview, GeoNode, GeoServer, and PostgreSQL (PostGIS) installed on the fly.

This guide describes the steps of installing and running Cartoview installer **v1.31.0**.
This guide describes the steps of installing and running Cartoview installer **v1.33.0**.

---

Expand All @@ -15,17 +15,31 @@ The installer can be requested and downloaded from [here](https://cartoview.net/

You just need to provide your information, select a version of Cartoview to download, and you should get an e-mail with the installer download link.

!!! note
It's recommended to stick with the latest version which is selected by default.

Download the installer on your Windows machine. You should get an executable file like that, **Cartoview_1.31.0.exe**.
Download the installer on your Windows machine. You should get an executable file like that, **Cartoview_1.33.0.exe**.

### Installer Steps
Proceed with the steps to install and run Cartoview.

!!! note
It's optional whether to stick with the default configurations during this installation or make changes according to your needs.

Specify whether to use the database with **Express** mode which installs and runs PostgreSQL on the fly or **Advanced** mode which uses an already running instance of PostgreSQL on your machine.

!!! note
If you select the **Advanced** mode, you will be required to provide the installation directory of PostgreSQL on your machine, the credentials and databases names.

![Current running PostgreSQL directory](../img/installation/Installer/postgres-dir.png "Current running PostgreSQL directory")

![Current running PostgreSQL credentials](../img/installation/Installer/postgres-credentials.png "Current running PostgreSQL credentials")

![Cartoview Web Database](../img/installation/Installer/web-db.png "Cartoview Web Database")

![Cartoview GIS Database](../img/installation/Installer/gis-db.png "Cartoview GIS Database")

We will stick with **Express** mode.

![DB Mode](../img/installation/Installer/db-mode.png "DB Mode")

Specify whether you want to use a **domain name** (e.g. localhost, example.com) or an **IP** (e.g. 192.168.10.1). We will stick with the default **domain name** to run on localhost.

![Domain or IP](../img/installation/Installer/domain-ip.png "Domain or IP")
Expand All @@ -41,14 +55,6 @@ PostgreSQL Port: Database port.

![Server Details](../img/installation/Installer/server-details.png "Server Details")

Specify whether to use the database with **Express** mode which installs and runs PostgreSQL on the fly or **Advanced** mode which uses a running instance of PostgreSQL.

If you select the **Advanced** mode, you will be required to provide the installation directory of PostgreSQL on your machine, the database server credentials (e.g. domain, port, username, and password) and databases names.

We will stick with **Express** mode.

![DB Mode](../img/installation/Installer/db-mode.png "DB Mode")

Select location of installation on your machine.

![Installation Location](../img/installation/Installer/installation-location.png "Installation Location")
Expand Down Expand Up @@ -78,13 +84,19 @@ And the [Admin](http://localhost:4040/docs/admin.html) page.

Congratulations! Cartoview is now installed successfully.

You can upload layers, create maps, and install Cartoview apps to visualize and interact with these maps.
You can upload layers, create maps, and interact with the pre-installed Cartoview apps to visualize these maps.

### Cartoview Apps

Once Cartoview is installed, You can navigate to the [apps](http://localhost:4040/cv_apps/) page and explore the available pre-installed apps.

![Cartoview Apps](../img/installation/Installer/apps.png "Cartoview Apps")

### Install Apps

Once Cartoview is installed, You can navigate to [http://localhost:4040/apps/](http://localhost:4040/apps/) to check and install all available apps from the [App Store](https://appstore.cartoview.net/).
Once Cartoview is installed, You can navigate to the [Manage Apps](http://localhost:4040/cv_apps/manage/) to check and install all available apps from the [App Store](https://appstore.cartoview.net/).

After installing any app, you may need to restart the running **Apache Windows service** if you can't see your app in `/apps`.
After installing any app, you may need to restart the running **Apache Windows service** if you can't see your app in the apps page.

![Services](../img/installation/Installer/services.png "Services")

Expand All @@ -102,14 +114,42 @@ For more information regarding Cartoview & GeoNode theming, please follow [this

### Quick Links

![Admin Configuration](../img/installation/Installer/admin-configuration-1.png "Quick Links")
![Admin Configuration](../img/installation/Installer/admin.png "Quick Links")

### Admin Configuration

You can find at the [Admin Configuration](http://localhost:4040/docs/docs.html) page the details of each installed service (e.g. Default credentials, Windows service name, and installed version).

![Admin Configuration](../img/installation/Installer/admin-configuration-2.png "Installed Services")
![Admin Configuration](../img/installation/Installer/admin-configuration-1.png "Installed Services")

And a guide about how to publish Cartoview on a Windows server.

![Publish Cartoview on Windows server](../img/installation/Installer/admin-configuration-3.png "Publish Cartoview on Windows server")
![Publish Cartoview on Windows server](../img/installation/Installer/admin-configuration-2.png "Publish Cartoview on Windows server")

---

## Troubleshooting

Sometimes, the installation of Cartoview Windows installer may fail due to different reasons. Here we will try to cover the potential errors and how to troubleshoot them.

If you got an error like for instance, the site `http://localhost:4040/` can't be reached or failed to upload data to Cartoview or any other kind of errors, you will need to check the logs of Cartoview Windows services as the installer consists of three services, **Apache**, **PostgreSQL**, and **Tomcat**.

![Cartoview Services](../img/installation/Installer/cartoview-services.png "Cartoview Services")

These services must appear as **running** as shown above. If you find one that is not, you can try to start again.

Right-click on a service and select start to start it again.

![Restart Service](../img/installation/Installer/restart-service.png "Restart Service")

Each service has its own log file and usually these logs should contain useful information for developers to acknowledge the current issue and may provide a fix.

You can find each log file in the following directories.

- **Apache**: `Cartoview/Apache24/logs/error.log`
- **Tomcat**: `Cartoview/Tomcat 9.0/logs/catalina.out`

!!! note
PostgreSQL doesn't have a log file by default. to enable it please check the PostgreSQL guide on [how to register event log on Windows](https://www.postgresql.org/docs/13/event-log-registration.html).

If you got an error that you can't fix it on your own, please send the log files with a clear description about what happened exactly to [cartoview@cartologic.com](mailto:cartoview@cartologic.com).

0 comments on commit 1f2c65a

Please sign in to comment.