Mainflux.mainflux/provision
Mirko Teodorovic bf189fbd23
NOISSUE - Update provision service (#1133)
* Add provision service

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* delete sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add provision file

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add provision

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add provision

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix envs

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix vendor

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* deleete LICENSE

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix modules

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix modules

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix modules

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* refactoring provison service

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* provision

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix test, and use sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* remove bootstrap mock

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* implement channel

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* export errors

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix test

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix tests

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix comments

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix tests

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add new line

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* remove docker-compse

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add new line

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix load config

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix load config

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* move certs to sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* move certs to sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* move certs to sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* move certs to sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* change dflt file

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix content

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* cert sdk

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix bootstraping

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix errors

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* update swagger

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix mproxy mod

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix test

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix test

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix linter messages

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix linter errors

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* upd vendor

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* upd vendor

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* remove dead code

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add some space for readability

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* remov thingids

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* revert readme

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix logging

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* use snake_case

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix var naming

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix signature

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* aling with defaults

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix logging info

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix logging

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* fix tag

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-04-29 00:39:23 +02:00
..
api NOISSUE - Update provision service (#1133) 2020-04-29 00:39:23 +02:00
configs NOISSUE - Update provision service (#1133) 2020-04-29 00:39:23 +02:00
docker NOISSUE - Update provision service (#1133) 2020-04-29 00:39:23 +02:00
mocks NOISSUE - Update provision service (#1133) 2020-04-29 00:39:23 +02:00
README.md MF-1123 - Move Provision service to monorepo (#1132) 2020-04-21 16:05:11 +02:00
config.go NOISSUE - Update provision service (#1133) 2020-04-29 00:39:23 +02:00
docs.go MF-1123 - Move Provision service to monorepo (#1132) 2020-04-21 16:05:11 +02:00
service.go NOISSUE - Update provision service (#1133) 2020-04-29 00:39:23 +02:00
service_test.go NOISSUE - Update provision service (#1133) 2020-04-29 00:39:23 +02:00
swagger.yml NOISSUE - Update provision service (#1133) 2020-04-29 00:39:23 +02:00

README.md

PROVISION service

PROVISION service provides an HTTP API to interact with Mainflux.

Configuration

The service is configured using the environment variables presented in the following table. Note that any unset variables will be replaced with their default values.

Variable Description Default
MF_USER User (email) for accessing Mainflux user@example.com
MF_PASS Mainflux password user123
MF_PROVISION_HTTP_PORT Provision service listening port 8091
MF_ENV_CLIENTS_TLS Mainflux SDK TLS verification false
MF_PROVISION_CA_CERTS Mainflux gRPC secure certs ""
MF_PROVISION_SERVER_CERT Mainflux gRPC secure server cert ""
MF_PROVISION_SERVER_KEY Mainflux gRPC secure server key ""
MF_PROVISION_SERVER_KEY Mainflux gRPC secure server key ""
MF_MQTT_URL Mainflux MQTT adapter URL "http://localhost:1883"
MF_USERS_LOCATION Users service URL "http://locahost"
MF_THINGS_LOCATION Things service URL "http://localhost"
MF_PROVISION_LOG_LEVEL Service log level "http://localhost"
MF_PROVISION_HTTP_PORT Service listening port "8091"
MF_USER Mainflux user username "test@example.com"
MF_PASS Mainflux user password "password"
MF_BS_SVC_URL Mainflux Bootstrap service URL http://localhost/things/configs"
MF_BS_SVC_WHITELISTE_URL Mainflux Bootstrap service whitelist URL "http://localhost/things/state"
MF_CERTS_SVC_URL Certificats service URL "http://localhost/certs"
MF_X509_PROVISIONING Should X509 client cert be provisioned "false"
MF_BS_CONFIG_PROVISIONING Should thing config be saved in Bootstrap service "true"
MF_BS_AUTO_WHITEIST Should thing be auto whitelisted "true"
MF_BS_CONTENT Bootstrap service content "{}"

Example

curl -X POST \
  http://localhost:8091/mapping\
  -H 'Content-Type: application/json' \
  -d '{ "externalid" : "02:42:fE:65:CB:3d", "externalkey: "key12345678" }'