GeoMoose: Difference between revisions
Brian Wilson (talk | contribs) |
Brian Wilson (talk | contribs) mNo edit summary |
||
Line 14: | Line 14: | ||
'''Grrr. It does not build! On my third try now.''' I am thinking the Geomoose crew concentrate efforts on the Windows version. | '''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. | |||
# It threw an error referencing a log file that's buried inside the temporary docker container. | |||
# I looked up the name of the crashed container with: docker ps -a | |||
# I created a snapshot of the (crashed) container. docker commit ''the_container_name_or_id'' snappy | |||
# I started the snapshot with a shell and looked at the file: docker run -it snappy bash | |||
# I searched for the library: cat /usr/local/src/mapserver/build/CMakeFiles/CMakeError.log | |||
# I added the library to the Dockerfile that I found by searching for it: apt-cache search pthreads | |||
# 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: | |||
# I checked the changes into github so that the automated build would happen. git commit -a -m 'added missing library' && git push | |||
# I waited 30 minutes for it to autobuild. This build is big and slow. | |||
# While waiting I removed the no-longer-needed local images and containers. | |||
# 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: | '''Once I fix the build process,''' you should be able to start it running for testing with this: |
Revision as of 21:23, 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
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.
- It threw an error referencing a log file that's buried inside the temporary docker container.
- I looked up the name of the crashed container with: docker ps -a
- I created a snapshot of the (crashed) container. docker commit the_container_name_or_id snappy
- I started the snapshot with a shell and looked at the file: docker run -it snappy bash
- I searched for the library: cat /usr/local/src/mapserver/build/CMakeFiles/CMakeError.log
- I added the library to the Dockerfile that I found by searching for it: apt-cache search pthreads
- 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:
- I checked the changes into github so that the automated build would happen. git commit -a -m 'added missing library' && git push
- I waited 30 minutes for it to autobuild. This build is big and slow.
- While waiting I removed the no-longer-needed local images and containers.
- 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!
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.