[Geomoose-users] 3 bug reports and a working server

Jim Klassen klassen.js at gmail.com
Thu Mar 28 08:03:20 PDT 2019


Thanks for points this stuff out.


My thoughts on the matter:

As the release manager... ah great, more places for links to get out of date.  I wonder if they can get updated with the build and or package script?


I'm also thinking the titles on those quickstarts aren't the best.


The EC2 quickstart is actually a pretty standard install on any linux-like-os, with a few extra lines about selecting an instance type.  Even the PPA stuff isn't strictly necessary, at least with Ubuntu 18.04 or Debian Stretch as they both have new enough version of mapserver to work with the demo data.  Also, GeoMoose (particularly with versions 3+) is a browser based application. It has never claimed to be a full stack by itself.  The demo application built on GeoMoose gets it's data from MapServer, but that isn't strictly necessary depending on the needs of the site.

A typical Linux install (on a production server) would be:

  * install whatever webserver you like that can handle static files
  * optionally if you want to use the demo app as is, or as a starting point
      o install mapserver (requires cgi/fastcgi) if you want to use that to serve your data
      o download and unzip GeoMoose Demo Dataset somewhere (not under your webroot, but accessible by the webserver)
  * Download and unzip the GeoMoose for Linux zipfile somewhere under your webroot
  * Configure GeoMoose to point at your data (config.js/mapbook.xml).



The *nix developers quickstart is really more about docker (which is to date mostly used for testing during development on laptops while away from good Internet connectivity).  It seems to presume you will read the Dockerfile to know how to do this in general. Although, on the surface it completely skips over actual GeoMoose development procedures.  (I really dislike how Docker encourages people to just say "hey, there is a Dockerfile. What more do you want?" and skip the actual instruction of how to generally deploy something... Kids these days are all spoiled.  Back in my day we had to edit config files by re-wire wrapping the boards, etc.)

A more general Linux development path would be:

  * install recent nodejs,
  * git clone geomoose/gm3,
  * npm install,
  * grunt build,
  * npm test,
  * configure it to point to some data,
  * drop the examples and dist directories someplace a webserver can see it (rsync/symlink/etc), or run grunt serve which sets up a local only nodejs/webpack webserver that includes the debug info so you have about a 1/3 chance of tracing from the browser console back to the actual line of code that caused the error (grumble, stupid, half-broken "next gen" JS development tools, npm is a plague, you kids get off my lawn, etc.).
  * optionally: npm pack.  That will build the npm package that is the base for building the Linux and MS4W downloads.  (And is also available on the download page under the NPM heading). Note: the full scripts to build the downloads are in geomoose/gm3-admin, but that probably doesn't matter to anyone not building official releases.  If you are doing custom builds for your own sites, the npm package or a fork of the geomoose/gm3 git repo is probably the way to go.  All the files needed to run GeoMoose end up in ./dist after the build.  The exception is the index.html and friends which we expect will be site specific.  The example application which lives in ./example/desktop provides an example of what could be done, but it is expected that you would be using that as a starting point and modifying that for a specific site.  In any case, you don't want your app to live in ./example/desktop as it could get overwritten by updates. (This is covered in the workshops).

Now what data it points to is up to you.  GeoMoose can talk directly to many http(s) exposed data sources (WMS/WFS/GeoJSON/etc. not just MapServer).  However, because we had to pick something concrete for the demo, the Dockerfile in gm3-demo-data handles that, unsurprisingly, by building a demo app that uses gm3-demo-data.  As such, I haven't found the Dockerfile directly useful for any real site (except maybe as a starting point).... but this gets back to why it is in a repo called gm3-demo-data.  It is simply a a set of data to work with the example app that people could start from, but by no means the last word on every way GeoMoose can be installed.  It is a separate repo because it is kind of large and, in general, useless (except as possibly a reference people to follow for one way to do things that works) for any actual site using GeoMoose.


The MS4W option is a get up and running with the demo app quickly on Windows. This is what most of the workshops are based on.


The Windows development option is what it takes to build/modify/etc. GeoMoose on Windows.  (With the caveat that some tests won't practically run because they require the npm canvas package which needs a working C/C++ compiler that matches the ABI of whatever nodejs install you are using and also requires some dependencies installed first.  This is  a trivial requirement on Linux with all that stuff easily available and willing to work together via apt-get/dnf/etc.  On Windows, you end up having to build the world from scratch just to make sure it is all built with the same compiler.  We haven't been willing to take that on because frankly it is much easier to install a Linux VM at that point.)  You would still need to deploy what you build somewhere afterwards (and the MS4W option is probably your best bet here).


On 3/27/19 6:15 PM, Brian Wilson wrote:
>
> Greetings moose people,
>
> This is sort of 3 bug reports…
>
> Yesterday I dug around in Github code because I am mostly curious about how GM3 is implemented, not really trying to deploy it. I found that to be awkward because there appear to be several repos and I could not really tell what I needed to do. So today I decided to try the NORMAL approach and use “quickstart” to set up a working GeoMoose demo server.
>
> Working from https://geomoose.github.io/gm3/ Quickstart where I see there are 4 Quickstart options.
>
> 1 -- I am most comfortable with Linux so I started there “For developers on *nix-systems” … Docker image won’t build, missing pthreads library is the error. Spent a couple hours chasing that one.
>
> I found some vague information online about debugging the problem in cmake but cmake is a foreign entity to me and I stalled out there.
>
> 2 -- I am a developer so next I tried  “For developers on Windows” but this appears to be only the Javascript browser portion, no server. So… call this ½ a stack? Incomplete instructions??
>
> I can successfully start up the empty GeoMoose framework with no data in it, but I have no idea what this is supposed to do for me so I stopped here.
>
> 3 -- Finally I tried “For MS4W” and discovered the download links on page are broken. I can get MapServer but not Geomoose This page here https://geomoose.github.io/gm3/ms4w-quickstart/index.html
>
> 4 -- I am not willing to spend time “Deploying on EC2” at the moment. J So I did not find any problems there. J
>
> OKAY after all of that I took a break, went for a walk, then felt reinvigorated so I dug around in the broken URLs in #3 and found the actual files in GeoMoose downloads. I have Apache and GM3 running on my puny Windows 10 laptop, for testing.
>
> Brian Wilson | GIS Technician
>
> Information Technology | Clatsop County
>
> 503-338-3668
>
> This message has been prepared on resources owned by Clatsop County, Oregon. It is subject to the Internet and Online Services Use Policy and Procedures of Clatsop County.
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geomoose-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20190328/c6de3c1c/attachment-0001.html>


More information about the Geomoose-users mailing list