Skip to content

wistefan/context-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Context-Server

FIWARE Core Context Management License badge Docker badge NGSI-LD badge Coverage Status Test Known Vulnerabilities

The Context Server provides capabilities to serve and manage NGSI-LD Contexts. It provides multiple options for storage backends to allow environmental flexibility.

The current api can be viewed here: Swagger-UI

Configuration

The only general required configuration is the general.baseUrl. It should be set to the url that ContextServer is available at, in order to be able to build a sufficent link-header on creation and list retrieval. The context URLs will be constructed after the following pattern:

<BASE_URL>/jsonldContexts/<CONTEXT_ID>, f.e. http://context-server.fiware.org/jsonldContexts/myFancyContext.json

Cache control

In order to provide information about context-caching, the maxAge for Cache-Control can be set. It will default to max(1 year) if not configured.

general.maxAge: 31536000

Storage options

Multiple options for storage of the contexts are available. Every instance can only use one storage and multiple instances of distributed context servers can only use one shared backend.

In Memory

⚠️ In memory storage should only be used in single instance setups, since no distribution between multiple instances happens. It does not persist anything.

Enable: memory.enabled: true

Local Disc

⚠️ Local Disc storage should only be used in single instance setups or setups with an underlying (transparently) distributed filesystem, since no distribution between multiple instances happens.

Enable: local.enabled: true

Properties:

Property Env-Var Description Default Required
local.contextFolder LOCAL_CONTEXTFOLDER Local folder for the context's to be stored. ld-contexts true

In order to use Local-Disk storage, the correct read and write permissions need to be set.

GCS

Enable: gcs.enabled: true

Properties:

Property Env-Var Description Default Required
gcs.bucketName GCS_BUCKETNAME Name of the bucket to be used for storage. my-contexts true

In order to enable context storage on GCS, the Google Service Account credentials need to be provided. A service-account json file should be created as described(Google-Doc) and provided with the environment variable GOOGLE_APPLICATION_CREDENTIALS set to the file's path.

FTP

⚠️ This is currently considered to be experimental and not properly tested, yet.

Enable: ftp.enabled: true

Properties:

Property Env-Var Description Default Required
ftp.hostname FTP_HOSTNAME Hostname of the ftp to be used. empty true
ftp.port FTP_PORT Port of the ftp to be used. 21 true
ftp.contextFolder FTP_CONTEXTFOLDER Folder to store the contexts at. /my-contexts true
ftp.secured FTP_SECURED Does the ftp require username/password authentication false true
ftp.username FTP_USERNAME Username to be used for authentication on ftp. user false
ftp.password FTP_PASSWORD Password to be used for authentication on ftp. password false

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published