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

Extend cloud-init ISO builder to include vendor-data and network-config #51

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

jqueuniet
Copy link
Contributor

Current implementation is missing support for vendor-data and network-config.

Vendor data is similar to user-data, but allows a clean separation of cloud-config scripts from infrastructure providers and clients. Network config is basically a netplan config file and is the recommended way to setup networking use-cases different from the default cloud-init behavior (DHCP on the first working interface).

@luthermonson
Copy link
Owner

https://cloudinit.readthedocs.io/en/latest/reference/datasources/nocloud.html#file-formats says vendor data is supported, is network config just not documented? if it works np to merge this

@luthermonson
Copy link
Owner

welp there it is: https://cloudinit.readthedocs.io/en/latest/reference/datasources/nocloud.html#example-meta-data

it is supported. answered my own question

@luthermonson luthermonson merged commit 5cdb980 into luthermonson:main Jan 25, 2023
@jqueuniet jqueuniet deleted the extend_cloudinit_iso branch January 25, 2023 19:57
@jqueuniet
Copy link
Contributor Author

network-config is how PVE is implementing the various network cloud-init properties on virtual machines like nameservers, searchdomains or ipconfigX for the nocloud datasource.

@mcbenjemaa
Copy link
Contributor

@jqueuniet I tested the network-config with this iso mechansinm but it doesn't work

@jqueuniet
Copy link
Contributor Author

I'm sorry to hear that, but I'm not sure an old closed PR is the best place to talk about this. Could you open a new issue and provide a sample non-working ISO file, the network-config string provided, the overall network setup used for PVE and the VM configuration?

@mcbenjemaa
Copy link
Contributor

I tested it.

Great!
I tested the network-config and it worked ✅

´´´yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
match:
name: en*
dhcp4: 'no'
addresses:
- 10.10.10.17/24
routes:
- to: default
via: 10.10.10.1
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
´´´

Thanks

@jqueuniet
Copy link
Contributor Author

Glad it works for you then :)

@mcbenjemaa
Copy link
Contributor

Do you know how to set the hostname via metadata?

As it doesn't work for me!

@luthermonson
Copy link
Owner

what did you try? i think you're supposed to use local-hostname in the metadata file but that's just what i've learned from reading docs which might be old

@jqueuniet
Copy link
Contributor Author

I'm using the fqdn field in vendor-data for that at the moment.

https://cloudinit.readthedocs.io/en/latest/reference/modules.html#set-hostname

@mcbenjemaa
Copy link
Contributor

Oh, well.
For local-hostname, it works.

For fqdn,
I have to try.

@mcbenjemaa
Copy link
Contributor

We are building the capi provider for proxmox.

And we are relying on this client.
So, we are supporting it.

Thanks for your help.

@luthermonson
Copy link
Owner

lol everyone is working on a capi provider then, there are 2 more already started. keep it up! let's get one good one eventually :)

@luthermonson
Copy link
Owner

join us in the slack channel by the way if you want more realtime support: https://gophers.slack.com/archives/C05920LDDD3

@mcbenjemaa
Copy link
Contributor

I will make it public after the first MVP.

@luthermonson
Copy link
Owner

good! keep working hard

@mcbenjemaa
Copy link
Contributor

btw, do you know if we can use bios uuid as a unique identifier for machines accros proxmox nodes?

@luthermonson
Copy link
Owner

better to have a thread on in the slack channel if you don't mind, come over there and pose the question and let's start a thread about it

@mcbenjemaa
Copy link
Contributor

i can't join with that link :)

@luthermonson
Copy link
Owner

try this https://gophers.slack.com/archives/C05920LDDD3

@mcbenjemaa
Copy link
Contributor

mc.benjemaa@gmail.com doesn’t have an account on this workspace.

@luthermonson
Copy link
Owner

make one! it's free

renovate bot referenced this pull request in kairos-io/provider-kairos Oct 28, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/luthermonson/go-proxmox](https://togithub.com/luthermonson/go-proxmox)
| require | patch | `v0.0.0-alpha3` -> `v0.0.0-beta1` |

---

### Release Notes

<details>
<summary>luthermonson/go-proxmox
(github.com/luthermonson/go-proxmox)</summary>

###
[`v0.0.0-beta1`](https://togithub.com/luthermonson/go-proxmox/releases/tag/v0.0.0-beta1)

[Compare
Source](https://togithub.com/luthermonson/go-proxmox/compare/v0.0.0-alpha9...v0.0.0-beta1)

#### What's Changed

- Add context support by
[@&#8203;jqueuniet](https://togithub.com/jqueuniet) in
[https://github.com/luthermonson/go-proxmox/pull/97](https://togithub.com/luthermonson/go-proxmox/pull/97)

**Full Changelog**:
luthermonson/go-proxmox@v0.0.0-alpha10...v0.0.0-beta1

###
[`v0.0.0-alpha9`](https://togithub.com/luthermonson/go-proxmox/releases/tag/v0.0.0-alpha9)

[Compare
Source](https://togithub.com/luthermonson/go-proxmox/compare/v0.0.0-alpha8...v0.0.0-alpha9)

#### What's Changed

- adding group update/delete tests by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/93](https://togithub.com/luthermonson/go-proxmox/pull/93)
- add node and node version test by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/94](https://togithub.com/luthermonson/go-proxmox/pull/94)
- fix node network deserialization by
[@&#8203;simplysoft](https://togithub.com/simplysoft) in
[https://github.com/luthermonson/go-proxmox/pull/95](https://togithub.com/luthermonson/go-proxmox/pull/95)
- extend storage up & download by
[@&#8203;simplysoft](https://togithub.com/simplysoft) in
[https://github.com/luthermonson/go-proxmox/pull/96](https://togithub.com/luthermonson/go-proxmox/pull/96)

#### New Contributors

- [@&#8203;simplysoft](https://togithub.com/simplysoft) made their first
contribution in
[https://github.com/luthermonson/go-proxmox/pull/95](https://togithub.com/luthermonson/go-proxmox/pull/95)

**Full Changelog**:
luthermonson/go-proxmox@v0.0.0-alpha8...v0.0.0-alpha9

###
[`v0.0.0-alpha8`](https://togithub.com/luthermonson/go-proxmox/releases/tag/v0.0.0-alpha8)

[Compare
Source](https://togithub.com/luthermonson/go-proxmox/compare/v0.0.0-alpha7...v0.0.0-alpha8)

#### What's Changed

- adding missing vm fields, added vm rdddata by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/85](https://togithub.com/luthermonson/go-proxmox/pull/85)
- adding roles by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/86](https://togithub.com/luthermonson/go-proxmox/pull/86)
- adding missing networks fields, moving networks to own file, added
network(s) tests by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/88](https://togithub.com/luthermonson/go-proxmox/pull/88)
- adding vm ping test by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/89](https://togithub.com/luthermonson/go-proxmox/pull/89)
- adding acl by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/90](https://togithub.com/luthermonson/go-proxmox/pull/90)
- adding tests for domains by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/91](https://togithub.com/luthermonson/go-proxmox/pull/91)
- adding domain type, renamed timeframe const by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/92](https://togithub.com/luthermonson/go-proxmox/pull/92)

**Full Changelog**:
luthermonson/go-proxmox@v0.0.0-alpha7...v0.0.0-alpha8

###
[`v0.0.0-alpha7`](https://togithub.com/luthermonson/go-proxmox/releases/tag/v0.0.0-alpha7)

[Compare
Source](https://togithub.com/luthermonson/go-proxmox/compare/v0.0.0-alpha6...v0.0.0-alpha7)

#### What's Changed

- Adding Groups by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/82](https://togithub.com/luthermonson/go-proxmox/pull/82)
- Adding users and tokens by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/83](https://togithub.com/luthermonson/go-proxmox/pull/83)
- Refactor pools to drop PoolAPI and add pool resource filters by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/81](https://togithub.com/luthermonson/go-proxmox/pull/81)

**Full Changelog**:
luthermonson/go-proxmox@v0.0.0-alpha6...v0.0.0-alpha7

###
[`v0.0.0-alpha6`](https://togithub.com/luthermonson/go-proxmox/releases/tag/v0.0.0-alpha6)

[Compare
Source](https://togithub.com/luthermonson/go-proxmox/compare/v0.0.0-alpha5...v0.0.0-alpha6)

#### What's Changed

- adding domain endpoints for realm management by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/78](https://togithub.com/luthermonson/go-proxmox/pull/78)
- Fix warnings raised by Goland by
[@&#8203;jqueuniet](https://togithub.com/jqueuniet) in
[https://github.com/luthermonson/go-proxmox/pull/80](https://togithub.com/luthermonson/go-proxmox/pull/80)
- Implement pool API by
[@&#8203;jqueuniet](https://togithub.com/jqueuniet) in
[https://github.com/luthermonson/go-proxmox/pull/79](https://togithub.com/luthermonson/go-proxmox/pull/79)

**Full Changelog**:
luthermonson/go-proxmox@v0.0.0-alpha5...v0.0.0-alpha6

###
[`v0.0.0-alpha5`](https://togithub.com/luthermonson/go-proxmox/releases/tag/v0.0.0-alpha5)

[Compare
Source](https://togithub.com/luthermonson/go-proxmox/compare/v0.0.0-alpha4...v0.0.0-alpha5)

#### What's Changed

- Deprecate Old Access funcs in Favor of Options by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/74](https://togithub.com/luthermonson/go-proxmox/pull/74)
- add lint to ci process, add mage comments by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/72](https://togithub.com/luthermonson/go-proxmox/pull/72)
- Add missing fields to virtual machine config and cluster resource by
[@&#8203;jqueuniet](https://togithub.com/jqueuniet) in
[https://github.com/luthermonson/go-proxmox/pull/73](https://togithub.com/luthermonson/go-proxmox/pull/73)
- add Password by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/75](https://togithub.com/luthermonson/go-proxmox/pull/75)
- rewrite cluster resources to use url and add tests by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/76](https://togithub.com/luthermonson/go-proxmox/pull/76)
- Do not fail if cloudinit iso is not found by
[@&#8203;mcbenjemaa](https://togithub.com/mcbenjemaa) in
[https://github.com/luthermonson/go-proxmox/pull/77](https://togithub.com/luthermonson/go-proxmox/pull/77)

#### New Contributors

- [@&#8203;mcbenjemaa](https://togithub.com/mcbenjemaa) made their first
contribution in
[https://github.com/luthermonson/go-proxmox/pull/77](https://togithub.com/luthermonson/go-proxmox/pull/77)

**Full Changelog**:
luthermonson/go-proxmox@v0.0.0-alpha4...v0.0.0-alpha5

###
[`v0.0.0-alpha4`](https://togithub.com/luthermonson/go-proxmox/releases/tag/v0.0.0-alpha4)

[Compare
Source](https://togithub.com/luthermonson/go-proxmox/compare/v0.0.0-alpha3...v0.0.0-alpha4)

#### What's Changed

- Extend cloud-init ISO builder to include vendor-data and
network-config by [@&#8203;jqueuniet](https://togithub.com/jqueuniet) in
[https://github.com/luthermonson/go-proxmox/pull/51](https://togithub.com/luthermonson/go-proxmox/pull/51)
- basic framework to gock out the entire pve api by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/52](https://togithub.com/luthermonson/go-proxmox/pull/52)
- moving integration tests by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/53](https://togithub.com/luthermonson/go-proxmox/pull/53)
- Better handle the optionality of network-config and vendor-data by
[@&#8203;jqueuniet](https://togithub.com/jqueuniet) in
[https://github.com/luthermonson/go-proxmox/pull/54](https://togithub.com/luthermonson/go-proxmox/pull/54)
- Add missing uptime field in NodeStatus by
[@&#8203;FedericoAntoniazzi](https://togithub.com/FedericoAntoniazzi) in
[https://github.com/luthermonson/go-proxmox/pull/55](https://togithub.com/luthermonson/go-proxmox/pull/55)
- fixes for agent exec by
[@&#8203;boyvinall](https://togithub.com/boyvinall) in
[https://github.com/luthermonson/go-proxmox/pull/57](https://togithub.com/luthermonson/go-proxmox/pull/57)
- make sure we get a number, it not we set 0 by
[@&#8203;earentir](https://togithub.com/earentir) in
[https://github.com/luthermonson/go-proxmox/pull/58](https://togithub.com/luthermonson/go-proxmox/pull/58)
- upgrade to go 1.20 and add gophers slack channel by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/60](https://togithub.com/luthermonson/go-proxmox/pull/60)
- Cleanup by [@&#8203;luthermonson](https://togithub.com/luthermonson)
in
[https://github.com/luthermonson/go-proxmox/pull/62](https://togithub.com/luthermonson/go-proxmox/pull/62)
- removing route abstract and using gock directly by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/63](https://togithub.com/luthermonson/go-proxmox/pull/63)
- move mock config, add /nodes by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/64](https://togithub.com/luthermonson/go-proxmox/pull/64)
- adding a couple cluster tests by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/65](https://togithub.com/luthermonson/go-proxmox/pull/65)
- fix cpulimit type to float32 by
[@&#8203;ricardoalcantara](https://togithub.com/ricardoalcantara) in
[https://github.com/luthermonson/go-proxmox/pull/67](https://togithub.com/luthermonson/go-proxmox/pull/67)
- adding noop error and ignoring task from addtag in cloudinit by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/70](https://togithub.com/luthermonson/go-proxmox/pull/70)
- adding StringOrFloat64 by
[@&#8203;luthermonson](https://togithub.com/luthermonson) in
[https://github.com/luthermonson/go-proxmox/pull/71](https://togithub.com/luthermonson/go-proxmox/pull/71)

#### New Contributors

- [@&#8203;FedericoAntoniazzi](https://togithub.com/FedericoAntoniazzi)
made their first contribution in
[https://github.com/luthermonson/go-proxmox/pull/55](https://togithub.com/luthermonson/go-proxmox/pull/55)
- [@&#8203;boyvinall](https://togithub.com/boyvinall) made their first
contribution in
[https://github.com/luthermonson/go-proxmox/pull/57](https://togithub.com/luthermonson/go-proxmox/pull/57)
- [@&#8203;earentir](https://togithub.com/earentir) made their first
contribution in
[https://github.com/luthermonson/go-proxmox/pull/58](https://togithub.com/luthermonson/go-proxmox/pull/58)
- [@&#8203;ricardoalcantara](https://togithub.com/ricardoalcantara) made
their first contribution in
[https://github.com/luthermonson/go-proxmox/pull/67](https://togithub.com/luthermonson/go-proxmox/pull/67)

**Full Changelog**:
luthermonson/go-proxmox@v0.0.0-alpha3...v0.0.0-alpha4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 11pm every weekday,before 7am
every weekday,every weekend" in timezone Europe/Brussels, Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/kairos-io/provider-kairos).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

3 participants