Skip to content

ScaleCube-Microservices is a higher level reusable Microservices repository built with ScaleCube-Services, it provides the building blocks for setting up a Dockerized Microservice cluster

Notifications You must be signed in to change notification settings

ronenhamias/scalecube-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScaleCube Configuration Service

Build Status Codacy Badge Codacy Badge Join the chat at https://gitter.im/scalecube/Lobby Twitter URL

Web Site: http://scalecube.io

CONFIGURATION SERVICE:


ScaleCube-Configuration Service is a Multi-Tenant configuration service that enables clients to store key, value pairs in collections of data where the value is any json object. it is based on redisson project and redis as persistence storage.

To better understand how the ScaleCube-Configuration service work we first need to understand few concepts:

Account Service:

The account service is responsible to manage users and organizations and the membership of users in organizations.

The Account Service manages and validates api-keys with write or read permission levels. the api-keys are based on jwt tokens.

See: Account Service API

User

Users are registered in scalecube-configuration service after they have completed authentication with google and granted rights to the application. once google replied with token_id it is sent to the account service for registration and verification, once verified client has responded with the user details.

each user has userId provided by the authentication service and it is used to identify the user.

Organization

Once a user is registered it can create organizations and invite other or kickout users to its organization. once a user is invited to an organization it become organization member, organization members might be one of two roles:

  • Owner: owners has rights to manage users membership and delete the organization.
  • Members: have the right to view the organization details only

Configuration Service:

Any request The configuration service requires an api key issued by the Account-Service and the Configuration service validates the request with the account service to understand validity of the access token and the permission level it has to access the apis.

The configuration service manages collections of [Key, Value]. clients of the configuration service can:

  • Get key from collection - requires read-level api key.
  • List all entries from collection - requires read-level api key.
  • save entry in a collection (create or update) - requires write -level api key.
  • Delete key from a collection - requires write -level api key.

Configuration

Configuration entry is a key value pair stored in a collection. in the example bellow is an entry that represent some details about logical environment called 'dev' and where its 'url' entry point. so clients may request from the configuration service the 'url' for their 'dev' environment.

its up to the users to determine what is the collection names, keys and values they wish to store and manage as their configuration.

{
   "collection":"environments",
   "key":"dev",
   "value":{
      "url":"http://localhost:8080"
   }
}

GETTING STARTED:


Running Everything locally:

  • install redis.
  • clone the project
  • run GatewayAll main.
  • open your browser in http://localhost:8080
  • Login to google.
  • check your browser consul to see the interaction with the server.

Running Microservices cluster on Docker:

see wiki page

About

ScaleCube-Microservices is a higher level reusable Microservices repository built with ScaleCube-Services, it provides the building blocks for setting up a Dockerized Microservice cluster

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published