$ git clone [email protected]:life1347/googlepusbsub-exmaple.git $GOPATH/src/tachingchen.com/googlePubSub
$ godep restore
$ GOOGLE_CLOUD_PROJECT="<google project name>" go run pull.go
- Place domain SSL
certificate.crt
andprivate.key
in asset directory - Place
crt.json
in asset directory with json file download from API Console Credentials page. (Please refer Google Dev Guide) - (Optional) Replace
ca-certificates.crt
with the ca-certificates.crt, which can be found under the /etc/ssl/certs/ in any linux distribution, in asset directory.
$ cd push
# build.sh will upload built image to google image registry automatically
$ GOOGLE_CLOUD_PROJECT="<google project name>" ./build.sh
- Replace configuration in k8s/pubsub-deployment.yaml
- Point your domin name (endpoint) to
EXTERNAL-IP
$ kubectl apply -f k8s/pubsub-deployment.yaml
$ kubectl apply -f k8s/pubsub-svc.yaml
$ kubectl get svc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
pubsub-service 10.3.246.101 x.x.x.x 443/TCP 39s
# Once the push/pull client is ready
$ GOOGLE_CLOUD_PROJECT="<google project name>" go run publisher.go