Sign inSign up

iotitude/baasbox-data

By iotitude

•Updated about 10 years ago

BaasBox Data

Image
0

936

iotitude/baasbox-data repository overview

⁠BaasBox

BaasBox⁠ back-end for the IoTCity service. The version used in this project was 0.9.5.

The back-end provided a common back-end for many of the key services of the project. Instapp, Portal, AdminKaMU, KaMU and SDNcontroller all used the same back-end. Main purpose of the BaasBox back-end was to have a single place for KaMU information and user data.

Installation⁠
How it was setup⁠
 Collections⁠
 Users⁠
 Roles⁠
 Plugins⁠
 Metering unit JSON format⁠
Docker⁠

⁠Installation

  • Download your BaasBox zip file from the official site.
  • Unzip
  • Run the start.sh script

⁠How it was setup

The data was stored on BaasBox and it's noSQL OrientDB. The data was split into collections and documents. The storage format was JSON.

⁠Collections
CollectionDescriptionPermissions
MasterHolds all KaMU information of a cityAdminKaMU: RW, Office Installer: RW
AdminHolds a list of AdminKaMU hashesKaMU: R
TaskListField Installer specific task listOffice Installer: RW, Field Installer: R
ProfileA collection of available profilesOffice Installer: RW
VersionA collection of available versionsOffice Installer: RW

These collections were implemented discluding the TaskList.

⁠Users
UserDescriptionPermissions
KaMUCommon user for metering unitsAdminHash: read
AdminKaMUAdmin software for controlling KaMUsMaster: read/write
Office InstallerMaster: read/write, TaskList(s), read/write (create)
Field InstallerTaskList: read

It was planned that these users could be present in the prototype. In this proof of concept implementation the default admin user was used throughout.

⁠Roles

Roles could have been the same as users. Different roles were not implemented during this project.

⁠Plugins

Plugins were used to further expand the capabilities of BaasBox and to provide special functionality for out project. For further information look in to the plugins folder.

⁠Metering unit JSON format
{
  "mac": "the-mac-address",
  "hash": "hash-for-kaa",
  "installer": "name-of-installer",
  "installationDate": "date-of-installation",
  "address": "location-of-installation",
  "location": {
    "long": "longitude",
    "lat": "latitude"
  },
  "sensorHeight": 0,
  "enabled": false,
  "status": 1,
  "swVersion": "version-of-current-software",
  "sensors": [],
  "activeProfile": "profile"
}
  • sensor-height in millimeters. Entered on installation.
  • enabled was the metering unit enabled for reading
  • status metering unit status; running, battery low, etc...
  • sensors list of sensors used by the KaMU

⁠Docker

The dockerfiles in the repo provided a dockerized version of the BaasBox service. Main image was for running the service while a separate data container made it possible to persist the data if the main service was shutdown. They were added to the Docker Hub with automatic building:

BaasBox was setup on Rancher with the commands in the docker-compose.yml file.

Tag summary

Content type

Image

Digest

Size

49 MB

Last updated

about 10 years ago

docker pull iotitude/baasbox-data