9f08f88a0d
Sub PRs: sonic-net/sonic-host-services#84 #17191 Why I did it According to the design, the database instances of DPU will be kept in the NPU host. Microsoft ADO (number only): 25072889 How I did it To follow the multiple ASIC design, I assume a new platform environment variable NUM_DPU will be defined in the /usr/share/sonic/device/$PLATFORM/platform_env.conf. Based on this number, NPU host will launch a corresponding number of instances for the DPU database. Signed-off-by: Ze Gan <ganze718@gmail.com>
127 lines
3.2 KiB
Django/Jinja
127 lines
3.2 KiB
Django/Jinja
{
|
|
"INSTANCES": {
|
|
"redis":{
|
|
"hostname" : "{{HOST_IP}}",
|
|
"port" : {{REDIS_PORT}},
|
|
"unix_socket_path" : "/var/run/redis{{DEV}}/redis.sock",
|
|
"persistence_for_warm_boot" : "yes"
|
|
{% if DATABASE_TYPE is defined and DATABASE_TYPE != "" %}
|
|
,"database_type": "{{DATABASE_TYPE}}"
|
|
{% endif %}
|
|
},
|
|
"redis_chassis":{
|
|
"hostname" : "redis_chassis.server",
|
|
"port": 6380,
|
|
"unix_socket_path": "/var/run/redis-chassis/redis_chassis.sock",
|
|
"persistence_for_warm_boot" : "yes"
|
|
}
|
|
},
|
|
"DATABASES" : {
|
|
"APPL_DB" : {
|
|
"id" : 0,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
},
|
|
"ASIC_DB" : {
|
|
"id" : 1,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
},
|
|
"COUNTERS_DB" : {
|
|
"id" : 2,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
},
|
|
"LOGLEVEL_DB" : {
|
|
"id" : 3,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
},
|
|
"CONFIG_DB" : {
|
|
"id" : 4,
|
|
"separator": "|",
|
|
"instance" : "redis"
|
|
},
|
|
"PFC_WD_DB" : {
|
|
"id" : 5,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
},
|
|
"FLEX_COUNTER_DB" : {
|
|
"id" : 5,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
},
|
|
"STATE_DB" : {
|
|
"id" : 6,
|
|
"separator": "|",
|
|
"instance" : "redis"
|
|
},
|
|
"SNMP_OVERLAY_DB" : {
|
|
"id" : 7,
|
|
"separator": "|",
|
|
"instance" : "redis"
|
|
},
|
|
"RESTAPI_DB" : {
|
|
"id" : 8,
|
|
"separator": "|",
|
|
"instance" : "redis"
|
|
},
|
|
"GB_ASIC_DB" : {
|
|
"id" : 9,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
},
|
|
"GB_COUNTERS_DB" : {
|
|
"id" : 10,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
},
|
|
"GB_FLEX_COUNTER_DB" : {
|
|
"id" : 11,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
},
|
|
"CHASSIS_APP_DB" : {
|
|
"id" : 12,
|
|
"separator": "|",
|
|
"instance" : "redis_chassis"
|
|
},
|
|
"CHASSIS_STATE_DB" : {
|
|
"id" : 13,
|
|
"separator": "|",
|
|
"instance" : "redis_chassis"
|
|
},
|
|
"APPL_STATE_DB" : {
|
|
"id" : 14,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
}
|
|
{% if DATABASE_TYPE is defined and DATABASE_TYPE == "dpudb" %}
|
|
,
|
|
"DPU_APPL_DB" : {
|
|
"id" : 15,
|
|
"separator": ":",
|
|
"instance" : "redis",
|
|
"format": "proto"
|
|
},
|
|
"DPU_APPL_STATE_DB" : {
|
|
"id" : 16,
|
|
"separator": "|",
|
|
"instance" : "redis"
|
|
},
|
|
"DPU_STATE_DB" : {
|
|
"id" : 17,
|
|
"separator": "|",
|
|
"instance" : "redis"
|
|
},
|
|
"DPU_COUNTERS_DB" : {
|
|
"id" : 18,
|
|
"separator": ":",
|
|
"instance" : "redis"
|
|
}
|
|
{% endif %}
|
|
},
|
|
"VERSION" : "1.0"
|
|
}
|