sonic-buildimage/files
Dong Zhang 768beb79e1 create multiple Redis DB instances based on CONFIG at /etc/sonic/database_config.json (#2182)
this is the first step to moving different databases tables into different database instances

in this PR, only handle multiple database instances creation based on user configuration at /etc/sonic/database_config.json

we keep current method to create single database instance if no extra/new DATABASE configuration exist in database_config.json file.

if user try to configure more db instances at database_config.json , we create those new db instances along with the original db instance existing today.

The configuration is as below, later we can add more db related information if needed:
{
...
"DATABASE": {
"redis-db-01" : {
"port" : "6380",
"database": ["APPL_DB", "STATE_DB"]
},
"redis-db-02" : {
"port" : "6381",
"database":["ASIC_DB"]
},
}
...
}

The detail description is at design doc at Azure/SONiC#271

The main idea is : when database.sh started, we check the configuration and generate corresponding scripts.

rc.local service handle old_config copy when loading new images, there is no dependency between rc.local and database service today, for safety and make sure the copy operation are done before database try to read it, we make database service run after rc.local

Then database docker started, we check the configuration and generate corresponding scripts/.conf in database docker as well.

based on those conf, we create databases instances as required.

at last, we ping_pong check database are up and continue


Signed-off-by: Dong Zhang d.zhang@alibaba-inc.com
2019-08-28 11:15:10 -07:00
..
Aboot [build]: enable docker in ram option for small disk device (#3279) 2019-08-06 23:04:00 -07:00
apt [build]: SONiC buildimage ARM arch support (#2980) 2019-07-25 22:06:41 -07:00
build_templates create multiple Redis DB instances based on CONFIG at /etc/sonic/database_config.json (#2182) 2019-08-28 11:15:10 -07:00
dhcp [baseimage]: Initial changes for dhcp to support eth0 in a mgmt vrf (#2348) 2019-01-15 18:15:56 -08:00
docker [docker-engine]: upgrade docker engine to 18.09 (#2417) 2019-01-04 20:47:43 -08:00
image_config [control plane assistant] stop control plane assistant after warm reboot (#3337) 2019-08-15 00:45:54 -07:00
initramfs-tools [build]: enable docker in ram option for small disk device (#3279) 2019-08-06 23:04:00 -07:00
scripts [Fast-Reboot]: FR mode is active only first 3 minutes after start. (#3352) 2019-08-19 16:05:20 -07:00
sshd [security] Do not generate ssh server keys for non RSA protocols (#2718) 2019-03-29 15:27:33 -07:00