Refactor DB configuration in harbor.cfg

Put harbor_db, clair_db configuration together
This commit is contained in:
yixingj 2018-02-01 17:57:14 +08:00
parent 3b36236dc0
commit 6c8bb9c73f
2 changed files with 30 additions and 32 deletions

View File

@ -190,19 +190,16 @@ In ```Harbor.cfg```
Change the value to your Harbor DB's
```
#The password for the root user of mysql db, change this before any production use.
#The address of the Harbor database. Only need to change when using external db.
db_host = 192.168.1.215
#The password for the root user of Harbor database. Change this before any production use.
db_password = root123
...
#####################################################
#the address of the mysql database.
db_host = 192.168.1.215
#The port of mysql database host
#The port of Harbor database host
db_port = 3306
#The user name of mysql database
#The user name of Harbor database
db_user = root
```
@ -221,20 +218,15 @@ If you have multiple Redis servers then separate them with ";"
In harbor.cfg
```
clair_db_password = password
...
#Clair DB host address
clair_db_host = 192.168.1.50
#Clair DB connect port
clair_db_password = password
clair_db_port = 5432
#Clair DB username
clair_db_username = postgres
#Clair default database
clair_db = postgres
```

View File

@ -8,9 +8,6 @@ hostname = reg.mydomain.com
#It can be set to https if ssl is enabled on nginx.
ui_url_protocol = http
#The password for the root user of mysql db, change this before any production use.
db_password = root123
#Maximum number of job workers in job service
max_job_workers = 3
@ -30,10 +27,6 @@ secretkey_path = /data
#Admiral's url, comment this attribute, or set its value to NA when Harbor is standalone
admiral_url = NA
#The password of the Clair's postgres database, only effective when Harbor is deployed with Clair.
#Please update it before deployment, subsequent update will cause Clair's API server and Harbor unable to access Clair's database.
clair_db_password = password
#Log files are rotated log_rotate_count times before being removed. If count is 0, old versions are removed rather than rotated.
log_rotate_count = 50
#Log files are rotated only if they grow bigger than log_rotate_size bytes. If size is followed by k, the size is assumed to be in kilobytes.
@ -109,22 +102,36 @@ token_expiration = 30
#Set to "adminonly" so that only admin user can create project.
project_creation_restriction = everyone
#The follow configurations are for Harbor HA mode only
#####################################################
#the address of the mysql database.
#************************END INITIAL PROPERTIES************************
#######Harbor DB configuration section#######
#The address of the Harbor database. Only need to change when using external db.
db_host = mysql
#The port of mysql database host
#The password for the root user of Harbor DB. Change this before any production use.
db_password = root123
#The port of Harbor database host
db_port = 3306
#The user name of mysql database
#The user name of Harbor database
db_user = root
#The redis server address
##### End of Harbor DB configuration#######
#The redis server address. Only needed in HA installation.
redis_url =
#Clair DB host address
##########Clair DB configuration############
#Clair DB host address. Only change it when using an exteral DB.
clair_db_host = postgres
#The password of the Clair's postgres database. Only effective when Harbor is deployed with Clair.
#Please update it before deployment. Subsequent update will cause Clair's API server and Harbor unable to access Clair's database.
clair_db_password = password
#Clair DB connect port
clair_db_port = 5432
@ -133,9 +140,8 @@ clair_db_username = postgres
#Clair default database
clair_db = postgres
################### end of HA section #####################
#************************END INITIAL PROPERTIES************************
##########End of Clair DB configuration############
#The following attributes only need to be set when auth mode is uaa_auth
uaa_endpoint = uaa.mydomain.org