Skip to content
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

Add option for regenerating certificates after starting Docker Machine #1019

Merged
merged 1 commit into from
May 15, 2018

Conversation

makeamark1
Copy link
Contributor

@makeamark1 makeamark1 commented May 8, 2018

If using Docker Machine with the AWS EC2 driver, the remote host will have a new IP address every time it is started up again. This causes the Docker Maven plug-in to fail with an error about certificates being invalid when starting up the machine automatically. Add an option to automatically regenerate the certificates for the new IP address after startup. Setting this option to true will allow Docker Machines running in AWS EC2 to be automatically started up into a usable state by the Docker Maven plug-in. (Without this option, such automatically started machines will fail the Maven Docker plug-in invocation complaining about certificates being invalid as the existing certificates are associated with the old IP address)

The changes have been tested with the option both on and off, and are working as expected. Also the documentation has been updated to mention the new option and when it is useful.

@codecov
Copy link

codecov bot commented May 8, 2018

Codecov Report

Merging #1019 into master will decrease coverage by 0.1%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master    #1019      +/-   ##
============================================
- Coverage     51.82%   51.71%   -0.11%     
  Complexity     1367     1367              
============================================
  Files           147      147              
  Lines          7460     7475      +15     
  Branches       1132     1134       +2     
============================================
  Hits           3866     3866              
- Misses         3229     3244      +15     
  Partials        365      365
Impacted Files Coverage Δ Complexity Δ
.../io/fabric8/maven/docker/access/DockerMachine.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...aven/docker/config/DockerMachineConfiguration.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...ric8/maven/docker/service/DockerAccessFactory.java 0% <0%> (ø) 0 <0> (ø) ⬇️

If using Docker Machine with the AWS EC2 driver, the remote host will
have a new IP address every time it is started up again.  This causes
the Docker Maven plug-in to fail with an error about certificates
being invalid when starting up the machine automatically.  Add an
option to automatically regenerate the certificates for the new IP
address after startup.  Setting this option to true will allow Docker
Machines running in AWS EC2 to be automatically started up into a
usable state by the Docker Maven plug-in.

Signed-off-by: Markus Hallmann <markhalm256@gmail.com>
@makeamark1
Copy link
Contributor Author

Would be possible to have this merged? The code coverage results are mainly due to Docker Machine code already not being covered, and adding coverage for anything new related to Docker Machine is challenging without any existing testing setup.

Copy link
Collaborator

@rhuss rhuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and sorry for the delay, I was on the road last week.

You can expect a next version soon (this week)

@rhuss rhuss merged commit ac22953 into fabric8io:master May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants