Sign inSign up

resensys/resensys_logger

By resensys

•Updated over 2 years ago

Official image of Resensys database logger application managed by the Resensys team.

Image
Networking
Developer tools
Databases & storage
1

420

resensys/resensys_logger repository overview

Create a self-hosted Resensys microservice in your own cloud using the resensys_logger image. Simply pull the latest version and have a running version of mysql:5.7 image. Connect both to a single bridge network to get a containerized solution to data logging with Resensys sensing technology.

Pulling resensys_logger and mysql Images:

To get started, you will need to pull two images from docker hub to create the self-hosted service.

Run the following commands to pull the Resensys_logger and mysql 5.7 images:

  • docker pull resensys/resensys_logger:v3.1

  • docker pull mysql:5.7

Check that the two images have been installed by running: docker images.

Creating Dedicated Docker Bridge Network:

In order for the logger and MySQL database containers to communicate, you should connect them to the same bridge network.

To create a dedicated docker bridge network for this service run the following command: docker network create --driver=bridge resensys

Now if you list the networks running within docker, you should have a new entry with name “resensys”:docker network ls

We will connect the running containers to this new network in the next step.

Running Docker Containers:

Start a new docker container running the MySQL database using the following command:

docker run -d --name mysql-container --restart always -p 3307:3306 -e MYSQL_ROOT_PASSWORD={SET YOUR ROOT PASSWORD} -e MYSQL_BIND_ADDRESS=0.0.0.0 -e MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password -v $(pwd)/mysql_config.sql:/docker-entrypoint-initdb.d/1.sql -v $(pwd)/mysqlData:/var/lib/mysql --network resensys mysql:5.7

Note: Be sure to name this container “mysql-container” verbatim, or the logger will not properly access and log SenSpot data.

Start the logger container mapping a chosen host port (e.g. 5556) to container port 5555:

docker run -d --name logger-container --restart always -p 5555:5555 -e MYSQL_ROOT_PASSWORD={SET SAME MYSQL ROOT PASSWORD} -e SENSCOPE_USERNAME=senscope_user -e SENSCOPE_PASSWORD=password -e SID=F000 --network resensys resensys/resensys_logger:v3.1*

*Note: In case you want to update MySQL root password, you should update within the MySQL container, then re-run to create a logger container using the command above. Make sure to set the environmental variable MYSQL_ROOT_PASSWORD.

You should now have two containers running named “mysql-container” and “logger-container”: docker ps

Tag summary

Content type

Image

Digest

sha256:4a6242325…

Size

402.4 MB

Last updated

over 2 years ago

docker pull resensys/resensys_logger