Proxmox resources are provisioned to deploy services to #116

Open
opened 2025-02-11 16:06:12 +01:00 by kiara · 2 comments
Owner

As a Fediversity user,
I want my deployment to automatically provision VMs,
so that I do not need to perform additional manual steps.

Test:

Given I have a configuration in FediPanel, but no deployment yet, and no resources (machines) provisioned for that deployment,
When I run the deployment,
Then, the necessary VMs are provisioned within specified resource constraints.

implementation notes

needed resources include:

  • MAC addresses
  • IP-addresses
  • Virtual Machine(s)
  • Storage

This process should further prevent conflicting ownership claims over resources, i.e. a given VM cannot be claimed by multiple deployments at once.

ephemeral state to un-hardcode (c.f. #314):

  • hardware/VM info (from the nixos perspective) - to be passed on vm creation, if not using nixos-facter
  • proxmox info (as per #319): make configurable (to host)?
    • instance
    • credentials
    • hardware info - could be covered by say nixos-facter?
    • where to put things
    • resources to allocate
    • target system architecture (x86_64-linux, while our proposal involved open-source hardware e.g. riscv64-linux)
  • authorized SSH keys (users.nix, keys/) (c.f. #199) - move to input?

orchestrator state to un-hardcode (c.f. #515):

**As** a Fediversity user, **I want** my deployment to automatically provision VMs, **so that** I do not need to perform additional manual steps. ### Test: **Given** I have a configuration in FediPanel, but no deployment yet, and no resources (machines) provisioned for that deployment, **When** I run the deployment, **Then**, the necessary VMs are provisioned within specified resource constraints. ### implementation notes needed resources include: - MAC addresses - IP-addresses - Virtual Machine(s) - Storage This process should further prevent conflicting ownership claims over resources, i.e. a given VM cannot be claimed by multiple deployments at once. - c.f. infra variant (#433) - c.f. [`proxmox-provision.sh`](https://git.fediversity.eu/Fediversity/Fediversity/src/commit/5db04d0c50514423959fc246c4a873da7f12019c/infra/proxmox-provision.sh) which imperatively performs similar logic ephemeral state to un-hardcode (c.f. #314): - [ ] hardware/VM info (from the nixos perspective) - to be passed on vm creation, if not using `nixos-facter` - [ ] proxmox info (as per #319): make configurable (to host)? - [ ] instance - [ ] credentials - [ ] hardware info - could be covered by say `nixos-facter`? - [ ] where to put things - [ ] resources to allocate - [ ] target system architecture (`x86_64-linux`, while our proposal involved open-source hardware e.g. `riscv64-linux`) - [ ] authorized SSH keys (`users.nix`, `keys/`) (c.f. #199) - move to input? orchestrator state to un-hardcode (c.f. #515): - [ ] IPs/gateways - e.g. [netbox](https://github.com/netbox-community/netbox) ([open-core](https://netboxlabs.com/pricing/), tho as per several reddit threads with limited competition) - [`services.netbox`](https://search.nixos.org/options?channel=unstable&show=services.netbox.settings&query=netbox) - [nixos wiki](https://wiki.nixos.org/wiki/NetBox) - `POST` request to [`/api/ipam/prefixes/{id}/available-ips/`](https://netbox.protagio.org/api/schema/swagger-ui/#/ipam/ipam_prefixes_available_ips_create) for [protagio prefix `480`](https://netbox.protagio.org/ipam/prefixes/480/) - [TF provider](https://github.com/e-breuninger/terraform-provider-netbox) (not yet in nixpkgs, [IP](https://registry.terraform.io/providers/e-breuninger/netbox/latest/docs/resources/available_ip_address#prefix_id-1)) - [ ] where to deploy (could be expressed as IPs, but is currently expressed by domain `abundos.eu` with some sub-domains) - see IP
kiara added this to the Fediversity project 2025-04-14 11:30:17 +02:00
Author
Owner

given we published test machines' private keys, we will need to redo our infra before we deploy this (for using this story we can). as our existing nixops lacks such integrations, this will need #309.

given we published test machines' private keys, we will need to redo our infra before we deploy this (for using this story we can). as our existing nixops lacks such integrations, this will need #309.
kiara self-assigned this 2025-04-22 21:45:49 +02:00
Author
Owner

TF's most mature proxmox provider offers both resources:

going by the similar examples these are looking fairly interchangeable. procolix seems more experienced with VMs, which seems like one potential data point in hosts' preferences.

TF's [most mature proxmox provider](https://registry.terraform.io/providers/bpg/proxmox/latest/docs#example-usage) offers both resources: - [vm](https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_vm) - [container](https://registry.terraform.io/providers/bpg/proxmox/latest/docs/resources/virtual_environment_container) going by the similar examples these are looking fairly interchangeable. procolix seems more experienced with VMs, which seems like one potential data point in hosts' preferences.
kiara removed this from the Fediversity project 2025-06-10 19:06:40 +02:00
kiara added this to the Fediversity project 2025-08-02 16:40:55 +02:00
kiara referenced this issue from a commit 2025-10-25 21:53:36 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: fediversity/fediversity#116
No description provided.