You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

This is the configuration files for the OD routing API and Consul service discovery App. Both are utilized for the correct routing of requests for ODIS.

Example of the Consul(ConsulAgent) configuration file.


Consul configuration conf.json
{"datacenter":"od-InterfacesServer","data_dir":"E:\\consulAgent\\Data","log_level":"INFO","node_name":"127.0.0.1","server":true,"bind_addr":"127.0.0.1","connect":{"enabled":true},"services":[{"id":"ODIS_DMS2DSW","name":"ODISDms2Dsw","tags":["primary"],"address":"127.0.0.1","port":50100},{"id":"ODIS_DSW2DMS","name":"ODISDsw2Dms","tags":["primary"],"address":"127.0.0.1","port":50120},{"id":"ODSimpleOath","name":"ODISSimpleOath","tags":["primary"],"address":"127.0.0.1","port":50200}],"dns_config":{"allow_stale":false,"service_ttl":{"*":"0s"},"node_ttl":"0s"},"ui_config":{"content_path":"/ui/","enabled":true},"acl":{"enabled":false,"default_policy":"deny","enable_token_persistence":true}}


Ocelot configuration file example:

Ocelot routing
{"GlobalConfiguration":{"ServiceDiscoveryProvider":{"Host":"127.0.0.1","Port":8500,"Type":"Consul"},"RequestIdKey":"Request-Id","BaseUrl":"http://127.0.0.1:9000"},"Routes":[{"DownstreamPathTemplate":"/api/integrations/odil/onedealer/{everything}","DownstreamScheme":"http","ServiceName":"ODISDsw2Dms","LoadBalancerOptions":{"Type":"RoundRobin"},"UpstreamPathTemplate":"/api/integrations/odil/onedealer/{everything}","SwaggerKey":"ODIS_Dsw2Dms"},{"DownstreamPathTemplate":"/api/integrations/odil/dms/{everything}","DownstreamScheme":"http","ServiceName":"ODISDms2Dsw","LoadBalancerOptions":{"Type":"RoundRobin"},"UpstreamPathTemplate":"/api/integrations/odil/dms/{everything}","SwaggerKey":"ODIS_Dms2Dsw"},{"DownstreamPathTemplate":"/api/session/create","DownstreamScheme":"http","ServiceName":"ODISSimpleOath","LoadBalancerOptions":{"Type":"RoundRobin"},"UpstreamPathTemplate":"/api/session/create"},{"DownstreamPathTemplate":"/{everything}/oauth2/v2.0/token","DownstreamScheme":"http","ServiceName":"ODISSimpleOath","LoadBalancerOptions":{"Type":"RoundRobin"},"UpstreamPathTemplate":"/{everything}/oauth2/v2.0/token"}]}




  • No labels