Commit Graph

144 Commits

Author SHA1 Message Date
Wang Yan
4faab2618e
add an example of harbor systemd service (#17420)
Dependencies
1, You must have docker with compose plugin installed.
2, You must have the directory /etc/goharbor/harbor in your env.

Tested
1, ubuntu 20.04

Signed-off-by: Wang Yan <wangyan@vmware.com>
2022-08-17 16:53:13 +08:00
Yang Jiao
853e3d5fff
Add Publish Release workflow (#16956)
When release, this workflow will be triggered to complete subsequent work.
1 Push harbor images to dockerhub.
2 Upload asset to release.
3 Generate release notes using the .github/release.yml template.

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-06-07 16:04:13 +08:00
Wang Yan
494d74d32d
bump up go version to 1.16 (#15286)
Signed-off-by: Wang Yan <wangyan@vmware.com>
2021-07-08 16:25:15 +08:00
He Weiwei
c6bd7b2ec2
ci: lint the swagger file (#14916)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-05-19 10:36:09 +08:00
He Weiwei
c58ccdfb8c
feat: bump up go-swagger to v0.25.0 (#14703)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-04-21 11:07:10 +08:00
Josh Soref
dfe360040b Spelling
* addition
* attribute
* auditing
* availability
* available
* bandwidth
* browser
* business
* cadence
* chartmuseum
* client
* column
* content
* demonstrate
* described
* endpoints
* facilitate
* github
* harbor
* information
* instance
* manual
* meaningful
* operation
* overridden
* password
* possible
* project
* refactor
* replication
* requires
* running
* scanned
* settings
* signup
* those
* unsigned
* vulnerability

--
Also removes trailing space from a filename

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-02-19 11:59:15 +08:00
He Weiwei
50b40445f4
feat: add BeforePrepare for operation of swagger API (#14048)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2021-01-22 10:44:25 +08:00
Wang Yan
7a8a8fa104
upgrade go version to v1.15.6 (#13836)
Signed-off-by: wang yan <wangyan@vmware.com>
2020-12-23 18:53:09 +08:00
DQ
4f5c3568bc Add tool for migration chart v2 to oci format
chartmuseum might deprecated in future. This tool is used for migrate the charts

Signed-off-by: DQ <dengq@vmware.com>
2020-11-23 16:45:42 +08:00
Dirk Mueller
08a4d8efd2
Update to golang 1.14.7 (#12809)
We should use a golang that isn't having security issues.

This includes:
* go1.14.6 (released 2020/07/16) includes fixes to the go command, the
compiler, the linker, vet, and the database/sql, encoding/json,
net/http, reflect, and testing packages. See the Go 1.14.6 milestone on
our issue tracker for details.

* go1.14.7 (released 2020/08/06) includes security fixes to the
encoding/binary package. See the Go 1.14.7 milestone on our issue
tracker for details (CVE-2020-16845)

Signed-off-by: Dirk Mueller <dirk@dmllr.de>
Signed-off-by: Dirk Mueller <dmueller@suse.com>
2020-08-20 15:38:35 +08:00
He Weiwei
aa55fcfce7 chore(mocks): add make targets to generate and check mocks
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-07-22 01:59:32 +00:00
Wang Yan
bad8f026fc
upgrade golang to v1.14.5 (#12489)
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-16 16:20:54 +08:00
DQ
e786add88c Remove migrator container
1. Python 2.7 is EOL
2. Migration script from 1.9 already  to prepare migrate

Signed-off-by: DQ <dengq@vmware.com>
2020-04-01 12:16:53 +08:00
Wang Yan
bd7940217a
upgrade golang version to v1.13.8 (#11006)
The vesrion contains two security bug fix - CVE-2020-0601, CVE-2020-7919

More details, see the golang milestone:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.8+label%3ACherryPickApproved

Signed-off-by: wang yan <wangyan@vmware.com>
2020-03-11 12:20:06 +08:00
He Weiwei
c729e3b9e0 feat(swagger): generate apis v2.0 from swagger.yaml
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-01-14 02:20:18 +00:00
DQ
ed6438cf69 Add default domainname for no_proxy
All internal service and known internal hostname shuold add to no_proxy by default

Signed-off-by: DQ <dengq@vmware.com>
2019-11-27 15:10:42 +08:00
He Weiwei
fe69a5df99 build(scanner-adapter): bump up clair adapter to v1.0.1-rc2
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-11-13 02:35:21 +00:00
Wang Yan
6da183d576
Merge pull request #9800 from ninjadq/failure_earlier_of_ca_bundle_permission_check
Failure earlier of ca bundle permission check
2019-11-11 14:09:21 +08:00
Daniel Jiang
b8777a7cc3
Merge pull request #9276 from das-peter/patch-1
#9174 config migration fails with python error: jinja2.exceptions.UndefinedError: 'chart' is undefined
2019-11-08 14:20:53 +08:00
DQ
cecc0fe85a Upgrade should not render http is config not provide
Just ingore if not congifured http

Signed-off-by: DQ <dengq@vmware.com>
2019-11-07 17:08:06 +08:00
Peter Philipp
d964bf5c35 Possible fix for: https://github.com/goharbor/harbor/issues/9174
Signed-off-by: Peter Philipp <peter.philipp@cando-image.com>
2019-10-30 12:42:48 -04:00
DQ
0b26e2c89f Add migrator for harbor 1.10.0
add 1.10.0 template for migration

Signed-off-by: DQ <dengq@vmware.com>
2019-10-28 20:41:32 +08:00
DQ
377739204b Update config file names
Signed-off-by: DQ <dengq@vmware.com>
2019-09-02 18:19:06 +08:00
He Weiwei
e2a19d8ab9
fix(build): max idle and open conn settings for external db (#8854)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2019-08-29 15:04:10 +08:00
DQ
fd7b867fe3 Add config template
Add upgrade script
Update latest version

Signed-off-by: DQ <dengq@vmware.com>
2019-08-22 17:23:33 +08:00
DQ
c1c48ea757 Fix migration script to support exeternal db
migrated config file will contains seperated db configuration

Signed-off-by: DQ <dengq@vmware.com>
2019-06-25 19:00:31 +08:00
Daniel Jiang
64b16c8915 Enable cfg migration from v1.8.0 (#7751)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-05-10 13:14:46 +08:00
Qian Deng
bb66358df8 Update migratrion script (#7728)
* Fix migration script

1. port is string when parsed from configparser
2. remove index and db_user in if condition

Signed-off-by: Qian Deng <dengq@vmware.com>

* Add port to public_url

Add port to public_url

Signed-off-by: Qian Deng <dengq@vmware.com>

* Customized value for notary and clair

db config in notary and clair is hardcoded

Signed-off-by: Qian Deng <dengq@vmware.com>

* Add notary and clair db config in harbor.yml

Add notary clair config to harbor.yml and fix related regression

Signed-off-by: Qian Deng <dengq@vmware.com>
2019-05-10 10:44:05 +08:00
Daniel Jiang
546bd44047 Require output path for harbor.cfg->harbor.yml migration
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-05-09 19:11:22 +08:00
Daniel Jiang
3a1ffb3c49 Update migrator to support only from >=v1.6.0
This commit removes code to support upgrade from <v1.6.0
It also removes packages for supporting mysql/mariadb from Dockerfile

It does not handle the optimization in the script such as run.sh after the update.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-05-06 22:46:58 -07:00
Qian Deng
c1e676ad99 Add migration script from 1.7.0 to 1.8.0
Add jinja2 to migrator
Add template to migrator
Add config upgrading script

Signed-off-by: Qian Deng <dengq@vmware.com>
2019-04-17 15:14:54 +08:00
Qian Deng
ba4764c61d
Merge pull request #6755 from ninjadq/refactor_prepare
Refactor the prepare script
2019-03-22 14:54:30 +08:00
Qian Deng
93af296eeb Enhance: refactor the mount dirs and workflow of generate cert
mount a temp dir input for all input files and configs
generated secrets file stored in data volumns keys dir
certs file stored in data volumns nginx dir

Signed-off-by: Qian Deng <dengq@vmware.com>
2019-03-15 15:51:11 +08:00
wang yan
f49b5910d2 disable non zern check on wait for db ready
Signed-off-by: wang yan <wangyan@vmware.com>
2019-03-09 12:52:38 +08:00
wang yan
7d6cdefae6 add script to fix migration issue on notary
The script is to fix the issue #7091, notary upgrade failure from mysql to pqsl.

Signed-off-by: wang yan <wangyan@vmware.com>
2019-03-08 20:29:23 +08:00
Qian Deng
b0f158c4c8 Add migratior script
Add migrator template and script

Signed-off-by: Qian Deng <dengq@vmware.com>
2019-03-08 16:46:14 +08:00
Daniel Jiang
091ed91ad8 Install psycopg2 via photon's repo (#7018)
The psycopg2 installed by pip has very old `.so` files.
This commit will mitigate such issue by using `tdnf` to install this package.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2019-02-26 10:58:05 +08:00
wang yan
cd50d85c47 Upgrade migrator base os to photon 2.0
Signed-off-by: wang yan <wangyan@vmware.com>
2019-02-14 11:35:44 +08:00
Yan
5412e581de
Add a flag judging on building migrator (#6905)
This commit is to add a flag judging when to build image of migator, which is not necessary.

Signed-off-by: wang yan <wangyan@vmware.com>
2019-02-12 20:33:42 +08:00
wang yan
7936d14abc fix per comments, add if not exists to create pqsql sequence
Signed-off-by: wang yan <wangyan@vmware.com>
2018-12-08 16:11:30 +08:00
wang yan
0517ecca7a Fix unable to use Notary after updating to v1.6.0
This commit is to fix the issue on notary migrations from mysql to pgsql.
1, alter sequence for the primary key of changeseed, this is missed in v1.6.0 migrator.
2, alter table owners from postgres to notarysigner and notaryserver.

Issue:
https://github.com/goharbor/harbor/issues/6465

Workaround:
https://github.com/goharbor/harbor/issues/6465#issuecomment-445162616

Impacted upgrade path:
1, Upgrade from version older then v1.6.0 with migrator:v1.6.0, and migrates the notarty DB.

No impacted upgrade path:
1, Upgrade from version older than v1.6.0 with migrator:v1.6.0, but without migrates the notarty DB.

Notes:
After merge this fix, we need to provide an new migrator with an new tag, like v1.6.1, and
deprecated the v1.6.0. For those who was impacted by migrator v1.6.0, will open an new PR to build
the workaround into the migrator and expose an specical command for hot-fix.

Signed-off-by: wang yan <wangyan@vmware.com>
2018-12-07 19:33:44 +08:00
Daniel Jiang
2a9d46e052 Update no_proxy from 'portal' to 'core' in cfg migrator (#6464)
Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2018-12-06 11:49:40 +08:00
Qian Deng
7647e688fd Feat: Upgrade harbor.cfg from 1.6.0 to 1.7.0
Add script to upgrade harbor.cfg

Signed-off-by: Qian Deng <dengq@vmware.com>
2018-12-04 10:36:11 +08:00
Brett Johnson
f3640acf67 corrected tdnf build install command.
build failing due to tdnf attempting to install
x86_64/gcc-5.3.0-5.ph1.x86_64.rpm

Signed-off-by: Brett Johnson <brett@sdbrett.com>
2018-11-29 17:55:23 +11:00
Brett Johnson
2d134c2f21 corrected tdnf build install command.
build failing due to tdnf attempting to install
x86_64/gcc-5.3.0-5.ph1.x86_64.rpm

Signed-off-by: Brett Johnson <brett@sdbrett.com>
2018-11-29 16:30:27 +11:00
clouderati
587459df15 Replacing copyright notices with "Copyright Project Harbor Authors".
Signed-off-by: clouderati <35942204+clouderati@users.noreply.github.com>
2018-09-19 16:59:36 +00:00
wang yan
b3918fe748 Add the encoding to the data converter script
This commit is to fix bug reported by community to upgrade v1.6.0, for the details
just refer to #5788. The fix is to add the encoding(utf-8) for the converter when to convert
the mysql data to pqsql data. Already passed on test with Chinese/Japanese.

Signed-off-by: wang yan <wangyan@vmware.com>

update
2018-09-04 12:02:48 +08:00
wang yan
f8b964d8cf Extend configuration length to 1024 in DB
Signed-off-by: wang yan <wangyan@vmware.com>
2018-08-31 13:42:24 +08:00
Daniel Jiang
1d4f991901
Merge pull request #5640 from wy65701436/deprecate-ova
deprecate ova for harbor repository
2018-08-24 13:38:42 +08:00
wang yan
aacbf229d6 deprecate ova for harbor repository
This commit is to remove the document/tests of ova from harbor repository as decide to deprecate
ova installer in the future release.

Signed-off-by: wang yan <wangyan@vmware.com>
2018-08-24 13:05:01 +08:00