Skip to content

Cleanup docker support #257

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

Merged
merged 8 commits into from
Feb 16, 2024
Merged

Cleanup docker support #257

merged 8 commits into from
Feb 16, 2024

Conversation

h0tw1r3
Copy link
Contributor

@h0tw1r3 h0tw1r3 commented Feb 15, 2024

Commits are simply housekeeping. Reconcile the two docker tasks to ensure they create containers and manage the bolt inventory in exactly the same way. After this I'm hoping we can move to supporting unprivileged docker containers.

These changes can be tested running the manual workflow on Litmusimage using { "git": "https://github.com/h0tw1r3/provision.git", "ref": "docker-dodo" } for the provision module option after puppetlabs/litmusimage#75 is merged.

* os_release facts added to docker_exp
* container_id fact added to docker
* consistent naming convention, remove generated name from docker (use id)
should make writing tests easier
* tmpdir missing from docker_exp run
* docker_exp docker_run_opts optional
* use container_id as node name for both implementations
* dropped archlinux as it never worked
* support opensuse ssh service start
@h0tw1r3 h0tw1r3 requested a review from a team as a code owner February 15, 2024 03:20
@h0tw1r3 h0tw1r3 force-pushed the docker-dodo branch 2 times, most recently from 2da4c6f to 2bf8841 Compare February 15, 2024 08:03
@h0tw1r3
Copy link
Contributor Author

h0tw1r3 commented Feb 15, 2024

@h0tw1r3 h0tw1r3 marked this pull request as draft February 15, 2024 08:09
@h0tw1r3 h0tw1r3 marked this pull request as ready for review February 15, 2024 08:26
@h0tw1r3
Copy link
Contributor Author

h0tw1r3 commented Feb 15, 2024

@jordanbreen28
Copy link
Contributor

@h0tw1r3 this is great! Just a small hitch in my testing, the docker_exp task seems to be broken.

bundle exec rake 'litmus:provision[docker_exp, litmusimage/debian:11]'                                                                
HEAD is now at c511041 Merge pull request #647 from puppetlabs/release-prep
[✔] Provisioning litmusimage/debian:11 using docker_exp provisioner.
rake aborted!
provisioning of litmusimage/debian:11 failed.
Results:
  localhost: {"_error"=>{"kind"=>"provision/docker_exp_failure", "msg"=>"undefined local variable or method `image' for main:Object", "details"=>{}}}}

This doesn't happen when running on main:

bundle exec rake 'litmus:provision[docker_exp, litmusimage/debian:11]'                                                            
HEAD is now at c511041 Merge pull request #647 from puppetlabs/release-prep
[\] Provisioning litmusimage/debian:11 using docker_exp provisioner.Successfully provisioned litmusimage/debian:11 using docker_exp
Checking connectivity for ["916654c6d7ea"]
[\] Provisioning litmusimage/debian:11 using docker_exp provisioner.Connectivity check PASSED.
[✔] Provisioning litmusimage/debian:11 using docker_exp provisioner.
916654c6d7ea, litmusimage/debian:11

Hope this isn't too big of an issue for you, just seems we are referncing an undefined variable image.

@h0tw1r3
Copy link
Contributor Author

h0tw1r3 commented Feb 16, 2024

@jordanbreen28 forgot to push the fix. Thanks!

Copy link
Contributor

@jordanbreen28 jordanbreen28 left a comment

Choose a reason for hiding this comment

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

Verified locally as working.
Great stuff @h0tw1r3

@jordanbreen28 jordanbreen28 merged commit d3b25f4 into puppetlabs:main Feb 16, 2024
@h0tw1r3 h0tw1r3 deleted the docker-dodo branch February 16, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants