Skip to content

Commit

Permalink
More files than just waterpoly, #12
Browse files Browse the repository at this point in the history
  • Loading branch information
stevage committed Jul 25, 2014
1 parent be26e09 commit 4b839fb
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 28 deletions.
8 changes: 6 additions & 2 deletions pillar/tm.sls
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copy top.sls and tm.sls to /srv/pillar, then change the settings below.
# Copy top.sls and tm.sls to /srv/pillar, then change the settings below.

# Indentation matters! This must be a syntactically correct YAML file.

tm_username: tm # Username/password for basic htpasswd authentication
tm_password: pumpkin
Expand All @@ -17,7 +19,9 @@ tm_fonts: # List of urls that provide zip downloads
- http://www.fontsquirrel.com/fonts/download/roboto

# (Optional)
tm_waterpolygonsource: http://gis.researchmaps.net/water-polygons-split-3857.zip
tm_extrafiles:
- http://gis.researchmaps.net/water-polygons-split-3857.zip
- http://gis.researchmaps.net/land-polygons-split-3857.zip

# (Optional)
tm_projects: # Sample projects to unzip in /usr/share/mapbox/project.
Expand Down
6 changes: 5 additions & 1 deletion pillar/top.sls
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copy top.sls and tm.sls to /srv/pillar, then change the settings below.

# Indentation matters!

base:
'*':
- tm
- tm
# - workshops
6 changes: 6 additions & 0 deletions pillar/workshops.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This settings file is used for "Mapping for academics" workshops.
tm_osmsourceurl: http://gis.researchmaps.net/australia-latest.osm.pbf

tm_projects: # Sample projects to unzip in /usr/share/mapbox/project.
- { name: mapstarter, source: "http://gis.researchmaps.net/sample/map-starter.zip" }
- { name: melbourne, source: "http://gis.researchmaps.net/sample/melbourne.zip" }
27 changes: 27 additions & 0 deletions tilemill/extrafiles.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Install water polygon shapefile. This is needed for working with OpenStreetMap data extracts.
# TODO: figure out how to make the shapefile a 'favourite'
extrafiles:
pkg.installed:
- names:
- unzip
- wget
cmd.run:
- cwd: /usr/share/mapbox
- user: mapbox
- group: mapbox
- require:
- pkg: unzip
- name: |
{% for f in pillar.tm_extrafiles %}
wget -nv {{ f }}
{% endfor %}
sleep 5
yes no | unzip '*.zip' # Don't overwrite any existing files
unzip -f '*.zip' # Freshen existing files if needed
# - unless: test -d /usr/share/mapbox/water-polygons-split-3857 # should we bother trying to not repeat?
extrafiles_logdone:
cmd.wait_script:
- source: salt://log.sh
- args: "'Extra tilemill files downloaded and unzipped.'"
- watch: [ { cmd: extrafiles } ]
4 changes: 2 additions & 2 deletions tilemill/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ include:
- .fonts
{% endif %}
- .tilemillinstall
{% if pillar.tm_waterpolygonsource is defined %}
- .waterpolygons
{% if pillar.tm_tilemillextras is defined %}
- .tilemillextras
{% endif %}
{% if pillar.tm_projects is defined %}
- .projects
Expand Down
23 changes: 0 additions & 23 deletions tilemill/waterpolygons.sls

This file was deleted.

0 comments on commit 4b839fb

Please sign in to comment.