Skip to content

0. Prerequisites

DΓ©nes Csala edited this page Apr 10, 2021 · 10 revisions

Background

The πŸ‡·πŸ‡΄πŸ’ΉπŸ“‰πŸ“Š COVID-19 - Romanian Economic Impact Monitor is built using only open source technologies. You can recreate your own environment by following the instructions below.

  • The development environment has been tested on Ubuntu running on a t2.micro server on AWS. If you are expecting more than 1000 users/min on your site, you will need a t3.medium at least.
  • The dashboard is built as a set of micro-services running in Docker. The environment should work the same way on Windows, Linux and Mac, provided that your Docker is set up correctly.
  • You will need a terminal - not an issue for Mac/Linux. Under Windows preferably use a PowerShell or even better, a WSL Ubuntu. If working with a cloud server under Windows, I suggest using SmarTTY.

Hosting

Unless you are just testing everything locally on your localhost, this project will require access to a DNS. I used GitHub pages routed through Cloudflare. Through the project setup tutorial, I will use myserv.er consistently as the demo domain. Replace this with yours. On the DNS settings of your registry you will need to set up 4 A type entries pointing to the IP address of your server:

  • grafana.myserv.er - or, if this is your main page, just myserv.er
  • jupyter.myserv.er
  • html.myserv.er
  • monitor.myserv.er

You will also need ports 22 (for SSH), 80 (for HTTP) and 443 (for HTTPS) open on your server.

Docker

To set up docker on a freshly started Ubuntu on AWS, follow these steps:

AWS Ubuntu user: `ubuntu`  

sudo bash
 
apt-get update
 
apt-get upgrade
 
apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
 
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
 
add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
   
apt-get update
 
apt-get install docker-ce docker-ce-cli containerd.io
 
docker run hello-world
 
docker ps

apt-get install docker-compose

For an AMI Linux image running a CentOS flavor, try these steps instead:

AWS AMI Linux user: `ec2-user`  

yum install git  
  
sudo yum install -y yum-utils  
  
sudo yum install -y docker  
  
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose  
  
systemctl enable docker  

πŸŽ‰ Congratulations! You're ready. πŸ‘‰ Continue by configuring the necessary 1. Services.

Clone this wiki locally