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
Implement a basic, first pass odo push
with Docker support
#2806
Implement a basic, first pass odo push
with Docker support
#2806
Conversation
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
👍 As part of running the same test on 4.* is concerned there we need to figure out how to do it (Possibly we need to configure docker instances in the test container). I would suggest create a separate issue for running the same test against 4.* cluster and assign it to @prietyc123. |
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Updated the PR with integration tests 😃 For now they're just running in Travis, I'll open an issue later today to track running them elsewhere. |
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Codecov Report
@@ Coverage Diff @@
## master #2806 +/- ##
==========================================
+ Coverage 43.06% 43.87% +0.80%
==========================================
Files 97 102 +5
Lines 8917 9147 +230
==========================================
+ Hits 3840 4013 +173
- Misses 4713 4761 +48
- Partials 364 373 +9
Continue to review full report at Codecov.
|
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.
Thx for this PR, impressed by the quick turnaround considering all the logic that is in here!
Review is mostly just re-arranging code and functions to be consistent with the devfile kubernetes package, since they seem out of place looking at the two packages simultaneously and few nits here and there which can go either way depending on how you prefer it.
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
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.
Minor changes and questions
Looks good and works well, I can add lgtm after small cleanups
// Start the container | ||
err = a.startContainer(componentName, projectVolumeName, comp) | ||
if err != nil { | ||
return errors.Wrapf(err, "Unable to start container for devfile component %s", *comp.Alias) |
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.
Same comment about s.End(false)
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.
See my reply to your other comment.
tests/helper/helper_docker.go
Outdated
} | ||
|
||
// NewDockerRunner initializes new DockerRunner | ||
func NewDockerRunner(ocPath string) DockerRunner { |
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.
ocPath
to dockerPath
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.
Fixed.
@@ -0,0 +1,81 @@ | |||
package docker |
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.
how do you feel about all devfile tests being under the devfile dir? and then separated out to tests/integration/devfile/docker
and tests/integration/devfile/kube
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.
Makes sense, fixed. I moved the docker tests to tests/integration/devfile/docker
, we can move the kube tests later.
Signed-off-by: John Collier <John.J.Collier@ibm.com>
changes look good |
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Had to fix a merge conflict |
adding back lgtm after rebase |
/retest |
/retest |
@kadel: The
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kadel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
…developer#2806) * Implement docker adapter Signed-off-by: John Collier <John.J.Collier@ibm.com> * Docker component support Signed-off-by: John Collier <John.J.Collier@ibm.com> * Implement odo push for Docker Signed-off-by: John Collier <John.J.Collier@ibm.com> * Create helper file for integration tests Signed-off-by: John Collier <John.J.Collier@ibm.com> * Fix build and test issues Signed-off-by: John Collier <John.J.Collier@ibm.com> * Don't require kube client for odo create Signed-off-by: John Collier <John.J.Collier@ibm.com> * Fix storage tests Signed-off-by: John Collier <John.J.Collier@ibm.com> * Address gosec messages Signed-off-by: John Collier <John.J.Collier@ibm.com> * Finish docker integration tests Signed-off-by: John Collier <John.J.Collier@ibm.com> * Fix borked git rebase Signed-off-by: John Collier <John.J.Collier@ibm.com> * Address review comments Signed-off-by: John Collier <John.J.Collier@ibm.com> * Fix merge conflict issues Signed-off-by: John Collier <John.J.Collier@ibm.com> * Fix more merge conflict issues Signed-off-by: John Collier <John.J.Collier@ibm.com> * Fix more merge conflicts in tests Signed-off-by: John Collier <John.J.Collier@ibm.com> * Address rev Signed-off-by: John Collier <John.J.Collier@ibm.com> * Don't require kube context Signed-off-by: John Collier <John.J.Collier@ibm.com>
Why we would want to run this against clusters. No cluster is used in this case, it is just using Docker daemon |
What type of PR is this?
/kind feature
What does does this PR do / why we need it:
This PR implements a basic, first pass implementation of
odo push
with local Docker containers when the PushTarget preference is set to Docker. Currently it's limited to just deploying the containers and setting up the shared source volume. This will unblock folks who are assigned issues that are dependent on this functionality (such as #2717, #2580, #2581)So, what does the PR do in all?
Creates a Docker platform adapter for interacting with devfile components in Docker
experimental
is true andPushTarget
is set to DockerCreates a Docker component adapter, which does the following
Push
pulls images and starts containers based on what was specified in the devfile. Each container is labeled withcomponent=<odo-componentName>
andalias=<devfile-component-alias>
that provide an easy way to group and find the pods associated with an odo componentDoesComponentExist
returns true if there's at least one container running that's labeled withcomponent=<odo-componentName>
Unit tests
Integration tests
Which issue(s) this PR fixes:
Fixes #2579
How to test changes / Special notes to the reviewer:
Have Docker installed and running on your system
Build my branch
Set both experimental mode to true and PushTarget to Docker
odo preference set experimental true
odo preference set pushtarget docker
Create a devfile component
odo create openLiberty
odo push