Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save denniswon/7eee536335dc9f3d1f07ff49ae28ae89 to your computer and use it in GitHub Desktop.
Save denniswon/7eee536335dc9f3d1f07ff49ae28ae89 to your computer and use it in GitHub Desktop.
Harmony Block Explorer prod deployment steps
1. Coordinate with lc@harmony.one (Leo Chen) on setting up "Harmony-Dev Role" for your AWS account.
2. Here are ip addresses of explorer services (mainnet vs. testnet) that we run on AWS Oregon region
AWS_EXPLORER=35.167.126.78
AWS_EXPLORER_LRTN=44.232.43.231
3. Find these instances and make sure to add your wifi public ip to the security group so that you can ssh into the machine from your ip.
4. SSH into the machine. ex) ssh -i ~/.ssh/keys/oregon-key-benchmark.pem ec2-user@35.167.126.78
5. Attach to the running tmux session if a session is already running.
6. Frontend: ~/projects/harmony-dashboard
Backend: ~/projects/harmony-dashboard-backend
7. On terminal check ports: you could either run `check_ports` command alias in .bash_profile, or run `sudo lsof -i -P -n | grep LISTEN`
Frontend port: port 2000, Backend port: 8080 for rest api, 8888 for websocket
* Note that on the machine, ip forwarding is on with:
```
sudo iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 2000
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
```
8. Frontend:
on the root of the project repo, run `npm run build` to build, and `npm run start` to start the vue.js app.
* Note: make sure to kill the process running on port 2000 before restarting.
Backend:
on the root of the project repo, run `npm run build` to build, and `npm run start` to start the service.
* Note: make sure to kill the process running on ports 8080 and 8888 before restarting.
8.
@jhd2best
Copy link

jhd2best commented Jun 5, 2020

tmux command prefix change to C-a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment