sonic-buildimage/dockers
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
..
docker-base [build]: SONiC buildimage ARM arch support (#2980) 2019-07-25 22:06:41 -07:00
docker-base-stretch [build]: SONiC buildimage ARM arch support (#2980) 2019-07-25 22:06:41 -07:00
docker-basic_router Remove extra trailing newlines at EOF (#804) 2017-07-12 20:54:37 -07:00
docker-config-engine Remove unused packages in docker images and host (#2807) 2019-04-29 17:21:24 -07:00
docker-config-engine-stretch [build]: Improve dockerfile instructions (#3048) 2019-06-22 11:26:23 -07:00
docker-database create multiple Redis DB instances based on CONFIG at /etc/sonic/database_config.json (#2182) 2019-08-28 11:15:10 -07:00
docker-dhcp-relay [dhcp_relay] Only call 'wait_until_iface_ready' once for each interface (#3317) 2019-08-09 11:28:15 -07:00
docker-fpm-frr [docker-fpm-frr]: Generate separated staticd.conf for staticd (#3306) 2019-08-16 14:29:42 -07:00
docker-fpm-gobgp Generate interface table to have an entry designated to default VRF. (#2848) 2019-06-10 14:02:55 -07:00
docker-fpm-quagga [bgp]: Fix isolate/unisolate command for ipv6 peers (#3183) 2019-07-18 16:34:26 -07:00
docker-lldp-sv2 Reverting permission changes on lldpmgrd (#3184) 2019-07-18 14:30:43 -07:00
docker-orchagent [innovium]: Initial commit (#3243) 2019-08-14 10:40:55 -07:00
docker-platform-monitor [devices]: DELL Platform 2.0 API Infra and Reboot Reason support in Z9100 & S6100 (#3063) 2019-07-03 06:52:35 -07:00
docker-ptf [build]: SONiC buildimage ARM arch support (#2980) 2019-07-25 22:06:41 -07:00
docker-ptf-saithrift [docker-ptf-*]: Use buildimage infrastructure to build docker-ptf-* (#638) 2017-05-26 17:18:11 -07:00
docker-router-advertiser [build]: Improve dockerfile instructions (#3048) 2019-06-22 11:26:23 -07:00
docker-snmp-sv2 [innovium]: Initial commit (#3243) 2019-08-14 10:40:55 -07:00
docker-sonic-mgmt [docker-sonic-mgmt] install ptf framework in mgmt container and upgrade ptf (#3239) 2019-07-30 10:19:48 -07:00
docker-sonic-telemetry [database]: Update redis to 5.0.3 (#3066) 2019-07-03 22:16:09 -07:00
docker-teamd [database]: Update redis to 5.0.3 (#3066) 2019-07-03 22:16:09 -07:00
dockerfile-macros.j2 [build]: Improve dockerfile instructions (#3048) 2019-06-22 11:26:23 -07:00