chr4-cookbooks / osrm Goto Github PK
View Code? Open in Web Editor NEWInstall osrm-routed and download/extract/prepare map data
License: GNU General Public License v3.0
Install osrm-routed and download/extract/prepare map data
License: GNU General Public License v3.0
Do you plan to support the osrm-datastore with sharedmemory support ?
Here is my recipe:
include_recipe 'apt'
include_recipe 'osrm'
region = 'delaware'
group 'osrm-routed'
user 'osrm-routed' do
gid 'osrm-routed'
shell '/bin/false'
end
osrm_map region do
action :create
end
osrm_datastore region
osrm_routed region do
listen '0.0.0.0'
port 5000
shared_memory true
end
And when I run kitchen converge:
================================================================================
Error executing action `create` on resource 'osrm_datastore[delaware]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
execute[/opt/osrm/build/osrm-datastore /opt/osrm-data/delaware/car/delaware-latest.osrm] (/tmp/kitchen/cache/cookbooks/osrm/providers/datastore.rb line 59) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/osrm/build/osrm-datastore /opt/osrm-data/delaware/car/delaware-latest.osrm ----
STDOUT:
STDERR: [warn] Invalid file path given!
If I delete /opt/osrm-data/delaware/car
and change the osrm_map action to :create_if_missing, kitchen converge works fine.
It looks like some files are deleted inadvertently from osrm_contract causing osrm_datastore to fail.
Hello
Tried to install server with map for north-america region.
Environment:
EC2 west 2 instance, Ubuntu 14.04.
Used Chef Client, version 11.4.4, chef-solo and roundsman.
recipes/default.rb
include_recipe 'osrm::install_git'
osrm_map 'north-america' do
action :create_if_missing
user 'ubuntu'
end
osrm_routed 'north-america' do
user 'ubuntu'
listen '0.0.0.0'
port 5000
end
Got an error on stage of downloading .osm.pbf file.
** [out :: ] Recipe: osrm::default
** [out :: ] * osrm_map[north-america] action create_if_missing
** [out :: ] (up to date)
** [out :: ] Recipe: <Dynamically Defined Resource>
** [out :: ] * osrm_map_download[north-america] action download_if_missing
** [out :: ] (skipped due to only_if)
** [out :: ] * osrm_map_extract[north-america] action extract_if_missing
** [out :: ] (up to date)
** [out :: ] * template[/opt/osrm/build/extractor.ini] action create
** [out :: ] (up to date)
** [out :: ] * file[/opt/osrm/build/.stxxl] action create
** [out :: ] (skipped due to only_if)
** [out :: ] * directory[/opt/osrm-data/north-america/car] action create
** [out :: ] (up to date)
** [out :: ] * link[/opt/osrm-data/north-america/car/north-america-latest.osm.pbf] action create
** [out :: ] (up to date)
** [out :: ] * execute[rm -f /opt/osrm-data/north-america/car/north-america-latest.osrm] action run
** [out :: ] (skipped due to not_if)
** [out :: ] * execute[rm -f /opt/osrm-data/north-america/car/north-america-latest.osrm.names] action run
** [out :: ] (skipped due to not_if)
** [out :: ] * execute[rm -f /opt/osrm-data/north-america/car/north-america-latest.osrm.restrictions] action run
** [out :: ] (skipped due to not_if)
** [out :: ] * execute[osrm-north-america-car-extract] action run
** [out :: ]
** [out :: ] ================================================================================
** [out :: ] Error executing action `run` on resource 'execute[osrm-north-america-car-extract]'
** [out :: ] ================================================================================
** [out :: ]
** [out :: ]
** [out :: ] Mixlib::ShellOut::ShellCommandFailed
** [out :: ] ------------------------------------
** [out :: ] Expected process to exit with [0], but received '1'
** [out :: ] ---- Begin output of /opt/osrm/build/osrm-extract /opt/osrm-data/north-america/car/north-america-latest.osm.pbf -p /opt/osrm/profiles/car.lua ----
** [out :: ] STDOUT: [info] Reading options from: extractor.ini
** [out :: ] STDERR: [warn] Input file /opt/osrm-data/north-america/car/north-america-latest.osm.pbf not found!
** [out :: ] ---- End output of /opt/osrm/build/osrm-extract /opt/osrm-data/north-america/car/north-america-latest.osm.pbf -p /opt/osrm/profiles/car.lua ----
** [out :: ] Ran /opt/osrm/build/osrm-extract /opt/osrm-data/north-america/car/north-america-latest.osm.pbf -p /opt/osrm/profiles/car.lua returned 1
** [out :: ]
** [out :: ]
** [out :: ] Resource Declaration:
** [out :: ] ---------------------
** [out :: ] # In /tmp/roundsman/config/cookbooks/osrm/providers/map_extract.rb
** [out :: ]
** [out :: ] 72: execute "osrm-#{new_resource.region}-#{new_resource.profile}-extract" do
** [out :: ]
** [out :: ] 73: user new_resource.user if new_resource.user
** [out :: ] 74: cwd cwd
** [out :: ] 75: timeout new_resource.timeout
** [out :: ]
** [out :: ] 76: command "#{command} #{linked_map} -p #{profile_dir}/#{new_resource.profile}.lua"
** [out :: ] 77: not_if { ::File.exists?("#{map_stripped_path}.osrm.names") }
** [out :: ] 78: end
** [out :: ] 79:
** [out :: ]
** [out :: ]
** [out :: ]
** [out :: ] Compiled Resource:
** [out :: ] ------------------
** [out :: ] # Declared in /tmp/roundsman/config/cookbooks/osrm/providers/map_extract.rb:72:in `extract'
** [out :: ]
** [out :: ] execute("osrm-north-america-car-extract") do
** [out :: ] action "run"
** [out :: ] retries 0
** [out :: ] retry_delay 2
** [out :: ] command "/opt/osrm/build/osrm-extract /opt/osrm-data/north-america/car/north-america-latest.osm.pbf -p /opt/osrm/profiles/car.lua"
** [out :: ] backup 5
** [out :: ] cwd "/opt/osrm/build"
** [out :: ] returns 0
** [out :: ]
** [out :: ] timeout 86400
** [out :: ] user "ubuntu"
** [out :: ] cookbook_name :osrm
** [out :: ] not_if { #code block }
** [out :: ] end
** [out :: ]
** [out :: ]
** [out :: ]
** [out :: ]
** [out :: ] [2014-06-03T09:55:13+00:00] ERROR: Running exception handlers
** [out :: ] [2014-06-03T09:55:13+00:00] ERROR: Exception handlers complete
** [out :: ] Chef Client failed. 0 resources updated
** [out :: ] [2014-06-03T09:55:13+00:00] FATAL: Stacktrace dumped to /tmp/roundsman/cache/chef-stacktrace.out
** [out :: ] [2014-06-03T09:55:13+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[osrm-north-america-car-extract] (/tmp/roundsman/config/cookbooks/osrm/providers/map_extract.rb line 72) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
** [out :: ] ---- Begin output of /opt/osrm/build/osrm-extract /opt/osrm-data/north-america/car/north-america-latest.osm.pbf -p /opt/osrm/profiles/car.lua ----
** [out :: ] STDOUT: [info] Reading options from: extractor.ini
** [out :: ] STDERR: [warn] Input file /opt/osrm-data/north-america/car/north-america-latest.osm.pbf not found!
** [out :: ] ---- End output of /opt/osrm/build/osrm-extract /opt/osrm-data/north-america/car/north-america-latest.osm.pbf -p /opt/osrm/profiles/car.lua ----
** [out :: ] Ran /opt/osrm/build/osrm-extract /opt/osrm-data/north-america/car/north-america-latest.osm.pbf -p /opt/osrm/profiles/car.lua returned 1
command finished in 3602ms
failed: "sh -c 'sudo -p '\\''sudo password: '\\'' chef-solo -c /tmp/roundsman/solo.rb -j /tmp/roundsman/solo.json'" on
After brief research, found this line https://github.com/chr4-cookbooks/osrm/blob/master/providers/map.rb#L31 where new_resource.map is blank. I was unable to find the place where map is filled with URL from attributes.
Temporally comment this line and rerun chef installation - successfully started downloading file.
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.