This document covers usage info on how to run Hubble on your own servers.
- Ruby 2.5+
- Node LTS
- Accessible PostgreSQL database.
- PostMark account for email notifications.
- Rollbar account for exception tracking.
- Fork this repo!
- Generate encrypted secrets with
bin/rails secrets:setup
. Useconfig/encrypted_secrets_quickstart.yml
to see what values are needed for what environments. Storeconfig/secrets.yml.enc
somewhere safe as it won't be committed. - Setup your instance:
This automated process is meant for a Ubuntu 18.04 LTS install. We use AWS for this. Hubble uses HTTPS everywhere, so watch the output for when it asks you to create a DNS record.
export [email protected] export HUBBLE_HOST=ip-or-hostname-of-server export HUBBLE_RAILS_ENV=production export HUBBLE_KEY=~/.ssh/hubble-key.pem export HUBBLE_DOMAIN=hubble.your.domain export HUBBLE_REMOTE_USER=ubuntu ./setup/bootstrap.sh
- Assuming that all goes well, there will be a URL you can visit to claim an admin account and setup a password/2FA.
- In admin, create a new Cosmos chain with the chain name and gaiad RPC/LCD info. Make sure to click 'enable' at the top.
- Next ssh into the machine, start
screen
and do the initial sync:That will take a good long while depending on how long the chain you're syncing has been going for.cd /hubble/app/current bin/rake sync:cosmos:all events:cosmos:all stats:cosmos:all
- Once it's done, you will want to install the crontab entries. You can either run
bin/bundle exec whenever --update-crontab
right now, or just deploy again and they'll get installed automatically.
Use the appropriate generated deploy script if you used our setup scripts:
bin/deploy-{RAILS_ENV}.sh
Or do it manually:
RAILS_ENV=staging DEPLOY_USER=ubuntu DEPLOY_HOST=ip-or-hostname DEPLOY_KEYS=~/.ssh/hubble.pem bin/bundle cap staging deploy