from: https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-the-proxy-for-apt-for-ubuntu-18-04/
sudo touch /etc/apt/apt.conf.d/proxy.conf
Then add these lines, say with sudo vim /etc/apt/apt.conf.d/proxy.conf
:
Acquire::http::Proxy "http://dcsproxy:8080";
Acquire::https::Proxy "http://dcsproxy:8080";
Then test with sudo apt update
Add these two lines to ~/.profile
:
export HTTP_PROXY=http://dcsproxy:8080
export HTTPS_PROXY=http://dcsproxy:8080
You'll need to close and reopen your terminal to get a new shell so the settings will take.
Add psba root certificate
For git and curl.
Need to work out how to copy the inspection bundle to the host. But once it is there:
from: https://manuals.gfi.com/en/kerio/connect/content/server-configuration/ssl-certificates/adding-trusted-root-certificates-to-the-server-1605.html
Copy your CA to dir /usr/local/share/ca-certificates/
Use command: sudo cp inspection-bundle.crt /usr/local/share/ca-certificates/inspection-bundle.crt
Update the CA store: sudo update-ca-certificates
Installing OSRM Dependencies
from: https://github.com/Project-OSRM/osrm-backend/wiki/Building-on-Ubuntu
sudo apt install build-essential git cmake pkg-config \
libbz2-dev libstxxl-dev libstxxl1v5 libxml2-dev \
libzip-dev libboost-all-dev lua5.2 liblua5.2-dev libtbb-dev \
libluabind-dev libluabind0.9.1v5
git clone --depth=1 https://github.com/Project-OSRM/osrm-backend.git
from: https://github.com/Project-OSRM/osrm-backend/wiki/Building-OSRM
From inside osrm repo dir:
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
sudo cmake --build . --target install
from: https://github.com/Project-OSRM/osrm-backend/wiki/Running-OSRM
Using our truck profile and map from: \analytics\Pims\OSRM
Need to put files in an s3 bucket or something.
Copy the truck profile into the profiles folder in osrm-backend repo:
cp FireTruck.lua osrm-backend/profiles
Run:
osrm-extract australia-latest.osm.pbf -p osrm-backend/profiles/FireTruck.lua
inside the directory where the pbf file was will be an australia-latest.osrm
file.
Run:
osrm-contract australia-latest.osrm
(Uses 2.2GB of RAM)
osrm-routed australia-latest.osrm
Note we plan to use the table
service to batch our requests. So we will want to set the --max-table-size <n_locations>
option reasonably high. See: https://github.com/Project-OSRM/osrm-backend/blob/master/docs/http.md#table-service
Request route for Roma Street station to Kedron Park. Google says ~13 min over 10km.
curl "http://127.0.0.1:5000/route/v1/driving/153.0130931,-27.4658784;153.0358785,-27.4147576?steps=false"
with response:
{"code":"Ok","waypoints":[{"hint":"J7Y2gP___38CAAAABAAAABAAAAAAAAAAStBwQMPo_j90HKtBAAAAAAIAAAAEAAAAEAAAAAAAAACXDwAAL8oeCS7mXP5lyx4Jaudc_gIAfxPD7UVd","distance":46.52748,"location":[153.012783,-27.466194],"name":"Petrie Terrace"},{"hint":"ue81gP___38XAAAAGAAAAC8AAAC0AAAAkof5Qd_hID_X23ZCGXhvQxcAAAAYAAAALwAAALQAAACXDwAATyQfCQ2vXf5nJB8JGq9d_gMAnxTD7UVd","distance":2.776107,"location":[153.035855,-27.414771],"name":"Airport Link"}],"routes":[{"legs":[{"steps":[],"weight":799.1,"distance":12237,"summary":"","duration":799.1}],"weight_name":"routability","geometry":"tnsfD{h|d\\}CHyG{ImU[_D~@_FpM`A{@kFyF_Fas@aZ}RcJ}Y}IgH_NsByv@IekAmLcZmEySaJyYab@aMcb@iBuTxBcr@cB`r@fBfT`M`b@dPfLzBtFeAbJoH|E","weight":799.1,"distance":12237,"duration":799.1}]}
Suggesting travel time of 13.3 minutes over 12.2km.
Certificates
Store the psba inspection certificate file https://github.com/qfes/environment_config/blob/master/setup/inspection-bundle.crt somewhere (I'll assume $HOME/inspection-bundle.crt). Then add the following environment variables in ~/.profile
These variables remove the need for git
sslVerify=false
and.curlrc insecure