use of disconf

disconf has been successfully built (http://gjp014.iteye.com/admin/blogs/2360517), the following demonstrates how to use it:

Implementation function (the program is in the attachment):

Create a qa environment for boce_demo,

There is only one configuration file redis.properties in this environment 

Content: redis.host=192.168.1.24 

redis.port=6379

. Then modify the configuration file information,

disconf Notifies applications of modified configuration information.

 

 

1. Set the configuration file content of disconf

#disconf service address

disconf.conf_server_host=192.168.6.57:8080

 

The version number of the qa environment is: 

disconf.version=1_0_0_1

 

# Application Name 

disconf.app=boce_demo

 

# environment name

disconf.env=qa

 

2. Initialize the database:

---Application Name

INSERT INTO disconf.app (app_id,name,description,create_time,update_time,emails) VALUES (

3, 'bottle_demo', 'bottle_demo', '99991231235959', '99991231235959', '');

----Environment configuration

INSERT INTO disconf.config (config_id,`type`,status,name,value,app_id,version,env_id,create_time,update_time) VALUES (

150,0,1,'redis.properties','redis.host=192.168.6.29

redis.port=6379',3,'1_0_0_1',1,'99991231235959','20170306170753');

INSERT INTO disconf.config (config_id,`type`,status,name,value,app_id,version,env_id,create_time,update_time) VALUES (

151,0,1,'redis.properties','redis.host=192.168.6.24

redis.port=6379',3,'1_0_0_1',2,'99991231235959','20170306171907');

 

---

4. The test procedure is in the attachment.

 

5. Log in to the management platform to view the information:



 

Modify the configuration file:



 

Looking at the server side, the modified configuration parameters have been received. The configuration parameters have been modified from 192.168.6.24 to: 192.168.9.24



 View zookeper storage information, which has been modified:

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326627319&siteId=291194637
use
use