Open bpeng opened 8 years ago
eb ssh
sudo docker ps -a
4 sudo docker run -it 5a8625fb6321 /bin/bash
5 sudo docker run -it 2bfb46e987f3 /bin/bash
root@fd110e61cafe:/go/src/github.com/gclitheroe/grpc-exp/mtr-api# history
2 ls -l
3 cd mtr-api/
7 export $(cat env.list | grep = | xargs)
8 env
9 go build
36 mkdir github.com/gclitheroe/grpc-exp
37 mkdir -p github.com/gclitheroe/grpc-exp
38 cp -r app/* github.com/gclitheroe/grpc-exp/
39 cd github.com/gclitheroe/grpc-exp
43 go build
error:
golang.org/x/net/http2
/go/src/golang.org/x/net/http2/transport.go:219: req.Cancel undefined (type *http.Request has no field or method Cancel)
need go1.5 above
3 desirable to push docker image to hub and deploy from there to eliminate the go version issue
https://github.com/GeoNet/DevTools/blob/master/deploy/AWS-ECS.md https://github.com/GeoNet/DevTools/blob/master/deploy/ecr-prod.sh
moving our Docker images from quay.io to AWS ECR in Sydney.
AWS resources can use the "AmazonEC2ContainerRegistryReadOnly" policy so there is no need for them to have authentication credentials.
If you have auth tokens for the AWS prod account already then to get a 12 hour Docker login
eval $(aws --profile=production ecr get-login --region ap-southeast-2)
then for example docker pull 862640294325.dkr.ecr.ap-southeast-2.amazonaws.com/haz-db-consumer:latest
You need to install the AWS CLI and set up config using the tokens I send. I suggest a "production" profile but up to you http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
geoserver-docker
https://github.com/GeoNode/geoserver-docker
docker pull geonode/geoserver
docker run --name "geoserver" -d -p 8082:8080 geonode/geoserver
Result:
MapServer on docker
https://github.com/kartoza/docker-mapserver
cd ~/app
mkdir mapserver
cd mapserver/
git clone git@github.com:kartoza/docker-mapserver.git
cd docker-mapserver/
sudo docker build -t mapserver .
sudo docker run -d -p 8182:80 -v `pwd`/map:/map mapserver
//sudo docker run -it -v `pwd`/map:/map mapserver bash
Mapserver WMS client
http://mapserver.org/ogc/wms_client.html
- Use in leaflet
http://mac16540.gns.cri.nz:8000/leaflet-base-layers.html
//landCoverWms proxied on local mapserver using wms_client
var mapServerWmsUrl = '//' + jQuery(location).attr('hostname') + ':8182/cgi-bin/mapserv?map=/map/wms.map';
var landCoverWmsMapserver = L.tileLayer.wms(mapServerWmsUrl, {
layers: 'landcover',
format: 'image/png',
transparent: true,
srs: 'EPSG:900913'
});
- wms.map
MAP CONFIG "MS_ERRORFILE" "/tmp/generic_map_error.txt" DEBUG 5 NAME "WMS_CLIENT" SIZE 512 512 UNITS meters SHAPEPATH "/map/"
SYMBOLSET symbolset.txt
EXTENT 160 -47.0 180.0 -32.0 ##EXTENT [minx] [miny] [maxx] [maxy]
PROJECTION
'init=epsg:3857'
END #PROJECTION
IMAGECOLOR -1 -1 -1
IMAGEQUALITY 80
IMAGETYPE PNG
WEB
IMAGEPATH '/tmp/'
IMAGEURL '/tmp/'
METADATA
'ows_title' 'Generic Map'
'ows_srs' 'EPSG:3857 EPSG:4326 EPSG:900913'
'wms_feature_info_mime_type' "text/html"
'ows_enable_request' '*'
END
END
###wms client
LAYER
NAME "country_bounds"
TYPE RASTER
STATUS ON
CONNECTION "http://demo.mapserver.org/cgi-bin/wms?"
CONNECTIONTYPE WMS
METADATA
"wms_srs" "EPSG:4326"
"wms_name" "country_bounds"
"wms_server_version" "1.1.1"
"wms_format" "image/gif"
END
END
LAYER
NAME "landcover"
TYPE RASTER
STATUS ON
CONNECTION "http://maps.scinfo.org.nz/basemaps/wms?"
CONNECTIONTYPE WMS
METADATA
"wms_srs" "EPSG:2193"
"wms_name" "landscape_eco_painted_relief"
"wms_server_version" "1.1.1"
"wms_format" "image/png"
END
END
END