SanmuWangZJU commented on issue #4921: Is this UI module available ?
URL: 
https://github.com/apache/incubator-shardingsphere/issues/4921#issuecomment-603341679
 
 
   I think you can refer to source code in `sharding-ui-backend` module while 
filling config in ui.
   
   - for version 4.x, config check/update/load are implement in 
`org.apache.shardingsphere.ui.servcie.impl`
   
   - `Props` can refer to 
`org.apache.shardingsphere.ui.util.ConfigurationYamlConverter#loadProperties` , 
content should like [official 
guide](https://shardingsphere.apache.org/document/current/en/manual/sharding-proxy/configuration/#proxy-property),
 **but without the first line `prop:`**
   
   - `Authentication` can refer to 
`org.apache.shardingsphere.core.yaml.config.common.YamlAuthenticationConfiguration`,
 content should like [official 
guide](https://shardingsphere.apache.org/document/current/en/manual/sharding-proxy/configuration/#authentication-1),
 **but without the first line `authentication:`**
   authentications here control your access to proxy rather than backend-mysql
   
   - `Schema` can refer to 
`org.apache.shardingsphere.ui.servcie.impl.ShardingSchemaServiceImpl#checkRuleConfiguration`
 you can config encryptor/master-slave only/sharding(also can config 
master-slave), 
   
     + following example for datasource config
   
     ```yaml
     ds0: 
!!org.apache.shardingsphere.orchestration.yaml.config.YamlDataSourceConfiguration
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       properties:
         url: jdbc:mysql://ip:port/schema
         username: 
         password: 
         maxPoolSize: 
     ```
   
     + following examples for rule config
   
     ```yaml
     # master-slave-only
     ms_ds0:
         masterDataSourceName: ds0
         slaveDataSourceNames:
           - ds0_slave
         loadBalanceAlgorithmType: ROUND_ROBIN
     ```
   
     ```yaml
     # sharding with master-slave
     tables:
       logic_table_name: 
           actualDataNodes: 
           databaseStrategy:
           inline:
             shardingColumn: 
             algorithmExpression: 
         tableStrategy: 
           inline:
             shardingColumn: 
             algorithmExpression: 
     defaultTableStrategy:
       none:
   
     masterSlaveRules:
       ms_ds0:
         masterDataSourceName: ds0
         slaveDataSourceNames:
           - ds0_slave
         loadBalanceAlgorithmType: ROUND_ROBIN
       ms_ds1:
         masterDataSourceName: ds1
         slaveDataSourceNames: 
           - ds1_slave
         loadBalanceAlgorithmType: ROUND_ROBIN
     ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to