-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DTR replication support #9512
DTR replication support #9512
Conversation
Signed-off-by: wang yan <wangyan@vmware.com> Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
- no code contained - for 1.10 Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
Thanks for the PR, as this is integration with a specific version of DTR hosted registry, we need to consider testing and support for future versions as well before merging. But it's great that you got this replication working. |
Im not aware of any version specific stuff I did but will do a test with a much older version of DTR we still have setup later this week. I can also stand up a 2.6.x version to test without much trouble. As for future compatibility that would need to be addressed when DTR adds a v1 api, breaks v0 or changes how UCP and DTR work together since they are tied at the hips right now which I have no insight into. |
I was able to test the patch against DTR 2.4.13 today. Both pushing and pulling replication worked without any issues. It was able to make organizations, repositories and then sync the images without any issues while pushing. The pulling worked without any issues. |
@gregsidelinger need fix code format as ci failed |
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
Wow, fixing three log lines cause almost all CI tests to fail with new errors. Looking into why go vet is angry, may need to rebase as it has been a month. |
I reproduced the new CI errors locally after merging with master. I updated my code with the new factory that all replication adaptors now implement and go vet is clean. Will run a few tests tomorrow when I have access to DTR and update the PR. |
Pull Request Test Coverage Report for Build 2e8bd1506-PR-9512
💛 - Coveralls |
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
I cleaned up the formatting of the code to make all of the CI checks happy and have all the commits signed. Let me know if there is anything else. |
var accounts []Account | ||
var response Accounts | ||
|
||
endpoint := fmt.Sprintf("%s/enzi/v0/accounts?limit=100", c.url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you share the api document that you are referenced here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.docker.com/v17.09/datacenter/dtr/2.3/reference/api/
Unfortunately this API is no longer documented in the latest API docs however it is still there. It is the only way to create orgs as the core DTR api does not support any of those features based on how tied it is to UCP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have an existing env that we can have a test
All of my current DTR environments are within my companies network which I can not open up. I think a limited version of UCP with DTR can be stood up without license keys. Or they do offer a 30 day trial key. https://docs.docker.com/ee/ucp/admin/install/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pending merge as Steven required
I have an updated PR for the changes in 2.0. I still need to do some testing however the test suite is passing. I use helm to deploy harbor so I'm not yet running 2.0 since the chart still needs updated based on the 2.0.0 release notes. Once the chart is updated I do some manual testing and commit the changes. Let me know what needs done for the compliance verification testing framework once more of that is finalized. |
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
Codecov Report
@@ Coverage Diff @@
## master #9512 +/- ##
==========================================
- Coverage 61.73% 61.69% -0.05%
==========================================
Files 916 919 +3
Lines 54436 54743 +307
Branches 2039 2039
==========================================
+ Hits 33605 33772 +167
- Misses 17061 17157 +96
- Partials 3770 3814 +44
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
We will consider to merge it after the testing framework is ready. @bitsf , please give update about the progress of testing framework development, and the document of how to use it. |
@bitsf any update on the testing framework? |
Lots of bug fixes and new features in v2.1.0 but sad to see this one didn't make it. Community, lets up vote this for the next release!? @bitsf @wy65701436 where can we track the Testing Framework? |
Thanks for the patience. We have created a verification framework to test and verify if the related replication adapters are still working well with Harbor, see the repo https://github.com/goharbor/replication-verification. Please follow the readme to see if your adapter can pass the testing and then paste the testing results here. If cases are passed, we can accept and merge this adapter that's expected for a long while. Any help needed, please ping @bitsf / me. Thanks. |
@gregsidelinger because we don't have the environment, so you just need to upload the test result to prove everything is working fine. |
I'm a bit confused about the Post actions as documented in CONTRIBUTING. For steps 2-4. Am I suppose to send you the PR for my test case and include login info for a DTR setup?
The DTR I have access to is sitting inside my companies network and is not exposed to the Internet. I can setup and run the test case once but there is no way I can expose DTR on the Internet let along provide login access to it. |
Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
Got the point. You can use your DTR env to run the case offline and provide the results here. But it's internal env and then can not be used in the regular replication adapter verification pipeline. Let's skip the post actions so far. After PR is merged, we can continue to think about how to activate the verification test cases in the framework later. cc @bitsf |
@gregsidelinger please rebase commit and merge |
@gregsidelinger hi, it always has conflicts and can't merge.
|
Adding DTR replication support Signed-off-by: Greg Sidelinger <gate@ilive4code.net>
Support for Docker Trusted Registry, https://docs.docker.com/ee/dtr/.
I've tested this on DTR 2.7.3. Push and pull support are both working.