CluPilotCloud/config/provisioning.php

52 lines
2.0 KiB
PHP

<?php
use App\Provisioning\Steps\Host;
use Illuminate\Support\Str;
$wgSubnet = env('CLUPILOT_WG_SUBNET', '10.66.0.0/24');
return [
/*
| Ordered step classes per pipeline. ::class is textual — listing steps that
| are built incrementally does not autoload them until the pipeline runs.
*/
'pipelines' => [
'host' => [
Host\ValidateHostInput::class,
Host\EstablishSshTrust::class,
Host\PrepareBaseSystem::class,
Host\ConfigureWireguard::class,
Host\InstallProxmoxVe::class,
Host\RebootIntoPveKernel::class,
Host\ConfigureProxmox::class,
Host\CreateAutomationToken::class,
Host\VerifyProxmoxApi::class,
Host\RegisterCapacity::class,
Host\CompleteHostOnboarding::class,
],
],
// CluPilot VM acts as the WireGuard hub; hosts join it during onboarding.
'wireguard' => [
'subnet' => $wgSubnet,
'hub_ip' => env('CLUPILOT_WG_HUB_IP', Str::beforeLast($wgSubnet, '.').'.1'), // handshake target
'endpoint' => env('CLUPILOT_WG_ENDPOINT', ''), // host:port reachable by peers
'hub_public_key' => env('CLUPILOT_WG_HUB_PUBKEY', ''),
'config_path' => env('CLUPILOT_WG_CONFIG_PATH', '/etc/wireguard/wg0.conf'),
],
// SSH identity CluPilot deploys to each host after first password login.
'ssh' => [
'public_key' => env('CLUPILOT_SSH_PUBLIC_KEY', ''),
'private_key' => env('CLUPILOT_SSH_PRIVATE_KEY', ''),
],
// Proxmox automation role/user created on each host.
'proxmox' => [
'role_id' => 'CluPilotAutomation',
'role_privs' => 'VM.Allocate,VM.Clone,VM.Config.Disk,VM.Config.CPU,VM.Config.Memory,VM.Config.Network,VM.Config.Options,VM.Config.Cloudinit,VM.PowerMgmt,VM.Monitor,VM.Audit,VM.GuestAgent.Audit,VM.GuestAgent.Unrestricted,Datastore.AllocateSpace,Datastore.Audit,Sys.Audit',
'user' => 'automation@pve',
'token_name' => 'clupilot',
],
];