Platform and services installation

Installing the IIoT Platform — downloading the images, setting up Docker, and installing and verifying the system.

Downloading the installation files

You can download the IIoT Platform installation images in two ways.

When the server has no Internet access — for example, under an enterprise security policy — you can install the platform offline. The installation images are transferred to the server from external media.

Installation steps

  • Copy the required data package

    Copy the installation package to the server (administrator rights are required):

    • Copy the downloaded unicloud.tgz archive and the images folder (the standalone installation package with archived images) to the user’s home folder. The archive also contains the docker-compose.yml and .env configuration files (.env is hidden, so enable showing hidden files).
    • images
      • vadtel-nginx-latest.tar.gz
      • vadtel-app-latest.tar.gz
      • anytelemetry-latest.tar.gz
      • pgbouncer-latest.tar.gz
      • vadteljsondaemon-latest.tar.gz
      • logrotate-latest.tar.gz
      • postgres-15.1-alpine.tar.gz
      • redis-6.0.16-alpine.tar.gz
      • vector-latest.tar.gz
    • Copy the configuration files to /opt/vadtelnewweb/.

    • Set the system logins and passwords in the .env file:

  • Install Docker and Docker Compose

    On a CentOS-based distribution

    Install Docker and Docker Compose:

    bash
    sudo dnf install docker-ce docker-compose

    Start Docker and enable it at boot:

    bash
    sudo systemctl enable --now docker && systemctl start docker

    On a Debian-based distribution

    Install Docker and Docker Compose:

    bash
    sudo apt update
    sudo apt install docker docker-compose
  • Install the system

    The remaining steps are the same on every operating system. Add the user that will run the application to the docker group:

    bash
    sudo usermod -aG docker ${USER}

    Unpack the unicloud.tgz archive in the user’s home folder:

    bash
    tar -xf unicloud.tgz
    • unicloud
      • run
        • db-unicloud
      • remote_install.sh
      • init-db
        • create_tables.sql
      • script_conf.sh
      • docker-compose.yml
      • logs
        • crontab
        • vadteljsondaemon
        • anytelemetry
      • backups
      • data
        • db-unicloud
      • local-images
        • pgbouncer.tar.gz
        • postgres.tar.gz
        • vadteljsondaemon.tar.gz
        • anytelemetry.tar.gz
        • logrotate.tar.gz
      • unicloud.service

    Open the unpacked unicloud folder in the user’s home folder and run the installation script:

    bash
    sudo ./remote_install.sh

    After the package installs, open /var/lib/unicloud with administrator privileges and change the owner and group of the .env file to the current user.

    The script generates the database login and password in /var/lib/unicloud/.env. Copy these values into /opt/vadtelnewweb/.env:

    bash
    VADTEL_UNICLOUD_TEST_USERNAME=NEED_USERNAME
    
    VADTEL_UNICLOUD_TEST_PASSWORD=NEED_PASSWORD
  • Extract and load the images

    Unzip the image files in the previously copied images folder:

    bash
    gunzip vadtel-nginx-latest.tar.gz
    gunzip vadtel-app-latest.tar.gz
    gunzip anytelemetry-latest.tar.gz
    gunzip pgbouncer-latest.tar.gz
    gunzip vadteljsondaemon-latest.tar.gz
    gunzip logrotate-latest.tar.gz
    gunzip postgres-15.1-alpine.tar.gz
    gunzip redis-6.0.16-alpine.tar.gz
    gunzip vector-latest.tar.gz

    Load the images into Docker:

    bash
    docker load -i vadtel-nginx-latest.tar
    docker load -i vadtel-app-latest.tar
    docker load -i anytelemetry-latest.tar
    docker load -i pgbouncer-latest.tar
    docker load -i vadteljsondaemon-latest.tar
    docker load -i logrotate-latest.tar
    docker load -i postgres-15.1-alpine.tar
    docker load -i redis-6.0.16-alpine.tar
    docker load -i vector-latest.tar.gz

    Check that the images are available:

    bash
    docker images

    All nine images you loaded should appear in the list.

    If the images loaded without errors, run the following command from the /var/lib/unicloud folder:

    bash
    docker-compose up -d

    Create a directory for the vadtelnewweb application under /opt:

    bash
    sudo mkdir /opt/vadtelnewweb
    cd /opt/vadtelnewweb

    Then copy the docker-compose.yml and .env files (if you didn’t copy them earlier for a new installation) to /opt/vadtelnewweb.

    On the first run, create the database:

    bash
    docker-compose run app bundle exec rails db:create

    Now start the application:

    bash
    docker-compose up -d
    Troubleshooting

    If the application reports the following error after startup:

    bash
    network unicloud_unicloud-net declared as external, but could not be found

    the external network was not created during installation. Perform the initial installation from the unicloud.tar.tgz archive as described in Install the system, then start the application again:

    bash
    docker-compose up -d

    Check the running containers:

    bash
    docker ps

    All containers should be listed with status Up.

  • Check the system

    After the application starts, open the IP address of the server it runs on in your browser to confirm that the system is up:

    bash
    http://127.0.0.1/auth/users/sign_in
    IIoT Platform sign-in page with email and password fields
    IIoT Platform sign-in page

    The sign-in email and password are set in /opt/vadtelnewweb/.env:

    .env
    VADTEL_SUPER_ADMIN_EMAIL= (login)
    VADTEL_SUPER_ADMIN_PASSWORD= (password)

Next steps

With the platform installed and running, set it up to update cleanly and to restart automatically with the server.

Related topics

Last updated on

Was this page helpful?