# Wirepas Provisioning Server
## Introduction
This is the reference implemantation of the Wirepas provisioning server. It provides an example of the server side of Wirepas
Provisioning Protocol. It must be used with the _provisioning_joining_node_ application of the SDK. Please refer to the
provisioning reference manual for further information.
## Installation
### Host dependencies
The main requirements of Provisioning Server are:
- Python 3.7
- Pip3 (we recommend the latest available)
### Installing from PyPi
The Provisioning Server is available from [PyPi](https://pypi.org/project/wirepas-provisioning/) and you can install the
latest stable version with:
```shell
pip3 install wirepas-provisioning
```
If you wish to install a particular version please see the release history from PyPi.
### Installing from Github
First of all, make sure to clone the repository using the https address.
Checkout the [git tag that corresponds to the release version](https://github.com/wirepas/wm-provisioning/releases) you want
to install and install the package with:
```shell
pip3 install .
```
If you want to develop or patch a bug under your local environment, you can install the package in development mode through:
```shell
pip3 install -e .
```
When installed in development mode, changes to the source files will be immediately visible.
## Usage
Once installed, the Provisioning Server will be accessible through wm-prov-srv.
It requires few parameters to run:
- The Mqtt broker credentials the server will connect to.
- A configuration file containing a list of nodes authorized to provision and their associated data. An example is available
[here](examples/provisioning_config.yml)
```shell
wm-prov-srv --host my_server.com \
--port 8883 \
--username my_username \
--password my_password \
--config examples/provisioning_config.yml
```
## Building and running over Docker
Docker allows application to run on a sandbox containing all the dependencies needed to run and execute them.
If you are not familiar with Docker, please refer to the official documentation at [docker.com](https://www.docker.com).
### Dockerhub
Provisioning server builds are available from dockerhub under the
[Provisioning server registry](https://hub.docker.com/r/wirepas/provisioning-server).
The latest tag points to the current stable release, whereas the edge tag points to the top of master. The latest tag is built
automatically at dockerhub whenever this repository is tagged. The edge tag is built after each single merge into master.
To pull the Provisioning server image from dockerhub use:
```shell
docker pull wirepas/provisioning-server:latest
docker pull wirepas/provisioning-server:<tag>
```
### Running with docker
As the container will have no access to your local environment, you will have o propagate the input parameters through env
variables and by mounting the _provisioning_config.yml_ file inside the container.
To run it with docker type:
```shell
docker run -v $(pwd)/examples/provisioning_config.yml:/home/wirepas/wm-provisioning/vars/settings.yml \
-e WM_SERVICES_MQTT_HOSTNAME=my_server.com \
-e WM_SERVICES_MQTT_PORT=8883 \
-e WM_SERVICES_MQTT_USERNAME=username \
-e WM_SERVICES_MQTT_PASSWORD=password \
wirepas/provisioning-server
```
### Running with compose
To run the Provisioning Server using docker compose, you will have to modify the [template](docker/docker-compose.yml) file to fit your environment.
Environment must be customized to fit your mqtt broker parameters:
```yml
environment:
WM_SERVICES_MQTT_HOSTNAME: "my_server.com"
WM_SERVICES_MQTT_PORT: "8883"
WM_SERVICES_MQTT_USERNAME: "username"
WM_SERVICES_MQTT_PASSWORD: "password"
```
And the path of the configuration file path must be specified. Example if your config is located in /home/user/provisioning_config.yml
```yml
volumes:
- /home/user/provisioning_config.yml:/home/wirepas/wm-provisioning/vars/settings.yml
```
In the folder where you stored the customized file, please run:
```bash
docker-compose up -d
```
You can see the logs with:
```bash
docker-compose logs
```
And stop the gateway with:
```bash
docker-compose down
```
The tag to use for the provisioning server images can be chosen when invoking the docker-compose (by default it is latest tag).
```bash
PROV_SRV_TAG=edge docker-compose up -d
```
### Building the image locally
To build the image locally in the root of the repo type:
```shell
docker build -f docker/Dockerfile -t provisioning-server .
```
Alternatively you can also build using the docker-compose.yml present in
the root of the directory:
```shell
docker-compose -f docker/docker-compose.yml build
```
## License
Licensed under the Apache License, Version 2.0.
Raw data
{
"_id": null,
"home_page": "https://github.com/wirepas/wm-provisioning",
"name": "wirepas-provisioning",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "wirepas connectivity iot mesh",
"author": "Wirepas Ltd",
"author_email": "opensource@wirepas.com",
"download_url": "https://files.pythonhosted.org/packages/17/fb/d6256eb8143517c23138d178a08fb8a4771e019bf61793f8d2ee8c76f84c/wirepas_provisioning-1.2.tar.gz",
"platform": null,
"description": "# Wirepas Provisioning Server\n\n## Introduction\n\nThis is the reference implemantation of the Wirepas provisioning server. It provides an example of the server side of Wirepas\nProvisioning Protocol. It must be used with the _provisioning_joining_node_ application of the SDK. Please refer to the\nprovisioning reference manual for further information.\n\n## Installation\n\n### Host dependencies\n\nThe main requirements of Provisioning Server are:\n\n- Python 3.7\n- Pip3 (we recommend the latest available)\n\n### Installing from PyPi\n\nThe Provisioning Server is available from [PyPi](https://pypi.org/project/wirepas-provisioning/) and you can install the\nlatest stable version with:\n\n```shell\n pip3 install wirepas-provisioning\n```\n\nIf you wish to install a particular version please see the release history from PyPi.\n\n### Installing from Github\n\nFirst of all, make sure to clone the repository using the https address.\n\nCheckout the [git tag that corresponds to the release version](https://github.com/wirepas/wm-provisioning/releases) you want\nto install and install the package with:\n\n```shell\n pip3 install .\n```\n\nIf you want to develop or patch a bug under your local environment, you can install the package in development mode through:\n\n```shell\n pip3 install -e .\n```\n\nWhen installed in development mode, changes to the source files will be immediately visible.\n\n## Usage\n\nOnce installed, the Provisioning Server will be accessible through wm-prov-srv.\nIt requires few parameters to run:\n - The Mqtt broker credentials the server will connect to.\n - A configuration file containing a list of nodes authorized to provision and their associated data. An example is available\n[here](examples/provisioning_config.yml)\n\n```shell\nwm-prov-srv --host my_server.com \\\n --port 8883 \\\n --username my_username \\\n --password my_password \\\n --config examples/provisioning_config.yml\n```\n\n## Building and running over Docker\n\nDocker allows application to run on a sandbox containing all the dependencies needed to run and execute them.\nIf you are not familiar with Docker, please refer to the official documentation at [docker.com](https://www.docker.com).\n\n### Dockerhub\n\nProvisioning server builds are available from dockerhub under the\n[Provisioning server registry](https://hub.docker.com/r/wirepas/provisioning-server).\n\nThe latest tag points to the current stable release, whereas the edge tag points to the top of master. The latest tag is built\nautomatically at dockerhub whenever this repository is tagged. The edge tag is built after each single merge into master.\n\nTo pull the Provisioning server image from dockerhub use:\n\n```shell\n docker pull wirepas/provisioning-server:latest\n docker pull wirepas/provisioning-server:<tag>\n```\n\n### Running with docker\n\nAs the container will have no access to your local environment, you will have o propagate the input parameters through env\nvariables and by mounting the _provisioning_config.yml_ file inside the container.\n\nTo run it with docker type:\n\n```shell\n docker run -v $(pwd)/examples/provisioning_config.yml:/home/wirepas/wm-provisioning/vars/settings.yml \\\n -e WM_SERVICES_MQTT_HOSTNAME=my_server.com \\\n -e WM_SERVICES_MQTT_PORT=8883 \\\n -e WM_SERVICES_MQTT_USERNAME=username \\\n -e WM_SERVICES_MQTT_PASSWORD=password \\\n wirepas/provisioning-server\n```\n\n### Running with compose\n\nTo run the Provisioning Server using docker compose, you will have to modify the [template](docker/docker-compose.yml) file to fit your environment.\nEnvironment must be customized to fit your mqtt broker parameters:\n\n```yml\nenvironment:\n WM_SERVICES_MQTT_HOSTNAME: \"my_server.com\"\n WM_SERVICES_MQTT_PORT: \"8883\"\n WM_SERVICES_MQTT_USERNAME: \"username\"\n WM_SERVICES_MQTT_PASSWORD: \"password\"\n```\n\nAnd the path of the configuration file path must be specified. Example if your config is located in /home/user/provisioning_config.yml\n\n```yml\nvolumes:\n - /home/user/provisioning_config.yml:/home/wirepas/wm-provisioning/vars/settings.yml\n```\n\n\nIn the folder where you stored the customized file, please run:\n\n```bash\ndocker-compose up -d\n```\nYou can see the logs with:\n\n```bash\ndocker-compose logs\n```\nAnd stop the gateway with:\n\n```bash\ndocker-compose down\n```\n\nThe tag to use for the provisioning server images can be chosen when invoking the docker-compose (by default it is latest tag).\n\n```bash\nPROV_SRV_TAG=edge docker-compose up -d\n```\n\n### Building the image locally\n\nTo build the image locally in the root of the repo type:\n\n```shell\n docker build -f docker/Dockerfile -t provisioning-server .\n```\n\nAlternatively you can also build using the docker-compose.yml present in\nthe root of the directory:\n\n```shell\n docker-compose -f docker/docker-compose.yml build\n```\n\n## License\n\nLicensed under the Apache License, Version 2.0.\n\n",
"bugtrack_url": null,
"license": "Apache-2",
"summary": "Wirepas provisioning server reference implementation.",
"version": "1.2",
"project_urls": {
"Homepage": "https://github.com/wirepas/wm-provisioning"
},
"split_keywords": [
"wirepas",
"connectivity",
"iot",
"mesh"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f41a7e6b16ece297330a6f66634dc3c9ff980478dfc5cb144fc6e253ddae1b9a",
"md5": "403a6d8118453c2d7ed99d7af5619ea2",
"sha256": "1cdb8dba2612d399a66c1abd55baea2c0926eeeeabc33d0266bd67565ad428ae"
},
"downloads": -1,
"filename": "wirepas_provisioning-1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "403a6d8118453c2d7ed99d7af5619ea2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 25400,
"upload_time": "2023-10-06T08:23:08",
"upload_time_iso_8601": "2023-10-06T08:23:08.127894Z",
"url": "https://files.pythonhosted.org/packages/f4/1a/7e6b16ece297330a6f66634dc3c9ff980478dfc5cb144fc6e253ddae1b9a/wirepas_provisioning-1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "17fbd6256eb8143517c23138d178a08fb8a4771e019bf61793f8d2ee8c76f84c",
"md5": "2832b99eafc40f3f269de957f5e19a0d",
"sha256": "e169d8d65e3fbb724ad7b4e2091ff52f95045052469159236117267e21391390"
},
"downloads": -1,
"filename": "wirepas_provisioning-1.2.tar.gz",
"has_sig": false,
"md5_digest": "2832b99eafc40f3f269de957f5e19a0d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 15162,
"upload_time": "2023-10-06T08:23:10",
"upload_time_iso_8601": "2023-10-06T08:23:10.182928Z",
"url": "https://files.pythonhosted.org/packages/17/fb/d6256eb8143517c23138d178a08fb8a4771e019bf61793f8d2ee8c76f84c/wirepas_provisioning-1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-06 08:23:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wirepas",
"github_project": "wm-provisioning",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "wirepas-provisioning"
}