Mainflux.mainflux/manager
Dejan Mijic 5d715aa984
Fix 403 errors handling
Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2018-01-26 20:50:31 +01:00
..
api Fix middleware method signature 2017-12-29 10:56:59 +01:00
bcrypt Integrate manager service 2017-09-23 01:03:27 +02:00
cassandra Validate incoming requests 2017-10-01 01:12:06 +02:00
client Fix 403 errors handling 2018-01-26 20:50:31 +01:00
jwt Integrate manager service 2017-09-23 01:03:27 +02:00
mocks Fix manager client implementation 2017-12-29 11:10:31 +01:00
README.md Fix README 2017-11-22 12:51:32 +01:00
channels.go Integrate manager service 2017-09-23 01:03:27 +02:00
clients.go Ensure codestyle adherence 2017-10-06 23:03:24 +02:00
doc.go Integrate manager service 2017-09-23 01:03:27 +02:00
manager.go Implement access check based on the API spec 2017-12-29 10:40:44 +01:00
manager_test.go Implement access check based on the API spec 2017-12-29 10:40:44 +01:00
security.go Integrate manager service 2017-09-23 01:03:27 +02:00
service.go Implement access check based on the API spec 2017-12-29 10:40:44 +01:00
swagger.yaml Update the API documentation of manager service 2017-12-29 10:22:37 +01:00
users.go Ensure codestyle adherence 2017-10-06 23:03:24 +02:00

README.md

Mainflux manager

Mainflux manager provides an HTTP API for managing platform resources: users, devices, applications and channels. Through this API clients are able to do the following actions:

  • register new accounts and obtain access tokens
  • provision new clients (i.e. devices & applications)
  • create new channels
  • "connect" clients into the channels

For in-depth explanation of the aforementioned scenarios, as well as thorough understanding of Mainflux, please check out the official documentation.

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
MANAGER_DB_CLUSTER comma-separated Cassandra contact points 127.0.0.1
MANAGER_DB_KEYSPACE name of the Cassandra keyspace manager
MANAGER_SECRET string used for signing tokens manager

Deployment

Before proceeding to deployment, make sure to check out the Apache Cassandra 3.0.x documentation. Developers are advised to get acquainted with basic architectural concepts, data modeling techniques and deployment strategies.

Prior to deploying the service, make sure to set up the database and create the keyspace that will be used by the service.

The service itself is distributed as Docker container. The following snippet provides a compose file template that can be used to deploy the service container locally:

version: "2"
services:
  manager:
    image: mainflux/manager:[version]
    container_name: [instance name]
    ports:
      - [host machine port]:8180
    environment:
      MANAGER_DB_CLUSTER: [comma-separated Cassandra endpoints]
      MANAGER_DB_KEYSPACE: [name of Cassandra keyspace]
      MANAGER_SECRET: [string used for signing tokens]

To start the service outside of the container, execute the following shell script:

# download the latest version of the service
go get github.com/mainflux/mainflux

cd $GOPATH/src/github.com/mainflux/mainflux/cmd/manager

# compile the app; make sure to set the proper GOOS value
CGO_ENABLED=0 GOOS=[platform identifier] go build -ldflags "-s" -a -installsuffix cgo -o app

# set the environment variables and run the service
MANAGER_DB_CLUSTER=[comma-separated Cassandra endpoints] MANAGER_DB_KEYSPACE=[name of Cassandra keyspace] MANAGER_SECRET=[string used for signing tokens] app

Usage

For more information about service capabilities and its usage, please check out the API documentation.