Installation
Type of installation
- SSH Tunnel
- Linode
- Digital Ocean
- AWS
- AWS Elastic Beanstalk (On-click deploy)
SSH Tunnel
- ssh -L [rpcport-for-localhost]:localhost:[rpcport-for-remote-host] [username]@[remote-host]
- ssh -L [httpport-for-localhost]:localhost:[httpport-for-remote-host] [username]@[remote-host]
- ./build/bin/gptt –testp2p –rpcport [port-for-remote-host] –httpaddr 127.0.0.1:[http-port] –exthttpaddr //localhost:[httpport-for-localhost] –extrpcaddr //localhost:[rpcport-for-localhost]
(in browser) //localhost:[httpport-for-localhost]
Linode
- Create Linode with Stackscript ID: 399252 (hsiaochuanheng / p.me-docker (go-pttai))
- Launch the console and ensure that the new linode is created successfully.
- ssh -L 14779:localhost:14779 admin@[IP]
- ssh -L 9774:localhost:9774 admin@[IP]
- open browser and connect to //localhost:9774
- Update (in admin@[IP]):
sudo -s
docker pull ailabstw/go-pttai:latest
HTTPPORT=9774
APIPORT=14779
docker run -e HTTPPORT=${HTTPPORT} -e APIPORT=${APIPORT} -itd –restart=always -p 9487:9487 -p 127.0.0.1:9774:9774 -p 127.0.0.1:14779:14779 -v /home/admin/pttai.docker:/root/.pttai –name go-pttai ailabstw/go-pttai:latest gptt “–testp2p” “–httpdir” “/static” “–httpaddr” “0.0.0.0:9774” “–rpcaddr” “0.0.0.0” “–exthttpaddr” “//localhost:${HTTPPORT}” “–extrpcaddr” “//localhost:${APIPORT}”
Digital Ocean
- Create docker-with-ubuntu in One-click Applications.
- Install / Update (in root@[IP]):
sudo -s
docker pull ailabstw/go-pttai:latest
HTTPPORT=9774
APIPORT=14779
docker run -e HTTPPORT=${HTTPPORT} -e APIPORT=${APIPORT} -itd –restart=always -p 9487:9487 -p 127.0.0.1:9774:9774 -p 127.0.0.1:14779:14779 -v /home/admin/pttai.docker:/root/.pttai –name go-pttai ailabstw/go-pttai:latest gptt “–testp2p” “–httpdir” “/static” “–httpaddr” “0.0.0.0:9774” “–rpcaddr” “0.0.0.0” “–exthttpaddr” “//localhost:${HTTPPORT}” “–extrpcaddr” “//localhost:${APIPORT}”
- ssh -L 14779:localhost:14779 root@[IP]
- ssh -L 9774:localhost:9774 root@[IP]
- open browser and connect to //localhost:9774
AWS
- Setup Key Pair in AWS ec2 console. (for SSH use)
- Setup Security Group in AWS ec2 console
- Be sure to have port 22, 9487, 9774, 14779 open to 0.0.0.0/0
- Create an ECS cluster with the correpsonding Key Pair and Security Group.
- Install / Update (in ec2-user@[IP]):
sudo -sdocker pull ailabstw/go-pttai:latestHTTPPORT=9774APIPORT=14779docker run -e HTTPPORT=${HTTPPORT} -e APIPORT=${APIPORT} -itd –restart=always -p 9487:9487 -p 127.0.0.1:9774:9774 -p 127.0.0.1:14779:14779 -v /home/admin/pttai.docker:/root/.pttai –name go-pttai ailabstw/go-pttai:latest gptt “–testp2p” “–httpdir” “/static” “–httpaddr” “0.0.0.0:9774” “–rpcaddr” “0.0.0.0” “–exthttpaddr” “//localhost:${HTTPPORT}” “–extrpcaddr” “//localhost:${APIPORT}” - ssh -L 14779:localhost:14779 ec2-user@[IP]
- ssh -L 9774:localhost:9774 ec2-user@[IP]
- open browser and connect to //localhost:9774
AWS Elastic Beanstalk (On-click deploy)
- Setup Key Pair in AWS ec2 console. (for SSH use)
- Please remeber where you save the private key in your computer, you will need it at the last step.
- Click this link
- This will deploy the pre-build p.me docker image for you
- Click choice option Upload your code
- (Note: the code is already uploaded for you, you only have to click this option. This seems to be a bug of AWS.)