Launching Apache DevLake (Incubating) on an AWS instance

SHUBHAM GUPTA
4 min readJul 24, 2022
Merico

In this blog, we would discuss how to launch Apache Devlake ( Incubating ) on an AWS instance. We would be using a PUTTY for ( Windows ) and OPEN-SSH ( Linux ) for setting up the SSH connection from your local machine to the AWS server. The blog will be divided into 4 sessions you can jump directly on the step if you have configured it previously.

Prerequisite:

  1. AWS account — Create an account
  2. Download PUTTY ( Windows ) or OPEN-SSH ( Linux )
  3. Good internet Connection

Launching an AWS instance

Follow the steps given below to launch a free tire of AWS Linux.

Step 1: Click on the ec2-dashboard then Launch Instance a prompt would be opened like

AWS Launch Instance

Step 2: You can set up the name of your choice, for eg. I am choosing devlake-server and the Kernel 4.14 Amazon Linux 2 and the default architecture of x86–64.

Step 3: Choose the Instance Type t2.Micro which is free tier eligible.

Step 4: Click on Create new Key pair and create a private key which would be used by your client to set up an SSH connection. Download the .pem file if you are a Linux user and the .ppk file if you are on Windows.

Create Key Pair

Step 5: Keep the Network Setting to the Default ( we would configure it later in this blog) and click on launch instance to make sure the number of instances is one. In a few minutes, the ec2 instance would be up and running.

Setting up an SSH connection :

Windows User :

  1. Copy the Public IP address of the ec2-instance
  2. Open up PUTTY and paste the IP into the Host Name (IP address Column)
putty

3. Click the SSH > auth and locate the .ppk Private keys which you have saved and Click on open. A prompt will be opened up accept it and Log in as an ec2-user.

Linux User :

  1. OPEN-SSH come pre-installed on the Linux type ssh into the terminal if something like this appears that your OPEN-SSH was already installed. If nothing happens use Sudo apt-get install openSSH-client
ssh terminal

2. Setting up SSH on Linux is pretty simplified. Use this format ssh -i “[Your Private key]” [ Your Public DNS ] e.g. [ ssh -i “devlake.pem” ec2-user@ec2–3–108–228–148.ap-south-1.compute.amazonaws.com ]

Note: To ensure your key is not publicly viewable use chmod 400 [private key] e.g. chmod 400 devlake.pem

Congratulation you have successfully created an SSH connection.

Installing DevLake on the ec2- Instance

Prerequisites are Docker and Docker-Compose.

Step 1. Become a super user sudo su and run yum install docker All the dependencies of docker would be installed and configured.

Step 2: Install docker-compose using [sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose] and
[sudo chmod +x /usr/local/bin/docker-compose]

Step 3: Now Install docker-compose.yaml and env.example from release-page. Rename env.example to .env use [mv env.example .env]

Configure the Inbound Rule of AWS

Before starting all containers you need to allow traffic to pass through the specific ports used by the Config-UI and Grafana Dashboard. You will find the Inbound rule inside the Security Groups.

Select the Inbound rule and Add a rule that allows all traffic from any source and save the rule. This will allow all the traffic to pass.

Note: You have to Change the connecting port of Config-UI in docker-compose.yaml from 127.0.0.1:4000:80 to 0.0.0.0:4000:80.

Now you can run the container using docker-compose up -d all the four containers would be up and running. You can access the Config-UI using [Your Public IP]:4000 and Grafana Dashboard using [Your Public IP]:3002.

Up and Running Config-UI.

--

--

SHUBHAM GUPTA

Junior Developer Evangelist @ Apache DevLake ( Incubating )