How to Install Ralph Asset Management System on Ubuntu 20.04

Ralph is a free, open-source, simple and powerful Asset Management, DCIM and CMDB system for data center and back office. It is built on top of Django, Python3 and used to keep track of assets purchases and their life cycle. It comes with a user-friendly web interface and allows you to generate flexible and accurate cost reports.

In this tutorial, we will show you how to install Ralph Asset Management System with Docker on Ubuntu 20.04.

Prerequisites

  • A server running Ubuntu 20.04.
  • A root password is set up on your server.

Getting Started

Before starting, it is a good idea to update your system's package to the latest version. You can update them using the following command:

apt-get update -y
apt-get upgrade -y

Once all the packages are updated, restart your system to apply the changes.

Install Docker and Docker Compose

By default, the latest version of the Docker and Docker Compose is available in the Ubuntu 20.04 server default repository. You can install them by running the following command:

apt-get install docker.io docker-compose -y

After installing both packages, start the Docker service and enable it to start after system reboot with the following command:

systemctl start docker
systemctl enable docker

Next, verify the status of the Docker using the following command:

systemctl status docker

You should get the following output:

? docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
     Active: active (running) since Wed 2020-04-29 08:06:11 UTC; 6s ago
TriggeredBy: ? docker.socket
       Docs: https://docs.docker.com
   Main PID: 3371 (dockerd)
      Tasks: 10
     Memory: 36.0M
     CGroup: /system.slice/docker.service
             ??3371 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.552343504Z" level=warning msg="Your kernel does not support swap memory limi>
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.552406263Z" level=warning msg="Your kernel does not support cgroup blkio wei>
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.552423110Z" level=warning msg="Your kernel does not support cgroup blkio wei>
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.552769597Z" level=info msg="Loading containers: start."
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.710947740Z" level=info msg="Default bridge (docker0) is assigned with an IP >
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.793048851Z" level=info msg="Loading containers: done."
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.819265563Z" level=info msg="Docker daemon" commit=afacb8b7f0 graphdriver(s)=>
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.819655292Z" level=info msg="Daemon has completed initialization"
Apr 29 08:06:11 ubuntu20 systemd[1]: Started Docker Application Container Engine.
Apr 29 08:06:11 ubuntu20 dockerd[3371]: time="2020-04-29T08:06:11.874074016Z" level=info msg="API listen on /run/docker.sock"
lines 1-21/21 (END)

Next, check the installed version of the Docker using the command below:

docker -v

You should get the following output:

Docker version 19.03.8, build afacb8b7f0

Next, check the version of the Docker-compose using the following command:

docker-compose -v

You should get the following output:

docker-compose version 1.25.0, build unknown

Install Ralph with Docker

First, install the git package with the following command:

apt-get install git -y

Next, download the latest version of the Ralph from the Git repository using the following command:

git clone https://github.com/allegro/ralph.git

Once downloaded, change the directory to ralph/docker and initialize the Ralph with the following command:

cd ralph/docker
docker-compose run web init

Next, download and build the container for Ralph using the following command:

docker-compose up -d

Once all the containers are downloaded, you can check the running containers with the following command:

docker ps

You should see the following output:

CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                     NAMES
6d99415b9569        allegro/ralph:latest                "/var/local/ralph/do…"   40 seconds ago      Up 38 seconds       0.0.0.0:32771->8000/tcp   docker_web_1
fcede6c8a3d3        allegro/inkpy:latest                "/bin/sh -c 'supervi…"   40 seconds ago      Up 38 seconds                                 docker_inkpy_1
c93bf3a397d5        redis:3.0                           "docker-entrypoint.s…"   6 minutes ago       Up 6 minutes        0.0.0.0:32770->6379/tcp   docker_redis_1
ac4f4c278443        mysql:5.7                           "docker-entrypoint.s…"   6 minutes ago       Up 6 minutes        3306/tcp, 33060/tcp       docker_db_1
b0e6a7beeb61        allegro/ralph-static-nginx:latest   "nginx -g 'daemon of…"   6 minutes ago       Up 3 seconds        0.0.0.0:80->80/tcp        docker_nginx_1

You can also check the ports of the all running container with the following command:

docker-compose ps

You should see the following output:

     Name                   Command               State            Ports         
---------------------------------------------------------------------------------
docker_db_1      docker-entrypoint.sh mysql ...   Up      3306/tcp, 33060/tcp    
docker_inkpy_1   /bin/sh -c supervisord -n        Up                             
docker_nginx_1   nginx -g daemon off;             Up      0.0.0.0:80->80/tcp     
docker_redis_1   docker-entrypoint.sh redis ...   Up      0.0.0.0:32770->6379/tcp
docker_web_1     /var/local/ralph/docker-en ...   Up      0.0.0.0:32771->8000/tcp

Access Ralph Web Interface

Now, open your web browser and type the URL http://your-server-ip. You should see the Ralph login page:

Asset management Login

Provide the default username as ralph and password as ralph, and click on the Log in button. You should see the Ralph default dashboard in the following page:

Ralph Asset Management

Conclusion

Congratulations! you have successfully installed Ralph Asset Management System with Docker on Ubuntu 20.04. You can now easily manage your IT Asset from the central location. Feel free to ask me if you have any questions.

Share this page:

6 Comment(s)