diff options
author | Magnus Feuer <mfeuer@jaguarlandrover.com> | 2015-11-22 19:45:30 -0800 |
---|---|---|
committer | Magnus Feuer <mfeuer@jaguarlandrover.com> | 2015-11-22 19:45:30 -0800 |
commit | e79bcd3b8d6a116f38b97825874abf0b7167faf7 (patch) | |
tree | 18301f0d411b02057ed89a6775f5e0aa8e73b691 /priv/config/rvi_backend.config | |
parent | 7932e5903de9ddcb389e585b63e63a831ad1fd35 (diff) | |
download | rvi_core-e79bcd3b8d6a116f38b97825874abf0b7167faf7.tar.gz |
mfeuer-new_scripts: Merged and modified release-0.4.0-yocto_makefile
Diffstat (limited to 'priv/config/rvi_backend.config')
-rw-r--r-- | priv/config/rvi_backend.config | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/priv/config/rvi_backend.config b/priv/config/rvi_backend.config new file mode 100644 index 0000000..4c2ed57 --- /dev/null +++ b/priv/config/rvi_backend.config @@ -0,0 +1,100 @@ +%% -*- erlang -*- + +%% Copyright (C) 2014, Jaguar Land Rover +%% +%% This program is licensed under the terms and conditions of the +%% Mozilla Public License, version 2.0. The full text of the +%% Mozilla Public License is at https://www.mozilla.org/MPL/2.0/ +%% +%% Configuration file for the (in-vehicle) IVI used by the hvac_demo +%% +%% See ../hvac_demo/README.md for details on the demo. +%% +%% See ../CONFIGURE.md for a details on the configuration process +%% itself. +%% + +%% Parameters for simpler modification +Env = fun(V, Def) -> + case os:getenv(V) of + false -> Def; + Str when is_integer(Def) -> list_to_integer(Str); + Str when is_atom(Def) -> list_to_atom(Str); + Str -> Str + end + end. +MyPort = Env("RVI_MYPORT", 8800). +MyIP = Env("RVI_MYIP", "38.129.64.31"). +IPPort = fun(IP, Port) -> + IP ++ ":" ++ integer_to_list(Port) + end. +LogLevel = Env("RVI_LOGLEVEL", notice). + +[ + %% All erlang apps needed to fire up a node. Do not touch. + {include_lib, "rvi_core/priv/config/rvi_common.config"}, + + %% + %% Custom environment settings + %% for all apps running on the node. + %% + {env, + [ + {rvi_core, + [ + + {key_pair, {openssl_pem, "test_keys/insecure_device_key_priv.pem"}}, + {provisioning_key, "test_keys/insecure_root_key_pub.pem"}, + {authorize_jwt, "test_keys/insecure_device_key_pub_sign.jwt"}, + {cert_dir, "test_certs"}, + + { node_address, IPPort(MyIP, MyPort+7) }, + + { node_service_prefix, "jlr.com/backend"}, + + { routing_rules, + [ + { "", + [ + { proto_json_rpc, dlink_tcp_rpc} + ] + } + ] + }, + { components, + [ + {service_edge, + [ + %% Service_edge_rpc component is used as a gen_server + { service_edge_rpc, gen_server, + [ + { json_rpc_address, { MyIP, MyPort+1 } }, + { websocket, [ { port, MyPort+8}]} + ] + } + ] + }, + { rvi_common, [{ rvi_log, gen_server, [{json_rpc_address, MyPort+9}]}]}, + { service_discovery, [ { service_discovery_rpc, gen_server, [] } ] }, + { schedule, [ { schedule_rpc, gen_server, [] } ] }, + { authorize, [ { authorize_rpc, gen_server, [] } ] }, + { protocol, [ { proto_json_rpc, gen_server, [] } ] }, + { data_link, + [ + { dlink_tcp_rpc, gen_server, + [ + { server_opts, [ { port, MyPort + 7 }]} + ] + }, + { dlink_tls_rpc, gen_server, + [ + { server_opts, [ {port, MyPort + 10} ]} + ] + } + ] + } + ] + } + ]} + ]} +]. |