6.1.6 OS Setup and initialization

The information presented here and below is focused on installing the Ubuntu operating system and then downloading the DGT source files from GitHub. In case of other parameters, use the necessary clarifications or get advice from partnership@dgt.world.

  • Download an operating system image, such as Ubuntu 20.04.3.

  • Prepare the server for booting or create a stub for the virtual machine (see the manual for VirtualBox or VMWare). Check the minimum system requirements – see above.

  • Install the operating system using the proper user guide. For example, the official guide is recommended for Ubuntu. Enter the required , e.g. login: dgt, password: matagami2022.

  • For the Linux system, install additionally:

    o Open SSH (read more here)

    o Midnight Commander (optional, see here)

    o Python 3.9 or above (see here)

    o SFTP/FTP for enabling remote access to server files (see here)

6.1.6.1 Docker Installation

Whether you are downloading files directly from GitHub or using prepared installation files, the most convenient way to assemble the node is to use Docker, a deployment automation and container management software. The following is a sequence of steps to install the Docker container management tool for the Docker operating system.

  • Update: sudo apt update

  • Install auxiliary utilities:

    o apt-transport-https — activates the transfer of files and data through https.

    o ca-certificates — enables verification of security certificates.

    o curl — utility for accessing web resources.

    o software-properties-common —activates the ability to use scripts to manage software.

sudo apt install apt-transport-https ca-certificates curl software-properties-common
  • Add a GPG key to operate with the official Docker repository:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  • Add the Docker repository into the local list of repositories:

sudo add-apt-repository "deb [arch=amd64] 
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  • Re-update the data on operating system’s packages:

sudo apt update
  • Install the Docker package itself:

sudo apt install docker-ce -y
  • Initialize the Docker daemon and add it to startup:

sudo systemctl start docker
sudo systemctl enable docker

More information is available in the official Docker guide.

6.1.6.2 Setup Docker Compose

It is not recommended to use a version of Docker Compose other than 1.21.1 for this version of DGT

Docker Compose is a tool for describing and running multi-container Docker applications. The tool allows users to start, execute, communicate, and close containers with a single command.

  • We download the Docker Compose assembly directly from the GitHub repository with the required versions and options:

o -L allows redirects if the file is moved.

o -o modifies the file name to make it easier to run and specifies the directory to save.

sudo curl -L 
"https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Installation options:

o Specify a different version, for example, “1.28.6” instead of “1.23.1”

o Install from repository: sudo apt-get install docker-compose

  • After the download is complete, you will need to add execution rights to the downloaded binary file:

sudo chmod +x /usr/local/bin/docker-compose
  • We check the correctness of the Docker Compose operations:

sudo docker–compose –version

6.1.6.3 Post-Installation actions

To support the workability of bath-files, we configure rights and groups:

  • Create a Docker group:

sudo groupadd docker
  • Add the current user to the created group:

sudo usermod -aG docker $USER
  • Activate changes in the group:

newgrp docker
  • We check the ability to run Docker commands for the current user (without sudo):

docker run hello-world
  • In case of running Docker commands before adding a user to a group (which is what happens, if we take the checks into account), an error occurs with incorrect rights to the ~/.docker/. directory.

WARNING: Error loading config file: /home/user/.docker/config.json -
stat /home/user/.docker/config.json: permission denied

To fix this, we will use the following commands:

sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
$ sudo chmod g+rwx "$HOME/.docker" -R
  • Check again:

docker run hello-world

6.1.6.4 Last check before launch

Before proceeding with the installation of the DGT Node, check that you have completed the necessary preparatory steps and that the system requirements are met:

#

Action/Requirements

Complete?

1

You understand the functionality of the DGT platform and understand its positioning – see 1.1

2

You intend to use DGT for purposes consistent with the DGT Code of Conduct (see 8.4)

3

You have access to the official GitHub DGT repository; you read and understand the Apache 2.0 license requirements for the DGT CORE configuration and AGPL 3.0 for configuring GARANASKA (see also 1.5)

4

The target system meets the minimum requirements (CPU, HDD, RAM, Network Access) specified in 6.1.5.1

5

If a premade virtual machine image is used, the corresponding archive has a checksum that matches this guide (see 6.1.3)

6

You have full access to the server, including administrative rights

7

Docker container manager and Docker Compose are installed on your operating system and the necessary settings have been implemented (see 6.1.6.1 – 6.1.6.3)

Last updated