EC2 Instances

Datalogz runs on EC2 Instances inside Docker Containers for a simple, cost-effective deployment that can be scaled vertically as demand increases.

EC2 System Requirements

Option 1: Monolith VM supporting backend and frontend services

  • Minimum

    • CPU: 2 vCPU

    • Memory: 8 GB RAM

    • OS Disk: 50 GB

    Estimated Cost as of 2/1/2023: $80 / mo.

  • Recommended

    • CPU: 4 vCPU

    • Memory: 16 GB RAM

    • OS Disk: 50 GB

    Estimated Cost as of 2/1/2023: $160 / mo.

Total Estimated Cost: $80 - $160 / mo.

Option 2: Split VM each supporting either frontend or backend service

  • Backend VM

    • Minimum

      • CPU: 2 vCPU

      • Memory: 8 GB RAM

      • OS Disk: 50 GB

      Estimated Cost as of 2/1/2023: $80 / mo.

    • Recommended

      • CPU: 4 vCPU

      • Memory: 16 GB RAM

      • OS Disk: No changes required

      Estimated Cost as of 2/1/2023: $160 / mo.

  • Frontend VM

    • Minimum / Recommended

      • CPU: 2 vCPU

      • Memory: 4 GB RAM

      • OS Disk: No change

      • Estimated Cost as of 2/1/2023: $40 / mo.

Total Estimated Cost: $120 - $200 / mo.

Provisioning

  1. Go to the EC2 section

  2. Click on Launch Instance

  3. Name your EC2

  4. Select Ubuntu as Amazon Machine Image

  5. Select instance type t2.xlarge

  6. Generate a key pair for SSH into the EC2

  7. Expand Networking settings

  8. Select the VPC that we created in the VPC deployment Guide

  9. Select any of the 2 subnets that we created in the Subnet Deployment Guide

  10. Click Auto Assign public IP and click Enable

  11. Under the Firewall (security groups), select "Select Existing Security group"

  12. From the drop-down, select the security group that we created in the Security Group section

  13. Next, configure the storage to at least 50 GiB

  14. Click Advanced details

  15. Select the IAM role that we created in the IAM Roles section

  16. Leave the rest as default

  17. Click Launch Instance

The security group inbound rules on this machine should allow HTTP/HTTPS traffic from your private network IP so your users can access the site. The security group outbound rules on this machine should allow HTTPS traffic from your network IP so the Gateway API Service can make HTTPS connections to 3rd party services, such as Microsoft for running the OAuth2.0.

The security group inbound rules on this machine should allow SSH traffic from your private team's IP so your team can remotely log in and deploy the builds.

SSH into VM

Set the correct permissions on your SSH key pair before connecting to the virtual machine, updating the following variables with your key name, user name, and VM IP address.

sudo chmod 400 <private_key>.pem
ssh -i <private_key>.pem <admin_username>@<hostname>

SSH into the VM to install Docker and clone the repositories. Example: ssh -i "ec2_bi-monolith_testing_us-east-1_001.pem" ubuntu@ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com

Run an update

Ubuntu: sudo apt update

Installing Docker

Both the Datalogz frontend and backend applications are deployed using Docker.

Install Docker Desktop (Windows and Linux)

Please continue with the Docker Desktop installation referencing the official docs.

Ubuntu: https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository

Installing Git

  1. Download and install Git (Link)

    1. Ubuntu: apt-get install git

  2. Set up credential store by running the command in a Command Prompt: git config --global credential.helper 'store'

  3. The next time you run git pull on a remote origin and sign-in, your credentials will be cached for future reuse.

SSL Certificates

Deploying a Datalogz Proof-of-Concept (POC) will use self-signed keys generated during the build process to enable encrypted communications over HTTPS, and you will access your VM either using the Public IP Address of the VM or an Azure-provided DNS ending in *.cloudapp.azure.com. For example:

Monolith VM

  • https://x.x.x.x OR https://mono-mycomanywin11.eastus2.cloudapp.azure.com

Split VM

  • https://x.x.x.x OR https://app-mycomanywin11.eastus2.cloudapp.azure.com

  • https://x.x.x.y OR https://api-mycomanywin11.eastus2.cloudapp.azure.com

Deploying Datalogz into Production (PROD) enables you to provide your own Certificates for deploying Datalogz to new subdomains on an existing domain. For example:

Monolith VM

  1. https://app.datalogz.mycompany.com

Split VM

  1. https://app.datalogz.mycompany.com

  2. https://api.datalogz.mycompany.com

Last updated