Skip to content

Latest commit

 

History

History
91 lines (61 loc) · 2.46 KB

INSTALL.sentry.rst

File metadata and controls

91 lines (61 loc) · 2.46 KB

Deploy

This file describes how to deploy and setup a Sentry instance.

Description is based on https://github.com/getsentry/self-hosted

  1. Provision at least 4Gb RAM and 40Gb disk Ubuntu Server 20.04 virtual machine.

  2. Create DNS A record for sentry.blockchain.thenewboston.com to point to the virtual machine IP-address

  3. Login to the virtual machine console:

    ssh ubuntu@sentry.blockchain.thenewboston.com  # for AWS EC2 instance
    
  4. Add 16G swapfile:

    # Allocate swap space
    sudo -i
    fallocate -l 16G /swapfile
    chmod 600 /swapfile
    mkswap /swapfile
    
    # Turn on swap file
    swapon /swapfile
    nano /etc/fstab
    # Add the following line
    # /swapfile swap swap defaults 0 0
    
    # Correcting swappiness
    sysctl vm.swappiness=10
    nano /etc/sysctl.conf
    # Add the following line
    # vm.swappiness=10
    
    reboot
    
    # Validate new settings
    swapon --show
    cat /proc/sys/vm/swappiness
    
  5. Install prerequisites:

    sudo -i
    apt-get update
    apt-get install git nginx
    
  6. Install Docker according to https://docs.docker.com/engine/install/ubuntu/ (known working: Docker version 20.10.12, build e91ed57)

  7. Install Docker Compose according to https://docs.docker.com/compose/install/ (known working: docker-compose version 1.29.2, build 5becea4c)

  8. Get the repository:

    sudo -i
    git clone https://github.com/getsentry/self-hosted.git
    cd self-hosted
    git checkout 22.2.0
    
  9. Prepare configuration:

    # Copy `sentry.env.custom` from this repository
    scp node/config/settings/templates/sentry.env.custom ubuntu@sentry.blockchain.thenewboston.com:./self-hosted/.env.custom
    
  10. Run installation:

    ./install.sh
    
  11. Configure nginx:

    rm /etc/nginx/sites-enabled/default
    
    # Copy `sentry.nginx.conf` from this repository
    scp node/config/settings/templates/sentry.nginx.conf ubuntu@sentry.blockchain.thenewboston.com:/etc/nginx/sites-available/sentry.conf
    
    ln -s /etc/nginx/sites-available/sentry.conf /etc/nginx/sites-enabled/sentry.conf && \
    service nginx restart
    
  12. Install and run certbot as described at https://certbot.eff.org/instructions?ws=nginx&os=ubuntufocal (Use "get and install your certificates" option)

  13. Restart nginx:

    service nginx restart
    
  14. Run Sentry:

    sudo -i
    docker-compose --env-file /root/self-hosted/.env.custom up -d
    
  15. Check that Sentry is available at https://sentry.blockchain.thenewboston.com

  16. Configure on "Welcome to Sentry" (keep defaults)