-
Notifications
You must be signed in to change notification settings - Fork 73
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 hcloud support #261
Add hcloud support #261
Conversation
brings me:
|
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.
We also do some transformations specific to a hypervisor:
https://github.com/voxpupuli/beaker-hostgenerator/blob/master/lib/beaker-hostgenerator/hypervisor/docker.rb for example. It looks to be very consistent NAME-VERSION
without an architecture so perhaps that's an easier solution.
2dde06e
to
2963286
Compare
aha!
|
Codecov ReportBase: 0.51% // Head: 0.50% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #261 +/- ##
=========================================
- Coverage 0.51% 0.50% -0.01%
=========================================
Files 14 15 +1
Lines 2533 2556 +23
=========================================
Hits 13 13
- Misses 2520 2543 +23
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This is now working at: voxpupuli/puppet-hdm#18 |
FQDN generation is something we now do here: https://github.com/voxpupuli/puppet_metadata/blob/1d92f203598362d9719971cb5b6cab6c085f9689/lib/puppet_metadata/beaker.rb#L48 I'd actually prefer some option to set this and an env var like Then for the hcloud hypervisor it could actually add some randomness to it. For reference, libvirt has this: https://github.com/voxpupuli/beaker-vagrant/blob/50d671f73862e7a2271b1b361036794489a64672/lib/beaker/hypervisor/vagrant_libvirt.rb#L7-L11 |
@ekohl I considered modifying the image name in the hcloud hypervisor file. but hcloud only supports a tiny subset of all the operating systems beaker-hostgenerator has. Filtering that might add a bit too much complexity. Or do you think we shouldn't filter that and generate all operating systems for hcloud? |
I think this. Just like we generate a docker image name on the assumption that it exists. It may exist in the future and otherwise you get an error from the hypervisor. For example, it's reasonable to assume that at some point there will be an image for Ubuntu 24.04 and it's nice not to need any code change for it when it comes out. |
1b8bb91
to
a505106
Compare
@ekohl I refactored the image generation. I just need to think about the FQDN now. edit: so should the hcloud.rb modify the host_name attribute:
Or should we implement this in pupet_metedata/beaker-hcloud? beaker-hcloud? |
2d7b202
to
d81ab4b
Compare
when 'ubuntu' | ||
"#{os}-#{version[0, 2]}.#{version[2,2]}" | ||
when 'centos' | ||
version.to_i == 7 ? "#{os}-#{version}" : "#{os}-stream-#{version}" |
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.
@ekohl I reversed the logic and also added a test case for centos7/8 to verify it's working correctly.
This adds support for the Hetzner Cloud platform. They currently support (2022-12-07) the folling images: ``` bastelfreak@bastelfreak-nb ~ $ hcloud image list --type system ID TYPE NAME DESCRIPTION IMAGE SIZE DISK SIZE CREATED DEPRECATED 3 system centos-7 CentOS 7 - 5 GB Mon Jan 15 12:34:45 CET 2018 - 168855 system ubuntu-18.04 Ubuntu 18.04 - 5 GB Wed May 2 13:02:30 CEST 2018 - 5924233 system debian-10 Debian 10 - 5 GB Mon Jul 8 08:35:48 CEST 2019 - 15512617 system ubuntu-20.04 Ubuntu 20.04 - 5 GB Thu Apr 23 19:55:14 CEST 2020 - 45557056 system debian-11 Debian 11 - 5 GB Mon Aug 16 13:12:01 CEST 2021 - 45778012 system centos-stream-8 CentOS Stream 8 - 5 GB Thu Aug 5 07:07:23 CEST 2021 - 45780948 system rocky-8 Rocky Linux 8 - 5 GB Thu Aug 19 08:30:23 CEST 2021 - 59752342 system centos-stream-9 CentOS Stream 9 - 5 GB Thu Jan 27 08:52:03 CET 2022 - 67794396 system ubuntu-22.04 Ubuntu 22.04 - 5 GB Thu Apr 21 15:32:38 CEST 2022 - 69726282 system fedora-36 Fedora 36 - 5 GB Wed May 11 07:50:00 CEST 2022 - 76766499 system rocky-9 Rocky Linux 9 - 5 GB Wed Jul 20 15:55:52 CEST 2022 - bastelfreak@bastelfreak-nb ~ $ ```
This adds support for the Hetzner Cloud platform. They currently support
(2022-12-07) the folling images: