How to deploy Apprtc's collider into Google App Engine?

扶醉桌前 提交于 2019-12-11 12:25:51

问题


I have deployed the apprtc's google app engine code on my own GAE server. I don't find instructions on how to deploy the Go based collider for websocket signaling.

Here is the collider project: https://github.com/webrtc/apprtc/tree/master/src/collider

Any insights would help.


回答1:


Collider needs to be deployed in Google Compute Engine or equivalent services by Amazon. Here is the list of steps that I had go through:

1) Install go from: https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz

2) Set PATH variable: export PATH=$PATH:/usr/local/go/bin

3) Set GOROOT export GOROOT=/usr/local/go

4) Set GOPATH (must be different from GOROOT) export GOPATH=/usr/local/go-dependencies (have to create go-dependencies directory if not there)

5) Checkout apprtc code: git clone https://github.com/webrtc/apprtc.git

6) Copy collider files to $GOROOT/src: sudo cp -rf apprtc/src/collider/collider /usr/local/go/src/ sudo cp -rf apprtc/src/collider/collidermain /usr/local/go/src/ sudo cp -rf apprtc/src/collider/collidertest /usr/local/go/src/

7) Install websocket: go get -v golang.org/x/net/websocket

8) Install Dependencies: go get collidermain

9) Install collidermain: go install collidermain

10 Run collidermain: /usr/local/go/bin/collidermain -port=8089 -tls=false (need a certificate to run with tls enabled)




回答2:


Goto https://github.com/webrtc/apprtc/blob/master/src/collider/README.md This has all the steps to run collider the instructions given are specifically for google compute engine(GCE) which is a linux based machine

  1. Create a instance in GCE and connect through browser
  2. Install Go using
  3. Set up GO workspace and path accordingly
  4. Install git and Clone the apprtc project in your home directory
  5. Create symbolic links from your apprtc collider folders to go workspace src folders
  6. Goto Apprtc-->src-->collidermain-->main.go and change the room server to the server address of the app deployed in google app engine(GAE)

var roomSrv = flag.String("room-server", "https://your.apprtc.server", "The origin of the room server")

  1. Get dependencies and install collidermain
  2. Goto root path and install collider as given in the instructions
  3. start collider in root using sudo nohup collider/collidermain -port=443 -tls=true

**this is just for development purpose not for production



来源:https://stackoverflow.com/questions/33641595/how-to-deploy-apprtcs-collider-into-google-app-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!