Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

Introduction

The following guide will explain how to install a self contained azeti Engine on an Docker Host. It is a very fast way to get started.

Please note that this way is intended for demonstrations, test and PoC environments. Further steps are required to scale up an installation for hundreds or thousands of sites. Contact our Service Desk for further information.

Prerequisites

ResourceFurther Information
  • Create a free DockerHub account. The software is downloaded from azetis restricted DockerHub repository.
https://hub.docker.com/
  • Request a trial license and access through the azeti Service Desk. You will receive installation files, a license and access.

Please refer to your DockerHub username when requesting the license. This allows azeti to unlock you for the software download.

https://azetinetworks.atlassian.net/servicedesk/customer/portal/1/create/8
  • Installed Docker Host with administrative privileges and internet access.

We recommend Ubuntu LTS 16.04 as OS for Docker.

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
  • Installed docker-compose tool. Required to execute the initialization scripts.
https://docs.docker.com/compose/install/
On this page:



Installation

  1. Ensure that you got docker-compose installed.

    root@ubuntu:~# which docker-compose
    /usr/local/bin/docker-compose
    root@ubuntu:~# docker-compose -v
    docker-compose version 1.7.1, build 0a9ab35
    root@ubuntu:~#
  2. Extract the installation files

    ~/Downloads ❯❯❯ unzip demoStack-1.0.6.zip
      ...
      inflating: demo/init_stack.sh
  3. Execute init_stack.sh and follow the instructions. It will automatically pull the required images and files from the azeti repository and set up the basic system.

    ~/Downloads/demo ❯❯❯ ./init_stack.sh
    For this script to work, you need credentials for the DockerHub and you must have read access to the Azeti Organization!
    Enter DockerHub username and press [ENTER]:

Initial Setup

Organization Setup

  1. Open a web browser at http://<IP Address of Docker Host>
  2. The setup wizard will guide you through the creation of the initial Organization and Super Admin User

    Create a screenshot to memorize the Organization Short Name, Super Admin User and credentials as these are required further on.

WebSocket Configuration

The Web browser of the clients retrieve data through WebSocket protocol. This requires a server side setting matching the IP address of your new azeti Engine.

  1. Login to the Control Panel, e.g. http://192.168.207.210/SSCAdminApp#/login (change URL to match your IP address) as Super Admin (user you've created initially).
  2. Open System Parameters and search for net.azeti.cloud.mqtt.url
  3. Change the parameter to match your Docker Hosts IP address

License Upload

Fresh installations of the azeti Engine come without a valid license and will not allow to add further sites.

  1. To upload a license login as Super Admin
  2. Open License
  3. Click + Add and enter the license key without any trailing or leading white spaces and blanks.
  4. The License Status will change to OK if everything went good

Site Controller Software Upload

This step is optional but recommended. You can do this at a later stage if you don't have the necessary software package at hand. Template validation inside of the Control Panel requires a version of the Site Controller software you'll be using in your environment. It contains the XSD file required for the validation process.

  1. Login as Administrator into the Control Panel
  2. Open Config/Provisioning → Controller Software → Software Packages
  3. Upload the software package, click + Add
  4. The package will be listed after a successful upload.

    You can download the package at any time by clicking the button besides the Version column.

Docker Stack Administration

The azeti Engine stack comes with a collection of administrative scripts which wrap around docker-compose. Change into the demo directory to access the scripts.

azeti@ubuntu:~/demo$ ll
total 48
...
-rwxr-xr-x 1 azeti azeti  101 May 31 17:40 start_stack.sh*
-rwxr-xr-x 1 azeti azeti   99 May 31 17:40 stop_stack.sh*
-rwxr-xr-x 1 azeti azeti  915 May 31 17:40 update_stack.sh*

Starting and Stopping

Use the start and stop script.

azeti@ubuntu:~/demo$ sudo ./stop_stack.sh
Stopping the full stack...
Stopping sscdemo_influxdb_1 ... done
Stopping sscdemo_db_1 ... done

Same for starting it up again.

azeti@ubuntu:~/demo$ sudo ./start_stack.sh
Starting the full stack...
Starting influxdb_data ... done
Starting db_data ... done
Starting db ... done
Starting influxdb ... done
...

Update

You can easily update the full stack with the script, it does a docker-compose pull ... and fetches the latest application builds. Make sure to create backups before hand.

azeti@ubuntu:~/demo$ sudo ./update_stack.sh
Enter DockerHub username and press [ENTER]: 
Enter DockerHub password and press [ENTER]: 
Login Succeeded
Stopping the full stack...
Stopping sscdemo_tomcat_1 ... done
Stopping sscdemo_activemq_1 ... done
Stopping sscdemo_influxdb_1 ... done
Stopping sscdemo_db_1 ... done
Pulling tomcat (azeti/tomcat-data:latest)...
latest: Pulling from azeti/tomcat-data
8b87079b7a06: Already exists
..
Starting sscdemo_db_data_1
...Starting activemq ... done
Starting tomcat ... done

Log Rotation

Docker will not rotate container logfiles automatically. This can cause high disk usages and large amount of log file data. Check with your Docker Administrator if any log rotation is already configured. Below is an easy approach for regular rotation using logrotate

  1. Create a new Logrotate config file in /etc/logrotate.d/docker-container
  2. Enter the below configuration

    var/lib/docker/containers/*/*.log {
      rotate 7
      daily
      compress
      size=1M
      missingok
      delaycompress
      copytruncate
    }
  3. Start logrotate with the new configuration

    logrotate -fv /etc/logrotate.d/docker-container

This article describes the approach further and the above config was found in this good article from Sandro Keil. Read this very good RedHat article for further information on how to identify large docker logs, clear them up and rotate files.

Next Steps

Check out the Knowledge Base Articles in our Service Desk explaining next steps for operation and administration.

  • No labels