GeoMoose: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
mNo edit summary
Brian Wilson (talk | contribs)
Line 7: Line 7:
There are several repos. See their get started docs at http://geomoose.org
There are several repos. See their get started docs at http://geomoose.org


== Docker based Geomoose ==
== Docker based Geomoose wasted my time ==


Geomoose 3 ("gm3") uses Docker (in the Linux example anyway) to set up a copy of mapserver.
Geomoose 3 ("gm3") uses Docker (in the Linux example anyway) to set up a copy of mapserver.
Line 43: Line 43:
but as I said, this is just a demo, so I am not trying to 'fix' it right now!
but as I said, this is just a demo, so I am not trying to 'fix' it right now!


=== How to add your own maps and data ===
== Windows based GM3 has no server ==
 
Following the instructions appears to only start the Javascript compoent of GM3.
 
== How to add your own maps and data ==


The demo image also pulls demo data in from the official Geomoose repo so that you are ready to go. In real life,  
The demo image also pulls demo data in from the official Geomoose repo so that you are ready to go. In real life,  
you should use a separate docker volume to hold your data. This means you put everything in a directory on the server
you should use a separate docker volume to hold your data. This means you put everything in a directory on the server
and then tell Docker to make that directory available to the Geomoose container. I will tell you how to do that later.
and then tell Docker to make that directory available to the Geomoose container. I will tell you how to do that later.
== Another attempt MS4W ==
Since both of those approaches were failures... https://geomoose.github.io/gm3/ms4w-quickstart/index.html
This one fails too, because the download links are broken. I could probably find the files. But not just now, it's been a long day.

Revision as of 22:25, 27 March 2019

Overview

I am setting up a demo copy of Geomoose so that I can see how it works internally. It has two parts, a mapserver and a javascript client.

The official project is now in github, https://github.com/geomoose There are several repos. See their get started docs at http://geomoose.org

Docker based Geomoose wasted my time

Geomoose 3 ("gm3") uses Docker (in the Linux example anyway) to set up a copy of mapserver. It includes a build step that takes too long IMO! I copied the Dockerfile into this github repo and hooked it up to autobuild on Docker Hub.

Grrr. It does not build! On my third try now. I am thinking the Geomoose crew concentrate efforts on the Windows version.

I ran the build locally to debug it. There was a missing library. This was the process.

  1. It threw an error referencing a log file that's buried inside the temporary docker container.
  2. I looked up the name of the crashed container with: docker ps -a
  3. I created a snapshot of the (crashed) container. docker commit the_container_name_or_id snappy
  4. I started the snapshot with a shell and looked at the file: docker run -it snappy bash
  5. I searched for the library: cat /usr/local/src/mapserver/build/CMakeFiles/CMakeError.log
  6. I added the library to the Dockerfile that I found by searching for it: apt-cache search pthreads
  7. I built it locally to make sure it would complete: docker build -t gm3 .

...and it still fails

If it worked I would do this:

  1. I checked the changes into github so that the automated build would happen. git commit -a -m 'added missing library' && git push
  2. I waited 30 minutes for it to autobuild. This build is big and slow.
  3. While waiting I removed the no-longer-needed local images and containers.
  4. I proceeded henceforth with the rest of this page.

Once I fix the build process, you should be able to start it running for testing with this:

docker run -p 8000:80 --name geomoose_demo brian32768/geomoose:latest

While it is running I can see it (sorry, not currently providing public access) at http://maps.wildsong.biz:8000/ You might want to try try http://localhost:8000/

This docker image is far from optimal, it's too big and complex and I suspect it could be built on either the official or camptocamp base images. It looks like I should PROBABLY be using docker-compose and running several separate containers to provide services but as I said, this is just a demo, so I am not trying to 'fix' it right now!

Windows based GM3 has no server

Following the instructions appears to only start the Javascript compoent of GM3.

How to add your own maps and data

The demo image also pulls demo data in from the official Geomoose repo so that you are ready to go. In real life, you should use a separate docker volume to hold your data. This means you put everything in a directory on the server and then tell Docker to make that directory available to the Geomoose container. I will tell you how to do that later.

Another attempt MS4W

Since both of those approaches were failures... https://geomoose.github.io/gm3/ms4w-quickstart/index.html

This one fails too, because the download links are broken. I could probably find the files. But not just now, it's been a long day.