Skip to content

Commit

Permalink
Merge pull request goharbor#4212 from yixingjia/reorderconfig
Browse files Browse the repository at this point in the history
Refactor DB configuration in harbor.cfg
  • Loading branch information
yixingjia authored Feb 2, 2018
2 parents 9b9a441 + 6c8bb9c commit dcf16a8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
24 changes: 8 additions & 16 deletions docs/high_availability_installation_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
db_password = root123
...
#The address of the Harbor database. Only need to change when using external db.
db_host = 192.168.1.215
#####################################################
#the address of the mysql database.
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 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
```
Expand All @@ -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
```
Expand Down
38 changes: 22 additions & 16 deletions make/harbor.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit dcf16a8

Please sign in to comment.